aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/datasphere/v2/community_service.proto
blob: e533111dbc6ee7b7d0766db29955710e9990eaf8 (plain) (blame)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
syntax = "proto3";

package yandex.cloud.datasphere.v2;

import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "yandex/cloud/access/access.proto";
import "yandex/cloud/api/operation.proto";
import "yandex/cloud/validation.proto";
import "yandex/cloud/operation/operation.proto";
import "yandex/cloud/datasphere/v2/community.proto";
import "yandex/cloud/datasphere/v2/resource_types.proto";
import "yandex/cloud/datasphere/v2/restrictions.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/datasphere/v2;datasphere";
option java_package = "yandex.cloud.api.datasphere.v2";

// A set of methods for managing Community resources.
service CommunityService {
  // Creates community in specified organization.
  rpc Create(CreateCommunityRequest) returns (operation.Operation) {
    option (google.api.http) = {
      post: "/datasphere/v2/communities"
      body: "*"
    };
    option (yandex.cloud.api.operation) = {
      metadata: "CreateCommunityMetadata"
      response: "Community"
    };
  }

  // Returns community.
  rpc Get(GetCommunityRequest) returns (Community) {
    option (google.api.http) = {get: "/datasphere/v2/communities/{community_id}"};
  }

  // Updates specified community.
  rpc Update(UpdateCommunityRequest) returns (operation.Operation) {
    option (google.api.http) = {
      patch: "/datasphere/v2/communities/{community_id}"
      body: "*"
    };
    option (yandex.cloud.api.operation) = {
      metadata: "UpdateCommunityMetadata"
      response: "Community"
    };
  }

  // Deletes specified community.
  rpc Delete(DeleteCommunityRequest) returns (operation.Operation) {
    option (google.api.http) = {delete: "/datasphere/v2/communities/{community_id}"};
    option (yandex.cloud.api.operation) = {
      metadata: "DeleteCommunityMetadata"
      response: "google.protobuf.Empty"
    };
  }

  // List communities in specified organization.
  rpc List(ListCommunitiesRequest) returns (ListCommunitiesResponse) {
    option (google.api.http) = {get: "/datasphere/v2/communities"};
  }

  // Lists access bindings for specified community.
  rpc ListAccessBindings(access.ListAccessBindingsRequest) returns (access.ListAccessBindingsResponse) {
    option (google.api.http) = {get: "/datasphere/v2/communities/{resource_id}:accessBindings"};
  }

  // Sets access bindings for specified community.
  rpc SetAccessBindings(access.SetAccessBindingsRequest) returns (operation.Operation) {
    option (google.api.http) = {
      post: "/datasphere/v2/communities/{resource_id}:setAccessBindings"
      body: "*"
    };
    option (yandex.cloud.api.operation) = {
      metadata: "SetCommunityAccessBindingsMetadata"
      response: "google.protobuf.Empty"
    };
  }

  // Updates access bindings for specified community.
  rpc UpdateAccessBindings(access.UpdateAccessBindingsRequest) returns (operation.Operation) {
    option (google.api.http) = {
      patch: "/datasphere/v2/communities/{resource_id}:updateAccessBindings"
      body: "*"
    };
    option (yandex.cloud.api.operation) = {
      metadata: "UpdateCommunityAccessBindingsMetadata"
      response: "google.protobuf.Empty"
    };
  }

  // Adds shared resource to community
  rpc AddResource(AddCommunityResourceRequest) returns (operation.Operation) {
    option (google.api.http) = {
      post: "/datasphere/v2/communities/{resource_id}:addResource"
      body: "*"
    };
    option (yandex.cloud.api.operation) = {response: "google.protobuf.Empty"};
  }

  // Removes shared resource from community
  rpc RemoveResource(RemoveCommunityResourceRequest) returns (operation.Operation) {
    option (google.api.http) = {
      post: "/datasphere/v2/communities/{resource_id}:removeResource"
      body: "*"
    };
    option (yandex.cloud.api.operation) = {response: "google.protobuf.Empty"};
  }

  // Get meta information about available restrictions.
  rpc GetRestrictionsMeta (google.protobuf.Empty) returns (GetRestrictionsMetaResponse) {
    option (google.api.http) = {get: "/datasphere/v2/communities/restrictionsMeta"};
  }

  // Get current community restrictions.
  rpc GetRestrictions (GetCommunityRestrictionsRequest) returns (RestrictionsResponse) {
    option (google.api.http) = {get: "/datasphere/v2/communities/{community_id}:restrictions"};
  }

  // Set community restrictions.
  rpc SetRestrictions (SetCommunityRestrictionsRequest) returns (operation.Operation) {
    option (google.api.http) = {post: "/datasphere/v2/communities/{community_id}:setRestrictions" body: "*"};
    option (yandex.cloud.api.operation) = {
      response: "RestrictionsResponse"
    };
  }
}

