-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcluster_service.proto
75 lines (52 loc) · 2.09 KB
/
cluster_service.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
syntax = "proto3";
package nebius.mk8s.v1alpha1;
import "buf/validate/validate.proto";
import "nebius/common/v1/metadata.proto";
import "nebius/common/v1alpha1/operation.proto";
import "nebius/mk8s/v1alpha1/cluster.proto";
option go_package = "github.com/nebius/gosdk/proto/nebius/mk8s/v1alpha1";
option java_multiple_files = true;
option java_outer_classname = "ClusterServiceProto";
option java_package = "ai.nebius.pub.mk8s.v1alpha1";
service ClusterService {
rpc Get(GetClusterRequest) returns (Cluster);
rpc GetByName(GetClusterByNameRequest) returns (Cluster);
rpc List(ListClustersRequest) returns (ListClustersResponse);
rpc Create(CreateClusterRequest) returns (common.v1alpha1.Operation);
rpc Update(UpdateClusterRequest) returns (common.v1alpha1.Operation);
rpc Delete(DeleteClusterRequest) returns (common.v1alpha1.Operation);
}
message CreateClusterRequest {
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field).required = true];
ClusterSpec spec = 2 [(buf.validate.field).required = true];
}
message GetClusterRequest {
string id = 1 [(buf.validate.field).required = true];
string resource_version = 2;
}
message GetClusterByNameRequest {
string parent_id = 1 [(buf.validate.field).required = true];
string name = 2 [(buf.validate.field).required = true];
}
message ListClustersRequest {
// ID of the IAM container we are listing the resources in.
string parent_id = 1 [(buf.validate.field).required = true];
// Specifies the maximum number of items to return in the response.
int64 page_size = 2;
// Token for pagination, allowing the retrieval of the next set of results.
string page_token = 3;
}
message ListClustersResponse {
repeated Cluster items = 1;
string next_page_token = 2;
}
message UpdateClusterRequest {
// Metadata associated with the instance.
// Includes ID of the instance to update.
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field).required = true];
// Updated specifications for the instance.
ClusterSpec spec = 2;
}
message DeleteClusterRequest {
string id = 1 [(buf.validate.field).required = true];
}