1 // Copyright 2018 Google Inc.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
17 package google.api.servicemanagement.v1;
19 import "google/api/annotations.proto";
20 import "google/api/service.proto";
21 import "google/api/servicemanagement/v1/resources.proto";
22 import "google/longrunning/operations.proto";
23 import "google/protobuf/any.proto";
24 import "google/protobuf/field_mask.proto";
25 import "google/protobuf/struct.proto";
26 import "google/rpc/status.proto";
28 option csharp_namespace = "Google.Cloud.ServiceManagement.V1";
29 option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement";
30 option java_multiple_files = true;
31 option java_outer_classname = "ServiceManagerProto";
32 option java_package = "com.google.api.servicemanagement.v1";
33 option objc_class_prefix = "GASM";
34 option php_namespace = "Google\\Cloud\\ServiceManagement\\V1";
36 // [Google Service Management API](/service-management/overview)
37 service ServiceManager {
38 // Lists managed services.
40 // Returns all public services. For authenticated users, also returns all
41 // services the calling user has "servicemanagement.services.get" permission
44 // **BETA:** If the caller specifies the `consumer_id`, it returns only the
45 // services enabled on the consumer. The `consumer_id` must have the format
46 // of "project:{PROJECT-ID}".
47 rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
48 option (google.api.http) = {
53 // Gets a managed service. Authentication is required unless the service is
55 rpc GetService(GetServiceRequest) returns (ManagedService) {
56 option (google.api.http) = {
57 get: "/v1/services/{service_name}"
61 // Creates a new managed service.
62 // Please note one producer project can own no more than 20 services.
64 // Operation<response: ManagedService>
65 rpc CreateService(CreateServiceRequest)
66 returns (google.longrunning.Operation) {
67 option (google.api.http) = {
73 // Deletes a managed service. This method will change the service to the
74 // `Soft-Delete` state for 30 days. Within this period, service producers may
76 // [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService]
77 // to restore the service. After 30 days, the service will be permanently
80 // Operation<response: google.protobuf.Empty>
81 rpc DeleteService(DeleteServiceRequest)
82 returns (google.longrunning.Operation) {
83 option (google.api.http) = {
84 delete: "/v1/services/{service_name}"
88 // Revives a previously deleted managed service. The method restores the
89 // service using the configuration at the time the service was deleted.
90 // The target service must exist and must have been deleted within the
93 // Operation<response: UndeleteServiceResponse>
94 rpc UndeleteService(UndeleteServiceRequest)
95 returns (google.longrunning.Operation) {
96 option (google.api.http) = {
97 post: "/v1/services/{service_name}:undelete"
101 // Lists the history of the service configuration for a managed service,
102 // from the newest to the oldest.
103 rpc ListServiceConfigs(ListServiceConfigsRequest)
104 returns (ListServiceConfigsResponse) {
105 option (google.api.http) = {
106 get: "/v1/services/{service_name}/configs"
110 // Gets a service configuration (version) for a managed service.
111 rpc GetServiceConfig(GetServiceConfigRequest) returns (google.api.Service) {
112 option (google.api.http) = {
113 get: "/v1/services/{service_name}/configs/{config_id}"
114 additional_bindings { get: "/v1/services/{service_name}/config" }
118 // Creates a new service configuration (version) for a managed service.
119 // This method only stores the service configuration. To roll out the service
120 // configuration to backend systems please call
121 // [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
123 // Only the 100 most recent service configurations and ones referenced by
124 // existing rollouts are kept for each service. The rest will be deleted
126 rpc CreateServiceConfig(CreateServiceConfigRequest)
127 returns (google.api.Service) {
128 option (google.api.http) = {
129 post: "/v1/services/{service_name}/configs"
130 body: "service_config"
134 // Creates a new service configuration (version) for a managed service based
136 // user-supplied configuration source files (for example: OpenAPI
137 // Specification). This method stores the source configurations as well as the
138 // generated service configuration. To rollout the service configuration to
141 // [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
143 // Only the 100 most recent configuration sources and ones referenced by
144 // existing service configurtions are kept for each service. The rest will be
145 // deleted eventually.
147 // Operation<response: SubmitConfigSourceResponse>
148 rpc SubmitConfigSource(SubmitConfigSourceRequest)
149 returns (google.longrunning.Operation) {
150 option (google.api.http) = {
151 post: "/v1/services/{service_name}/configs:submit"
156 // Lists the history of the service configuration rollouts for a managed
157 // service, from the newest to the oldest.
158 rpc ListServiceRollouts(ListServiceRolloutsRequest)
159 returns (ListServiceRolloutsResponse) {
160 option (google.api.http) = {
161 get: "/v1/services/{service_name}/rollouts"
165 // Gets a service configuration
166 // [rollout][google.api.servicemanagement.v1.Rollout].
167 rpc GetServiceRollout(GetServiceRolloutRequest) returns (Rollout) {
168 option (google.api.http) = {
169 get: "/v1/services/{service_name}/rollouts/{rollout_id}"
173 // Creates a new service configuration rollout. Based on rollout, the
174 // Google Service Management will roll out the service configurations to
175 // different backend services. For example, the logging configuration will be
176 // pushed to Google Cloud Logging.
178 // Please note that any previous pending and running Rollouts and associated
179 // Operations will be automatically cancelled so that the latest Rollout will
180 // not be blocked by previous Rollouts.
182 // Only the 100 most recent (in any state) and the last 10 successful (if not
183 // already part of the set of 100 most recent) rollouts are kept for each
184 // service. The rest will be deleted eventually.
186 // Operation<response: Rollout>
187 rpc CreateServiceRollout(CreateServiceRolloutRequest)
188 returns (google.longrunning.Operation) {
189 option (google.api.http) = {
190 post: "/v1/services/{service_name}/rollouts"
195 // Generates and returns a report (errors, warnings and changes from
196 // existing configurations) associated with
197 // GenerateConfigReportRequest.new_value
199 // If GenerateConfigReportRequest.old_value is specified,
200 // GenerateConfigReportRequest will contain a single ChangeReport based on the
201 // comparison between GenerateConfigReportRequest.new_value and
202 // GenerateConfigReportRequest.old_value.
203 // If GenerateConfigReportRequest.old_value is not specified, this method
204 // will compare GenerateConfigReportRequest.new_value with the last pushed
205 // service configuration.
206 rpc GenerateConfigReport(GenerateConfigReportRequest)
207 returns (GenerateConfigReportResponse) {
208 option (google.api.http) = {
209 post: "/v1/services:generateConfigReport"
214 // Enables a [service][google.api.servicemanagement.v1.ManagedService] for a
215 // project, so it can be used for the project. See [Cloud Auth
216 // Guide](https://cloud.google.com/docs/authentication) for more information.
218 // Operation<response: EnableServiceResponse>
219 rpc EnableService(EnableServiceRequest)
220 returns (google.longrunning.Operation) {
221 option (google.api.http) = {
222 post: "/v1/services/{service_name}:enable"
227 // Disables a [service][google.api.servicemanagement.v1.ManagedService] for a
228 // project, so it can no longer be be used for the project. It prevents
229 // accidental usage that may cause unexpected billing charges or security
232 // Operation<response: DisableServiceResponse>
233 rpc DisableService(DisableServiceRequest)
234 returns (google.longrunning.Operation) {
235 option (google.api.http) = {
236 post: "/v1/services/{service_name}:disable"
242 // Request message for `ListServices` method.
243 message ListServicesRequest {
244 // Include services produced by the specified project.
245 string producer_project_id = 1;
247 // Requested size of the next page of data.
250 // Token identifying which result to start with; returned by a previous list
252 string page_token = 6;
254 // Include services consumed by the specified consumer.
256 // The Google Service Management implementation accepts the following
258 // - project:<project_id>
259 string consumer_id = 7;
262 // Response message for `ListServices` method.
263 message ListServicesResponse {
264 // The returned services will only have the name field set.
265 repeated ManagedService services = 1;
267 // Token that can be passed to `ListServices` to resume a paginated query.
268 string next_page_token = 2;
271 // Request message for `GetService` method.
272 message GetServiceRequest {
273 // The name of the service. See the `ServiceManager` overview for naming
274 // requirements. For example: `example.googleapis.com`.
275 string service_name = 1;
278 // Request message for CreateService method.
279 message CreateServiceRequest {
280 // Initial values for the service resource.
281 ManagedService service = 1;
284 // Request message for DeleteService method.
285 message DeleteServiceRequest {
286 // The name of the service. See the [overview](/service-management/overview)
287 // for naming requirements. For example: `example.googleapis.com`.
288 string service_name = 1;
291 // Request message for UndeleteService method.
292 message UndeleteServiceRequest {
293 // The name of the service. See the [overview](/service-management/overview)
294 // for naming requirements. For example: `example.googleapis.com`.
295 string service_name = 1;
298 // Response message for UndeleteService method.
299 message UndeleteServiceResponse {
300 // Revived service resource.
301 ManagedService service = 1;
304 // Request message for GetServiceConfig method.
305 message GetServiceConfigRequest {
307 // Server response includes all fields except SourceInfo.
310 // Server response includes all fields including SourceInfo.
311 // SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile'
312 // and are only available for configs created using the
313 // SubmitConfigSource method.
317 // The name of the service. See the [overview](/service-management/overview)
318 // for naming requirements. For example: `example.googleapis.com`.
319 string service_name = 1;
321 // The id of the service configuration resource.
322 string config_id = 2;
324 // Specifies which parts of the Service Config should be returned in the
329 // Request message for ListServiceConfigs method.
330 message ListServiceConfigsRequest {
331 // The name of the service. See the [overview](/service-management/overview)
332 // for naming requirements. For example: `example.googleapis.com`.
333 string service_name = 1;
335 // The token of the page to retrieve.
336 string page_token = 2;
338 // The max number of items to include in the response list.
342 // Response message for ListServiceConfigs method.
343 message ListServiceConfigsResponse {
344 // The list of service configuration resources.
345 repeated google.api.Service service_configs = 1;
347 // The token of the next page of results.
348 string next_page_token = 2;
351 // Request message for CreateServiceConfig method.
352 message CreateServiceConfigRequest {
353 // The name of the service. See the [overview](/service-management/overview)
354 // for naming requirements. For example: `example.googleapis.com`.
355 string service_name = 1;
357 // The service configuration resource.
358 google.api.Service service_config = 2;
361 // Request message for SubmitConfigSource method.
362 message SubmitConfigSourceRequest {
363 // The name of the service. See the [overview](/service-management/overview)
364 // for naming requirements. For example: `example.googleapis.com`.
365 string service_name = 1;
367 // The source configuration for the service.
368 ConfigSource config_source = 2;
370 // Optional. If set, this will result in the generation of a
371 // `google.api.Service` configuration based on the `ConfigSource` provided,
372 // but the generated config and the sources will NOT be persisted.
373 bool validate_only = 3;
376 // Response message for SubmitConfigSource method.
377 message SubmitConfigSourceResponse {
378 // The generated service configuration.
379 google.api.Service service_config = 1;
382 // Request message for 'CreateServiceRollout'
383 message CreateServiceRolloutRequest {
384 // The name of the service. See the [overview](/service-management/overview)
385 // for naming requirements. For example: `example.googleapis.com`.
386 string service_name = 1;
388 // The rollout resource. The `service_name` field is output only.
392 // Request message for 'ListServiceRollouts'
393 message ListServiceRolloutsRequest {
394 // The name of the service. See the [overview](/service-management/overview)
395 // for naming requirements. For example: `example.googleapis.com`.
396 string service_name = 1;
398 // The token of the page to retrieve.
399 string page_token = 2;
401 // The max number of items to include in the response list.
404 // Use `filter` to return subset of rollouts.
405 // The following filters are supported:
406 // -- To limit the results to only those in
407 // [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
408 // use filter='status=SUCCESS'
409 // -- To limit the results to those in
410 // [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
411 // or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
415 // Response message for ListServiceRollouts method.
416 message ListServiceRolloutsResponse {
417 // The list of rollout resources.
418 repeated Rollout rollouts = 1;
420 // The token of the next page of results.
421 string next_page_token = 2;
424 // Request message for GetServiceRollout method.
425 message GetServiceRolloutRequest {
426 // The name of the service. See the [overview](/service-management/overview)
427 // for naming requirements. For example: `example.googleapis.com`.
428 string service_name = 1;
430 // The id of the rollout resource.
431 string rollout_id = 2;
434 // Request message for EnableService method.
435 message EnableServiceRequest {
436 // Name of the service to enable. Specifying an unknown service name will
437 // cause the request to fail.
438 string service_name = 1;
440 // The identity of consumer resource which service enablement will be
443 // The Google Service Management implementation accepts the following
445 // - "project:<project_id>"
447 // Note: this is made compatible with
448 // google.api.servicecontrol.v1.Operation.consumer_id.
449 string consumer_id = 2;
452 // Request message for DisableService method.
453 message DisableServiceRequest {
454 // Name of the service to disable. Specifying an unknown service name
455 // will cause the request to fail.
456 string service_name = 1;
458 // The identity of consumer resource which service disablement will be
461 // The Google Service Management implementation accepts the following
463 // - "project:<project_id>"
465 // Note: this is made compatible with
466 // google.api.servicecontrol.v1.Operation.consumer_id.
467 string consumer_id = 2;
470 // Request message for GenerateConfigReport method.
471 message GenerateConfigReportRequest {
472 // Service configuration for which we want to generate the report.
473 // For this version of API, the supported types are
474 // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
475 // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
476 // and [google.api.Service][google.api.Service]
477 google.protobuf.Any new_config = 1;
479 // Service configuration against which the comparison will be done.
480 // For this version of API, the supported types are
481 // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
482 // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
483 // and [google.api.Service][google.api.Service]
484 google.protobuf.Any old_config = 2;
487 // Response message for GenerateConfigReport method.
488 message GenerateConfigReportResponse {
489 // Name of the service this report belongs to.
490 string service_name = 1;
492 // ID of the service configuration this report belongs to.
495 // list of ChangeReport, each corresponding to comparison between two
496 // service configurations.
497 repeated ChangeReport change_reports = 3;
499 // Errors / Linter warnings associated with the service definition this
502 repeated Diagnostic diagnostics = 4;