Method: services.configs.submit

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

Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually.

Operation<response: SubmitConfigSourceResponse>

HTTP request

POST https://servicemanagement.googleapis.com/v1/services/{serviceName}/configs:submit

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
serviceName

string

Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

Authorization requires the following IAM permission on the specified resource serviceName:

  • servicemanagement.services.update

Request body

The request body contains data with the following structure:

JSON representation
{
  "configSource": {
    object (ConfigSource)
  },
  "validateOnly": boolean
}
Fields
configSource

object (ConfigSource)

Required. The source configuration for the service.

validateOnly

boolean

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.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/service.management
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ConfigSource

Represents a source file which is used to generate the service configuration defined by google.api.Service.

JSON representation
{
  "id": string,
  "files": [
    {
      object (ConfigFile)
    }
  ]
}
Fields
id

string

A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. If empty, the server may choose to generate one instead.

files[]

object (ConfigFile)

Set of source configuration files that are used to generate a service configuration (google.api.Service).

ConfigFile

Generic specification of a source configuration file

JSON representation
{
  "filePath": string,
  "fileContents": string,
  "fileType": enum (FileType)
}
Fields
filePath

string

The file name of the configuration file (full or relative path).

fileContents

string (bytes format)

The bytes that constitute the file.

A base64-encoded string.

fileType

enum (FileType)

The type of configuration file this represents.

FileType

Enums
FILE_TYPE_UNSPECIFIED Unknown file type.
SERVICE_CONFIG_YAML YAML-specification of service.
OPEN_API_JSON OpenAPI specification, serialized in JSON.
OPEN_API_YAML OpenAPI specification, serialized in YAML.
FILE_DESCRIPTOR_SET_PROTO

FileDescriptorSet, generated by protoc.

To generate, use protoc with imports and source info included. For an example test.proto file, the following command would put the value in a new file named out.pb.

$protoc --include_imports --include_source_info test.proto -o out.pb

PROTO_FILE Uncompiled Proto file. Used for storage and display purposes only, currently server-side compilation is not supported. Should match the inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A file of this type can only be included if at least one file of type FILE_DESCRIPTOR_SET_PROTO is included.