From 2c64c9d3b8ea519dc8a2bf0189c896c368298427 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Mar 2026 11:34:00 +0000 Subject: [PATCH] Publish proto files from a77aaecf4 --- endpoints.md | 2 + nebius/ai/v1/endpoint.proto | 7 +- nebius/ai/v1/job.proto | 7 +- nebius/capacity/v1/resource_advice.proto | 122 ++++++++++++++++++ .../capacity/v1/resource_advice_service.proto | 49 +++++++ nebius/compute/v1/disk.proto | 3 + nebius/compute/v1/filesystem.proto | 3 + 7 files changed, 181 insertions(+), 12 deletions(-) create mode 100644 nebius/capacity/v1/resource_advice.proto create mode 100644 nebius/capacity/v1/resource_advice_service.proto diff --git a/endpoints.md b/endpoints.md index f12c733..2a40000 100755 --- a/endpoints.md +++ b/endpoints.md @@ -15,6 +15,8 @@ * [nebius.audit.v2.AuditEventExportService](nebius/audit/v2/audit_event_export_service.proto) * [nebius.audit.v2.AuditEventService](nebius/audit/v2/audit_event_service.proto) * [nebius.common.v1.OperationService](nebius/common/v1/operation_service.proto) +* capacity-advisor.billing-cpl.api.nebius.cloud:443 + * [nebius.capacity.v1.ResourceAdviceService](nebius/capacity/v1/resource_advice_service.proto) * capacity-blocks.billing-cpl.api.nebius.cloud:443 * [nebius.capacity.v1.CapacityBlockGroupService](nebius/capacity/v1/capacity_block_group_service.proto) * [nebius.capacity.v1.CapacityIntervalService](nebius/capacity/v1/capacity_interval_service.proto) diff --git a/nebius/ai/v1/endpoint.proto b/nebius/ai/v1/endpoint.proto index 3a3d412..91867a7 100644 --- a/nebius/ai/v1/endpoint.proto +++ b/nebius/ai/v1/endpoint.proto @@ -140,12 +140,7 @@ message EndpointSpec { // Source of the volume mount. // // Can be a name of an ID of Nebius Storage bucket or filesystem. - string source = 1 [(nid) = { - resource: [ - "computefilesystem", - "storagebucket" - ] - }]; + string source = 1; // Path inside the source volume. // diff --git a/nebius/ai/v1/job.proto b/nebius/ai/v1/job.proto index 249237a..92f4230 100644 --- a/nebius/ai/v1/job.proto +++ b/nebius/ai/v1/job.proto @@ -142,12 +142,7 @@ message JobSpec { // Source of the volume mount. // // Can be a name of an ID of Nebius Storage bucket or filesystem. - string source = 1 [(nid) = { - resource: [ - "computefilesystem", - "storagebucket" - ] - }]; + string source = 1; // Path inside the source volume. // diff --git a/nebius/capacity/v1/resource_advice.proto b/nebius/capacity/v1/resource_advice.proto new file mode 100644 index 0000000..b9796ca --- /dev/null +++ b/nebius/capacity/v1/resource_advice.proto @@ -0,0 +1,122 @@ +syntax = "proto3"; + +package nebius.capacity.v1; + +import "buf/validate/validate.proto"; +import "google/protobuf/timestamp.proto"; +import "nebius/annotations.proto"; +import "nebius/common/v1/metadata.proto"; + +option go_package = "github.com/nebius/gosdk/proto/nebius/capacity/v1"; +option java_multiple_files = true; +option java_outer_classname = "ResourceAdviceProto"; +option java_package = "ai.nebius.pub.capacity.v1"; + +// ResourceAdvice is a virtual resource representing the availability +// of a specific technical configuration in a specific scope. +message ResourceAdvice { + option (resource_behavior) = UNNAMED; + + // Standard metadata. parent_id is the User's Tenant/Project NID. + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field).required = true, + (nid) = { + parent_resource: ["tenant"] + } + ]; + + // Identifiers for the capacity scope and technical configuration. + ResourceAdviceSpec spec = 2 [(buf.validate.field).required = true]; + + // The current state of availability, including quotas and data freshness. + ResourceAdviceStatus status = 3 [(field_behavior) = OUTPUT_ONLY]; +} + +// Resource Advice specification. +message ResourceAdviceSpec { + // Geographical region identifier. + string region = 1 [(field_behavior) = IMMUTABLE]; + + // Data center fabric or cluster identifier. + string fabric = 2 [(field_behavior) = IMMUTABLE]; + + // Details specific to the type of resource being advised. + oneof resource_details { + ComputeInstanceDetails compute_instance = 10; + } +} + +// Details for Compute/GPU capacity. +message ComputeInstanceDetails { + // Preset details. + message Preset { + // All resources existing in a preset. + message Resources { + // Number of vCPUs. + int32 vcpu_count = 1; + + // Memory size. + int32 memory_gibibytes = 2; + + // Number of GPU cores. + int32 gpu_count = 3; + } + + // Name of the preset (e.g., "8gpu-128vcpu-1600gb"). + string name = 1; + + // Resources for the specified preset. + Resources resources = 2; + } + + // Specific platform. Example: "gpu-h200-sxm". + string platform = 1 [(field_behavior) = IMMUTABLE]; + + // The specific VM preset this advice applies to. + Preset preset = 2 [(field_behavior) = IMMUTABLE]; + + // GPU memory size. + int32 gpu_memory_gigabytes = 3; +} + +// Resource Advice status. +message ResourceAdviceStatus { + // Shows the available resources. + message Availability { + // Shows if data could be trusted. + enum DataState { + // Shouldn't ever happen. + DATA_STATE_UNSPECIFIED = 0; + + // Data is relevant and reflects current state of the system. + DATA_STATE_FRESH = 1; + + // Data is not relevant anymore as it was fetched long time ago. + DATA_STATE_STALE = 2; + + // Failed to retrieve data. + DATA_STATE_UNKNOWN = 10; + } + + // Reflects relevance of the data. + DataState data_state = 1; + + // Current units that can be allocated immediately (clipped by quota). + uint32 available = 2; + + // The user's maximum quota limit for this resource type. + uint32 limit = 4; + + // The timestamp of the actual infrastructure measurement. + google.protobuf.Timestamp effective_at = 10; + } + + // Capacity for reserved/guaranteed resources through Capacity Blocks. + Availability reserved = 1; + + // Capacity for regular on-demand resources. + Availability on_demand = 2; + + // Capacity for preemptible/spot resources. + Availability preemptible = 3; +} diff --git a/nebius/capacity/v1/resource_advice_service.proto b/nebius/capacity/v1/resource_advice_service.proto new file mode 100644 index 0000000..7546fe1 --- /dev/null +++ b/nebius/capacity/v1/resource_advice_service.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package nebius.capacity.v1; + +import "buf/validate/validate.proto"; +import "nebius/annotations.proto"; +import "nebius/capacity/v1/resource_advice.proto"; + +option go_package = "github.com/nebius/gosdk/proto/nebius/capacity/v1"; +option java_multiple_files = true; +option java_outer_classname = "ResourceAdviceServiceProto"; +option java_package = "ai.nebius.pub.capacity.v1"; + +// ResourceAdvisorService provides insights into capacity availability for various resources. +// It helps users understand where they can launch instances or allocate storage based on their +// quotas and the current physical buffers in the data centers. +service ResourceAdviceService { + option (api_service_name) = "capacity-advisor.billing-cpl"; + + // Lists resource advice resources. + // Supports filtering by region, resource type, or platform. + rpc List(ListResourceAdviceRequest) returns (ListResourceAdviceResponse); +} + +message ListResourceAdviceRequest { + // Tenant NID. + // Required to calculate 'available' numbers clipped by user quotas. + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["tenant"] + } + ]; + + // Maximum number of items to return. + int64 page_size = 2; + + // Page token for pagination. + string page_token = 3; +} + +message ListResourceAdviceResponse { + // List of resource advice items matching the request. + // Each item represents a unique combination of Resource Type + Tier/Preset. + repeated ResourceAdvice items = 1; + + // Token for retrieving the next page of results. + string next_page_token = 2; +} diff --git a/nebius/compute/v1/disk.proto b/nebius/compute/v1/disk.proto index 1a7d88c..ea1eb4b 100644 --- a/nebius/compute/v1/disk.proto +++ b/nebius/compute/v1/disk.proto @@ -72,6 +72,9 @@ message DiskSpec { // Defines how data on the disk is encrypted. By default, no encryption is applied. DiskEncryption disk_encryption = 11 [(field_behavior) = IMMUTABLE]; + + // Prevents deletion whilst set + bool forbid_deletion = 12; } message SourceImageFamily { diff --git a/nebius/compute/v1/filesystem.proto b/nebius/compute/v1/filesystem.proto index eab8a40..0a27fe1 100644 --- a/nebius/compute/v1/filesystem.proto +++ b/nebius/compute/v1/filesystem.proto @@ -59,6 +59,9 @@ message FilesystemSpec { (buf.validate.field).required = true, (field_behavior) = IMMUTABLE ]; + + // Prevents deletion whilst set + bool forbid_deletion = 7; } message FilesystemStatus {