aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/iam/v1/service_control_service.proto
blob: ab97faf7a642018ec5428ec30718fcfa0b858788 (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
syntax = "proto3";

package yandex.cloud.iam.v1;

import "google/api/annotations.proto";
import "yandex/cloud/api/operation.proto";
import "yandex/cloud/iam/v1/resource.proto";
import "yandex/cloud/iam/v1/service_control.proto";
import "yandex/cloud/operation/operation.proto";
import "yandex/cloud/validation.proto";

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

// A set of methods for managing Service resources.
service ServiceControlService {
  // Returns the Service information in the specified resource container.
  //
  // To get the list of available Services, make a [List] request.
  rpc Get (GetServiceRequest) returns (Service) {
    option (google.api.http) = { get: "/iam/v1/services/{service_id}" };
  }

  // Retrieves the list of Service in the specified resource container.
  rpc List (ListServicesRequest) returns (ListServicesResponse) {
    option (google.api.http) = { get: "/iam/v1/services" };
  }

  // Enable a service in the specified resource container.
  rpc Enable (EnableServiceRequest) returns (operation.Operation) {
    option (google.api.http) = { post: "/iam/v1/service/{service_id}:enable" body: "*" };
    option (yandex.cloud.api.operation) = {
      metadata: "EnableServiceMetadata"
      response: "Service"
    };
  }

  // Resume a service in the specified resource container.
  rpc Resume (ResumeServiceRequest) returns (operation.Operation) {
    option (google.api.http) = { post: "/iam/v1/service/{service_id}:resume" body: "*" };
    option (yandex.cloud.api.operation) = {
      metadata: "ResumeServiceMetadata"
      response: "Service"
    };
  }

  // Pause a service in the specified resource container.
  rpc Pause (PauseServiceRequest) returns (operation.Operation) {
    option (google.api.http) = { post: "/iam/v1/service/{service_id}:pause" body: "*" };
    option (yandex.cloud.api.operation) = {
      metadata: "PauseServiceMetadata"
      response: "Service"
    };
  }

  // Disable a service in the specified resource container.
  rpc Disable (DisableServiceRequest) returns (operation.Operation) {
    option (google.api.http) = { post: "/iam/v1/service/{service_id}:disable" body: "*" };
    option (yandex.cloud.api.operation) = {
      metadata: "DisableServiceMetadata"
      response: "Service"
    };
  }
}

message GetServiceRequest {
  // ID of the Service.
  string service_id = 1 [(required) = true, (length) = "<=50"];

  // Resource container to get a service information in.
  //
  // It is supported only resource-manager.cloud resource container now.
  Resource resource = 2 [(required) = true];
}

message ListServicesRequest {
  // Resource container to list a services.
  //
  // It is supported only resource-manager.cloud resource container now.
  Resource resource = 1 [(required) = true];

  // The maximum number of results per page to return. If the number of available
  // results is larger than [page_size],
  // the service returns a [ListServicesResponse.next_page_token]
  // that can be used to get the next page of results in subsequent list requests.
  // Default value: 100
  int64 page_size = 2 [(value) = "0-1000"];

  // Page token. To get the next page of results, set [page_token]
  // to the [ListServicesResponse.next_page_token]
  // returned by a previous list request.
  string page_token = 3 [(length) = "<=2000"];
}

message ListServicesResponse {
  // List of Services.
  repeated Service services = 1;

  // This token allows you to get the next page of results for list requests. If the number of results
  // is larger than [ListServicesRequest.page_size], use
  // the [next_page_token] as the value
  // for the [ListServicesRequest.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 EnableServiceRequest {
  // ID of the Service.
  string service_id = 1 [(required) = true, (length) = "<=50"];

  // Resource container to enable a service in.
  //
  // It is supported only resource-manager.cloud resource container now.
  Resource resource = 2 [(required) = true];
}

message EnableServiceMetadata {
  // ID of the Service.
  string service_id = 1;

  // Resource container.
  Resource resource = 2;
}

message ResumeServiceRequest {
  // ID of the Service.
  string service_id = 1 [(required) = true, (length) = "<=50"];

  // Resource container to resume a service in.
  //
  // It is supported only resource-manager.cloud resource container now.
  Resource resource = 2 [(required) = true];
}

message ResumeServiceMetadata {
  // ID of the Service.
  string service_id = 1;

  // Resource container.
  Resource resource = 2;
}

message PauseServiceRequest {
  // ID of the Service.
  string service_id = 1 [(required) = true, (length) = "<=50"];

  // Resource container to pause a service in.
  //
  // It is supported only resource-manager.cloud resource container now.
  Resource resource = 2 [(required) = true];

  // Force pause.
  //
  // It will pause service even if there is service resources that will be broke.
  bool force = 3;
}

message PauseServiceMetadata {
  // ID of the Service.
  string service_id = 1;

  // Resource container.
  Resource resource = 2;
}

message DisableServiceRequest {
  // ID of the Service.
  string service_id = 1 [(required) = true, (length) = "<=50"];

  // Resource container to disable a service in.
  //
  // It is supported only resource-manager.cloud resource container now.
  Resource resource = 2 [(required) = true];
}

message DisableServiceMetadata {
  // ID of the Service.
  string service_id = 1;

  // Resource container.
  Resource resource = 2;
}