|
| 1 | +syntax = "proto3"; |
| 2 | + |
| 3 | +package yandex.cloud.priv.team.integration.v1; |
| 4 | + |
| 5 | +option go_package = "github.com/ydb-platform/ydb/ydb/public/api/client/yc_private/team;integration"; |
| 6 | +option java_outer_classname = "PTIAS"; |
| 7 | + |
| 8 | +import "ydb/public/api/client/yc_common/api/operation.proto"; |
| 9 | +import "ydb/public/api/client/yc_private/operation/operation.proto"; |
| 10 | +import "ydb/public/api/client/yc_private/common/validation.proto"; |
| 11 | + |
| 12 | +// A set of methods for mapping ABC folders to clouds and vice versa. |
| 13 | +// https://wiki.yandex-team.ru/intranet/abc/ |
| 14 | +service AbcService { |
| 15 | + // Creates new cloud for abc folder id. |
| 16 | + // If given abc folder id does not exists, the result will be `FAILED_PRECONDITION`. |
| 17 | + // If such cloud already exists for the given abc folder id, the result will be `ALREADY_EXISTS`. |
| 18 | + rpc Create (CreateCloudRequest) returns (operation.Operation) { |
| 19 | + option (yandex.cloud.api.operation) = { |
| 20 | + metadata: "CreateCloudMetadata" |
| 21 | + response: "CreateCloudResponse" |
| 22 | + }; |
| 23 | + } |
| 24 | + |
| 25 | + // Resolves cloud id to abc folder id or vice versa. |
| 26 | + // If no cloud created for the given abc folder id, the result will be `NOT_FOUND`. |
| 27 | + rpc Resolve (ResolveRequest) returns (ResolveResponse) {} |
| 28 | +} |
| 29 | + |
| 30 | +message CreateCloudRequest { |
| 31 | + oneof abc { |
| 32 | + option (exactly_one) = true; |
| 33 | + // Deprecated. Creates cloud_id for default folder of ABC service. |
| 34 | + string abc_slug = 1 [deprecated = true]; |
| 35 | + // Deprecated. Creates cloud_id for default folder of ABC service. |
| 36 | + int64 abc_id = 2 [deprecated = true]; |
| 37 | + string abc_folder_id = 3; |
| 38 | + } |
| 39 | +} |
| 40 | + |
| 41 | +message CreateCloudMetadata { |
| 42 | + string abc_slug = 1; |
| 43 | + int64 abc_id = 2; |
| 44 | + string abc_folder_id = 3; |
| 45 | +} |
| 46 | + |
| 47 | +message CreateCloudResponse { |
| 48 | + string cloud_id = 1; |
| 49 | + string default_folder_id = 2; |
| 50 | +} |
| 51 | + |
| 52 | +message ResolveRequest { |
| 53 | + oneof abc { |
| 54 | + option (exactly_one) = true; |
| 55 | + string cloud_id = 1; |
| 56 | + // Deprecated. Resolves cloud_id for default folder of ABC service. |
| 57 | + string abc_slug = 2 [deprecated = true]; |
| 58 | + // Deprecated. Resolves cloud_id for default folder of ABC service. |
| 59 | + int64 abc_id = 3 [deprecated = true]; |
| 60 | + string abc_folder_id = 4; |
| 61 | + } |
| 62 | +} |
| 63 | + |
| 64 | +message ResolveResponse { |
| 65 | + string cloud_id = 1; |
| 66 | + // Deprecated. Will be removed in a future release. |
| 67 | + string abc_slug = 2; |
| 68 | + // Deprecated. Will be removed in a future release. |
| 69 | + int64 abc_id = 3; |
| 70 | + string default_folder_id = 4; |
| 71 | + string abc_folder_id = 5; |
| 72 | +} |
0 commit comments