servicemanager.proto
22.1 KB
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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.api.servicemanagement.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/service.proto";
import "google/api/servicemanagement/v1/resources.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/field_mask.proto";
import "google/rpc/status.proto";
option csharp_namespace = "Google.Cloud.ServiceManagement.V1";
option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement";
option java_multiple_files = true;
option java_outer_classname = "ServiceManagerProto";
option java_package = "com.google.api.servicemanagement.v1";
option objc_class_prefix = "GASM";
option php_namespace = "Google\\Cloud\\ServiceManagement\\V1";
option ruby_package = "Google::Cloud::ServiceManagement::V1";
// [Google Service Management API](/service-management/overview)
service ServiceManager {
option (google.api.default_host) = "servicemanagement.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/cloud-platform.read-only,"
"https://www.googleapis.com/auth/service.management,"
"https://www.googleapis.com/auth/service.management.readonly";
// Lists managed services.
//
// Returns all public services. For authenticated users, also returns all
// services the calling user has "servicemanagement.services.get" permission
// for.
//
// **BETA:** If the caller specifies the `consumer_id`, it returns only the
// services enabled on the consumer. The `consumer_id` must have the format
// of "project:{PROJECT-ID}".
rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
option (google.api.http) = {
get: "/v1/services"
};
option (google.api.method_signature) = "producer_project_id,consumer_id";
}
// Gets a managed service. Authentication is required unless the service is
// public.
rpc GetService(GetServiceRequest) returns (ManagedService) {
option (google.api.http) = {
get: "/v1/services/{service_name}"
};
option (google.api.method_signature) = "service_name";
}
// Creates a new managed service.
// Please note one producer project can own no more than 20 services.
//
// Operation<response: ManagedService>
rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/services"
body: "service"
};
option (google.api.method_signature) = "service";
option (google.longrunning.operation_info) = {
response_type: "google.api.servicemanagement.v1.ManagedService"
metadata_type: "google.api.servicemanagement.v1.OperationMetadata"
};
}
// Deletes a managed service. This method will change the service to the
// `Soft-Delete` state for 30 days. Within this period, service producers may
// call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service.
// After 30 days, the service will be permanently deleted.
//
// Operation<response: google.protobuf.Empty>
rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/services/{service_name}"
};
option (google.api.method_signature) = "service_name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "google.api.servicemanagement.v1.OperationMetadata"
};
}
// Revives a previously deleted managed service. The method restores the
// service using the configuration at the time the service was deleted.
// The target service must exist and must have been deleted within the
// last 30 days.
//
// Operation<response: UndeleteServiceResponse>
rpc UndeleteService(UndeleteServiceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/services/{service_name}:undelete"
};
option (google.api.method_signature) = "service_name";
option (google.longrunning.operation_info) = {
response_type: "google.api.servicemanagement.v1.UndeleteServiceResponse"
metadata_type: "google.api.servicemanagement.v1.OperationMetadata"
};
}
// Lists the history of the service configuration for a managed service,
// from the newest to the oldest.
rpc ListServiceConfigs(ListServiceConfigsRequest) returns (ListServiceConfigsResponse) {
option (google.api.http) = {
get: "/v1/services/{service_name}/configs"
};
option (google.api.method_signature) = "service_name";
}
// Gets a service configuration (version) for a managed service.
rpc GetServiceConfig(GetServiceConfigRequest) returns (google.api.Service) {
option (google.api.http) = {
get: "/v1/services/{service_name}/configs/{config_id}"
additional_bindings {
get: "/v1/services/{service_name}/config"
}
};
option (google.api.method_signature) = "service_name,config_id,view";
}
// Creates a new service configuration (version) for a managed service.
// This method only stores the service configuration. To roll out the service
// configuration to backend systems please call
// [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
//
// Only the 100 most recent service configurations and ones referenced by
// existing rollouts are kept for each service. The rest will be deleted
// eventually.
rpc CreateServiceConfig(CreateServiceConfigRequest) returns (google.api.Service) {
option (google.api.http) = {
post: "/v1/services/{service_name}/configs"
body: "service_config"
};
option (google.api.method_signature) = "service_name,service_config";
}
// Creates a new service configuration (version) for a managed service based
// on
// user-supplied configuration source files (for example: OpenAPI
// Specification). This method stores the source configurations as well as the
// generated service configuration. To rollout the service configuration to
// other services,
// please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
//
// Only the 100 most recent configuration sources and ones referenced by
// existing service configurtions are kept for each service. The rest will be
// deleted eventually.
//
// Operation<response: SubmitConfigSourceResponse>
rpc SubmitConfigSource(SubmitConfigSourceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/services/{service_name}/configs:submit"
body: "*"
};
option (google.api.method_signature) = "service_name,config_source,validate_only";
option (google.longrunning.operation_info) = {
response_type: "google.api.servicemanagement.v1.SubmitConfigSourceResponse"
metadata_type: "google.api.servicemanagement.v1.OperationMetadata"
};
}
// Lists the history of the service configuration rollouts for a managed
// service, from the newest to the oldest.
rpc ListServiceRollouts(ListServiceRolloutsRequest) returns (ListServiceRolloutsResponse) {
option (google.api.http) = {
get: "/v1/services/{service_name}/rollouts"
};
option (google.api.method_signature) = "service_name,filter";
}
// Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout].
rpc GetServiceRollout(GetServiceRolloutRequest) returns (Rollout) {
option (google.api.http) = {
get: "/v1/services/{service_name}/rollouts/{rollout_id}"
};
option (google.api.method_signature) = "service_name,rollout_id";
}
// Creates a new service configuration rollout. Based on rollout, the
// Google Service Management will roll out the service configurations to
// different backend services. For example, the logging configuration will be
// pushed to Google Cloud Logging.
//
// Please note that any previous pending and running Rollouts and associated
// Operations will be automatically cancelled so that the latest Rollout will
// not be blocked by previous Rollouts.
//
// Only the 100 most recent (in any state) and the last 10 successful (if not
// already part of the set of 100 most recent) rollouts are kept for each
// service. The rest will be deleted eventually.
//
// Operation<response: Rollout>
rpc CreateServiceRollout(CreateServiceRolloutRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/services/{service_name}/rollouts"
body: "rollout"
};
option (google.api.method_signature) = "service_name,rollout";
option (google.longrunning.operation_info) = {
response_type: "google.api.servicemanagement.v1.Rollout"
metadata_type: "google.api.servicemanagement.v1.OperationMetadata"
};
}
// Generates and returns a report (errors, warnings and changes from
// existing configurations) associated with
// GenerateConfigReportRequest.new_value
//
// If GenerateConfigReportRequest.old_value is specified,
// GenerateConfigReportRequest will contain a single ChangeReport based on the
// comparison between GenerateConfigReportRequest.new_value and
// GenerateConfigReportRequest.old_value.
// If GenerateConfigReportRequest.old_value is not specified, this method
// will compare GenerateConfigReportRequest.new_value with the last pushed
// service configuration.
rpc GenerateConfigReport(GenerateConfigReportRequest) returns (GenerateConfigReportResponse) {
option (google.api.http) = {
post: "/v1/services:generateConfigReport"
body: "*"
};
option (google.api.method_signature) = "new_config,old_config";
}
// Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used
// for the project. See
// [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for
// more information.
//
// Operation<response: EnableServiceResponse>
rpc EnableService(EnableServiceRequest) returns (google.longrunning.Operation) {
option deprecated = true;
option (google.api.http) = {
post: "/v1/services/{service_name}:enable"
body: "*"
};
option (google.api.method_signature) = "service_name,consumer_id";
option (google.longrunning.operation_info) = {
response_type: "google.api.servicemanagement.v1.EnableServiceResponse"
metadata_type: "google.api.servicemanagement.v1.OperationMetadata"
};
}
// Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be
// be used for the project. It prevents accidental usage that may cause
// unexpected billing charges or security leaks.
//
// Operation<response: DisableServiceResponse>
rpc DisableService(DisableServiceRequest) returns (google.longrunning.Operation) {
option deprecated = true;
option (google.api.http) = {
post: "/v1/services/{service_name}:disable"
body: "*"
};
option (google.api.method_signature) = "service_name,consumer_id";
option (google.longrunning.operation_info) = {
response_type: "google.api.servicemanagement.v1.DisableServiceResponse"
metadata_type: "google.api.servicemanagement.v1.OperationMetadata"
};
}
}
// Request message for `ListServices` method.
message ListServicesRequest {
// Include services produced by the specified project.
string producer_project_id = 1;
// The max number of items to include in the response list. Page size is 50
// if not specified. Maximum value is 100.
int32 page_size = 5;
// Token identifying which result to start with; returned by a previous list
// call.
string page_token = 6;
// Include services consumed by the specified consumer.
//
// The Google Service Management implementation accepts the following
// forms:
// - project:<project_id>
string consumer_id = 7 [deprecated = true];
}
// Response message for `ListServices` method.
message ListServicesResponse {
// The returned services will only have the name field set.
repeated ManagedService services = 1;
// Token that can be passed to `ListServices` to resume a paginated query.
string next_page_token = 2;
}
// Request message for `GetService` method.
message GetServiceRequest {
// Required. The name of the service. See the `ServiceManager` overview for naming
// requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
}
// Request message for CreateService method.
message CreateServiceRequest {
// Required. Initial values for the service resource.
ManagedService service = 1 [(google.api.field_behavior) = REQUIRED];
}
// Request message for DeleteService method.
message DeleteServiceRequest {
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
}
// Request message for UndeleteService method.
message UndeleteServiceRequest {
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
}
// Response message for UndeleteService method.
message UndeleteServiceResponse {
// Revived service resource.
ManagedService service = 1;
}
// Request message for GetServiceConfig method.
message GetServiceConfigRequest {
enum ConfigView {
// Server response includes all fields except SourceInfo.
BASIC = 0;
// Server response includes all fields including SourceInfo.
// SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile'
// and are only available for configs created using the
// SubmitConfigSource method.
FULL = 1;
}
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The id of the service configuration resource.
//
// This field must be specified for the server to return all fields, including
// `SourceInfo`.
string config_id = 2 [(google.api.field_behavior) = REQUIRED];
// Specifies which parts of the Service Config should be returned in the
// response.
ConfigView view = 3;
}
// Request message for ListServiceConfigs method.
message ListServiceConfigsRequest {
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
// The token of the page to retrieve.
string page_token = 2;
// The max number of items to include in the response list. Page size is 50
// if not specified. Maximum value is 100.
int32 page_size = 3;
}
// Response message for ListServiceConfigs method.
message ListServiceConfigsResponse {
// The list of service configuration resources.
repeated google.api.Service service_configs = 1;
// The token of the next page of results.
string next_page_token = 2;
}
// Request message for CreateServiceConfig method.
message CreateServiceConfigRequest {
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The service configuration resource.
google.api.Service service_config = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for SubmitConfigSource method.
message SubmitConfigSourceRequest {
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The source configuration for the service.
ConfigSource config_source = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. If set, this will result in the generation of a
// `google.api.Service` configuration based on the `ConfigSource` provided,
// but the generated config and the sources will NOT be persisted.
bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Response message for SubmitConfigSource method.
message SubmitConfigSourceResponse {
// The generated service configuration.
google.api.Service service_config = 1;
}
// Request message for 'CreateServiceRollout'
message CreateServiceRolloutRequest {
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The rollout resource. The `service_name` field is output only.
Rollout rollout = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for 'ListServiceRollouts'
message ListServiceRolloutsRequest {
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
// The token of the page to retrieve.
string page_token = 2;
// The max number of items to include in the response list. Page size is 50
// if not specified. Maximum value is 100.
int32 page_size = 3;
// Required. Use `filter` to return subset of rollouts.
// The following filters are supported:
// -- To limit the results to only those in
// [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
// use filter='status=SUCCESS'
// -- To limit the results to those in
// [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
// or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
string filter = 4 [(google.api.field_behavior) = REQUIRED];
}
// Response message for ListServiceRollouts method.
message ListServiceRolloutsResponse {
// The list of rollout resources.
repeated Rollout rollouts = 1;
// The token of the next page of results.
string next_page_token = 2;
}
// Request message for GetServiceRollout method.
message GetServiceRolloutRequest {
// Required. The name of the service. See the [overview](/service-management/overview)
// for naming requirements. For example: `example.googleapis.com`.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The id of the rollout resource.
string rollout_id = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for EnableService method.
message EnableServiceRequest {
// Required. Name of the service to enable. Specifying an unknown service name will
// cause the request to fail.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The identity of consumer resource which service enablement will be
// applied to.
//
// The Google Service Management implementation accepts the following
// forms:
// - "project:<project_id>"
//
// Note: this is made compatible with
// google.api.servicecontrol.v1.Operation.consumer_id.
string consumer_id = 2 [(google.api.field_behavior) = REQUIRED];
}
// Operation payload for EnableService method.
message EnableServiceResponse {
}
// Request message for DisableService method.
message DisableServiceRequest {
// Required. Name of the service to disable. Specifying an unknown service name
// will cause the request to fail.
string service_name = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The identity of consumer resource which service disablement will be
// applied to.
//
// The Google Service Management implementation accepts the following
// forms:
// - "project:<project_id>"
//
// Note: this is made compatible with
// google.api.servicecontrol.v1.Operation.consumer_id.
string consumer_id = 2 [(google.api.field_behavior) = REQUIRED];
}
// Operation payload for DisableService method.
message DisableServiceResponse {
}
// Request message for GenerateConfigReport method.
message GenerateConfigReportRequest {
// Required. Service configuration for which we want to generate the report.
// For this version of API, the supported types are
// [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
// [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
// and [google.api.Service][google.api.Service]
google.protobuf.Any new_config = 1 [(google.api.field_behavior) = REQUIRED];
// Optional. Service configuration against which the comparison will be done.
// For this version of API, the supported types are
// [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
// [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
// and [google.api.Service][google.api.Service]
google.protobuf.Any old_config = 2 [(google.api.field_behavior) = OPTIONAL];
}
// Response message for GenerateConfigReport method.
message GenerateConfigReportResponse {
// Name of the service this report belongs to.
string service_name = 1;
// ID of the service configuration this report belongs to.
string id = 2;
// list of ChangeReport, each corresponding to comparison between two
// service configurations.
repeated ChangeReport change_reports = 3;
// Errors / Linter warnings associated with the service definition this
// report
// belongs to.
repeated Diagnostic diagnostics = 4;
}