Method: operations.cancel
長時間実行オペレーションの非同期キャンセルを開始します。サーバーは操作のキャンセルに全力を尽くしますが、成功は保証されません。このメソッドがサーバーでサポートされていない場合は、google.rpc.Code.UNIMPLEMENTED
を返します。クライアントは Operations.GetOperation
などのメソッドを使用して、キャンセルが成功したか、あるいはキャンセルしたにもかかわらずオペレーションが完了したかを確認できます。キャンセルが成功してもそのオペレーションは削除されず、google.rpc.Status.code
が 1
の Operation.error
値を持つオペレーションになります(これは Code.CANCELLED
に相当します)。
HTTP リクエスト
POST https://vault.googleapis.com/v1/{name=operations/**}:cancel
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
name |
string
キャンセルするオペレーション リソースの名前。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功すると、レスポンスの本文は空の JSON オブジェクトになります。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/ediscovery
詳細については、OAuth 2.0 Overview をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-02-06 UTC。
[null,null,["最終更新日 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"]]