From bcbd306fbdba01327189341df6b3eeabeb2f5cbf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Mar 2026 10:13:19 +0000 Subject: [PATCH] Publish proto files from 7d55278b9 --- endpoints.md | 3 + .../v1alpha1/billing_report_exporter.proto | 17 +++ nebius/billing/v1alpha1/one_time_export.proto | 93 ++++++++++++++++ .../v1alpha1/one_time_export_service.proto | 78 ++++++++++++++ nebius/mk8s/v1/node_group.proto | 7 +- nebius/mk8s/v1alpha1/node_group.proto | 7 +- nebius/storage/v1alpha1/transfer.proto | 7 ++ nebius/vpc/v1/allocation.proto | 48 +++++++-- nebius/vpc/v1/allocation_service.proto | 76 +++++++++---- nebius/vpc/v1/network.proto | 15 ++- nebius/vpc/v1/network_service.proto | 101 ++++++++++++------ nebius/vpc/v1/pool.proto | 23 +++- nebius/vpc/v1/pool_service.proto | 76 +++++++++---- nebius/vpc/v1/route.proto | 11 +- nebius/vpc/v1/route_service.proto | 76 +++++++++---- nebius/vpc/v1/route_table.proto | 13 ++- nebius/vpc/v1/route_table_service.proto | 76 +++++++++---- nebius/vpc/v1/security_group.proto | 9 +- nebius/vpc/v1/security_group_service.proto | 76 +++++++++---- nebius/vpc/v1/security_rule.proto | 16 ++- nebius/vpc/v1/security_rule_service.proto | 76 +++++++++---- nebius/vpc/v1/subnet.proto | 19 +++- nebius/vpc/v1/subnet_service.proto | 73 +++++++++---- nebius/vpc/v1/target_group.proto | 19 +++- nebius/vpc/v1/target_group_service.proto | 30 ++++-- nebius/vpc/v1alpha1/allocation.proto | 37 +++++-- nebius/vpc/v1alpha1/allocation_service.proto | 76 +++++++++---- nebius/vpc/v1alpha1/network.proto | 16 ++- nebius/vpc/v1alpha1/network_interface.proto | 28 +++-- nebius/vpc/v1alpha1/network_service.proto | 21 +++- nebius/vpc/v1alpha1/pool.proto | 22 +++- nebius/vpc/v1alpha1/pool_service.proto | 21 +++- nebius/vpc/v1alpha1/scope.proto | 5 +- nebius/vpc/v1alpha1/scope_service.proto | 21 +++- nebius/vpc/v1alpha1/subnet.proto | 16 ++- nebius/vpc/v1alpha1/subnet_service.proto | 28 ++++- 36 files changed, 1034 insertions(+), 302 deletions(-) create mode 100644 nebius/billing/v1alpha1/billing_report_exporter.proto create mode 100644 nebius/billing/v1alpha1/one_time_export.proto create mode 100644 nebius/billing/v1alpha1/one_time_export_service.proto diff --git a/endpoints.md b/endpoints.md index 83b4c45..f12c733 100755 --- a/endpoints.md +++ b/endpoints.md @@ -1,5 +1,8 @@ ## Services and their endpoints +* api.billing-report-exporter.billing-data-plane.api.nebius.cloud:443 + * [nebius.billing.v1alpha1.OneTimeExportService](nebius/billing/v1alpha1/one_time_export_service.proto) + * [nebius.common.v1.OperationService](nebius/common/v1/operation_service.proto) * api.calculator.billing-data-plane.api.nebius.cloud:443 * [nebius.billing.v1alpha1.CalculatorService](nebius/billing/v1alpha1/calculator_service.proto) * apps.msp.api.nebius.cloud:443 diff --git a/nebius/billing/v1alpha1/billing_report_exporter.proto b/nebius/billing/v1alpha1/billing_report_exporter.proto new file mode 100644 index 0000000..40f4867 --- /dev/null +++ b/nebius/billing/v1alpha1/billing_report_exporter.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package nebius.billing.v1alpha1; + +option go_package = "github.com/nebius/gosdk/proto/nebius/billing/v1alpha1"; +option java_multiple_files = true; +option java_outer_classname = "BillingReportExporterProto"; +option java_package = "ai.nebius.pub.billing.v1alpha1"; + +// Supported export formats for billing reports. +enum ExportFormat { + EXPORT_FORMAT_UNSPECIFIED = 0; + + // FOCUS (FinOps Open Cost and Usage Specification) v1.2 CSV format. + // See: https://focus.finops.org/focus-specification/v1-2/ + EXPORT_FORMAT_FOCUS_1_2_CSV = 1; +} diff --git a/nebius/billing/v1alpha1/one_time_export.proto b/nebius/billing/v1alpha1/one_time_export.proto new file mode 100644 index 0000000..568b92b --- /dev/null +++ b/nebius/billing/v1alpha1/one_time_export.proto @@ -0,0 +1,93 @@ +syntax = "proto3"; + +package nebius.billing.v1alpha1; + +import "buf/validate/validate.proto"; +import "google/protobuf/timestamp.proto"; +import "nebius/annotations.proto"; +import "nebius/billing/v1alpha1/billing_report_exporter.proto"; +import "nebius/common/v1/error.proto"; +import "nebius/common/v1/metadata.proto"; + +option go_package = "github.com/nebius/gosdk/proto/nebius/billing/v1alpha1"; +option java_multiple_files = true; +option java_outer_classname = "OneTimeExportProto"; +option java_package = "ai.nebius.pub.billing.v1alpha1"; + +// One-time export of billing reports as a downloadable archive. +// Creates a .tar.gz archive of FOCUS billing data for the requested period +// and provides a presigned download URL. +message OneTimeExport { + option (resource_behavior) = UNNAMED; + + // Parent is Contract ID. + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field).required = true, + (nid) = { + parent_resource: ["contract"] + } + ]; + + // Export configuration specification. + OneTimeExportSpec spec = 2 [(buf.validate.field).required = true]; + + // Current status of the one-time export. + OneTimeExportStatus status = 3 [(field_behavior) = OUTPUT_ONLY]; +} + +// Specification for one-time billing report export. +message OneTimeExportSpec { + // Format of the exported billing reports. + ExportFormat format = 1 [(buf.validate.field).required = true]; + + // The first billing period to include in the export (inclusive). + // Example: "2025-04". + string start_period = 2 [(buf.validate.field).required = true]; + + // The last billing period to include in the export (inclusive). + // Example: "2025-06". + string end_period = 3 [(buf.validate.field).required = true]; +} + +// Status information for one-time export. +message OneTimeExportStatus { + // Current state of the export. + OneTimeExportState state = 1; + + // Presigned download URL for the archive. + // Populated only when state is DONE. Each Get request generates a fresh URL. + string download_url = 2 [(sensitive) = true]; + + // Timestamp when this export expires. + google.protobuf.Timestamp expires_at = 3; + + // Additional details about the current state. + OneTimeExportStateDetails state_details = 4; +} + +// Additional details about the current state of the export. +message OneTimeExportStateDetails { + // Error encountered during export. + // Populated only when state is FAILED. + common.v1.ServiceError error = 1; +} + +// Lifecycle states for one-time export. +enum OneTimeExportState { + ONE_TIME_EXPORT_STATE_UNSPECIFIED = 0; + + // Export has been created and is scheduled for processing. + ONE_TIME_EXPORT_STATE_SCHEDULED = 1; + + // Export is in progress. + ONE_TIME_EXPORT_STATE_RUNNING = 2; + + // Export completed successfully. Download URL is available. + ONE_TIME_EXPORT_STATE_SUCCESS = 3; + + // Export failed. See error field for details. + ONE_TIME_EXPORT_STATE_FAILED = 4; + + // Export has been archived and the archive is no longer available for download. + ONE_TIME_EXPORT_STATE_ARCHIVED = 5; +} diff --git a/nebius/billing/v1alpha1/one_time_export_service.proto b/nebius/billing/v1alpha1/one_time_export_service.proto new file mode 100644 index 0000000..591a498 --- /dev/null +++ b/nebius/billing/v1alpha1/one_time_export_service.proto @@ -0,0 +1,78 @@ +syntax = "proto3"; + +package nebius.billing.v1alpha1; + +import "buf/validate/validate.proto"; +import "nebius/annotations.proto"; +import "nebius/billing/v1alpha1/one_time_export.proto"; +import "nebius/common/v1/metadata.proto"; +import "nebius/common/v1/operation.proto"; + +option go_package = "github.com/nebius/gosdk/proto/nebius/billing/v1alpha1"; +option java_multiple_files = true; +option java_outer_classname = "OneTimeExportServiceProto"; +option java_package = "ai.nebius.pub.billing.v1alpha1"; + +// Service for managing one-time billing report exports. +// Enables creation of downloadable archives of billing data for a specified period. +service OneTimeExportService { + option (api_service_name) = "api.billing-report-exporter.billing-data-plane"; + + // Creates a new one-time export of billing reports for the requested period. + rpc Create(CreateOneTimeExportRequest) returns (common.v1.Operation); + + // Retrieves details of a specific one-time export. + // When the export is complete, the response includes a fresh presigned download URL. + rpc Get(GetOneTimeExportRequest) returns (OneTimeExport); + + // Lists one-time exports for a given contract. + rpc List(ListOneTimeExportsRequest) returns (ListOneTimeExportsResponse); +} + +message CreateOneTimeExportRequest { + // Resource metadata including parent contract ID. + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field).required = true, + (nid) = { + parent_resource: ["contract"] + } + ]; + + // Export configuration specification. + OneTimeExportSpec spec = 2 [(buf.validate.field).required = true]; +} + +message GetOneTimeExportRequest { + // Unique identifier of the one-time export. + string id = 1 [ + (buf.validate.field).required = true, + (field_behavior) = IDENTIFIER, + (nid) = { + resource: ["billingonetimeexport"] + } + ]; +} + +message ListOneTimeExportsRequest { + // Parent contract ID for which to list one-time exports. + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["contract"] + } + ]; + + // Maximum number of items to return per page. + int64 page_size = 2; + + // Token for retrieving the next page of results. + string page_token = 3; +} + +message ListOneTimeExportsResponse { + // List of one-time exports for the specified contract. + repeated OneTimeExport items = 1; + + // Token for retrieving the next page of results. Empty if no more pages. + string next_page_token = 2; +} diff --git a/nebius/mk8s/v1/node_group.proto b/nebius/mk8s/v1/node_group.proto index 26b304b..4d7f821 100644 --- a/nebius/mk8s/v1/node_group.proto +++ b/nebius/mk8s/v1/node_group.proto @@ -112,7 +112,12 @@ message NodeTemplate { // Nebius Compute GPUCluster ID that will be attached to node. GpuClusterSpec gpu_cluster = 4; - repeated NetworkInterfaceTemplate network_interfaces = 5 [(field_behavior) = NON_EMPTY_DEFAULT]; + repeated NetworkInterfaceTemplate network_interfaces = 5 [ + (field_behavior) = NON_EMPTY_DEFAULT, + (buf.validate.field) = { + repeated: {max_items: 1} + } + ]; // Static attachments of Compute Filesystem. // Can be used as a workaround, until CSI for Compute Disk and Filesystem will be available. diff --git a/nebius/mk8s/v1alpha1/node_group.proto b/nebius/mk8s/v1alpha1/node_group.proto index e157289..df85ee1 100644 --- a/nebius/mk8s/v1alpha1/node_group.proto +++ b/nebius/mk8s/v1alpha1/node_group.proto @@ -93,7 +93,12 @@ message NodeTemplate { GpuClusterSpec gpu_cluster = 4; - repeated NetworkInterfaceTemplate network_interfaces = 5 [(field_behavior) = NON_EMPTY_DEFAULT]; + repeated NetworkInterfaceTemplate network_interfaces = 5 [ + (field_behavior) = NON_EMPTY_DEFAULT, + (buf.validate.field) = { + repeated: {max_items: 1} + } + ]; repeated AttachedFilesystemSpec filesystems = 7; diff --git a/nebius/storage/v1alpha1/transfer.proto b/nebius/storage/v1alpha1/transfer.proto index 138d213..2a1de2f 100644 --- a/nebius/storage/v1alpha1/transfer.proto +++ b/nebius/storage/v1alpha1/transfer.proto @@ -82,6 +82,13 @@ message TransferSpec { // Credentials for accessing the destination bucket. These credentials must have head and write permissions. // This parameter must be specified only during create operations. BucketCredentials credentials = 2 [(field_behavior) = INPUT_ONLY]; + + // The endpoint must be in the form of a URL, starting with the protocol (https), + // followed by the endpoint address without a trailing slash. + // Example: https://storage.us-central1.nebius.cloud + string endpoint = 10 [(field_behavior) = IMMUTABLE]; + + string region = 11 [(field_behavior) = IMMUTABLE]; } message BucketCredentials { diff --git a/nebius/vpc/v1/allocation.proto b/nebius/vpc/v1/allocation.proto index 6b6ae48..3e1bdfc 100644 --- a/nebius/vpc/v1/allocation.proto +++ b/nebius/vpc/v1/allocation.proto @@ -15,7 +15,9 @@ option java_package = "ai.nebius.pub.vpc.v1"; message Allocation { // Metadata for the Allocation. // `metadata.parent_id` represents IAM Container. - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specifications for the allocation, detailing its name and IP configuration. AllocationSpec spec = 2; @@ -65,10 +67,20 @@ message IPv4PrivateAllocationSpec { // with this subnet. // In order to assign an allocation to a resource (i.e. network interface) // both must be associated with the same subnet. - string subnet_id = 2 [(field_behavior) = IMMUTABLE]; + string subnet_id = 2 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcsubnet"] + } + ]; // ID of the pool that allocation will receive its IP address from. - string pool_id = 3 [(field_behavior) = IMMUTABLE]; + string pool_id = 3 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcpool"] + } + ]; } } @@ -101,10 +113,20 @@ message IPv4PublicAllocationSpec { // this subnet. // Assigning an allocation to a resource (i.e. network interface) requires // both to be associated with the same subnet. - string subnet_id = 2 [(field_behavior) = IMMUTABLE]; + string subnet_id = 2 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcsubnet"] + } + ]; // ID of the pool that allocation will receive its IP address from. - string pool_id = 3 [(field_behavior) = IMMUTABLE]; + string pool_id = 3 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcpool"] + } + ]; } } @@ -142,7 +164,9 @@ message AllocationDetails { string allocated_cidr = 1; // ID of the pool from which this allocation was made. - string pool_id = 2; + string pool_id = 2 [(nid) = { + resource: ["vpcpool"] + }]; // The IP version of this allocation (IPv4 or IPv6). IpVersion version = 4; @@ -150,7 +174,9 @@ message AllocationDetails { // ID of the subnet associated with this allocation. // Populated when created with explicit subnet_id, from a subnet-specific pool, // or when assigned to a resource. - string subnet_id = 5; + string subnet_id = 5 [(nid) = { + resource: ["vpcsubnet"] + }]; } message Assignment { @@ -165,7 +191,9 @@ message Assignment { message NetworkInterfaceAssignment { // ID of the Compute instance network interface belongs to. - string instance_id = 1; + string instance_id = 1 [(nid) = { + resource: ["computeinstance"] + }]; // Network interface name string name = 2; @@ -173,5 +201,7 @@ message NetworkInterfaceAssignment { message LoadBalancerAssignment { // ID of the Load Balancer. - string id = 1; + string id = 1 [(nid) = { + resource: ["vpcloadbalancer"] + }]; } diff --git a/nebius/vpc/v1/allocation_service.proto b/nebius/vpc/v1/allocation_service.proto index c533e22..7c78b98 100644 --- a/nebius/vpc/v1/allocation_service.proto +++ b/nebius/vpc/v1/allocation_service.proto @@ -34,19 +34,34 @@ service AllocationService { } message GetAllocationRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcallocation"] + } + ]; } message GetAllocationByNameRequest { // ID of the project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListAllocationsRequest { // ID of the project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; @@ -86,34 +101,49 @@ message ListAllocationsResponse { } message CreateAllocationRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["project"] + } + ]; AllocationSpec spec = 2 [(buf.validate.field).required = true]; } message UpdateAllocationRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["project"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; AllocationSpec spec = 2; } message DeleteAllocationRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcallocation"] + } + ]; } diff --git a/nebius/vpc/v1/network.proto b/nebius/vpc/v1/network.proto index a68c740..fbbce3b 100644 --- a/nebius/vpc/v1/network.proto +++ b/nebius/vpc/v1/network.proto @@ -17,7 +17,9 @@ option java_package = "ai.nebius.pub.vpc.v1"; message Network { // Metadata for the network resource. // `metadata.parent_id` represents IAM container - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the network. NetworkSpec spec = 2; @@ -48,7 +50,12 @@ message IPv4PublicNetworkPools { message NetworkPool { // ID of the pool. - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcpool"] + } + ]; } message NetworkStatus { @@ -67,5 +74,7 @@ message NetworkStatus { State state = 1; // ID of the network's default route table. - string default_route_table_id = 5; + string default_route_table_id = 5 [(nid) = { + resource: ["vpcroutetable"] + }]; } diff --git a/nebius/vpc/v1/network_service.proto b/nebius/vpc/v1/network_service.proto index b6dc96f..3fd4f65 100644 --- a/nebius/vpc/v1/network_service.proto +++ b/nebius/vpc/v1/network_service.proto @@ -32,19 +32,34 @@ service NetworkService { } message GetNetworkRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcnetwork"] + } + ]; } message GetNetworkByNameRequest { // ID of the project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListNetworksRequest { // ID of the project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; @@ -58,47 +73,67 @@ message ListNetworksResponse { } message CreateNetworkRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["project"] + } + ]; NetworkSpec spec = 2; } message CreateDefaultNetworkRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["project"] + } + ]; } message UpdateNetworkRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["project"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; NetworkSpec spec = 2; } message DeleteNetworkRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcnetwork"] + } + ]; } diff --git a/nebius/vpc/v1/pool.proto b/nebius/vpc/v1/pool.proto index 283a2e6..5df3ec4 100644 --- a/nebius/vpc/v1/pool.proto +++ b/nebius/vpc/v1/pool.proto @@ -14,7 +14,9 @@ option java_package = "ai.nebius.pub.vpc.v1"; message Pool { // Metadata associated with the Pool. // `metadata.parent_id` represents the Project. - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the Pool. PoolSpec spec = 2; @@ -26,7 +28,12 @@ message Pool { message PoolSpec { // ID of the source pool. // CIDR blocks of a pool must be within the range defined by its source pool. - string source_pool_id = 1 [(field_behavior) = IMMUTABLE]; + string source_pool_id = 1 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcpool"] + } + ]; // IP version of the pool. IpVersion version = 3 [ @@ -111,7 +118,9 @@ message PoolStatus { repeated string cidrs = 2; // Scope is the unique identifier for single pool tree. - string scope_id = 3; + string scope_id = 3 [(nid) = { + resource: ["vpcscope"] + }]; // Assignment details for this Pool PoolAssignment assignment = 4; @@ -135,8 +144,12 @@ enum IpVisibility { message PoolAssignment { // IDs of Networks to which the Pool is assigned. - repeated string networks = 1; + repeated string networks = 1 [(nid) = { + resource: ["vpcnetwork"] + }]; // IDs of Subnets to which the Pool is assigned. - repeated string subnets = 2; + repeated string subnets = 2 [(nid) = { + resource: ["vpcsubnet"] + }]; } diff --git a/nebius/vpc/v1/pool_service.proto b/nebius/vpc/v1/pool_service.proto index 1bbed80..4720d9f 100644 --- a/nebius/vpc/v1/pool_service.proto +++ b/nebius/vpc/v1/pool_service.proto @@ -32,19 +32,34 @@ service PoolService { } message GetPoolRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcpool"] + } + ]; } message GetPoolByNameRequest { // ID of the project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListPoolsRequest { // ID of the project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; @@ -71,34 +86,49 @@ message ListPoolsResponse { } message CreatePoolRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["project"] + } + ]; PoolSpec spec = 2 [(buf.validate.field).required = true]; } message UpdatePoolRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["project"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; PoolSpec spec = 2; } message DeletePoolRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcpool"] + } + ]; } diff --git a/nebius/vpc/v1/route.proto b/nebius/vpc/v1/route.proto index 9205400..1185eb4 100644 --- a/nebius/vpc/v1/route.proto +++ b/nebius/vpc/v1/route.proto @@ -15,7 +15,9 @@ option java_package = "ai.nebius.pub.vpc.v1"; // specifying the path that traffic should take based on destination addresses. message Route { // `metadata.parent_id` represents the RouteTable. - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["vpcroutetable"] + }]; // Specification of the route's configuration. RouteSpec spec = 2; @@ -85,7 +87,12 @@ message NextHop { // AllocationNextHop specifies an IP allocation as the next hop. message AllocationNextHop { // ID of the IP allocation to use as the next hop. - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcallocation"] + } + ]; } message RouteStatus { diff --git a/nebius/vpc/v1/route_service.proto b/nebius/vpc/v1/route_service.proto index f2b3afc..190fb9e 100644 --- a/nebius/vpc/v1/route_service.proto +++ b/nebius/vpc/v1/route_service.proto @@ -30,19 +30,34 @@ service RouteService { } message GetRouteRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcroute"] + } + ]; } message GetRouteByNameRequest { // ID of the RouteTable. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcroutetable"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListRoutesRequest { // ID of the RouteTable. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcroutetable"] + } + ]; int64 page_size = 2; @@ -56,34 +71,49 @@ message ListRoutesResponse { } message CreateRouteRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["vpcroutetable"] + } + ]; RouteSpec spec = 2 [(buf.validate.field).required = true]; } message UpdateRouteRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["vpcroutetable"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; RouteSpec spec = 2; } message DeleteRouteRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcroute"] + } + ]; } diff --git a/nebius/vpc/v1/route_table.proto b/nebius/vpc/v1/route_table.proto index 9154907..5c27c52 100644 --- a/nebius/vpc/v1/route_table.proto +++ b/nebius/vpc/v1/route_table.proto @@ -16,7 +16,9 @@ option java_package = "ai.nebius.pub.vpc.v1"; // and contains rules for routing traffic to different destinations. message RouteTable { // `metadata.parent_id` represents the Project. - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the route table's configuration. RouteTableSpec spec = 2; @@ -29,7 +31,10 @@ message RouteTableSpec { // ID of the VPC network this route table belongs to. string network_id = 1 [ (buf.validate.field).required = true, - (field_behavior) = IMMUTABLE + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcnetwork"] + } ]; } @@ -56,5 +61,7 @@ message RouteTableStatus { message RouteTableAssignment { // List of subnet IDs that use this route table for their routing configuration. - repeated string subnets = 1; + repeated string subnets = 1 [(nid) = { + resource: ["vpcsubnet"] + }]; } diff --git a/nebius/vpc/v1/route_table_service.proto b/nebius/vpc/v1/route_table_service.proto index 7d3fc1d..5b17702 100644 --- a/nebius/vpc/v1/route_table_service.proto +++ b/nebius/vpc/v1/route_table_service.proto @@ -32,19 +32,34 @@ service RouteTableService { } message GetRouteTableRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcroutetable"] + } + ]; } message GetRouteTableByNameRequest { // ID of the Project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListRouteTablesRequest { // ID of the Project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; @@ -71,34 +86,49 @@ message ListRouteTablesResponse { } message CreateRouteTableRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["project"] + } + ]; RouteTableSpec spec = 2 [(buf.validate.field).required = true]; } message UpdateRouteTableRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["project"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; RouteTableSpec spec = 2; } message DeleteRouteTableRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcroutetable"] + } + ]; } diff --git a/nebius/vpc/v1/security_group.proto b/nebius/vpc/v1/security_group.proto index 6afebf4..90bca85 100644 --- a/nebius/vpc/v1/security_group.proto +++ b/nebius/vpc/v1/security_group.proto @@ -16,7 +16,9 @@ option java_package = "ai.nebius.pub.vpc.v1"; // Security group applies implicit deny at the end (traffic not matched by any rule will be denied). message SecurityGroup { // `metadata.parent_id` represents the Project. - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the security group's configuration. SecurityGroupSpec spec = 2; @@ -29,7 +31,10 @@ message SecurityGroupSpec { // ID of the VPC network this security group belongs to. string network_id = 1 [ (buf.validate.field).required = true, - (field_behavior) = IMMUTABLE + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcnetwork"] + } ]; } diff --git a/nebius/vpc/v1/security_group_service.proto b/nebius/vpc/v1/security_group_service.proto index aa0b620..1742201 100644 --- a/nebius/vpc/v1/security_group_service.proto +++ b/nebius/vpc/v1/security_group_service.proto @@ -34,19 +34,34 @@ service SecurityGroupService { } message GetSecurityGroupRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcsecuritygroup"] + } + ]; } message GetSecurityGroupByNameRequest { // ID of the Project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListSecurityGroupsRequest { // ID of the Project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; @@ -74,34 +89,49 @@ message ListSecurityGroupsResponse { } message CreateSecurityGroupRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["project"] + } + ]; SecurityGroupSpec spec = 2 [(buf.validate.field).required = true]; } message UpdateSecurityGroupRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["project"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; SecurityGroupSpec spec = 2; } message DeleteSecurityGroupRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcsecuritygroup"] + } + ]; } diff --git a/nebius/vpc/v1/security_rule.proto b/nebius/vpc/v1/security_rule.proto index f053e22..b4fdb14 100644 --- a/nebius/vpc/v1/security_rule.proto +++ b/nebius/vpc/v1/security_rule.proto @@ -16,7 +16,9 @@ option java_package = "ai.nebius.pub.vpc.v1"; // match source, and ports. message SecurityRule { // `metadata.parent_id` represents the SecurityGroup. - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["vpcsecuritygroup"] + }]; // Specification of the security rule's configuration. // Defines the parameters and constraints for rules that control network traffic. @@ -80,7 +82,9 @@ message SecurityRuleSpec { // Defines match for incoming traffic. message RuleIngress { // ID of the referenced Security Group as the source. - string source_security_group_id = 1; + string source_security_group_id = 1 [(nid) = { + resource: ["vpcsecuritygroup"] + }]; // CIDR blocks as the source. // Optional. Empty list means any address. @@ -121,7 +125,9 @@ message RuleIngress { // Defines match for outgoing traffic. message RuleEgress { // ID of the referenced Security Group as the destination. - string destination_security_group_id = 1; + string destination_security_group_id = 1 [(nid) = { + resource: ["vpcsecuritygroup"] + }]; // CIDR blocks as the destination. // Optional. Empty list means any address. @@ -230,7 +236,9 @@ message SecurityRuleStatus { message RuleMatchStatus { // ID of the Security Group. - string security_group_id = 1; + string security_group_id = 1 [(nid) = { + resource: ["vpcsecuritygroup"] + }]; // List of CIDR blocks. repeated string cidrs = 2; diff --git a/nebius/vpc/v1/security_rule_service.proto b/nebius/vpc/v1/security_rule_service.proto index 8f115d1..4486548 100644 --- a/nebius/vpc/v1/security_rule_service.proto +++ b/nebius/vpc/v1/security_rule_service.proto @@ -31,19 +31,34 @@ service SecurityRuleService { } message GetSecurityRuleRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcsecurityrule"] + } + ]; } message GetSecurityRuleByNameRequest { // ID of the Security Group. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcsecuritygroup"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListSecurityRulesRequest { // ID of the Security Group. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcsecuritygroup"] + } + ]; int64 page_size = 2; @@ -57,34 +72,49 @@ message ListSecurityRulesResponse { } message CreateSecurityRuleRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["vpcsecuritygroup"] + } + ]; SecurityRuleSpec spec = 2 [(buf.validate.field).required = true]; } message UpdateSecurityRuleRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["vpcsecuritygroup"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; SecurityRuleSpec spec = 2; } message DeleteSecurityRuleRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcsecurityrule"] + } + ]; } diff --git a/nebius/vpc/v1/subnet.proto b/nebius/vpc/v1/subnet.proto index 99a0b3a..0bec544 100644 --- a/nebius/vpc/v1/subnet.proto +++ b/nebius/vpc/v1/subnet.proto @@ -17,7 +17,9 @@ option java_package = "ai.nebius.pub.vpc.v1"; message Subnet { // Metadata for the subnet resource. // `metadata.parent_id` represents IAM container - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the subnet. SubnetSpec spec = 2; @@ -28,7 +30,12 @@ message Subnet { message SubnetSpec { // ID of the network this subnet belongs to. - string network_id = 1 [(buf.validate.field).required = true]; + string network_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcnetwork"] + } + ]; // Private IPv4 address pools for this subnet. // If unspecified, pools from the associated network are used. @@ -40,7 +47,9 @@ message SubnetSpec { // ID of the route table to associate with the subnet. // If unspecified, the network's default route table is used. - string route_table_id = 5; + string route_table_id = 5 [(nid) = { + resource: ["vpcroutetable"] + }]; } message IPv4PrivateSubnetPools { @@ -132,7 +141,9 @@ message SubnetStatus { message SubnetAssociatedRouteTable { // ID of the route table. - string id = 1; + string id = 1 [(nid) = { + resource: ["vpcroutetable"] + }]; // Indicates whether this is the network's default route table. // If true, this is the default route table inherited from the network. diff --git a/nebius/vpc/v1/subnet_service.proto b/nebius/vpc/v1/subnet_service.proto index 071d17b..fffcb0b 100644 --- a/nebius/vpc/v1/subnet_service.proto +++ b/nebius/vpc/v1/subnet_service.proto @@ -32,19 +32,34 @@ service SubnetService { } message GetSubnetRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcsubnet"] + } + ]; } message GetSubnetByNameRequest { // ID of the project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListSubnetsRequest { // ID of the parent project. - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; @@ -71,34 +86,46 @@ message ListSubnetsResponse { } message CreateSubnetRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["project"] + } + ]; SubnetSpec spec = 2 [(buf.validate.field).required = true]; } message UpdateSubnetRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["project"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; SubnetSpec spec = 2; } message DeleteSubnetRequest { - string id = 1; + string id = 1 [(nid) = { + resource: ["vpcsubnet"] + }]; } diff --git a/nebius/vpc/v1/target_group.proto b/nebius/vpc/v1/target_group.proto index 37081a8..8311718 100644 --- a/nebius/vpc/v1/target_group.proto +++ b/nebius/vpc/v1/target_group.proto @@ -15,7 +15,9 @@ option java_package = "ai.nebius.pub.vpc.v1"; message TargetGroup { // Metadata for the TargetGroup resource. // `metadata.parent_id` represents IAM container - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the TargetGroup. TargetGroupSpec spec = 2; @@ -42,7 +44,12 @@ message Target { // Target representing compute instance message ComputeInstance { // Compute instance id to send traffic to - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["computeinstance"] + } + ]; // Name of the compute instance's NetworkInterface to send traffic to. If not specified the first one will be used. string network_interface_name = 2 [(field_behavior) = NON_EMPTY_DEFAULT]; @@ -50,14 +57,18 @@ message ComputeInstance { message TargetGroupStatus { // LoadBalancer ids target group is attached to - repeated string load_balancer_ids = 1; + repeated string load_balancer_ids = 1 [(nid) = { + resource: ["vpcloadbalancer"] + }]; // Statuses of specified targets repeated TargetStatus target_statuses = 2; } message TargetStatus { - string compute_instance_id = 1; + string compute_instance_id = 1 [(nid) = { + resource: ["computeinstance"] + }]; TargetState target_state = 2; diff --git a/nebius/vpc/v1/target_group_service.proto b/nebius/vpc/v1/target_group_service.proto index 91265ee..c4cea00 100644 --- a/nebius/vpc/v1/target_group_service.proto +++ b/nebius/vpc/v1/target_group_service.proto @@ -22,19 +22,29 @@ service TargetGroupService { } message GetTargetGroupRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpctargetgroup"] + } + ]; } message UpdateTargetGroupRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["project"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; TargetGroupSpec spec = 2; } diff --git a/nebius/vpc/v1alpha1/allocation.proto b/nebius/vpc/v1alpha1/allocation.proto index 7a964c6..125bafd 100644 --- a/nebius/vpc/v1alpha1/allocation.proto +++ b/nebius/vpc/v1alpha1/allocation.proto @@ -15,7 +15,9 @@ option java_package = "ai.nebius.pub.vpc.v1alpha1"; message Allocation { // Metadata for the Allocation. // `metadata.parent_id` represents IAM Container. - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specifications for the allocation, detailing its name and IP configuration. AllocationSpec spec = 2; @@ -58,10 +60,20 @@ message IPv4PrivateAllocationSpec { // Subnet ID. // Required same subnet to use allocation in subnet-resources (e.g. Network Interface) - string subnet_id = 2 [(field_behavior) = IMMUTABLE]; + string subnet_id = 2 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcsubnet"] + } + ]; // Pool for the IPv4 private allocation. - string pool_id = 3 [(field_behavior) = IMMUTABLE]; + string pool_id = 3 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcpool"] + } + ]; } } @@ -84,7 +96,12 @@ message IPv4PublicAllocationSpec { ]; // Pool for the IPv4 public allocation. - string pool_id = 2 [(field_behavior) = IMMUTABLE]; + string pool_id = 2 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcpool"] + } + ]; } message AllocationStatus { @@ -119,7 +136,9 @@ message AllocationStatus { message AllocationDetails { string allocated_cidr = 1; - string pool_id = 2; + string pool_id = 2 [(nid) = { + resource: ["vpcpool"] + }]; IpVersion version = 4; } @@ -136,7 +155,9 @@ message Assignment { message NetworkInterfaceAssignment { // ID of the Compute instance network interface belongs to. - string instance_id = 1; + string instance_id = 1 [(nid) = { + resource: ["computeinstance"] + }]; // Network interface name string name = 2; @@ -144,5 +165,7 @@ message NetworkInterfaceAssignment { message LoadBalancerAssignment { // ID of the Load Balancer. - string id = 1; + string id = 1 [(nid) = { + resource: ["vpcloadbalancer"] + }]; } diff --git a/nebius/vpc/v1alpha1/allocation_service.proto b/nebius/vpc/v1alpha1/allocation_service.proto index d7633f9..e846ee2 100644 --- a/nebius/vpc/v1alpha1/allocation_service.proto +++ b/nebius/vpc/v1alpha1/allocation_service.proto @@ -30,17 +30,32 @@ service AllocationService { } message GetAllocationRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcallocation"] + } + ]; } message GetAllocationByNameRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListAllocationsRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; @@ -56,34 +71,49 @@ message ListAllocationsResponse { } message CreateAllocationRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - required: true - }]; + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + required: true + }, + (nid) = { + parent_resource: ["project"] + } + ]; AllocationSpec spec = 2 [(buf.validate.field).required = true]; } message UpdateAllocationRequest { - common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = { - cel: [ - { - id: "metadata_name" - message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." - expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" - } - ] - }]; + common.v1.ResourceMetadata metadata = 1 [ + (nid) = { + parent_resource: ["project"] + }, + (buf.validate.field) = { + cel: [ + { + id: "metadata_name" + message: "'name' must start with a letter or digit, allow '-', '_', '.', '/', and have a length between 2 and 255 characters." + expression: "this.name.matches('^[a-zA-Z0-9][-_./a-zA-Z0-9]{1,254}$')" + } + ] + } + ]; AllocationSpec spec = 2; } message DeleteAllocationRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcallocation"] + } + ]; } diff --git a/nebius/vpc/v1alpha1/network.proto b/nebius/vpc/v1alpha1/network.proto index 48b79f0..273b364 100644 --- a/nebius/vpc/v1alpha1/network.proto +++ b/nebius/vpc/v1alpha1/network.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package nebius.vpc.v1alpha1; import "buf/validate/validate.proto"; +import "nebius/annotations.proto"; import "nebius/common/v1/metadata.proto"; option go_package = "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1"; @@ -16,7 +17,9 @@ option java_package = "ai.nebius.pub.vpc.v1alpha1"; message Network { // Metadata for the network resource. // `metadata.parent_id` represents IAM container - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the network. NetworkSpec spec = 2; @@ -31,7 +34,12 @@ message NetworkSpec { } message NetworkPool { - string pool_id = 1 [(buf.validate.field).required = true]; + string pool_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcpool"] + } + ]; } message NetworkStatus { @@ -50,5 +58,7 @@ message NetworkStatus { State state = 1; // Scope ID of all pools - string scope_id = 2; + string scope_id = 2 [(nid) = { + resource: ["vpcscope"] + }]; } diff --git a/nebius/vpc/v1alpha1/network_interface.proto b/nebius/vpc/v1alpha1/network_interface.proto index fd4f9ee..6d49be9 100644 --- a/nebius/vpc/v1alpha1/network_interface.proto +++ b/nebius/vpc/v1alpha1/network_interface.proto @@ -15,7 +15,10 @@ message NetworkInterfaceSpec { // Subnet ID string subnet_id = 1 [ (buf.validate.field).required = true, - (field_behavior) = IMMUTABLE + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcsubnet"] + } ]; // Interface name @@ -43,7 +46,9 @@ message NetworkInterfaceSpec { // Describes an IPv4 address. message IPAddress { // Allocation identifier if it was created before. - string allocation_id = 1; + string allocation_id = 1 [(nid) = { + resource: ["vpcallocation"] + }]; } // Describes a public IP address. @@ -51,7 +56,9 @@ message PublicIPAddress { // Describes different methods of public IP address allocation. oneof allocation { // Allocation identifier if it was created before. - string allocation_id = 1; + string allocation_id = 1 [(nid) = { + resource: ["vpcallocation"] + }]; } // If false - Lifecycle of allocation depends on NetworkInterface.Allocate/NetworkInterface.Deallocate @@ -62,7 +69,12 @@ message PublicIPAddress { message IPAlias { // ID of allocation - string allocation_id = 1 [(buf.validate.field).required = true]; + string allocation_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcallocation"] + } + ]; } // Describes the status of a network interface. @@ -92,7 +104,9 @@ message IPAddressStatus { string address = 1; // Allocation identifier. - string allocation_id = 2; + string allocation_id = 2 [(nid) = { + resource: ["vpcallocation"] + }]; } message PublicIPAddressStatus { @@ -100,7 +114,9 @@ message PublicIPAddressStatus { string address = 1; // Allocation identifier. - string allocation_id = 2; + string allocation_id = 2 [(nid) = { + resource: ["vpcallocation"] + }]; } message IPAliasesStatus { diff --git a/nebius/vpc/v1alpha1/network_service.proto b/nebius/vpc/v1alpha1/network_service.proto index 31d408b..3c43a47 100644 --- a/nebius/vpc/v1alpha1/network_service.proto +++ b/nebius/vpc/v1alpha1/network_service.proto @@ -22,17 +22,32 @@ service NetworkService { } message GetNetworkRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcnetwork"] + } + ]; } message GetNetworkByNameRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListNetworksRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; diff --git a/nebius/vpc/v1alpha1/pool.proto b/nebius/vpc/v1alpha1/pool.proto index c041333..99c5907 100644 --- a/nebius/vpc/v1alpha1/pool.proto +++ b/nebius/vpc/v1alpha1/pool.proto @@ -14,7 +14,9 @@ option java_package = "ai.nebius.pub.vpc.v1alpha1"; message Pool { // Metadata associated with the Pool. // `metadata.parent_id` represents the Project. - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the Pool. PoolSpec spec = 2; @@ -28,10 +30,20 @@ message PoolSpec { option (buf.validate.oneof).required = true; // ID of source pool. Current pool will be created with the same scope. - string source_pool_id = 1 [(field_behavior) = IMMUTABLE]; + string source_pool_id = 1 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcpool"] + } + ]; // ID of the scope. Pool will be considered as top-level pool within scope. - string source_scope_id = 2 [(field_behavior) = IMMUTABLE]; + string source_scope_id = 2 [ + (field_behavior) = IMMUTABLE, + (nid) = { + resource: ["vpcscope"] + } + ]; } // IP version for the Pool. @@ -104,7 +116,9 @@ message PoolStatus { repeated string cidrs = 2; // ID of the scope - string scope_id = 3; + string scope_id = 3 [(nid) = { + resource: ["vpcscope"] + }]; } enum IpVersion { diff --git a/nebius/vpc/v1alpha1/pool_service.proto b/nebius/vpc/v1alpha1/pool_service.proto index 5d8c810..df596ca 100644 --- a/nebius/vpc/v1alpha1/pool_service.proto +++ b/nebius/vpc/v1alpha1/pool_service.proto @@ -22,17 +22,32 @@ service PoolService { } message GetPoolRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcpool"] + } + ]; } message GetPoolByNameRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListPoolsRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; diff --git a/nebius/vpc/v1alpha1/scope.proto b/nebius/vpc/v1alpha1/scope.proto index 7eeb787..38ad9bd 100644 --- a/nebius/vpc/v1alpha1/scope.proto +++ b/nebius/vpc/v1alpha1/scope.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package nebius.vpc.v1alpha1; import "buf/validate/validate.proto"; +import "nebius/annotations.proto"; import "nebius/common/v1/metadata.proto"; option go_package = "github.com/nebius/gosdk/proto/nebius/vpc/v1alpha1"; @@ -13,7 +14,9 @@ option java_package = "ai.nebius.pub.vpc.v1alpha1"; message Scope { // Metadata associated with the Scope. // `metadata.parent_id` represents the parent IAM container. - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the Scope. ScopeSpec spec = 2; diff --git a/nebius/vpc/v1alpha1/scope_service.proto b/nebius/vpc/v1alpha1/scope_service.proto index 2cb2908..0724ab3 100644 --- a/nebius/vpc/v1alpha1/scope_service.proto +++ b/nebius/vpc/v1alpha1/scope_service.proto @@ -22,17 +22,32 @@ service ScopeService { } message GetScopeRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcscope"] + } + ]; } message GetScopeByNameRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListScopesRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; diff --git a/nebius/vpc/v1alpha1/subnet.proto b/nebius/vpc/v1alpha1/subnet.proto index fe48c7b..d586eae 100644 --- a/nebius/vpc/v1alpha1/subnet.proto +++ b/nebius/vpc/v1alpha1/subnet.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package nebius.vpc.v1alpha1; import "buf/validate/validate.proto"; +import "nebius/annotations.proto"; import "nebius/common/v1/metadata.proto"; import "nebius/vpc/v1alpha1/pool.proto"; @@ -16,7 +17,9 @@ option java_package = "ai.nebius.pub.vpc.v1alpha1"; message Subnet { // Metadata for the subnet resource. // `metadata.parent_id` represents IAM container - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; // Specification of the subnet. SubnetSpec spec = 2; @@ -27,7 +30,12 @@ message Subnet { message SubnetSpec { // Network ID. - string network_id = 1 [(buf.validate.field).required = true]; + string network_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcnetwork"] + } + ]; // Pool for addresses repeated SubnetPool pools = 2 [(buf.validate.field).required = true]; @@ -42,7 +50,9 @@ message SubnetPool { SubnetPoolSpec spec = 1; - string pool_id = 2; + string pool_id = 2 [(nid) = { + resource: ["vpcpool"] + }]; } } diff --git a/nebius/vpc/v1alpha1/subnet_service.proto b/nebius/vpc/v1alpha1/subnet_service.proto index 90274bc..df04acb 100644 --- a/nebius/vpc/v1alpha1/subnet_service.proto +++ b/nebius/vpc/v1alpha1/subnet_service.proto @@ -24,17 +24,32 @@ service SubnetService { } message GetSubnetRequest { - string id = 1 [(buf.validate.field).required = true]; + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcsubnet"] + } + ]; } message GetSubnetByNameRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; string name = 2 [(buf.validate.field).required = true]; } message ListSubnetsRequest { - string parent_id = 1 [(buf.validate.field).required = true]; + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["project"] + } + ]; int64 page_size = 2; @@ -44,7 +59,12 @@ message ListSubnetsRequest { } message ListSubnetsByNetworkRequest { - string network_id = 1 [(buf.validate.field).required = true]; + string network_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["vpcnetwork"] + } + ]; int64 page_size = 2;