From d52885b642ad2aa1f42b132ee62dbf49a73e1e24 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 9 Jan 2020 09:12:17 -0800 Subject: [PATCH] Migrate the service management API to GAPIC v2. Committer: @lukesneeringer PiperOrigin-RevId: 288909426 --- .../artman_servicemanagement_v1.yaml | 5 +- .../servicemanagement_v1.yaml | 233 -------------- .../api/servicemanagement/v1/resources.proto | 18 +- .../v1/servicemanagement_gapic.legacy.yaml | 300 ++++++++++++++++++ .../v1/servicemanagement_gapic.yaml | 285 +---------------- .../v1/servicemanagement_v1.yaml | 275 ++++++++++++++++ .../servicemanagement/v1/servicemanager.proto | 238 ++++++++------ 7 files changed, 737 insertions(+), 617 deletions(-) delete mode 100644 google/api/servicemanagement/servicemanagement_v1.yaml create mode 100644 google/api/servicemanagement/v1/servicemanagement_gapic.legacy.yaml create mode 100644 google/api/servicemanagement/v1/servicemanagement_v1.yaml diff --git a/google/api/servicemanagement/artman_servicemanagement_v1.yaml b/google/api/servicemanagement/artman_servicemanagement_v1.yaml index cfb5fce2..a7e229cf 100644 --- a/google/api/servicemanagement/artman_servicemanagement_v1.yaml +++ b/google/api/servicemanagement/artman_servicemanagement_v1.yaml @@ -3,11 +3,12 @@ common: api_version: v1 organization_name: google-cloud proto_deps: - - name: google-common-protos + - name: google-common-protos src_proto_paths: - v1 - service_yaml: servicemanagement_v1.yaml + service_yaml: v1/servicemanagement_v1.yaml gapic_yaml: v1/servicemanagement_gapic.yaml + proto_package: google.api.servicemanagement.v1 artifacts: - name: gapic_config type: GAPIC_CONFIG diff --git a/google/api/servicemanagement/servicemanagement_v1.yaml b/google/api/servicemanagement/servicemanagement_v1.yaml deleted file mode 100644 index b23a788f..00000000 --- a/google/api/servicemanagement/servicemanagement_v1.yaml +++ /dev/null @@ -1,233 +0,0 @@ -type: google.api.Service -config_version: 2 -name: servicemanagement.googleapis.com -title: Google Service Management API - -apis: -- name: google.api.servicemanagement.v1.ServiceManager - -types: -- name: google.api.servicemanagement.v1.ConfigSource -- name: google.api.servicemanagement.v1.ConfigRef -- name: google.api.servicemanagement.v1.OperationMetadata -- name: google.api.servicemanagement.v1.Rollout -- name: google.api.servicemanagement.v1.SubmitConfigSourceResponse -- name: google.api.servicemanagement.v1.UndeleteServiceResponse - -documentation: - summary: |- - Google Service Management allows service producers to publish their services - on Google Cloud Platform so that they can be discovered and used by service - consumers. - overview: |- - Google Service Management manages a set of *services*. Service Management - allows *service producers* to publish their services on Google Cloud - Platform so that they can be discovered and used by *service consumers*. It - also handles the tasks of tracking service lifecycle and programming various - backend systems -- such as [Stackdriver - Logging](https://cloud.google.com/stackdriver), [Stackdriver - Monitoring](https://cloud.google.com/stackdriver) -- to support the managed - services. - - If you are a service producer, you can use the Google Service Management API - and [Google Cloud SDK (gcloud)](/sdk) to publish and manage your services. - Each managed service has a service configuration which declares various - aspects of the service such as its API surface, along with parameters to - configure the supporting backend systems, such as logging and monitoring. If - you build your service using [Google Cloud - Endpoints](https://cloud.google.com/endpoints/), the service configuration - will be handled automatically. - - If you are a service consumer and want to use a managed service, you can use - the Google Service Management API or [Google Cloud - Console](https://console.cloud.google.com) to activate the service for your - [Google developer project](https://developers.google.com/console/help/new/), - then start using its APIs and functions. - - ## Managed services - - REST URL: - `https://servicemanagement.googleapis.com/v1/services/{service-name}`
- REST schema is defined - [here](/service-management/reference/rest/v1/services). - - A managed service refers to a network service managed by Service Management. - Each managed service has a unique name, such as `example.googleapis.com`, - which must be a valid fully-qualified DNS name, as per RFC 1035. - - A managed service typically provides some REST APIs and/or other functions - to their service consumers, such as mobile apps or cloud services. - - Service producers can use methods, such as - [services.create](/service-management/reference/rest/v1/services/create), - [services.delete](/service-management/reference/rest/v1/services/delete), - [services.undelete](/service-management/reference/rest/v1/services/undelete), - to manipulate their managed services. - - ## Service producers - - A service producer is the Google developer project responsible for - publishing and maintaining a managed service. Each managed service is owned - by exactly one service producer. - - ## Service consumers - - A service consumer is a Google developer project that has enabled and can - invoke APIs on a managed service. A managed service can have many service - consumers. - - ## Service configuration - - REST URL: - `https://servicemanagement.googleapis.com/v1/services/{service-name}/configs/{config_id}` -
REST schema is defined - [here](/service-management/reference/rest/v1/services.configs). - - Each managed service is described by a service configuration which covers a - wide range of features, including its name, title, RPC API definitions, REST - API definitions, documentation, authentication, and more. - - To change the configuration of a managed service, the service producer needs - to publish an updated service configuration to Service Management. Service - Management keeps a history of published service configurations, making it - possible to easily retrace how a service's configuration evolved over time. - Service configurations can be published using the - [services.configs.create](/service-management/reference/rest/v1/services.configs/create) - or - [services.configs.submit](/service-management/reference/rest/v1/services.configs/submit) - methods. - - Alternatively, `services.configs.submit` allows publishing an - [OpenAPI](https://github.com/OAI/OpenAPI-Specification) specification, - formerly known as the Swagger Specification, which is automatically - converted to a corresponding service configuration. - - ## Service rollout - - REST URL: - `https://servicemanagement.googleapis.com/v1/services/{service-name}/rollouts/{rollout-id}` -
REST schema is defined - [here](/service-management/reference/rest/v1/services.rollouts). - - A `Rollout` defines how Google Service Management should deploy service - configurations to backend systems and how the configurations take effect at - runtime. It lets service producers specify multiple service configuration - versions to be deployed together, and a strategy that indicates how they - should be used. - - Updating a managed service's configuration can be dangerous, as a - configuration error can lead to a service outage. To mitigate risks, Service - Management supports gradual rollout of service configuration changes. This - feature gives service producers time to identity potential issues and - rollback service configuration changes in case of errors, thus minimizing - the customer impact of bad configurations. For example, you could specify - that 5% of traffic uses configuration 1, while the remaining 95% uses - configuration 2. - - Service Management keeps a history of rollouts so that service producers can - undo to previous configuration versions. You can rollback a configuration by - initiating a new `Rollout` that clones a previously submitted rollout - record. - rules: - - selector: google.longrunning.Operations.ListOperations - description: Lists service operations that match the specified filter in the request. - -backend: - rules: - - selector: google.longrunning.Operations.ListOperations - deadline: 10.0 - - selector: google.longrunning.Operations.GetOperation - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.ListServices - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.GetService - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.CreateService - deadline: 20.0 - - selector: google.api.servicemanagement.v1.ServiceManager.DeleteService - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.UndeleteService - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceConfig - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig - deadline: 20.0 - - selector: google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource - deadline: 20.0 - - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceRollout - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.EnableService - deadline: 10.0 - - selector: google.api.servicemanagement.v1.ServiceManager.DisableService - deadline: 10.0 - - selector: google.iam.v1.IAMPolicy.SetIamPolicy - deadline: 10.0 - - selector: google.iam.v1.IAMPolicy.GetIamPolicy - deadline: 10.0 - - selector: google.iam.v1.IAMPolicy.TestIamPermissions - deadline: 10.0 - -http: - rules: - - selector: google.longrunning.Operations.ListOperations - get: /v1/operations - - - selector: google.iam.v1.IAMPolicy.SetIamPolicy - post: '/v1/{resource=services/*}:setIamPolicy' - body: '*' - additional_bindings: - - post: '/v1/{resource=services/*/consumers/*}:setIamPolicy' - body: '*' - - - selector: google.iam.v1.IAMPolicy.GetIamPolicy - post: '/v1/{resource=services/*}:getIamPolicy' - body: '*' - additional_bindings: - - post: '/v1/{resource=services/*/consumers/*}:getIamPolicy' - body: '*' - - - selector: google.iam.v1.IAMPolicy.TestIamPermissions - post: '/v1/{resource=services/*}:testIamPermissions' - body: '*' - additional_bindings: - - post: '/v1/{resource=services/*/consumers/*}:testIamPermissions' - body: '*' - - -authentication: - rules: - - selector: '*' - oauth: - canonical_scopes: |- - https://www.googleapis.com/auth/cloud-platform, - https://www.googleapis.com/auth/service.management - - selector: |- - google.api.servicemanagement.v1.ServiceManager.GetService, - google.api.servicemanagement.v1.ServiceManager.GetServiceConfig, - google.api.servicemanagement.v1.ServiceManager.GetServiceRollout, - google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs, - google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts, - google.api.servicemanagement.v1.ServiceManager.ListServices - oauth: - canonical_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 - - selector: |- - google.iam.v1.IAMPolicy.GetIamPolicy, - google.iam.v1.IAMPolicy.TestIamPermissions - oauth: - canonical_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 diff --git a/google/api/servicemanagement/v1/resources.proto b/google/api/servicemanagement/v1/resources.proto index 1c924849..d7eee52c 100644 --- a/google/api/servicemanagement/v1/resources.proto +++ b/google/api/servicemanagement/v1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -11,6 +11,7 @@ // 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"; @@ -18,12 +19,13 @@ package google.api.servicemanagement.v1; import "google/api/annotations.proto"; import "google/api/config_change.proto"; +import "google/api/field_behavior.proto"; import "google/api/metric.proto"; +import "google/api/quota.proto"; import "google/api/service.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/any.proto"; import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -195,7 +197,7 @@ message ChangeReport { message Rollout { // Strategy that specifies how clients of Google Service Controller want to // send traffic to use different config versions. This is generally - // used by API proxy to split traffic based on your configured precentage for + // used by API proxy to split traffic based on your configured percentage for // each config version. // // One example of how to gradually rollout a new service configuration using @@ -232,7 +234,9 @@ message Rollout { // Strategy used to delete a service. This strategy is a placeholder only // used by the system generated rollout to delete a service. - message DeleteServiceStrategy {} + message DeleteServiceStrategy { + + } // Status of a Rollout. enum RolloutStatus { @@ -260,15 +264,15 @@ message Rollout { FAILED_ROLLED_BACK = 6; } - // Optional unique identifier of this Rollout. Only lower case letters, digits - // and '-' are allowed. + // Optional. Unique identifier of this Rollout. Must be no longer than 63 characters + // and only lower case letters, digits, '.', '_' and '-' are allowed. // // If not specified by client, the server will generate one. The generated id // will have the form of , where "date" is the create // date in ISO 8601 format. "revision number" is a monotonically increasing // positive number that is reset every day for each service. // An example of the generated rollout_id is '2016-02-16r1' - string rollout_id = 1; + string rollout_id = 1 [(google.api.field_behavior) = OPTIONAL]; // Creation time of the rollout. Readonly. google.protobuf.Timestamp create_time = 2; diff --git a/google/api/servicemanagement/v1/servicemanagement_gapic.legacy.yaml b/google/api/servicemanagement/v1/servicemanagement_gapic.legacy.yaml new file mode 100644 index 00000000..7086218c --- /dev/null +++ b/google/api/servicemanagement/v1/servicemanagement_gapic.legacy.yaml @@ -0,0 +1,300 @@ +type: com.google.api.codegen.ConfigProto +config_schema_version: 1.0.0 +# The settings of generated code in a specific language. +language_settings: + java: + package_name: com.google.cloud.api.servicemanagement.v1 + python: + package_name: google.cloud.api.servicemanagement_v1.gapic + go: + package_name: cloud.google.com/go/api/servicemanagement/apiv1 + csharp: + package_name: Google.Api.Servicemanagement.V1 + ruby: + package_name: Google::Cloud::Api::Servicemanagement::V1 + php: + package_name: Google\Cloud\Api\Servicemanagement\V1 + nodejs: + package_name: servicemanagement.v1 +# A list of API interface configurations. +interfaces: +- name: google.api.servicemanagement.v1.ServiceManager + # A list of resource collection configurations. + # Consists of a name_pattern and an entity_name. + # The name_pattern is a pattern to describe the names of the resources of this + # collection, using the platform's conventions for URI patterns. A generator + # may use this to generate methods to compose and decompose such names. The + # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; + # those will be taken as hints for the parameter names of the generated + # methods. If empty, no name methods are generated. + # The entity_name is the name to be used as a basis for generated methods and + # classes. + smoke_test: + method: ListServices + init_fields: + - producer_project_id=$PROJECT_ID + collections: [] + # Definition for retryable codes. + retry_codes_def: + - name: idempotent + retry_codes: + - UNAVAILABLE + - DEADLINE_EXCEEDED + - name: non_idempotent + retry_codes: [] + # Definition for retry/backoff parameters. + retry_params_def: + - name: default + initial_retry_delay_millis: 100 + retry_delay_multiplier: 1.3 + max_retry_delay_millis: 60000 + initial_rpc_timeout_millis: 20000 + rpc_timeout_multiplier: 1 + max_rpc_timeout_millis: 20000 + total_timeout_millis: 600000 + # A list of method configurations. + # Common properties: + # + # name - The simple name of the method. + # + # flattening - Specifies the configuration for parameter flattening. + # Describes the parameter groups for which a generator should produce method + # overloads which allow a client to directly pass request message fields as + # method parameters. This information may or may not be used, depending on + # the target language. + # Consists of groups, which each represent a list of parameters to be + # flattened. Each parameter listed must be a field of the request message. + # + # required_fields - Fields that are always required for a request to be + # valid. + # + # resource_name_treatment - An enum that specifies how to treat the resource + # name formats defined in the field_name_patterns and + # response_field_name_patterns fields. + # UNSET: default value + # NONE: the collection configs will not be used by the generated code. + # VALIDATE: string fields will be validated by the client against the + # specified resource name formats. + # STATIC_TYPES: the client will use generated types for resource names. + # + # page_streaming - Specifies the configuration for paging. + # Describes information for generating a method which transforms a paging + # list RPC into a stream of resources. + # Consists of a request and a response. + # The request specifies request information of the list method. It defines + # which fields match the paging pattern in the request. The request consists + # of a page_size_field and a token_field. The page_size_field is the name of + # the optional field specifying the maximum number of elements to be + # returned in the response. The token_field is the name of the field in the + # request containing the page token. + # The response specifies response information of the list method. It defines + # which fields match the paging pattern in the response. The response + # consists of a token_field and a resources_field. The token_field is the + # name of the field in the response containing the next page token. The + # resources_field is the name of the field in the response containing the + # list of resources belonging to the page. + # + # retry_codes_name - Specifies the configuration for retryable codes. The + # name must be defined in interfaces.retry_codes_def. + # + # retry_params_name - Specifies the configuration for retry/backoff + # parameters. The name must be defined in interfaces.retry_params_def. + # + # field_name_patterns - Maps the field name of the request type to + # entity_name of interfaces.collections. + # Specifies the string pattern that the field must follow. + # + # timeout_millis - Specifies the default timeout for a non-retrying call. If + # the call is retrying, refer to retry_params_name instead. + methods: + - name: ListServices + flattening: + groups: + - parameters: + - producer_project_id + - consumer_id + required_fields: + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: services + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: GetService + flattening: + groups: + - parameters: + - service_name + required_fields: + - service_name + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: CreateService + flattening: + groups: + - parameters: + - service + required_fields: + - service + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: DeleteService + flattening: + groups: + - parameters: + - service_name + required_fields: + - service_name + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 60000 + - name: UndeleteService + flattening: + groups: + - parameters: + - service_name + required_fields: + - service_name + retry_codes_name: non_idempotent + retry_params_name: default + # REVIEW: Could this operation take a long time? + timeout_millis: 60000 + - name: ListServiceConfigs + flattening: + groups: + - parameters: + - service_name + required_fields: + - service_name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: service_configs + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: GetServiceConfig + flattening: + groups: + - parameters: + - service_name + - config_id + - view + required_fields: + - service_name + - config_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: CreateServiceConfig + flattening: + groups: + - parameters: + - service_name + - service_config + required_fields: + - service_name + - service_config + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 20000 + - name: SubmitConfigSource + flattening: + groups: + - parameters: + - service_name + - config_source + - validate_only + required_fields: + - service_name + - config_source + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 10000 + - name: ListServiceRollouts + flattening: + groups: + - parameters: + - service_name + - filter + required_fields: + - service_name + page_streaming: + request: + page_size_field: page_size + token_field: page_token + response: + token_field: next_page_token + resources_field: rollouts + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: GetServiceRollout + flattening: + groups: + - parameters: + - service_name + - rollout_id + required_fields: + - service_name + - rollout_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: CreateServiceRollout + flattening: + groups: + - parameters: + - service_name + - rollout + required_fields: + - service_name + - rollout + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 10000 + - name: GenerateConfigReport + flattening: + groups: + - parameters: + - new_config + - old_config + required_fields: + - new_config + - old_config + retry_codes_name: non_idempotent + retry_params_name: default + timeout_millis: 10000 + - name: EnableService + flattening: + groups: + - parameters: + - service_name + - consumer_id + required_fields: + - service_name + - consumer_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 + - name: DisableService + flattening: + groups: + - parameters: + - service_name + - consumer_id + required_fields: + - service_name + - consumer_id + retry_codes_name: idempotent + retry_params_name: default + timeout_millis: 10000 diff --git a/google/api/servicemanagement/v1/servicemanagement_gapic.yaml b/google/api/servicemanagement/v1/servicemanagement_gapic.yaml index 0cca80e2..e6985653 100644 --- a/google/api/servicemanagement/v1/servicemanagement_gapic.yaml +++ b/google/api/servicemanagement/v1/servicemanagement_gapic.yaml @@ -1,5 +1,5 @@ type: com.google.api.codegen.ConfigProto -config_schema_version: 1.0.0 +config_schema_version: 2.0.0 # The settings of generated code in a specific language. language_settings: java: @@ -16,286 +16,3 @@ language_settings: package_name: Google\Cloud\Api\Servicemanagement\V1 nodejs: package_name: servicemanagement.v1 -# A list of API interface configurations. -interfaces: - # The fully qualified name of the API interface. -- name: google.api.servicemanagement.v1.ServiceManager - # A list of resource collection configurations. - # Consists of a name_pattern and an entity_name. - # The name_pattern is a pattern to describe the names of the resources of this - # collection, using the platform's conventions for URI patterns. A generator - # may use this to generate methods to compose and decompose such names. The - # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`; - # those will be taken as hints for the parameter names of the generated - # methods. If empty, no name methods are generated. - # The entity_name is the name to be used as a basis for generated methods and - # classes. - smoke_test: - method: ListServices - init_fields: - - producer_project_id=$PROJECT_ID - collections: [] - # Definition for retryable codes. - retry_codes_def: - - name: idempotent - retry_codes: - - UNAVAILABLE - - DEADLINE_EXCEEDED - - name: non_idempotent - retry_codes: [] - # Definition for retry/backoff parameters. - retry_params_def: - - name: default - initial_retry_delay_millis: 100 - retry_delay_multiplier: 1.3 - max_retry_delay_millis: 60000 - initial_rpc_timeout_millis: 20000 - rpc_timeout_multiplier: 1 - max_rpc_timeout_millis: 20000 - total_timeout_millis: 600000 - # A list of method configurations. - # Common properties: - # - # name - The simple name of the method. - # - # flattening - Specifies the configuration for parameter flattening. - # Describes the parameter groups for which a generator should produce method - # overloads which allow a client to directly pass request message fields as - # method parameters. This information may or may not be used, depending on - # the target language. - # Consists of groups, which each represent a list of parameters to be - # flattened. Each parameter listed must be a field of the request message. - # - # required_fields - Fields that are always required for a request to be - # valid. - # - # resource_name_treatment - An enum that specifies how to treat the resource - # name formats defined in the field_name_patterns and - # response_field_name_patterns fields. - # UNSET: default value - # NONE: the collection configs will not be used by the generated code. - # VALIDATE: string fields will be validated by the client against the - # specified resource name formats. - # STATIC_TYPES: the client will use generated types for resource names. - # - # page_streaming - Specifies the configuration for paging. - # Describes information for generating a method which transforms a paging - # list RPC into a stream of resources. - # Consists of a request and a response. - # The request specifies request information of the list method. It defines - # which fields match the paging pattern in the request. The request consists - # of a page_size_field and a token_field. The page_size_field is the name of - # the optional field specifying the maximum number of elements to be - # returned in the response. The token_field is the name of the field in the - # request containing the page token. - # The response specifies response information of the list method. It defines - # which fields match the paging pattern in the response. The response - # consists of a token_field and a resources_field. The token_field is the - # name of the field in the response containing the next page token. The - # resources_field is the name of the field in the response containing the - # list of resources belonging to the page. - # - # retry_codes_name - Specifies the configuration for retryable codes. The - # name must be defined in interfaces.retry_codes_def. - # - # retry_params_name - Specifies the configuration for retry/backoff - # parameters. The name must be defined in interfaces.retry_params_def. - # - # field_name_patterns - Maps the field name of the request type to - # entity_name of interfaces.collections. - # Specifies the string pattern that the field must follow. - # - # timeout_millis - Specifies the default timeout for a non-retrying call. If - # the call is retrying, refer to retry_params_name instead. - methods: - - name: ListServices - flattening: - groups: - - parameters: - - producer_project_id - - consumer_id - required_fields: - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: services - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: GetService - flattening: - groups: - - parameters: - - service_name - required_fields: - - service_name - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: CreateService - flattening: - groups: - - parameters: - - service - required_fields: - - service - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: DeleteService - flattening: - groups: - - parameters: - - service_name - required_fields: - - service_name - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 60000 - - name: UndeleteService - flattening: - groups: - - parameters: - - service_name - required_fields: - - service_name - retry_codes_name: non_idempotent - retry_params_name: default - # REVIEW: Could this operation take a long time? - timeout_millis: 60000 - - name: ListServiceConfigs - flattening: - groups: - - parameters: - - service_name - required_fields: - - service_name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: service_configs - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: GetServiceConfig - flattening: - groups: - - parameters: - - service_name - - config_id - - view - required_fields: - - service_name - - config_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: CreateServiceConfig - flattening: - groups: - - parameters: - - service_name - - service_config - required_fields: - - service_name - - service_config - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 20000 - - name: SubmitConfigSource - flattening: - groups: - - parameters: - - service_name - - config_source - - validate_only - required_fields: - - service_name - - config_source - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 10000 - - name: ListServiceRollouts - flattening: - groups: - - parameters: - - service_name - - filter - required_fields: - - service_name - page_streaming: - request: - page_size_field: page_size - token_field: page_token - response: - token_field: next_page_token - resources_field: rollouts - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: GetServiceRollout - flattening: - groups: - - parameters: - - service_name - - rollout_id - required_fields: - - service_name - - rollout_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: CreateServiceRollout - flattening: - groups: - - parameters: - - service_name - - rollout - required_fields: - - service_name - - rollout - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 10000 - - name: GenerateConfigReport - flattening: - groups: - - parameters: - - new_config - - old_config - required_fields: - - new_config - - old_config - retry_codes_name: non_idempotent - retry_params_name: default - timeout_millis: 10000 - - name: EnableService - flattening: - groups: - - parameters: - - service_name - - consumer_id - required_fields: - - service_name - - consumer_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 - - name: DisableService - flattening: - groups: - - parameters: - - service_name - - consumer_id - required_fields: - - service_name - - consumer_id - retry_codes_name: idempotent - retry_params_name: default - timeout_millis: 10000 diff --git a/google/api/servicemanagement/v1/servicemanagement_v1.yaml b/google/api/servicemanagement/v1/servicemanagement_v1.yaml new file mode 100644 index 00000000..43640dd5 --- /dev/null +++ b/google/api/servicemanagement/v1/servicemanagement_v1.yaml @@ -0,0 +1,275 @@ +type: google.api.Service +config_version: 2 +name: servicemanagement.googleapis.com +title: Service Management API + +apis: +- name: google.api.servicemanagement.v1.ServiceManager + +types: +- name: google.api.servicemanagement.v1.ConfigRef +- name: google.api.servicemanagement.v1.ConfigSource +- name: google.api.servicemanagement.v1.DisableServiceResponse +- name: google.api.servicemanagement.v1.EnableServiceResponse +- name: google.api.servicemanagement.v1.OperationMetadata +- name: google.api.servicemanagement.v1.Rollout +- name: google.api.servicemanagement.v1.SubmitConfigSourceResponse +- name: google.api.servicemanagement.v1.UndeleteServiceResponse + +documentation: + summary: |- + Google Service Management allows service producers to publish their + services on Google Cloud Platform so that they can be discovered and used + by service consumers. + overview: |- + Google Service Management manages a set of *services*. Service Management + allows *service producers* to + publish their services on Google Cloud Platform so that they can be + discovered and used by *service consumers*. It also handles the tasks of + tracking + service lifecycle and programming various backend systems -- such as + [Stackdriver Logging](https://cloud.google.com/stackdriver), + [Stackdriver Monitoring](https://cloud.google.com/stackdriver) -- to + support the managed services. + + If you are a service producer, you can use the Google Service Management + API and [Google Cloud SDK (gcloud)](/sdk) to publish and manage your + services. + Each managed service has a service configuration which declares various + aspects of the service such as its API surface, along with parameters to + configure the supporting backend systems, such as logging and monitoring. + If you build your service using + [Google Cloud Endpoints](https://cloud.google.com/endpoints/), the service + configuration will be handled automatically. + + If you are a service consumer and want to use a managed service, you can + use the Google Service Management API or [Google Cloud + Console](https://console.cloud.google.com) to activate the service for + your [Google developer + project](https://developers.google.com/console/help/new/), then start + using its APIs and functions. + + ## Managed services + + REST URL: + `https://servicemanagement.googleapis.com/v1/services/{service-name}`
REST schema is defined + [here](/service-management/reference/rest/v1/services). + + A managed service refers to a network service managed by + Service Management. Each managed service has a unique name, such as + `example.googleapis.com`, which must be a valid fully-qualified DNS name, + as per RFC 1035. + + A managed service typically provides some REST APIs and/or other + functions to their service consumers, such as mobile apps or cloud + services. + + Service producers can use methods, such as + [services.create](/service-management/reference/rest/v1/services/create), + [services.delete](/service-management/reference/rest/v1/services/delete), + [services.undelete](/service-management/reference/rest/v1/services/undelete), to + manipulate their managed services. + + ## Service producers + + A service producer is the Google developer project responsible for + publishing and maintaining a managed service. Each managed service is + owned by exactly one service producer. + + ## Service consumers + + A service consumer is a Google developer project that has enabled and can + invoke APIs on a managed service. A managed service can have many service + consumers. + + ## Service configuration + + REST URL: + `https://servicemanagement.googleapis.com/v1/services/{service-name}/configs/{config_id}` +
REST schema is defined + [here](/service-management/reference/rest/v1/services.configs). + + Each managed service is described by a service configuration which covers + a wide range of features, including its name, title, RPC API + definitions, + REST API definitions, documentation, authentication, and more. + + To change the configuration of a managed service, the service producer + needs to publish an updated service configuration to Service + Management. + Service Management keeps a history of published + service configurations, making it possible to easily retrace how a + service's configuration evolved over time. Service configurations can be + published + using the [services.configs.create](/service-management/reference/rest/v1/services.configs/create) or + [services.configs.submit](/service-management/reference/rest/v1/services.configs/submit) methods. Alternatively, + `services.configs.submit` allows publishing an + [OpenAPI](https://github.com/OAI/OpenAPI-Specification) specification, + formerly known as the Swagger Specification, which is automatically + converted to a corresponding service configuration. + + ## Service rollout + + REST URL: + `https://servicemanagement.googleapis.com/v1/services/{service-name}/rollouts/{rollout-id}` +
REST schema is defined + [here](/service-management/reference/rest/v1/services.rollouts). + + A `Rollout` defines how Google Service Management should deploy service + configurations to backend systems and how the configurations take effect + at runtime. It lets service producers specify multiple service + configuration + versions to be deployed together, and a strategy that indicates how they + should be used. + + Updating a managed service's configuration can be dangerous, as a + configuration error can lead to a service outage. To mitigate risks, + Service Management + supports gradual rollout of service configuration changes. This feature + gives service producers time to identity potential issues and rollback + service + configuration changes in case of errors, thus minimizing the customer + impact of bad configurations. For example, you could specify that 5% of + traffic uses configuration 1, while the remaining 95% uses configuration + 2. + + Service Management keeps a history of rollouts so that service + producers can undo to previous configuration versions. You can rollback a + configuration by initiating a new `Rollout` that clones a previously + submitted + rollout record. + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + description: |- + Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + description: |- + Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and + PERMISSION_DENIED + + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + description: |- + Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a NOT_FOUND error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + + - selector: google.longrunning.Operations.ListOperations + description: Lists service operations that match the specified filter in the request. + +backend: + rules: + - selector: 'google.api.servicemanagement.v1.ServiceManager.*' + deadline: 10.0 + - selector: google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig + deadline: 20.0 + - selector: 'google.iam.v1.IAMPolicy.*' + deadline: 10.0 + - selector: 'google.longrunning.Operations.*' + deadline: 10.0 + +http: + rules: + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + post: '/v1/{resource=services/*}:getIamPolicy' + body: '*' + additional_bindings: + - post: '/v1/{resource=services/*/consumers/*}:getIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + post: '/v1/{resource=services/*}:setIamPolicy' + body: '*' + additional_bindings: + - post: '/v1/{resource=services/*/consumers/*}:setIamPolicy' + body: '*' + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + post: '/v1/{resource=services/*}:testIamPermissions' + body: '*' + additional_bindings: + - post: '/v1/{resource=services/*/consumers/*}:testIamPermissions' + body: '*' + - selector: google.longrunning.Operations.ListOperations + get: /v1/operations + +authentication: + rules: + - selector: 'google.api.servicemanagement.v1.ServiceManager.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/service.management + - selector: google.api.servicemanagement.v1.ServiceManager.GetService + oauth: + canonical_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 + - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceConfig + oauth: + canonical_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 + - selector: google.api.servicemanagement.v1.ServiceManager.GetServiceRollout + oauth: + canonical_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 + - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs + oauth: + canonical_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 + - selector: google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts + oauth: + canonical_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 + - selector: google.api.servicemanagement.v1.ServiceManager.ListServices + oauth: + canonical_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 + - selector: google.iam.v1.IAMPolicy.GetIamPolicy + oauth: + canonical_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 + - selector: google.iam.v1.IAMPolicy.SetIamPolicy + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/service.management + - selector: google.iam.v1.IAMPolicy.TestIamPermissions + oauth: + canonical_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 + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/service.management diff --git a/google/api/servicemanagement/v1/servicemanager.proto b/google/api/servicemanagement/v1/servicemanager.proto index 02d50666..6069b817 100644 --- a/google/api/servicemanagement/v1/servicemanager.proto +++ b/google/api/servicemanagement/v1/servicemanager.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -17,12 +17,13 @@ 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/protobuf/struct.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.ServiceManagement.V1"; @@ -35,6 +36,13 @@ option php_namespace = "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 @@ -48,6 +56,7 @@ service ServiceManager { 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 @@ -56,33 +65,40 @@ service ServiceManager { 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 - rpc CreateService(CreateServiceRequest) - returns (google.longrunning.Operation) { + 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. + // call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service. + // After 30 days, the service will be permanently deleted. // // Operation - rpc DeleteService(DeleteServiceRequest) - returns (google.longrunning.Operation) { + 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 @@ -91,28 +107,35 @@ service ServiceManager { // last 30 days. // // Operation - rpc UndeleteService(UndeleteServiceRequest) - returns (google.longrunning.Operation) { + 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) { + 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" } + 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. @@ -123,12 +146,12 @@ service ServiceManager { // 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) { + 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 @@ -137,37 +160,40 @@ service ServiceManager { // 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]. + // 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 - rpc SubmitConfigSource(SubmitConfigSourceRequest) - returns (google.longrunning.Operation) { + 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) { + 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]. + // 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 @@ -184,12 +210,16 @@ service ServiceManager { // service. The rest will be deleted eventually. // // Operation - rpc CreateServiceRollout(CreateServiceRolloutRequest) - returns (google.longrunning.Operation) { + 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 @@ -203,39 +233,49 @@ service ServiceManager { // 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) { + 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. + // 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 - rpc EnableService(EnableServiceRequest) - returns (google.longrunning.Operation) { + 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. + // 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 - rpc DisableService(DisableServiceRequest) - returns (google.longrunning.Operation) { + 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" + }; } } @@ -244,7 +284,8 @@ message ListServicesRequest { // Include services produced by the specified project. string producer_project_id = 1; - // Requested size of the next page of data. + // 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 @@ -256,7 +297,7 @@ message ListServicesRequest { // The Google Service Management implementation accepts the following // forms: // - project: - string consumer_id = 7; + string consumer_id = 7 [deprecated = true]; } // Response message for `ListServices` method. @@ -270,29 +311,29 @@ message ListServicesResponse { // Request message for `GetService` method. message GetServiceRequest { - // The name of the service. See the `ServiceManager` overview for naming + // Required. The name of the service. See the `ServiceManager` overview for naming // requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for CreateService method. message CreateServiceRequest { - // Initial values for the service resource. - ManagedService service = 1; + // Required. Initial values for the service resource. + ManagedService service = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for DeleteService method. message DeleteServiceRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for UndeleteService method. message UndeleteServiceRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; } // Response message for UndeleteService method. @@ -314,12 +355,15 @@ message GetServiceConfigRequest { FULL = 1; } - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The id of the service configuration resource. - string config_id = 2; + // 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. @@ -328,14 +372,15 @@ message GetServiceConfigRequest { // Request message for ListServiceConfigs method. message ListServiceConfigsRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + 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. + // 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; } @@ -350,27 +395,27 @@ message ListServiceConfigsResponse { // Request message for CreateServiceConfig method. message CreateServiceConfigRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The service configuration resource. - google.api.Service service_config = 2; + // Required. The service configuration resource. + google.api.Service service_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for SubmitConfigSource method. message SubmitConfigSourceRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The source configuration for the service. - ConfigSource config_source = 2; + // 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; + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for SubmitConfigSource method. @@ -381,27 +426,28 @@ message SubmitConfigSourceResponse { // Request message for 'CreateServiceRollout' message CreateServiceRolloutRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The rollout resource. The `service_name` field is output only. - Rollout rollout = 2; + // 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 { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + 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. + // 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; - // Use `filter` to return subset of rollouts. + // 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', @@ -409,7 +455,7 @@ message ListServiceRolloutsRequest { // -- 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; + string filter = 4 [(google.api.field_behavior) = REQUIRED]; } // Response message for ListServiceRollouts method. @@ -423,21 +469,21 @@ message ListServiceRolloutsResponse { // Request message for GetServiceRollout method. message GetServiceRolloutRequest { - // The name of the service. See the [overview](/service-management/overview) + // Required. The name of the service. See the [overview](/service-management/overview) // for naming requirements. For example: `example.googleapis.com`. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The id of the rollout resource. - string rollout_id = 2; + // Required. The id of the rollout resource. + string rollout_id = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for EnableService method. message EnableServiceRequest { - // Name of the service to enable. Specifying an unknown service name will + // Required. Name of the service to enable. Specifying an unknown service name will // cause the request to fail. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The identity of consumer resource which service enablement will be + // Required. The identity of consumer resource which service enablement will be // applied to. // // The Google Service Management implementation accepts the following @@ -446,16 +492,21 @@ message EnableServiceRequest { // // Note: this is made compatible with // google.api.servicecontrol.v1.Operation.consumer_id. - string consumer_id = 2; + string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Operation payload for EnableService method. +message EnableServiceResponse { + } // Request message for DisableService method. message DisableServiceRequest { - // Name of the service to disable. Specifying an unknown service name + // Required. Name of the service to disable. Specifying an unknown service name // will cause the request to fail. - string service_name = 1; + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; - // The identity of consumer resource which service disablement will be + // Required. The identity of consumer resource which service disablement will be // applied to. // // The Google Service Management implementation accepts the following @@ -464,24 +515,29 @@ message DisableServiceRequest { // // Note: this is made compatible with // google.api.servicecontrol.v1.Operation.consumer_id. - string consumer_id = 2; + string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Operation payload for DisableService method. +message DisableServiceResponse { + } // Request message for GenerateConfigReport method. message GenerateConfigReportRequest { - // Service configuration for which we want to generate the report. + // 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.protobuf.Any new_config = 1 [(google.api.field_behavior) = REQUIRED]; - // Service configuration against which the comparison will be done. + // 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.protobuf.Any old_config = 2 [(google.api.field_behavior) = OPTIONAL]; } // Response message for GenerateConfigReport method.