Method: projects.builds.approve

Approves or rejects a pending build.

If approved, the returned LRO will be analogous to the LRO returned from a builds.create call.

If rejected, the returned LRO will be immediately done.

HTTP request

POST https://cloudbuild.googleapis.com/v1/{name=projects/*/builds/*}:approve

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. Name of the target build. For example: "projects/{$projectId}/builds/{$build_id}"

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

  • cloudbuild.builds.approve

Request body

The request body contains data with the following structure:

JSON representation
{
  "approvalResult": {
    object (ApprovalResult)
  }
}
Fields
approvalResult

object (ApprovalResult)

Approval decision and metadata.

Response body

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

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.