Method: projects.locations.services.create

Creates a new Service in a given project and location.

HTTP request

POST https://run.googleapis.com/v2/{parent}/services

Path parameters

Parameters
parent

string

Required. The location and project in which this service should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number. Only lowercase characters, digits, and hyphens. It takes the form projects/{project}/locations/{location}.

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

  • run.services.create

Query parameters

Parameters
serviceId

string

Required. The unique identifier for the Service. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the service becomes {parent}/services/{serviceId}.

validateOnly

boolean

Indicates that the request should be validated and default values populated, without persisting the request or creating any resources.

Request body

The request body contains an instance of Service.

Response body

If successful, the response body contains a newly created instance of Operation.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.