message CreateCommunityRequest {
  // Name of the community.
  string name = 1 [
    (length) = "<=63",
    (pattern) = "[a-zA-Z0-9\u0401\u0451\u0410-\u044f]\\S{1,61}[a-zA-Z0-9\u0401\u0451\u0410-\u044f]"
  ];

  // Description of the community.
  string description = 2;

  // ID of the organization where community should be created.
  string organization_id = 3 [(required) = true];

  // ID of the billing account for the created community. Optional, billing account could be bound to community later.
  string billing_account_id = 4;

  // Labels of the community.
  map<string, string> labels = 5;
}

message CreateCommunityMetadata {
  // ID of the community that is being created.
  string community_id = 1;
}

message GetCommunityRequest {
  // ID of the community.
  string community_id = 1 [(required) = true];
}

message UpdateCommunityRequest {
  // ID of the community.
  string community_id = 1 [(required) = true];

  // Field mask that specifies which fields of the Community resource are going to be updated.
  google.protobuf.FieldMask update_mask = 2;

  // Name of the community.
  string name = 3;

  // Description of the community.
  string description = 4;

  // Labels of the community.
  map<string, string> labels = 5;
}

message UpdateCommunityMetadata {
  // ID of the community that is being updated.
  string community_id = 1;
}

message DeleteCommunityRequest {
  // ID of the community.
  string community_id = 1 [(required) = true];
}

message DeleteCommunityMetadata {
  // ID of the community that is being deleted.
  string community_id = 1;
}

message ListCommunitiesRequest {
  reserved 4;
  // The maximum number of results per page to return. If the number of available
  // results is larger than [page_size],
  // the service returns a [ListCommunitiesResponse.next_page_token]
  // that can be used to get the next page of results in subsequent list requests.
  int64 page_size = 1;

  // Page token. To get the next page of results, set [page_token] to the
  // [ListCommunitiesResponse.next_page_token] returned by a previous list request.
  string page_token = 2;

  // Community name or description pattern.
  // Only communities with names or descriptions matching specified pattern will be returned.
  string name_or_description_pattern = 3;

  // ID of the user. Only communities owned by specified user will be returned.
  string owned_by_id = 5;

  // If set to true, only public communities will be returned.
  bool list_public = 6;

  // ID of the organization to list communities in.
  string organization_id = 7 [(required) = true];
}

message ListCommunitiesResponse {
  // List of communities matching filters in list communities request.
  repeated Community communities = 1;

  // This token allows you to get the next page of results for list requests. If the number of results
  // is larger than [ListCommunitiesRequest.page_size], use
  // the [next_page_token] as the value
  // for the [ListCommunitiesRequest.page_token] query parameter
  // in the next list request. Each subsequent list request will have its own
  // [next_page_token] to continue paging through the results.
  string next_page_token = 2;
}

message SetCommunityAccessBindingsMetadata {
  // ID of the community which access bindings are set.
  string community_id = 1;
}

message UpdateCommunityAccessBindingsMetadata {
  // ID of the community which access bindings are updated.
  string community_id = 1;
}

message AddCommunityResourceRequest {
  string community_id = 1 [
    (required) = true,
    (length) = "<=50"
  ];
  ResourceType resource_type = 2 [(required) = true];
  string resource_id = 3 [(required) = true];
}

message RemoveCommunityResourceRequest {
  string community_id = 1 [
    (required) = true,
    (length) = "<=50"
  ];
  ResourceType resource_type = 2 [(required) = true];
  string resource_id = 3 [(required) = true];
}

message GetCommunityRestrictionsRequest {
  // ID of the community.
  string community_id = 1 [(required) = true];
}

message SetCommunityRestrictionsRequest {
  // ID of the community.
  string community_id = 1 [(required) = true];
  // List of restrictions to set.
  repeated Restriction restrictions = 2;
}