公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
Method: projects.operations.cancel
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
POST https://earthengine.googleapis.com/v1/{name=projects/*/operations/**}:cancel
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
要取消的操作资源的名称。
|
响应正文
如果成功,响应正文将为空的 JSON 对象。
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/earthengine
https://www.googleapis.com/auth/cloud-platform
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eInitiates an asynchronous cancellation request for a long-running Earth Engine operation, with no guarantee of success and returning an \u003ccode\u003eUNIMPLEMENTED\u003c/code\u003e error if unsupported by the server.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful cancellation, the operation is marked with a \u003ccode\u003eCode.CANCELLED\u003c/code\u003e error but is not deleted, and users can monitor its status through methods like \u003ccode\u003eOperations.GetOperation\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe cancellation request is made using an HTTP POST to a specific URL, requires an empty request body, and uses the operation's name as a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eTo authorize the request, either the \u003ccode\u003eearthengine\u003c/code\u003e or \u003ccode\u003ecloud-platform\u003c/code\u003e OAuth scope is necessary.\u003c/p\u003e\n"]]],["This content details the process for asynchronously canceling a long-running operation. Users initiate cancellation via a POST request to a specified URL, providing the operation's name. The server attempts cancellation, potentially returning `UNIMPLEMENTED`. Clients check the operation's status using `GetOperation`. Successful cancellation results in an operation with an error code `1` (`CANCELLED`), and the operation isn't deleted. The request body is empty, and the response, if successful, is also empty. Specific OAuth scopes are required.\n"],null,["# Method: projects.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](/earth-engine/reference/rest/v1alpha/projects.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](/earth-engine/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.error) value with a [google.rpc.Status.code](/earth-engine/reference/rest/Shared.Types/ListOperationsResponse#Status.FIELDS.code) of `1`, corresponding to `Code.CANCELLED`.\n\n### HTTP request\n\n`POST https://earthengine.googleapis.com/v1/{name=projects/*/operations/**}:cancel`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|--------------------------------------------------------------|\n| `name` | `string` The 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.\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/earthengine`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]