Method: folders.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 returnsgoogle.rpc.Code.UNIMPLEMENTED. Clients can useOperations.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 anOperation.error value with agoogle.rpc.Status.code of1, corresponding toCode.CANCELLED.

HTTP request

POST https://osconfig.googleapis.com/v2beta/{name=folders/*/locations/*/operations/*}:cancel

The URL usesgRPC Transcoding syntax.

Path parameters

Parameters
name

string

The name of the operation resource to be cancelled.

Request body

The request body must be empty.

Response body

If successful, the response body is an empty JSON object.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see theAuthentication Overview.

IAM Permissions

Requires the followingIAM permission on thename resource:

  • osconfig.operations.cancel

For more information, see theIAM documentation.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-28 UTC.