Skip to main content

configs

Creates, updates, deletes, gets or lists a configs resource.

Overview

Nameconfigs
TypeResource
Idgoogle.servicemanagement.configs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstringA unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.
namestringThe service name, which is a DNS-like logical identifier for the service, such as calendar.googleapis.com. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.
apisarrayA list of API interfaces exported by this service. Only the name field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.
aspectsarrayConfiguration aspects. This is a repeated field to allow multiple aspects to be configured. The kind field in each ConfigAspect specifies the type of aspect. The spec field contains the configuration for that aspect. The schema for the spec field is defined by the backend service owners.
authenticationobjectAuth configuration. (id: Authentication)
backendobjectAPI backend configuration. (id: Backend)
billingobjectBilling configuration. (id: Billing)
configVersioninteger (uint32)Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to 3.
contextobjectContext configuration. (id: Context)
controlobjectConfiguration for the service control plane. (id: Control)
customErrorobjectCustom error configuration. (id: CustomError)
documentationobjectAdditional API documentation. (id: Documentation)
endpointsarrayConfiguration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.
enumsarrayA list of all enum types included in this API service. Enums referenced directly or indirectly by the apis are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum
httpobjectHTTP configuration. (id: Http)
loggingobjectLogging configuration. (id: Logging)
logsarrayDefines the logs used by this service.
metricsarrayDefines the metrics used by this service.
monitoredResourcesarrayDefines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.
monitoringobjectMonitoring configuration. (id: Monitoring)
producerProjectIdstringThe Google project that owns this service.
publishingobjectSettings for Google Cloud Client libraries generated from APIs defined as protocol buffers. (id: Publishing)
quotaobjectQuota configuration. (id: Quota)
sourceInfoobjectOutput only. The source information for this configuration if available. (id: SourceInfo)
systemParametersobjectSystem parameter configuration. (id: SystemParameters)
systemTypesarrayA list of all proto message types included in this API service. It serves similar purpose as [google.api.Service.types], except that these types are not needed by user-defined APIs. Therefore, they will not show up in the generated discovery doc. This field should only be used to define system APIs in ESF.
titlestringThe product title for this service, it is the name displayed in Google Cloud Console.
typesarrayA list of all proto message types included in this API service. Types referenced directly or indirectly by the apis are automatically included. Messages which are not referenced but shall be included, such as types used by the google.protobuf.Any type, should be listed here by name by the configuration author. Example: types: - name: google.protobuf.Int32
usageobjectConfiguration controlling usage of this service. (id: Usage)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectserviceName, configIdviewGets a service configuration (version) for a managed service.
listselectserviceNamepageToken, pageSizeLists the history of the service configuration for a managed service, from the newest to the oldest.
createinsertserviceNameCreates 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. Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.
submitexecserviceNameCreates 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. 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

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
configIdstring
serviceNamestring
pageSizeinteger (int32)
pageTokenstring
viewstring

SELECT examples

Gets a service configuration (version) for a managed service.

SELECT
id,
name,
apis,
aspects,
authentication,
backend,
billing,
configVersion,
context,
control,
customError,
documentation,
endpoints,
enums,
http,
logging,
logs,
metrics,
monitoredResources,
monitoring,
producerProjectId,
publishing,
quota,
sourceInfo,
systemParameters,
systemTypes,
title,
types,
usage
FROM google.servicemanagement.configs
WHERE serviceName = '{{ serviceName }}' -- required
AND configId = '{{ configId }}' -- required
AND view = '{{ view }}';

INSERT examples

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. Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.

INSERT INTO google.servicemanagement.configs (
data__name,
data__title,
data__producerProjectId,
data__id,
data__apis,
data__types,
data__enums,
data__documentation,
data__backend,
data__http,
data__quota,
data__authentication,
data__context,
data__usage,
data__customError,
data__endpoints,
data__control,
data__logs,
data__metrics,
data__monitoredResources,
data__billing,
data__logging,
data__monitoring,
data__systemParameters,
data__sourceInfo,
data__publishing,
data__systemTypes,
data__aspects,
data__configVersion,
serviceName
)
SELECT
'{{ name }}',
'{{ title }}',
'{{ producerProjectId }}',
'{{ id }}',
'{{ apis }}',
'{{ types }}',
'{{ enums }}',
'{{ documentation }}',
'{{ backend }}',
'{{ http }}',
'{{ quota }}',
'{{ authentication }}',
'{{ context }}',
'{{ usage }}',
'{{ customError }}',
'{{ endpoints }}',
'{{ control }}',
'{{ logs }}',
'{{ metrics }}',
'{{ monitoredResources }}',
'{{ billing }}',
'{{ logging }}',
'{{ monitoring }}',
'{{ systemParameters }}',
'{{ sourceInfo }}',
'{{ publishing }}',
'{{ systemTypes }}',
'{{ aspects }}',
{{ configVersion }},
'{{ serviceName }}'
RETURNING
id,
name,
apis,
aspects,
authentication,
backend,
billing,
configVersion,
context,
control,
customError,
documentation,
endpoints,
enums,
http,
logging,
logs,
metrics,
monitoredResources,
monitoring,
producerProjectId,
publishing,
quota,
sourceInfo,
systemParameters,
systemTypes,
title,
types,
usage
;

Lifecycle Methods

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. 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

EXEC google.servicemanagement.configs.submit 
@serviceName='{{ serviceName }}' --required
@@json=
'{
"configSource": "{{ configSource }}",
"validateOnly": {{ validateOnly }}
}';