Cancels an AutomationRun. The state of the AutomationRun after cancelling is CANCELLED. automationRuns.cancel can be called on AutomationRun in the state IN_PROGRESS and PENDING; AutomationRun in a different state returns an FAILED_PRECONDITION error.
HTTP request
POST https://clouddeploy.googleapis.com/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel
Required. Name of the AutomationRun. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/automationRuns/{automationRun}.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-13 UTC."],[[["\u003cp\u003eThis webpage details how to cancel an \u003ccode\u003eAutomationRun\u003c/code\u003e, which, upon successful cancellation, will have its state set to \u003ccode\u003eCANCELLED\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eautomationRuns.cancel\u003c/code\u003e action is only applicable to \u003ccode\u003eAutomationRun\u003c/code\u003e instances in either \u003ccode\u003eIN_PROGRESS\u003c/code\u003e or \u003ccode\u003ePENDING\u003c/code\u003e states, and attempting to cancel an instance in a different state will result in a \u003ccode\u003eFAILED_PRECONDITION\u003c/code\u003e error.\u003c/p\u003e\n"],["\u003cp\u003eCancelling an \u003ccode\u003eAutomationRun\u003c/code\u003e is accomplished through an HTTP POST request to a specific URL, which is structured using gRPC Transcoding syntax.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003ename\u003c/code\u003e path parameter indicating the specific \u003ccode\u003eAutomationRun\u003c/code\u003e to be cancelled and an empty request body.\u003c/p\u003e\n"],["\u003cp\u003eThe process requires the \u003ccode\u003eclouddeploy.automationRuns.cancel\u003c/code\u003e IAM permission on the target resource and \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.deliveryPipelines.automationRuns.cancel\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n- [Try it!](#try-it)\n\nCancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`. `automationRuns.cancel` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun in a different state returns an `FAILED_PRECONDITION` error.\n\n### HTTP request\n\n`POST https://clouddeploy.googleapis.com/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `clouddeploy.automationRuns.cancel`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]