Method: projects.locations.operations.cancel
Stay organized with collections
Save and categorize content based on your preferences.
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
.
HTTP request
POST https://firebaseapphosting.googleapis.com/v1/{name=projects/*/locations/*/operations/*}:cancel
The URL uses gRPC Transcoding syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the service error catalog
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 the OAuth 2.0 Overview.
IAM Permissions
Requires the following IAM permission on the name
resource:
firebaseapphosting.operations.cancel
For more information, see the IAM documentation.
See also Firebase App Hosting's IAM Permissions and Predefined IAM Roles.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-04 UTC.
[null,null,["Last updated 2025-04-04 UTC."],[],[],null,["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](/docs/reference/apphosting/rest/v1/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](/docs/reference/apphosting/rest/v1/projects.locations.operations#Operation.FIELDS.error) value with a [google.rpc.Status.code](/docs/reference/apphosting/rest/v1/Status#FIELDS.code) of `1`, corresponding to `Code.CANCELLED`.\n\nHTTP request\n\n`POST https://firebaseapphosting.googleapis.com/v1/{name=projects/*/locations/*/operations/*}:cancel`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the [service error catalog](/docs/reference/apphosting/rest/v1/errors)\n\nPath parameters\n\nRequest body\n\nThe request body must be empty.\n\nResponse body\n\nIf successful, the response body is an empty JSON object.\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).\n\nIAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `firebaseapphosting.operations.cancel`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs).\n\nSee also Firebase App Hosting's [IAM Permissions](https://firebase.google.com/docs/projects/iam/permissions#app-hosting) and [Predefined IAM Roles](https://firebase.google.com/docs/projects/iam/roles-predefined-product)."]]