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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
96 changes: 96 additions & 0 deletions nebius/common/v1/preflight_check.proto
Original file line number Diff line number Diff line change
@@ -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;
}
12 changes: 9 additions & 3 deletions nebius/compute/v1/filesystem.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
29 changes: 23 additions & 6 deletions nebius/compute/v1/filesystem_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 {
Expand Down
106 changes: 106 additions & 0 deletions nebius/storage/v1/inventory.proto
Original file line number Diff line number Diff line change
@@ -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 {}
90 changes: 90 additions & 0 deletions nebius/storage/v1/inventory_service.proto
Original file line number Diff line number Diff line change
@@ -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"]
}
];
}
Loading