Skip to content

Commit f7ef70b

Browse files
added integration
1 parent 96d3653 commit f7ef70b

File tree

4 files changed

+114
-0
lines changed

4 files changed

+114
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
syntax = "proto3";
2+
3+
package yandex.cloud.priv.team.integration.v1;
4+
5+
import "ydb/public/api/client/yc_private/operation/operation.proto";
6+
import "ydb/public/api/client/yc_private/common/validation.proto";
7+
8+
option go_package = "github.com/ydb-platform/ydb/ydb/public/api/client/yc_private/team;integration";
9+
option java_outer_classname = "POS";
10+
11+
service OperationService {
12+
rpc Get (GetOperationRequest) returns (operation.Operation) {}
13+
}
14+
15+
message GetOperationRequest {
16+
string operation_id = 1 [(required) = true, (length) = "<=50"];
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
PROTO_LIBRARY()
2+
3+
GRPC()
4+
SRCS(
5+
abc_service.proto
6+
operation_service.proto
7+
)
8+
9+
USE_COMMON_GOOGLE_APIS(
10+
api/annotations
11+
rpc/code
12+
rpc/errdetails
13+
rpc/status
14+
type/timeofday
15+
type/dayofweek
16+
)
17+
18+
PEERDIR(
19+
ydb/public/api/client/yc_common/api
20+
ydb/public/api/client/yc_private/common
21+
ydb/public/api/client/yc_private/operation
22+
)
23+
END()
24+

ydb/public/api/client/yc_private/ya.make

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ RECURSE(
55
iam
66
kms
77
operation
8+
team
89
quota
910
resourcemanager
1011
servicecontrol

0 commit comments

Comments
 (0)