Method: operations.cancel
Startet den asynchronen Abbruch eines lang andauernden Vorgangs. Der Server unternimmt alles, um den Vorgang abzubrechen, aber der Erfolg kann nicht garantiert werden. Wenn der Server diese Methode nicht unterstützt, wird google.rpc.Code.UNIMPLEMENTED
zurückgegeben. Kunden können Operations.GetOperation
oder andere Methoden verwenden, um zu prüfen, ob der Abbruch erfolgreich war oder der Vorgang dennoch abgeschlossen wurde. Bei erfolgreichem Abbruch wird der Vorgang nicht gelöscht. Stattdessen wird daraus ein Vorgang mit einem Operation.error
-Wert mit einem google.rpc.Status.code
von 1
, was Code.CANCELLED
entspricht.
HTTP-Anfrage
POST https://vault.googleapis.com/v1/{name=operations/**}:cancel
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
name |
string
Der Name der abzubrechenden Vorgangsressource
|
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, ist der Antworttext ein leeres JSON-Objekt.
Autorisierungsbereiche
Erfordert den folgenden OAuth-Bereich:
https://www.googleapis.com/auth/ediscovery
Weitere Informationen finden Sie unter OAuth 2.0 Overview.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-02-06 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-02-06 (UTC)."],[[["Initiates the cancellation process for a long-running operation, although cancellation success is not guaranteed."],["Uses the `POST` method with a specific URL structure including the operation name for cancellation."],["Requires an empty request body and returns an empty response body upon successful cancellation."],["In case of unsupported cancellation by the server, an `UNIMPLEMENTED` error code is returned."],["If cancelled successfully, the operation is not deleted but marked with a `CANCELLED` status code."]]],["This document details the process of initiating asynchronous cancellation for a long-running operation. It uses an HTTP POST request to `vault.googleapis.com/v1/{name=operations/**}:cancel`. The `name` parameter specifies the operation to cancel. The request body must be empty, and a successful response returns an empty JSON object. The server attempts cancellation, and clients can check the status via `Operations.GetOperation`. Successful cancellation results in an `Operation.error` with `Code.CANCELLED`. Authorization requires the `https://www.googleapis.com/auth/ediscovery` OAuth scope.\n"]]