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
3 changes: 3 additions & 0 deletions endpoints.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Services and their endpoints

* api.billing-report-exporter.billing-data-plane.api.nebius.cloud:443
* [nebius.billing.v1alpha1.OneTimeExportService](nebius/billing/v1alpha1/one_time_export_service.proto)
* [nebius.common.v1.OperationService](nebius/common/v1/operation_service.proto)
* api.calculator.billing-data-plane.api.nebius.cloud:443
* [nebius.billing.v1alpha1.CalculatorService](nebius/billing/v1alpha1/calculator_service.proto)
* apps.msp.api.nebius.cloud:443
Expand Down
17 changes: 17 additions & 0 deletions nebius/billing/v1alpha1/billing_report_exporter.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";

package nebius.billing.v1alpha1;

option go_package = "github.com/nebius/gosdk/proto/nebius/billing/v1alpha1";
option java_multiple_files = true;
option java_outer_classname = "BillingReportExporterProto";
option java_package = "ai.nebius.pub.billing.v1alpha1";

// Supported export formats for billing reports.
enum ExportFormat {
EXPORT_FORMAT_UNSPECIFIED = 0;

// FOCUS (FinOps Open Cost and Usage Specification) v1.2 CSV format.
// See: https://focus.finops.org/focus-specification/v1-2/
EXPORT_FORMAT_FOCUS_1_2_CSV = 1;
}
93 changes: 93 additions & 0 deletions nebius/billing/v1alpha1/one_time_export.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
syntax = "proto3";

package nebius.billing.v1alpha1;

import "buf/validate/validate.proto";
import "google/protobuf/timestamp.proto";
import "nebius/annotations.proto";
import "nebius/billing/v1alpha1/billing_report_exporter.proto";
import "nebius/common/v1/error.proto";
import "nebius/common/v1/metadata.proto";

option go_package = "github.com/nebius/gosdk/proto/nebius/billing/v1alpha1";
option java_multiple_files = true;
option java_outer_classname = "OneTimeExportProto";
option java_package = "ai.nebius.pub.billing.v1alpha1";

// One-time export of billing reports as a downloadable archive.
// Creates a .tar.gz archive of FOCUS billing data for the requested period
// and provides a presigned download URL.
message OneTimeExport {
option (resource_behavior) = UNNAMED;

// Parent is Contract ID.
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field).required = true,
(nid) = {
parent_resource: ["contract"]
}
];

// Export configuration specification.
OneTimeExportSpec spec = 2 [(buf.validate.field).required = true];

// Current status of the one-time export.
OneTimeExportStatus status = 3 [(field_behavior) = OUTPUT_ONLY];
}

// Specification for one-time billing report export.
message OneTimeExportSpec {
// Format of the exported billing reports.
ExportFormat format = 1 [(buf.validate.field).required = true];

// The first billing period to include in the export (inclusive).
// Example: "2025-04".
string start_period = 2 [(buf.validate.field).required = true];

// The last billing period to include in the export (inclusive).
// Example: "2025-06".
string end_period = 3 [(buf.validate.field).required = true];
}

// Status information for one-time export.
message OneTimeExportStatus {
// Current state of the export.
OneTimeExportState state = 1;

// Presigned download URL for the archive.
// Populated only when state is DONE. Each Get request generates a fresh URL.
string download_url = 2 [(sensitive) = true];

// Timestamp when this export expires.
google.protobuf.Timestamp expires_at = 3;

// Additional details about the current state.
OneTimeExportStateDetails state_details = 4;
}

// Additional details about the current state of the export.
message OneTimeExportStateDetails {
// Error encountered during export.
// Populated only when state is FAILED.
common.v1.ServiceError error = 1;
}

// Lifecycle states for one-time export.
enum OneTimeExportState {
ONE_TIME_EXPORT_STATE_UNSPECIFIED = 0;

// Export has been created and is scheduled for processing.
ONE_TIME_EXPORT_STATE_SCHEDULED = 1;

// Export is in progress.
ONE_TIME_EXPORT_STATE_RUNNING = 2;

// Export completed successfully. Download URL is available.
ONE_TIME_EXPORT_STATE_SUCCESS = 3;

// Export failed. See error field for details.
ONE_TIME_EXPORT_STATE_FAILED = 4;

// Export has been archived and the archive is no longer available for download.
ONE_TIME_EXPORT_STATE_ARCHIVED = 5;
}
78 changes: 78 additions & 0 deletions nebius/billing/v1alpha1/one_time_export_service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
syntax = "proto3";

package nebius.billing.v1alpha1;

import "buf/validate/validate.proto";
import "nebius/annotations.proto";
import "nebius/billing/v1alpha1/one_time_export.proto";
import "nebius/common/v1/metadata.proto";
import "nebius/common/v1/operation.proto";

option go_package = "github.com/nebius/gosdk/proto/nebius/billing/v1alpha1";
option java_multiple_files = true;
option java_outer_classname = "OneTimeExportServiceProto";
option java_package = "ai.nebius.pub.billing.v1alpha1";

// Service for managing one-time billing report exports.
// Enables creation of downloadable archives of billing data for a specified period.
service OneTimeExportService {
option (api_service_name) = "api.billing-report-exporter.billing-data-plane";

// Creates a new one-time export of billing reports for the requested period.
rpc Create(CreateOneTimeExportRequest) returns (common.v1.Operation);

// Retrieves details of a specific one-time export.
// When the export is complete, the response includes a fresh presigned download URL.
rpc Get(GetOneTimeExportRequest) returns (OneTimeExport);

// Lists one-time exports for a given contract.
rpc List(ListOneTimeExportsRequest) returns (ListOneTimeExportsResponse);
}

