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
40 changes: 29 additions & 11 deletions nebius/applications/v1alpha1/k8s_release.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,35 @@ message K8sRelease {
}

message K8sReleaseSpec {
string cluster_id = 1 [(buf.validate.field).required = true, (field_behavior) = IMMUTABLE];

string product_slug = 2 [(buf.validate.field).required = true, (field_behavior) = IMMUTABLE];

string namespace = 3 [(buf.validate.field).required = true, (field_behavior) = IMMUTABLE];

string application_name = 4 [(buf.validate.field).required = true, (field_behavior) = IMMUTABLE];

string values = 5 [(field_behavior) = INPUT_ONLY, (sensitive) = true];

map<string, string> set = 6 [(field_behavior) = INPUT_ONLY, (sensitive) = true];
string cluster_id = 1 [
(buf.validate.field).required = true,
(field_behavior) = IMMUTABLE
];

string product_slug = 2 [
(buf.validate.field).required = true,
(field_behavior) = IMMUTABLE
];

string namespace = 3 [
(buf.validate.field).required = true,
(field_behavior) = IMMUTABLE
];

string application_name = 4 [
(buf.validate.field).required = true,
(field_behavior) = IMMUTABLE
];

string values = 5 [
(field_behavior) = INPUT_ONLY,
(sensitive) = true
];

map<string, string> set = 6 [
(field_behavior) = INPUT_ONLY,
(sensitive) = true
];
}

