Cancels a build in progress.
Note: This method only cancels builds in the "global" region when using the legacy resource path projects/{projectId}/builds/{id}:cancel. For all regions, use the regional resource path: projects/{projectId}/locations/{location}/builds/{id}:cancel.
HTTP request
POST https://cloudbuild.googleapis.com/v1/projects/{projectId}/builds/{id}:cancel The URLs use gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
projectId |
Required. ID of the project. Authorization requires the following IAM permission on the specified resource
|
id |
Required. ID of the build. |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "name": string } |
| Fields | |
|---|---|
name |
The name of the |
Response body
If successful, the response body contains an instance of Build.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.