Stay organized with collections
Save and categorize content based on your preferences.
Full name: projects.locations.operations.cancel
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to code.CANCELLED.
Endpoint
post
https://{service-endpoint}/v1beta1/{name}:cancel
[[["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-27 UTC."],[],[],null,["# Method: operations.cancel\n\n**Full name**: projects.locations.operations.cancel\n\nStarts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use [Operations.GetOperation](/vertex-ai/docs/reference/rest/v1beta1/projects.locations.operations/get#google.longrunning.Operations.GetOperation) or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an [Operation.error](/vertex-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.error) value with a [google.rpc.Status.code](/vertex-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Status.FIELDS.code) of `1`, corresponding to `code.CANCELLED`. \n\n### Endpoint\n\npost `https:``/``/{service-endpoint}``/v1beta1``/{name}:cancel` \nWhere `{service-endpoint}` is one of the [supported service endpoints](/vertex-ai/docs/reference/rest#rest_endpoints).\n\n### Path parameters\n\n`name` `string` \nThe name of the operation resource to be cancelled.\n\n### Request body\n\nThe request body must be empty. \n\n### Response body\n\nIf successful, the response body is an empty JSON object."]]