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
詳しくは、認可ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: operations.cancel\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\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](/workspace/vault/reference/rest/v1/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](/workspace/vault/reference/rest/v1/operations#Operation.FIELDS.error) value with a [google.rpc.Status.code](/workspace/vault/reference/rest/v1/operations#Status.FIELDS.code) of `1`, corresponding to `Code.CANCELLED`.\n\n### HTTP request\n\n`POST https://vault.googleapis.com/v1/{name=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 the following OAuth scope:\n\n- `https://www.googleapis.com/auth/ediscovery`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]