Method: projects.operations.cancel
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Rozpoczyna asynchroniczne anulowanie długotrwałej operacji. Serwer dokłada wszelkich starań, aby anulować operację, ale nie można tego zagwarantować. Jeśli serwer nie obsługuje tej metody, zwraca google.rpc.Code.UNIMPLEMENTED
. Klienci mogą użyć Operations.GetOperation
lub innych metod, aby sprawdzić, czy anulowanie się powiodło lub czy operacja została zakończona pomimo anulowania. Po anulowaniu operacji nie jest ona usuwana. Zamiast tego staje się operacją o wartości Operation.error
z wartością google.rpc.Status.code
= 1
, która odpowiada operacji Code.CANCELLED
.
Żądanie HTTP
POST https://earthengine.googleapis.com/v1alpha/{name=projects/*/operations/**}:cancel
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
name |
string
Nazwa zasobu operacji, który ma zostać anulowany.
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi to pusty obiekt JSON.
Zakresy autoryzacji
Wymaga jednego z tych zakresów OAuth:
https://www.googleapis.com/auth/earthengine
https://www.googleapis.com/auth/cloud-platform
Więcej informacji znajdziesz w OAuth 2.0 Overview.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\u003cp\u003eInitiates an asynchronous cancellation request for a long-running Earth Engine operation, with no guarantee of success and returning \u003ccode\u003egoogle.rpc.Code.UNIMPLEMENTED\u003c/code\u003e if unsupported by the server.\u003c/p\u003e\n"],["\u003cp\u003eClients should use alternative methods such as \u003ccode\u003eOperations.GetOperation\u003c/code\u003e to confirm cancellation success or if the operation completed despite the request.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful cancellation marks the operation with an error having a \u003ccode\u003egoogle.rpc.Status.code\u003c/code\u003e of 1 (\u003ccode\u003eCode.CANCELLED\u003c/code\u003e) instead of deleting it.\u003c/p\u003e\n"],["\u003cp\u003eThis request requires an empty body and utilizes the \u003ccode\u003ePOST\u003c/code\u003e method with specific path parameters and authorization scopes documented.\u003c/p\u003e\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/v1alpha/{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)."]]