message CreateOneTimeExportRequest {
// Resource metadata including parent contract ID.
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field).required = true,
(nid) = {
parent_resource: ["contract"]
}
];

// Export configuration specification.
OneTimeExportSpec spec = 2 [(buf.validate.field).required = true];
}

message GetOneTimeExportRequest {
// Unique identifier of the one-time export.
string id = 1 [
(buf.validate.field).required = true,
(field_behavior) = IDENTIFIER,
(nid) = {
resource: ["billingonetimeexport"]
}
];
}

message ListOneTimeExportsRequest {
// Parent contract ID for which to list one-time exports.
string parent_id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["contract"]
}
];

// Maximum number of items to return per page.
int64 page_size = 2;

// Token for retrieving the next page of results.
string page_token = 3;
}

message ListOneTimeExportsResponse {
// List of one-time exports for the specified contract.
repeated OneTimeExport items = 1;

// Token for retrieving the next page of results. Empty if no more pages.
string next_page_token = 2;
}
7 changes: 6 additions & 1 deletion nebius/mk8s/v1/node_group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ message NodeTemplate {
// Nebius Compute GPUCluster ID that will be attached to node.
GpuClusterSpec gpu_cluster = 4;

repeated NetworkInterfaceTemplate network_interfaces = 5 [(field_behavior) = NON_EMPTY_DEFAULT];
repeated NetworkInterfaceTemplate network_interfaces = 5 [
(field_behavior) = NON_EMPTY_DEFAULT,
(buf.validate.field) = {
repeated: {max_items: 1}
}
];

// Static attachments of Compute Filesystem.
// Can be used as a workaround, until CSI for Compute Disk and Filesystem will be available.
Expand Down
7 changes: 6 additions & 1 deletion nebius/mk8s/v1alpha1/node_group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ message NodeTemplate {

GpuClusterSpec gpu_cluster = 4;

repeated NetworkInterfaceTemplate network_interfaces = 5 [(field_behavior) = NON_EMPTY_DEFAULT];
repeated NetworkInterfaceTemplate network_interfaces = 5 [
(field_behavior) = NON_EMPTY_DEFAULT,
(buf.validate.field) = {
repeated: {max_items: 1}
}
];

repeated AttachedFilesystemSpec filesystems = 7;

Expand Down
7 changes: 7 additions & 0 deletions nebius/storage/v1alpha1/transfer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ message TransferSpec {
// Credentials for accessing the destination bucket. These credentials must have head and write permissions.
// This parameter must be specified only during create operations.
BucketCredentials credentials = 2 [(field_behavior) = INPUT_ONLY];

// The endpoint must be in the form of a URL, starting with the protocol (https),
// followed by the endpoint address without a trailing slash.
// Example: https://storage.us-central1.nebius.cloud
string endpoint = 10 [(field_behavior) = IMMUTABLE];

string region = 11 [(field_behavior) = IMMUTABLE];
}

message BucketCredentials {
Expand Down
48 changes: 39 additions & 9 deletions nebius/vpc/v1/allocation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ option java_package = "ai.nebius.pub.vpc.v1";
message Allocation {
// Metadata for the Allocation.
// `metadata.parent_id` represents IAM Container.
common.v1.ResourceMetadata metadata = 1;
common.v1.ResourceMetadata metadata = 1 [(nid) = {
parent_resource: ["project"]
}];

// Specifications for the allocation, detailing its name and IP configuration.
AllocationSpec spec = 2;
Expand Down Expand Up @@ -65,10 +67,20 @@ message IPv4PrivateAllocationSpec {
// with this subnet.
// In order to assign an allocation to a resource (i.e. network interface)
// both must be associated with the same subnet.
string subnet_id = 2 [(field_behavior) = IMMUTABLE];
string subnet_id = 2 [
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["vpcsubnet"]
}
];

// ID of the pool that allocation will receive its IP address from.
string pool_id = 3 [(field_behavior) = IMMUTABLE];
string pool_id = 3 [
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["vpcpool"]
}
];
}
}

Expand Down Expand Up @@ -101,10 +113,20 @@ message IPv4PublicAllocationSpec {
// this subnet.
// Assigning an allocation to a resource (i.e. network interface) requires
// both to be associated with the same subnet.
string subnet_id = 2 [(field_behavior) = IMMUTABLE];
string subnet_id = 2 [
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["vpcsubnet"]
}
];

// ID of the pool that allocation will receive its IP address from.
string pool_id = 3 [(field_behavior) = IMMUTABLE];
string pool_id = 3 [
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["vpcpool"]
}
];
}
}

Expand Down Expand Up @@ -142,15 +164,19 @@ message AllocationDetails {
string allocated_cidr = 1;

// ID of the pool from which this allocation was made.
string pool_id = 2;
string pool_id = 2 [(nid) = {
resource: ["vpcpool"]
}];

// The IP version of this allocation (IPv4 or IPv6).
IpVersion version = 4;

// ID of the subnet associated with this allocation.
// Populated when created with explicit subnet_id, from a subnet-specific pool,
// or when assigned to a resource.
string subnet_id = 5;
string subnet_id = 5 [(nid) = {
resource: ["vpcsubnet"]
}];
}

message Assignment {
Expand All @@ -165,13 +191,17 @@ message Assignment {

message NetworkInterfaceAssignment {
// ID of the Compute instance network interface belongs to.
string instance_id = 1;
string instance_id = 1 [(nid) = {
resource: ["computeinstance"]
}];

// Network interface name
string name = 2;
}

message LoadBalancerAssignment {
// ID of the Load Balancer.
string id = 1;
string id = 1 [(nid) = {
resource: ["vpcloadbalancer"]
}];
}
Loading