Method: operations.cancel
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
長時間実行されるオペレーションに対する非同期のキャンセルを開始します。サーバーは操作のキャンセルに全力を尽くしますが、成功は保証されません。このメソッドがサーバーでサポートされていない場合は、google.rpc.Code.UNIMPLEMENTED を返します。クライアントは Operations.GetOperation などのメソッドを使用して、キャンセルが成功したか、あるいはキャンセルしたにもかかわらずオペレーションが完了したかを確認できます。キャンセルが成功すると、そのオペレーションは削除されず、代わりに、google.rpc.Status.code が 1 の Operation.error 値を持つオペレーションになります。これは Code.CANCELLED に相当します。
HTTP リクエスト
POST https://dai.googleapis.com/v1/{name=operations/**}:cancel
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
| パラメータ |
name |
string
キャンセルするオペレーション リソースの名前。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功すると、レスポンスの本文は空の JSON オブジェクトになります。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-25 UTC。"],[],["The core function described is to initiate the cancellation of a long-running operation via a `POST` HTTP request to a specific URL. The operation is identified by its name, provided as a path parameter. The request body must be empty. Upon successful cancellation, the operation's status will reflect a `CANCELLED` code, although success isn't guaranteed. The response body is empty when successful. The operation's status can be checked using `Operations.GetOperation`. If cancellation is not supported `google.rpc.Code.UNIMPLEMENTED` is returned.\n"]]