Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions nebius/compute/v1/disk_snapshot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ option java_package = "ai.nebius.pub.compute.v1";

// DiskSnapshot resource
message DiskSnapshot {
common.v1.ResourceMetadata metadata = 1;
common.v1.ResourceMetadata metadata = 1 [(nid) = {
parent_resource: [
"tenant",
"project"
]
}];

DiskSnapshotSpec spec = 2;

Expand All @@ -24,7 +29,10 @@ message DiskSnapshotSpec {
// Identifier of the source disk. May become stale if the disk is deleted.
string source_disk_id = 1 [
(buf.validate.field).required = true,
(field_behavior) = IMMUTABLE
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["computedisk"]
}
];

// Arbitrary information about this snapshot provided by user.
Expand Down Expand Up @@ -62,7 +70,9 @@ message DiskSnapshotStatus {
message LockState {
// The snapshot is locked for deletion while disk is being created from this snapshot.
// Here is the list of these disks.
repeated string disks = 1;
repeated string disks = 1 [(nid) = {
resource: ["computedisk"]
}];
}

// Indicates which resources prevent the disk snapshot from being deleted.
Expand Down
30 changes: 25 additions & 5 deletions nebius/compute/v1/disk_snapshot_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,19 @@ service DiskSnapshotService {
}

message GetDiskSnapshotRequest {
string id = 1;
string id = 1 [(nid) = {
resource: ["computedisksnapshot"]
}];
}

message ListDiskSnapshotsRequest {
string parent_id = 1;
// Identifier of the parent resource
string parent_id = 1 [(nid) = {
resource: [
"tenant",
"project"
]
}];

int64 page_size = 2;

Expand Down Expand Up @@ -74,17 +82,29 @@ message ListDiskSnapshotsByDiskResponse {
}

message CreateDiskSnapshotRequest {
common.v1.ResourceMetadata metadata = 1;
common.v1.ResourceMetadata metadata = 1 [(nid) = {
parent_resource: [
"tenant",
"project"
]
}];

DiskSnapshotSpec spec = 2;
}

message UpdateDiskSnapshotRequest {
common.v1.ResourceMetadata metadata = 1;
common.v1.ResourceMetadata metadata = 1 [(nid) = {
parent_resource: [
"tenant",
"project"
]
}];

DiskSnapshotSpec spec = 2;
}

message DeleteDiskSnapshotRequest {
string id = 1;
string id = 1 [(nid) = {
resource: ["computedisksnapshot"]
}];
}
15 changes: 13 additions & 2 deletions nebius/compute/v1/image.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,22 @@ message ImageSpec {
option (buf.validate.oneof).required = true;

// ID of the disk to create the image from
string source_disk_id = 4 [(field_behavior) = IMMUTABLE];
string source_disk_id = 4 [
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["computedisk"]
}
];

SourceStorage source_storage = 11 [(field_behavior) = IMMUTABLE];

string source_disk_snapshot_id = 12 [(field_behavior) = IMMUTABLE];
// Identifier of the disk snapshot to create the image from.
string source_disk_snapshot_id = 12 [
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["computedisksnapshot"]
}
];
}

// CPU architecture supported by the image
Expand Down
3 changes: 3 additions & 0 deletions nebius/registry/v1/registry_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ service RegistryService {

rpc Get(GetRegistryRequest) returns (Registry);

// Gets the Registry resource by its parent IAM container `parent_id` and `name`
rpc GetByName(common.v1.GetByNameRequest) returns (Registry);

rpc List(ListRegistriesRequest) returns (ListRegistriesResponse);

rpc Create(CreateRegistryRequest) returns (common.v1.Operation);
Expand Down
7 changes: 6 additions & 1 deletion nebius/storage/v1/bucket.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ option java_package = "ai.nebius.pub.storage.v1";
message Bucket {
option (resource_behavior) = IMMUTABLE_NAME;

common.v1.ResourceMetadata metadata = 1 [(buf.validate.field).required = true];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field).required = true,
(nid) = {
parent_resource: ["project"]
}
];

BucketSpec spec = 2 [(buf.validate.field).required = true];

Expand Down
32 changes: 27 additions & 5 deletions nebius/storage/v1/bucket_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,44 @@ message GetBucketRequest {
}

message GetBucketByNameRequest {
string parent_id = 1;
string parent_id = 1 [(nid) = {
resource: ["project"]
}];

string name = 2 [(buf.validate.field).required = true];

reserved 3;
}

message CreateBucketRequest {
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field).required = true];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field).required = true,
(nid) = {
parent_resource: ["project"]
}
];

BucketSpec spec = 2 [(field_behavior) = NON_EMPTY_DEFAULT];
}

message UpdateBucketRequest {
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field).required = true];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field).required = true,
(nid) = {
parent_resource: ["project"]
}
];

BucketSpec spec = 2;
}

message DeleteBucketRequest {
string id = 1 [(buf.validate.field).required = true];
string id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["storagebucket"]
}
];

reserved 2;

Expand Down Expand Up @@ -106,7 +123,12 @@ message UndeleteBucketRequest {

message ListBucketsRequest {
// Represents the container ID.
string parent_id = 1 [(buf.validate.field).required = true];
string parent_id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["project"]
}
];

// Specifies the maximum number of items to return in the response.
int64 page_size = 2;
Expand Down