projects

POST /v2/projects/{projectsId}/locations/{locationsId}/builds:submit

Changed on

Submits a build in a given project.

Request

  • Base URL
    https://run.googleapis.com
  • Auth
    • OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/cloud-platform
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/cloud-platform
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/run
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/run

Path parameters

projectsId, string required
locationsId, string required

Query parameters

$.xgafv, '1' | '2'

V1 error format.

access_token, string

OAuth access token.

alt, 'json' | 'media' | 'proto'

Data format for response.

callback, string

JSONP

fields, string

Selector specifying which fields to include in a partial response.

key, string

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_token, string

OAuth 2.0 token for the current user.

prettyPrint, boolean

Returns response with indentations and line breaks.

quotaUser, string

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

uploadType, string

Legacy upload protocol for media (e.g. "media", "multipart").

upload_protocol, string

Upload protocol for media (e.g. "raw", "multipart").

Request body

GoogleCloudRunV2SubmitBuildRequest required

Request message for submitting a Build.

buildpackBuild, GoogleCloudRunV2BuildpacksBuild

Build the source using Buildpacks.

client, string

Optional. The client that initiated the build request.

dockerBuild, GoogleCloudRunV2DockerBuild

Build the source using Docker. This means the source has a Dockerfile.

imageUri, string

Required. Artifact Registry URI to store the built image.

machineType, string

Optional. The machine type from default pool to use for the build. If left blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8 is supported. If worker_pool is set, this field will be ignored.

releaseTrack, 'LAUNCH_STAGE_UNSPECIFIED' | 'UNIMPLEMENTED' | 'PRELAUNCH' | 'EARLY_ACCESS' | 'ALPHA' | 'BETA' | 'GA' | 'DEPRECATED'

Optional. The release track of the client that initiated the build request.

serviceAccount, string

Optional. The service account to use for the build. If not set, the default Cloud Build service account for the project will be used.

storageSource, GoogleCloudRunV2StorageSource

Location of the source in an archive file in Google Cloud Storage.

tags, string[]

Optional. Additional tags to annotate the build.

workerPool, string

Optional. Name of the Cloud Build private pool that should be used to build the function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

Response

Successful response

GoogleCloudRunV2SubmitBuildResponse required

Response message for submitting a Build.

baseImageUri, string

URI of the base builder image in Artifact Registry being used in the build. Used to opt into automatic base image updates.

baseImageWarning, string

Warning message for the base image.

buildOperation, GoogleLongrunningOperation

This resource represents a long-running operation that is the result of a network API call.

Changes

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/run was removed from the endpoint's security scheme Oauth2

    1 more change in this revision