diff --git a/endpoints.md b/endpoints.md index 2c1c929..ddfa310 100755 --- a/endpoints.md +++ b/endpoints.md @@ -69,6 +69,7 @@ * cpl.storage.api.nebius.cloud:443 * [nebius.common.v1.OperationService](nebius/common/v1/operation_service.proto) * [nebius.storage.v1.BucketService](nebius/storage/v1/bucket_service.proto) + * [nebius.storage.v1.InventoryService](nebius/storage/v1/inventory_service.proto) * cpl.teplo.api.nebius.cloud:443 * [nebius.common.v1.OperationService](nebius/common/v1/operation_service.proto) * [nebius.logging.v1.LogExportService](nebius/logging/v1/log_export_service.proto) diff --git a/nebius/common/v1/preflight_check.proto b/nebius/common/v1/preflight_check.proto new file mode 100644 index 0000000..01038c7 --- /dev/null +++ b/nebius/common/v1/preflight_check.proto @@ -0,0 +1,96 @@ +syntax = "proto3"; + +package nebius.common.v1; + +option go_package = "github.com/nebius/gosdk/proto/nebius/common/v1"; +option java_multiple_files = true; +option java_outer_classname = "PreflightCheckProto"; +option java_package = "ai.nebius.pub.common.v1"; + +// Context supplied by a caller when requesting a server-side preflight check. +message PreflightCheckContext { + // Operation evaluated by the preflight check. + enum Action { + // Infer UPDATE when the request metadata contains a resource ID; otherwise infer CREATE. + UNSPECIFIED = 0; + + // Evaluate resource creation. + CREATE = 1; + + // Evaluate a resource update. + UPDATE = 2; + + // Evaluate resource deletion. Reserved until delete preflight requests are supported. + DELETE = 3; + + // Evaluate resource recreation. This is the same as CREATE, but assumes that the resource + // with the requested ID is deleted immediately before it is created. + RECREATE = 4; + } + + // Operation evaluated by the preflight check. + Action action = 1; + + // Lower-case name of the calling tool, such as "terraform", "cli", or "console". + // Empty means that no tool-specific behavior is requested. + string tool = 2; + + // Nebius mask identifying values in the proposed request that are unknown. + // An unknown value is not available to the caller when it sends the preflight request. + // The caller expects the actual value to be available when the create or update operation runs. + // The mask is rooted at the request's metadata and spec fields. Empty means all supplied values are known; + // "*" means the complete proposed request is unknown. + string unknown_paths = 3; + + // Additive Nebius mask of fields that require resource recreation when changed. + // For RECREATE, the calling tool fills this mask with the paths that caused it to recreate the resource. + // If a field at one of these paths changes, the calling tool must delete the existing resource + // and create a new resource with the requested values. + // Empty means that the caller has not identified any such fields. + string paths_require_recreate = 4; +} + +// A user-facing diagnostic produced by a preflight check. +message PreflightCheckDiagnostic { + // Effect of the diagnostic on the proposed operation. + enum Severity { + // Invalid for a returned diagnostic. + UNSPECIFIED = 0; + + // The proposed operation cannot proceed. + ERROR = 1; + + // The proposed operation can proceed, subject to requires_user_approval. + WARNING = 2; + } + + // Effect of the diagnostic on the proposed operation. Must not be UNSPECIFIED. + Severity severity = 1; + + // Required single-line, plain-text user-facing explanation. + string summary = 2; + + // Optional plain-text consequence and remediation details. + string details = 3; + + // Optional Nebius field path rooted at metadata or spec. + // Empty means that the diagnostic applies to the resource or operation as a whole. + string path = 4; +} + +// Common preflight result for services that do not expose additional machine-readable impact fields. +// Service-defined result messages implement the same structural interface by declaring these three fields +// with the same names and types, and may add service-specific fields. +message PreflightCheckResult { + // Diagnostics produced while evaluating the proposed operation. + repeated PreflightCheckDiagnostic diagnostics = 1; + + // Additive Nebius mask of fields that the service identifies as requiring resource recreation when changed. + // For UPDATE, the service may set these paths to notify the caller to use RECREATE instead of failing because + // the resource cannot be updated. Empty means that the service has not identified any such fields; "*" means + // that the resource must be recreated without an attributable field. + string paths_require_recreate = 2; + + // Whether the caller must display the diagnostics and obtain explicit user approval before proceeding. + bool requires_user_approval = 3; +} diff --git a/nebius/compute/v1/filesystem.proto b/nebius/compute/v1/filesystem.proto index 0a27fe1..924253f 100644 --- a/nebius/compute/v1/filesystem.proto +++ b/nebius/compute/v1/filesystem.proto @@ -12,7 +12,9 @@ option java_outer_classname = "FilesystemProto"; option java_package = "ai.nebius.pub.compute.v1"; message Filesystem { - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; FilesystemSpec spec = 2; @@ -83,9 +85,13 @@ message FilesystemStatus { string state_description = 2; - repeated string read_write_attachments = 3; + repeated string read_write_attachments = 3 [(nid) = { + resource: ["computeinstance"] + }]; - repeated string read_only_attachments = 4; + repeated string read_only_attachments = 4 [(nid) = { + resource: ["computeinstance"] + }]; int64 size_bytes = 5; diff --git a/nebius/compute/v1/filesystem_service.proto b/nebius/compute/v1/filesystem_service.proto index 8611bde..aed9f81 100644 --- a/nebius/compute/v1/filesystem_service.proto +++ b/nebius/compute/v1/filesystem_service.proto @@ -38,15 +38,26 @@ service FilesystemService { rpc Delete(DeleteFilesystemRequest) returns (common.v1.Operation); // Lists all operations that were performed within a specific parent resource. - rpc ListOperationsByParent(ListOperationsByParentRequest) returns (common.v1.ListOperationsResponse); + rpc ListOperationsByParent(ListOperationsByParentRequest) returns (common.v1.ListOperationsResponse) { + option (request_fields) = { + field_path: "parent_id" + nid: { + resource: ["project"] + } + }; + } } message GetFilesystemRequest { - string id = 1; + string id = 1 [(nid) = { + resource: ["computefilesystem"] + }]; } message ListFilesystemsRequest { - string parent_id = 1; + string parent_id = 1 [(nid) = { + resource: ["project"] + }]; int64 page_size = 2; @@ -62,19 +73,25 @@ message ListFilesystemsRequest { } message CreateFilesystemRequest { - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; FilesystemSpec spec = 2; } message UpdateFilesystemRequest { - common.v1.ResourceMetadata metadata = 1; + common.v1.ResourceMetadata metadata = 1 [(nid) = { + parent_resource: ["project"] + }]; FilesystemSpec spec = 2; } message DeleteFilesystemRequest { - string id = 1; + string id = 1 [(nid) = { + resource: ["computefilesystem"] + }]; } message ListFilesystemsResponse { diff --git a/nebius/storage/v1/inventory.proto b/nebius/storage/v1/inventory.proto new file mode 100644 index 0000000..adc7910 --- /dev/null +++ b/nebius/storage/v1/inventory.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; + +package nebius.storage.v1; + +import "buf/validate/validate.proto"; +import "nebius/annotations.proto"; +import "nebius/common/v1/metadata.proto"; + +option go_package = "github.com/nebius/gosdk/proto/nebius/storage/v1"; +option java_multiple_files = true; +option java_outer_classname = "InventoryProto"; +option java_package = "ai.nebius.pub.storage.v1"; + +// Inventory configures periodic generation of an object listing for a bucket. +message Inventory { + option (resource_behavior) = IMMUTABLE_NAME; + + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field).required = true, + (nid) = { + parent_resource: ["storagebucket"] + } + ]; + + InventorySpec spec = 2 [(buf.validate.field).required = true]; + + InventoryStatus status = 3 [(field_behavior) = OUTPUT_ONLY]; +} + +// Desired configuration of an inventory. +message InventorySpec { + enum OutputFormat { + OUTPUT_FORMAT_UNSPECIFIED = 0; + + // CSV compressed with GZIP. + CSV_GZIP = 1; + + // Parquet compressed with Snappy. + PARQUET_SNAPPY = 2; + } + + enum OptionalField { + OPTIONAL_FIELD_UNSPECIFIED = 0; + + // Timestamp of the last access. + LAST_ACCESS = 1; + + // Checksum algorithms used. + CHECKSUM_ALGORITHMS = 2; + + // Current intelligent tier (for Intelligent Storage Class). + INTELLIGENT_TIER = 3; + + // True for multipart uploads, false for simple objects. + IS_MULTIPART_UPLOAD = 4; + + // Timestamp of lifecycle expiration. + LIFECYCLE_EXPIRATION = 5; + + // Object tags. + TAGS = 6; + } + + enum Schedule { + SCHEDULE_UNSPECIFIED = 0; + + // Run once a day. + DAILY = 1; + + // Run once a week. + WEEKLY = 2; + } + + // Enable or disable inventory generation. + bool enabled = 1; + + // Prefix to filter objects in the source bucket. + string source_prefix = 2; + + // ID of the destination bucket. + string destination_bucket_id = 3 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["storagebucket"] + } + ]; + + // Prefix under which bucket inventory will be stored in the destination bucket. + string destination_prefix = 4 [(buf.validate.field) = { + string: {max_len: 256} + }]; + + // Inventory format. + OutputFormat output_format = 5 [(buf.validate.field).required = true]; + + // Include noncurrent versions in inventory if set to true. + bool noncurrent_versions = 6; + + // Optional fields to include in inventory. + repeated OptionalField optional_fields = 7; + + // How often to generate the inventory. + Schedule schedule = 8 [(buf.validate.field).required = true]; +} + +message InventoryStatus {} diff --git a/nebius/storage/v1/inventory_service.proto b/nebius/storage/v1/inventory_service.proto new file mode 100644 index 0000000..2e352cd --- /dev/null +++ b/nebius/storage/v1/inventory_service.proto @@ -0,0 +1,90 @@ +syntax = "proto3"; + +package nebius.storage.v1; + +import "buf/validate/validate.proto"; +import "nebius/annotations.proto"; +import "nebius/common/v1/metadata.proto"; +import "nebius/common/v1/operation.proto"; +import "nebius/storage/v1/inventory.proto"; + +option go_package = "github.com/nebius/gosdk/proto/nebius/storage/v1"; +option java_multiple_files = true; +option java_outer_classname = "InventoryServiceProto"; +option java_package = "ai.nebius.pub.storage.v1"; + +// InventoryService manages bucket inventory configurations. +service InventoryService { + option (api_service_name) = "cpl.storage"; + + rpc Get(GetInventoryRequest) returns (Inventory); + + rpc GetByName(common.v1.GetByNameRequest) returns (Inventory); + + rpc List(ListInventoriesRequest) returns (ListInventoriesResponse); + + rpc Create(CreateInventoryRequest) returns (common.v1.Operation); + + rpc Update(UpdateInventoryRequest) returns (common.v1.Operation); + + rpc Delete(DeleteInventoryRequest) returns (common.v1.Operation); +} + +message GetInventoryRequest { + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["storagebucketinventory"] + } + ]; +} + +message ListInventoriesRequest { + string parent_id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["storagebucket"] + } + ]; + + int64 page_size = 2; + + string page_token = 3; +} + +message ListInventoriesResponse { + repeated Inventory items = 1; + + string next_page_token = 2; +} + +message CreateInventoryRequest { + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field).required = true, + (nid) = { + parent_resource: ["storagebucket"] + } + ]; + + InventorySpec spec = 2 [(buf.validate.field).required = true]; +} + +message UpdateInventoryRequest { + common.v1.ResourceMetadata metadata = 1 [ + (buf.validate.field).required = true, + (nid) = { + parent_resource: ["storagebucket"] + } + ]; + + InventorySpec spec = 2 [(buf.validate.field).required = true]; +} + +message DeleteInventoryRequest { + string id = 1 [ + (buf.validate.field).required = true, + (nid) = { + resource: ["storagebucketinventory"] + } + ]; +} diff --git a/nebius/tunnel/v1/tunnel.proto b/nebius/tunnel/v1/tunnel.proto index cc9ea19..6e94f29 100644 --- a/nebius/tunnel/v1/tunnel.proto +++ b/nebius/tunnel/v1/tunnel.proto @@ -60,4 +60,22 @@ message TunnelStatus { // Current lifecycle state of the tunnel. State state = 1; + + // Services reachable through the tunnel. A service is listed while at least + // one agent announces it, and follows the agents within about 30 seconds. + repeated ServiceStatus services = 2; +} + +// ServiceStatus is a service reachable through the tunnel. +message ServiceStatus { + // Name of the service, as the agent announced it. 1-20 characters, lowercase + // letters and digits only: the hostname joins the name to the tunnel id with + // a dash, so a name may not contain one. For example, "app". + string name = 1; + + // Where to reach the service, as host:port. The tunnel terminates TLS, so a + // client connects over TLS and sends the host as SNI. What travels inside is + // whatever the service speaks, which the tunnel does not interpret. + // For example, "app-hy3wnb3wstpk7dz.tunnel.example.com:443". + string endpoint = 2; }