diff --git a/endpoints.md b/endpoints.md index 008213a..eae71ad 100755 --- a/endpoints.md +++ b/endpoints.md @@ -10,6 +10,9 @@ * [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-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) * compute.api.nebius.cloud:443 * [nebius.common.v1.OperationService](nebius/common/v1/operation_service.proto) * [nebius.common.v1alpha1.OperationService](nebius/common/v1alpha1/operation_service.proto) diff --git a/nebius/audit/v2/audit_event.proto b/nebius/audit/v2/audit_event.proto index 1591aa0..d83b8b7 100644 --- a/nebius/audit/v2/audit_event.proto +++ b/nebius/audit/v2/audit_event.proto @@ -28,7 +28,7 @@ message AuditEvent { // Version of CloudEvents spec. See https://github.com/cloudevents/spec/blob/main/cloudevents/spec.md#specversion string spec_version = 3 [(buf.validate.field).required = true]; - // The type of event related to the originating occurrence. Formed according to template: "ai.nebius..." + // The type of event related to the originating occurrence. Formed according to template: `ai.nebius...` string type = 4 [(buf.validate.field).required = true]; // Indicates the service that generated the event. diff --git a/nebius/capacity/v1/capacity_block_group.proto b/nebius/capacity/v1/capacity_block_group.proto new file mode 100644 index 0000000..c52d4ab --- /dev/null +++ b/nebius/capacity/v1/capacity_block_group.proto @@ -0,0 +1,147 @@ +syntax = "proto3"; + +package nebius.capacity.v1; + +import "buf/validate/validate.proto"; +import "google/protobuf/timestamp.proto"; +import "nebius/annotations.proto"; +import "nebius/capacity/v1/resource_affinity.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 = "CapacityBlockGroupProto"; +option java_package = "ai.nebius.pub.capacity.v1"; + +// Capacity Block Group specification. +message CapacityBlockGroupSpec {} + +// Current, last or future concatenation of Capacity Intervals in a Capacity Block Group. +message CurrentContinuousInterval { + // Shows a state of a Continuous Interval. + enum State { + // Shouldn't happen. + STATE_UNSPECIFIED = 0; + + // Continuous Interval is in the future. + STATE_SCHEDULED = 1; + + // Continuous Interval is active. + STATE_ACTIVE = 2; + + // Continuous Interval is in the past. + STATE_EXPIRED = 3; + } + + // Start time of the first interval(s) in Continuous Interval. + google.protobuf.Timestamp start_time = 1; + + // End time of the last interval(s) in Continuous Interval. + google.protobuf.Timestamp end_time = 2; + + // Quota quantity that is currently set, was set or will be set in the Continuous Interval depending on it's + // start_time and end_time. + // If the Continuous Interval is currently active, quantity is the sum of quantities of the currently active + // non-zero intervals. + // If the Continuous Interval is in the past, quantity is the sum of quantities of the last non-zero active + // intervals. + // If the Continuous Interval is in the future, quantity is the sum of the quantities of the first scheduled + // non-zero active intervals. + uint64 quantity = 3; + + // Continuous Interval state. + State state = 4; +} + +// Capacity Block Group status. +message CapacityBlockGroupStatus { + // Shows the state of a Capacity Block Group with respect to its quota. + enum State { + // Shouldn't happen. + STATE_UNSPECIFIED = 0; + + // Capacity Block Group quota is being allocated as one or more capacity intervals have started. + STATE_ALLOCATING = 1; + + // Capacity Block Group quota is already allocated and active as one or more capacity intervals are active. + STATE_ACTIVE = 2; + + // Capacity Block Group is being shut down due to absence of active intervals at the time. + STATE_SHUTTING = 3; + + // Capacity Block Group is inactive due to absence of active intervals at the time. + STATE_INACTIVE = 4; + } + + // Shows the usage state if a Capacity Block Group quota. + enum UsageState { + // Shouldn't happen. + USAGE_STATE_UNSPECIFIED = 0; + + // Capacity Block Group quota is actively in use. + USAGE_STATE_USED = 1; + + // Capacity Block Group quota is not currently in use. + USAGE_STATE_NOT_USED = 2; + + // Capacity Block Group region is unreachable, the current usage is therefore unknown. + // Please, retry the request later. + USAGE_STATE_UNKNOWN = 3; + } + + // Name of the region where the Capacity Block Group is allocated. + // Example: "eu-north1". + string region = 1; + + // Specification of the Capacity Block Group. + ResourceAffinity resource_affinity = 2; + + // Service for which the Capacity Block Group is allocated. + string service = 3; + + // Capacity Block Group state with respect to quota allocation. + State state = 5; + + // Capacity Block Group current quota limit. + uint64 current_limit = 6; + + // Capacity Block Group quota usage. + uint64 usage = 8; + + // Capacity Block Group quota usage percentage. + string usage_percentage = 9; + + // Time of the next Capacity Block Group quota change. + google.protobuf.Timestamp next_change_at = 10; + + // The next expected change of the Capacity Block Group quota limit. + // the quota limit change that is currently performed. + optional uint64 next_change_to = 11; + + // Current concatenation of non-zero Capacity Intervals that overlap or follow each other without a break. + // If all Capacity Intervals are in the past, returns the last Continuous Interval. + // If all Capacity Intervals are in the future, returns the first Continuous Interval scheduled. + CurrentContinuousInterval current_continuous_interval = 12; + + // Capacity Block Group quota usage state. + UsageState usage_state = 13; + + // Shows that changes are in flight. + bool reconciling = 100; +} + +// Capacity Block Group is a parent resource for Capacity Intervals. +message CapacityBlockGroup { + option (resource_behavior) = UNNAMED; + + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field).required = true, + (nid) = { + parent_resource: ["tenant"] + } + ]; + + CapacityBlockGroupSpec spec = 2; + + CapacityBlockGroupStatus status = 3 [(field_behavior) = OUTPUT_ONLY]; +} diff --git a/nebius/capacity/v1/capacity_block_group_service.proto b/nebius/capacity/v1/capacity_block_group_service.proto new file mode 100644 index 0000000..eed655a --- /dev/null +++ b/nebius/capacity/v1/capacity_block_group_service.proto @@ -0,0 +1,89 @@ +syntax = "proto3"; + +package nebius.capacity.v1; + +import "buf/validate/validate.proto"; +import "nebius/annotations.proto"; +import "nebius/capacity/v1/capacity_block_group.proto"; +import "nebius/capacity/v1/resource_affinity.proto"; + +option go_package = "github.com/nebius/gosdk/proto/nebius/capacity/v1"; +option java_multiple_files = true; +option java_outer_classname = "CapacityBlockGroupServiceProto"; +option java_package = "ai.nebius.pub.capacity.v1"; + +// Capacity Block Group service provides read access to Capacity Block Groups resources. +service CapacityBlockGroupService { + option (api_service_name) = "capacity-blocks.billing-cpl"; + + // Get Capacity Block Group by its ID. + rpc Get(GetCapacityBlockGroupRequest) returns (CapacityBlockGroup); + + // Get Capacity Block Group by its specification. + rpc GetByResourceAffinity(GetCapacityBlockGroupByResourceAffinityRequest) returns (CapacityBlockGroup); + + // List all Capacity Block Groups for the specified Tenant. + rpc List(ListCapacityBlockGroupsRequest) returns (ListCapacityBlockGroupsResponse); +} + +// Get a Capacity Block Group by its ID. +message GetCapacityBlockGroupRequest { + // ID of the Capacity Block Group. + string id = 1 [ + (buf.validate.field).required = true, + (field_behavior) = IDENTIFIER, + (nid) = { + resource: ["capacityblockgroup"] + } + ]; +} + +// Get a Capacity Block Group in a Tenant by its Resource Affinity. +message GetCapacityBlockGroupByResourceAffinityRequest { + // Tenant ID of the Capacity Block Group. + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["tenant"] + } + ]; + + // Name of the region where the Capacity Block Group is allocated. + // Example: "eu-north1". + string region = 2 [(buf.validate.field).required = true]; + + // Specifications of the Capacity Block Group. + ResourceAffinity resource_affinity = 3 [(buf.validate.field).required = true]; +} + +// List Capacity Block Groups by a Tenant ID. +message ListCapacityBlockGroupsRequest { + // Tenant ID of the Capacity Block Group. + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["tenant"] + } + ]; + + // Page size. Must be between [1...200]. + // Optional; if not specified, a reasonable default will be chosen by the service. + int64 page_size = 2 [(buf.validate.field) = { + int64: { + lte: 200 + gte: 0 + } + }]; + + // Listing continuation token. Pass an empty string to start listing from the first page. + string page_token = 3; +} + +// All existing Capacity Block Groups in a Tenant. +message ListCapacityBlockGroupsResponse { + // List of Capacity Block Groups on this result page. + repeated CapacityBlockGroup items = 1; + + // Listing continuation token for the next page of results. + string next_page_token = 2; +} diff --git a/nebius/capacity/v1/capacity_interval.proto b/nebius/capacity/v1/capacity_interval.proto new file mode 100644 index 0000000..ad4bbbc --- /dev/null +++ b/nebius/capacity/v1/capacity_interval.proto @@ -0,0 +1,80 @@ +syntax = "proto3"; + +package nebius.capacity.v1; + +import "buf/validate/validate.proto"; +import "google/protobuf/timestamp.proto"; +import "nebius/annotations.proto"; +import "nebius/capacity/v1/resource_affinity.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 = "CapacityIntervalProto"; +option java_package = "ai.nebius.pub.capacity.v1"; + +// Capacity Interval specification. +message CapacityIntervalSpec {} + +// Capacity Interval status data. +message CapacityIntervalStatus { + enum State { + // Shouldn't happen. + STATE_UNSPECIFIED = 0; + + // Capacity Interval is fully in the future (now < start_time). + STATE_SCHEDULED = 1; + + // Capacity Interval is currently active (start_time <= now < end_time). + STATE_ACTIVE = 2; + + // Capacity Interval is fully in the past (end_time <= now). + STATE_EXPIRED = 3; + } + + // Tenant ID for which the Capacity Interval is created. + string container_id = 1 [(nid) = { + resource: ["tenant"] + }]; + + // Name of the region where the Capacity Interval is created. + // Example: "eu-north1". + string region = 2; + + // Specification of the Capacity Interval. + ResourceAffinity resource_affinity = 3; + + // Service for which the Capacity Interval is created. + string service = 4; + + // Resource quantity of the Capacity Interval. + uint64 quantity = 5; + + // Start time of the Capacity Interval. + google.protobuf.Timestamp start_time = 6; + + // End time of the Capacity Interval. + google.protobuf.Timestamp end_time = 7; + + // State of the Capacity Interval. + State state = 8; + + // Shows that changes are in flight. + bool reconciling = 100; +} + +// Capacity Intervals represents a timeframe during which the specified resources can be used. +message CapacityInterval { + option (resource_behavior) = UNNAMED; + + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field).required = true, + (nid) = { + parent_resource: ["capacityblockgroup"] + } + ]; + + CapacityIntervalSpec spec = 2 [(buf.validate.field).required = true]; + + CapacityIntervalStatus status = 3 [(field_behavior) = OUTPUT_ONLY]; +} diff --git a/nebius/capacity/v1/capacity_interval_service.proto b/nebius/capacity/v1/capacity_interval_service.proto new file mode 100644 index 0000000..b2bb13e --- /dev/null +++ b/nebius/capacity/v1/capacity_interval_service.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; + +package nebius.capacity.v1; + +import "buf/validate/validate.proto"; +import "nebius/annotations.proto"; +import "nebius/capacity/v1/capacity_interval.proto"; + +option go_package = "github.com/nebius/gosdk/proto/nebius/capacity/v1"; +option java_multiple_files = true; +option java_outer_classname = "CapacityIntervalServiceProto"; +option java_package = "ai.nebius.pub.capacity.v1"; + +// Capacity Interval service provides read access to Capacity Intervals resources. +service CapacityIntervalService { + option (api_service_name) = "capacity-blocks.billing-cpl"; + + // Get Capacity Interval by its ID. + rpc Get(GetCapacityIntervalRequest) returns (CapacityInterval); + + // List all capacity intervals in a Capacity Block Group. + rpc List(ListCapacityIntervalsRequest) returns (ListCapacityIntervalsResponse); +} + +// Getting Capacity Interval by its ID. +message GetCapacityIntervalRequest { + string id = 1 [ + (buf.validate.field).required = true, + (field_behavior) = IDENTIFIER, + (nid) = { + resource: ["capacityinterval"] + } + ]; +} + +// Listing all existing Capacity Intervals in a Capacity Block Group. +message ListCapacityIntervalsRequest { + // Capacity Block Group ID for which the Capacity Intervals should be listed. + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["capacityblockgroup"] + } + ]; + + // Page size. Must be between [1...200]. + // Optional; if not specified, a reasonable default will be chosen by the service. + int64 page_size = 2 [(buf.validate.field) = { + int64: { + lte: 200 + gte: 0 + } + }]; + + // Listing continuation token. Pass an empty string to start listing from the first page. + string page_token = 3; +} + +// All existing Capacity Intervals in a Capacity Block Group. +message ListCapacityIntervalsResponse { + // List of Capacity Intervals on this result page. + repeated CapacityInterval items = 1; + + // Listing continuation token for the next page of results. + string next_page_token = 2; +} diff --git a/nebius/capacity/v1/resource_affinity.proto b/nebius/capacity/v1/resource_affinity.proto new file mode 100644 index 0000000..cf3ef31 --- /dev/null +++ b/nebius/capacity/v1/resource_affinity.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package nebius.capacity.v1; + +import "buf/validate/validate.proto"; + +option go_package = "github.com/nebius/gosdk/proto/nebius/capacity/v1"; +option java_multiple_files = true; +option java_outer_classname = "ResourceAffinityProto"; +option java_package = "ai.nebius.pub.capacity.v1"; + +// First version of Compute service resource affinity +message ResourceAffinityComputeV1 { + // The fabric where the Capacity Block Group is allocated. + string fabric = 1 [(buf.validate.field).required = true]; + + // The platform for which the Capacity Block Group is allocated. + string platform = 2 [(buf.validate.field).required = true]; +} + +// Specification of the Capacity Block Group. +message ResourceAffinity { + oneof versions { + // First version of the compute Resource Affinity. + ResourceAffinityComputeV1 compute_v1 = 1; + } +} diff --git a/nebius/common/v1alpha1/operation.proto b/nebius/common/v1alpha1/operation.proto index 92cb618..a64b63f 100644 --- a/nebius/common/v1alpha1/operation.proto +++ b/nebius/common/v1alpha1/operation.proto @@ -71,7 +71,7 @@ message Operation { // in a Create operation it will be the spec and metadata *of the resource being created*, // and so on. // - [resource.status] reflects the status of the resource at the moment this operation started. - // This is a snapshot, call the Service/Get to get current status of the resource. + // This is a snapshot, call the `Service/Get` to get current status of the resource. // // The [resource] field MUST never be updated *after* this operation has started. // diff --git a/nebius/mk8s/v1/cluster.proto b/nebius/mk8s/v1/cluster.proto index 8ec6aa8..2444c26 100644 --- a/nebius/mk8s/v1/cluster.proto +++ b/nebius/mk8s/v1/cluster.proto @@ -116,7 +116,7 @@ message ClusterStatus { message ControlPlaneStatus { // Actual Kubernetes and configuration version. // Version have format `..-nebius-cp.` like "1.30.0-nebius-cp.3". - // Where .. is Kubernetes version and is version of control plane infrastructure and configuration, + // Where `..` is Kubernetes version and `` is version of control plane infrastructure and configuration, // which update may include bug fixes, security updates and new features of components running on control plane, like CCM or Cluster Autoscaler. string version = 1; diff --git a/nebius/mk8s/v1/node_group.proto b/nebius/mk8s/v1/node_group.proto index 969a01e..28c1f41 100644 --- a/nebius/mk8s/v1/node_group.proto +++ b/nebius/mk8s/v1/node_group.proto @@ -28,7 +28,7 @@ message NodeGroup { message NodeGroupSpec { // Version is desired Kubernetes version of the cluster. For now only acceptable format is // `.` like "1.31". Option for patch version update will be added later. - // By default the cluster control plane . version will be used. + // By default the cluster control plane `.` version will be used. string version = 1 [(buf.validate.field) = { string: {pattern: "|^\\d\\.\\d\\d$"} }]; @@ -269,7 +269,10 @@ message NodeGroupDeploymentStrategy { // Defaults to 1. // Example: If set to 25%, the node group can scale up by an additional 25% during the update, // allowing new nodes to be added before old nodes are removed, which helps minimize workload disruption. - // NOTE: it is user responsibility to ensure that there are enough quota for provision nodes above the desired number. + // + // NOTE: + // + // it is user responsibility to ensure that there are enough quota for provision nodes above the desired number. // Available quota effectively limits `max_surge`. // In case of not enough quota even for one extra node, update operation will hung because of quota exhausted error. // Such error will be visible in Operation.progress_data. @@ -379,7 +382,7 @@ message NodeGroupStatus { State state = 1; // Actual version of NodeGroup. Have format `..-nebius-node.` like "1.30.0-nebius-node.10". - // Where .. is Kubernetes version and is version of Node infrastructure and configuration, + // Where `..` is Kubernetes version and `` is version of Node infrastructure and configuration, // which update may include bug fixes, security updates and new features depending on worker node configuration. string version = 2; diff --git a/nebius/storage/v1/base.proto b/nebius/storage/v1/base.proto index 7bd506b..0db454e 100644 --- a/nebius/storage/v1/base.proto +++ b/nebius/storage/v1/base.proto @@ -13,6 +13,8 @@ enum StorageClass { STANDARD = 1; ENHANCED_THROUGHPUT = 2; + + INTELLIGENT_TIERING = 3; } enum VersioningPolicy {