message K8sReleaseStatus {
Expand Down
113 changes: 113 additions & 0 deletions nebius/audit/v2/audit_event_export.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
syntax = "proto3";

package nebius.audit.v2;

import "buf/validate/validate.proto";
import "google/protobuf/timestamp.proto";
import "nebius/annotations.proto";
import "nebius/audit/v2/audit_event_service.proto";
import "nebius/common/v1/metadata.proto";

option go_package = "github.com/nebius/gosdk/proto/nebius/audit/v2";
option java_multiple_files = true;
option java_outer_classname = "AuditEventExportProto";
option java_package = "ai.nebius.pub.audit.v2";

// A resource representing information about previously created exports of audit events.
// Each record stores data about which filter was used and where the audit events were exported.
message AuditEventExport {
common.v1.ResourceMetadata metadata = 1;

AuditEventExportSpec spec = 2;

AuditEventExportStatus status = 3;
}

message AuditEventExportSpec {
// Filter based on which audit logs must be exported.
AuditEventExportParams params = 1 [(buf.validate.field).required = true];

oneof export_destination {
option (buf.validate.oneof).required = true;

// An object storage bucket that will be used as the destination for audit logs.
// You must have `storage.upload` permission for successful execution.
NebiusObjectStorageDestination nebius_object_storage = 2;
}
}

message NebiusObjectStorageDestination {
// Prefix for export objects.
// Default value is `auditlogs`.
string object_prefix = 1;

// The bucket into which events will be exported.
oneof bucket {
option (buf.validate.oneof).required = true;

BucketById bucket_by_id = 2;
}
}

message BucketById {
// The id of the bucket in the tenant where the logs will be exported.
string id = 1 [(buf.validate.field).required = true];
}

message AuditEventExportParams {
// Returns results with a timestamp greater than or equal to this value.
google.protobuf.Timestamp from = 1 [(buf.validate.field).required = true];

// Returns results with a timestamp lower than this value.
google.protobuf.Timestamp to = 2 [(buf.validate.field).required = true];

// Example:
// service.name = 'iam' AND resource.hierarchy.id:'container-e0t' AND regex(resource.metadata.name, '^.*test.*$')
//
// Supported filters:
// "=" - equals
// "!=" - not equals
// ":" - contains
// regex - regular expression
//
// Fields that can be used for filtering:
// action
// authentication.static_key_credential.id
// authentication.subject.service_account_id
// authentication.subject.tenant_user_id
// authentication.token_credential.masked_token
// project_region.name
// resource.hierarchy.id
// resource.hierarchy.name
// resource.metadata.id
// resource.metadata.name
// resource.metadata.type
// service.name
// type
// status
string filter = 3 [(sensitive) = true];

// Type of audit event to filter by.
EventType event_type = 4 [(buf.validate.field).required = true];
}

message AuditEventExportStatus {
// Current state of audit logs export.
AuditEventExportState state = 1;
}

enum AuditEventExportState {
AUDIT_EVENT_EXPORT_STATE_UNSPECIFIED = 0;

// Export created and running.
AUDIT_EVENT_EXPORT_STATE_RUNNING = 1;

// Export has been cancelled.
AUDIT_EVENT_EXPORT_STATE_CANCELED = 2;

// Export successfully completed.
AUDIT_EVENT_EXPORT_STATE_DONE = 3;

// Export failed.
AUDIT_EVENT_EXPORT_STATE_FAILED = 4;
}
7 changes: 6 additions & 1 deletion nebius/audit/v2/audit_event_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ message ListAuditEventRequest {
// A tenant id must be provided
string parent_id = 1 [(buf.validate.field).required = true];

int64 page_size = 2 [(buf.validate.field) = { int64: { lte: 500, gte: 0 } }];
int64 page_size = 2 [(buf.validate.field) = {
int64: {
lte: 500
gte: 0
}
}];

google.protobuf.Timestamp start = 3 [(buf.validate.field).required = true];

Expand Down
4 changes: 2 additions & 2 deletions nebius/common/error/v1alpha1/common_errors.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ package nebius.common.error.v1alpha1;

import "nebius/annotations.proto";

option go_package = "github.com/nebius/gosdk/proto/nebius/common/error/v1alpha1";
option deprecated = true;
option (file_deprecation_details) = { description: "migrate to common/v1" };
option go_package = "github.com/nebius/gosdk/proto/nebius/common/error/v1alpha1";
option java_multiple_files = true;
option java_outer_classname = "CommonErrorsProto";
option java_package = "ai.nebius.pub.common.error.v1alpha1";
option (file_deprecation_details) = {description: "migrate to common/v1"};

// The request is invalid.
message BadRequest {
Expand Down
6 changes: 3 additions & 3 deletions nebius/common/error/v1alpha1/error.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ package nebius.common.error.v1alpha1;
import "nebius/annotations.proto";
import "nebius/common/error/v1alpha1/common_errors.proto";

option go_package = "github.com/nebius/gosdk/proto/nebius/common/error/v1alpha1";
option deprecated = true;
option (file_deprecation_details) = { description: "migrate to common/v1" };
option go_package = "github.com/nebius/gosdk/proto/nebius/common/error/v1alpha1";
option java_multiple_files = true;
option java_outer_classname = "ErrorProto";
option java_package = "ai.nebius.pub.common.error.v1alpha1";
option (file_deprecation_details) = {description: "migrate to common/v1"};

message ServiceError {
option deprecated = true;
option (message_deprecation_details) = { description: "migrate to common/v1" };
option (message_deprecation_details) = {description: "migrate to common/v1"};

// ID of Service which the error originated in. E.g. "dns".
string service = 1;
Expand Down
4 changes: 3 additions & 1 deletion nebius/common/v1/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ message ResourceMetadata {
// Positive and monotonically increases on each resource spec change (but *not* on each change of the
// resource's container(s) or status).
// Service allows zero value or current.
int64 resource_version = 4 [(buf.validate.field) = { int64: { gte: 0 } }];
int64 resource_version = 4 [(buf.validate.field) = {
int64: {gte: 0}
}];

// Timestamp indicating when the resource was created.
google.protobuf.Timestamp created_at = 5 [(field_behavior) = OUTPUT_ONLY];
Expand Down
12 changes: 6 additions & 6 deletions nebius/common/v1/operation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ syntax = "proto3";

package nebius.common.v1;

import "buf/validate/validate.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "buf/validate/validate.proto";
import "nebius/annotations.proto";

option go_package = "github.com/nebius/gosdk/proto/nebius/common/v1";
Expand Down Expand Up @@ -44,13 +44,13 @@ message Operation {
// All the header names *must* be converted to lower case.
// Validator is based on:
// https://httpwg.org/specs/rfc9110.html#considerations.for.new.field.names
map<string, RequestHeader> request_headers = 11 [
(buf.validate.field) = {
map: {
keys: { string: { pattern: "^[a-z][-a-z\\.]*$" } }
map<string, RequestHeader> request_headers = 11 [(buf.validate.field) = {
map: {
keys: {
string: {pattern: "^[a-z][-a-z\\.]*$"}
}
}
];
}];

// ID of the resource that this operation creates, updates, deletes or otherwise changes.
//
Expand Down
4 changes: 3 additions & 1 deletion nebius/common/v1/resource_event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,7 @@ message RecurrentResourceEvent {
ResourceEvent last_occurrence = 2 [(buf.validate.field).required = true];

// The number of times this event has occurred between `first_occurred_at` and `last_occurrence.occurred_at`. Must be > 0
int64 occurrence_count = 3 [(buf.validate.field) = { int64: { gt: 0 } }];
int64 occurrence_count = 3 [(buf.validate.field) = {
int64: {gt: 0}
}];
}
18 changes: 9 additions & 9 deletions nebius/common/v1alpha1/operation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ syntax = "proto3";

package nebius.common.v1alpha1;

import "buf/validate/validate.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "buf/validate/validate.proto";
import "nebius/annotations.proto";

option go_package = "github.com/nebius/gosdk/proto/nebius/common/v1alpha1";
option deprecated = true;
option (file_deprecation_details) = { description: "migrate to common/v1" };
option go_package = "github.com/nebius/gosdk/proto/nebius/common/v1alpha1";
option java_multiple_files = true;
option java_outer_classname = "OperationProto";
option java_package = "ai.nebius.pub.common.v1alpha1";
option (file_deprecation_details) = {description: "migrate to common/v1"};

message Operation {
option deprecated = true;
option (message_deprecation_details) = { description: "migrate to common/v1" };
option (message_deprecation_details) = {description: "migrate to common/v1"};

// ID of the operation.
string id = 1;
Expand Down Expand Up @@ -50,13 +50,13 @@ message Operation {
// All the header names *must* be converted to lower case.
// Validator is based on:
// https://httpwg.org/specs/rfc9110.html#considerations.for.new.field.names
map<string, request_header> request_headers = 11 [
(buf.validate.field) = {
map: {
keys: { string: { pattern: "^[a-z][-a-z\\.]*$" } }
map<string, request_header> request_headers = 11 [(buf.validate.field) = {
map: {
keys: {
string: {pattern: "^[a-z][-a-z\\.]*$"}
}
}
];
}];

// ID of the resource that this operation creates, updates, deletes or otherwise changes.
//
Expand Down
16 changes: 8 additions & 8 deletions nebius/common/v1alpha1/operation_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ syntax = "proto3";
package nebius.common.v1alpha1;

import "buf/validate/validate.proto";
import "nebius/common/v1alpha1/operation.proto";
import "nebius/annotations.proto";
import "nebius/common/v1alpha1/operation.proto";

option go_package = "github.com/nebius/gosdk/proto/nebius/common/v1alpha1";
option deprecated = true;
option (file_deprecation_details) = { description: "migrate to common/v1" };
option go_package = "github.com/nebius/gosdk/proto/nebius/common/v1alpha1";
option java_multiple_files = true;
option java_outer_classname = "OperationServiceProto";
option java_package = "ai.nebius.pub.common.v1alpha1";
option (file_deprecation_details) = {description: "migrate to common/v1"};

// Service for reading operations.
service OperationService {
option deprecated = true;
option (service_deprecation_details) = { description: "migrate to common/v1" };
option (service_deprecation_details) = {description: "migrate to common/v1"};

// Returns the latest state of the specified operation.
rpc Get(GetOperationRequest) returns (Operation);
Expand All @@ -27,15 +27,15 @@ service OperationService {

message GetOperationRequest {
option deprecated = true;
option (message_deprecation_details) = { description: "migrate to common/v1" };
option (message_deprecation_details) = {description: "migrate to common/v1"};

// Operation ID.
string id = 1 [(buf.validate.field).required = true];
}

message ListOperationsRequest {
option deprecated = true;
option (message_deprecation_details) = { description: "migrate to common/v1" };
option (message_deprecation_details) = {description: "migrate to common/v1"};

// ID of the Resource to list operations for.
string resource_id = 1 [(buf.validate.field).required = true];
Expand All @@ -53,7 +53,7 @@ message ListOperationsRequest {

message ListOperationsResponse {
option deprecated = true;
option (message_deprecation_details) = { description: "migrate to common/v1" };
option (message_deprecation_details) = {description: "migrate to common/v1"};

// List of operations on this result page.
repeated Operation operations = 1;
Expand All @@ -64,7 +64,7 @@ message ListOperationsResponse {

message ListOperationsByParentRequest {
option deprecated = true;
option (message_deprecation_details) = { description: "migrate to common/v1" };
option (message_deprecation_details) = {description: "migrate to common/v1"};

// ID of the parent to list operations for resource type at.
string parent_id = 1 [(buf.validate.field).required = true];
Expand Down
7 changes: 5 additions & 2 deletions nebius/compute/v1/disk.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ syntax = "proto3";
package nebius.compute.v1;

import "buf/validate/validate.proto";
import "nebius/common/v1/metadata.proto";
import "nebius/annotations.proto";
import "nebius/common/v1/metadata.proto";

option go_package = "github.com/nebius/gosdk/proto/nebius/compute/v1";
option java_multiple_files = true;
Expand Down Expand Up @@ -56,7 +56,10 @@ message DiskSpec {

// The type of disk defines the performance and reliability characteristics of the block device.
// For details, see https://docs.nebius.com/compute/storage/types#disks-types
DiskType type = 6 [(buf.validate.field).required = true, (field_behavior) = IMMUTABLE];
DiskType type = 6 [
(buf.validate.field).required = true,
(field_behavior) = IMMUTABLE
];

// Source for disk creation.
// Boot disk must be created from an image https://docs.nebius.com/compute/storage/manage#boot
Expand Down
2 changes: 1 addition & 1 deletion nebius/compute/v1/disk_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ message ListDisksRequest {
string filter = 4 [
deprecated = true,
(field_deprecation_details) = {
effective_at: "2025-06-16",
effective_at: "2025-06-16"
description: "it is not implemented, filtering could be done on client side"
}
];
Expand Down
Loading