Method: operations.cancel
長時間実行オペレーションの非同期キャンセルを開始します。サーバーは操作のキャンセルに全力を尽くしますが、成功は保証されません。このメソッドがサーバーでサポートされていない場合は、google.rpc.Code.UNIMPLEMENTED
を返します。クライアントは Operations.GetOperation
などのメソッドを使用して、キャンセルが成功したか、あるいはキャンセルしたにもかかわらずオペレーションが完了したかを確認できます。キャンセルが成功してもそのオペレーションは削除されず、google.rpc.Status.code
が 1
の Operation.error
値を持つオペレーションになります(これは Code.CANCELLED
に相当します)。
HTTP リクエスト
POST https://routeoptimization.googleapis.com/v1/{name=operations/**}:cancel
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
name |
string
キャンセルするオペレーション リソースの名前。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功すると、レスポンスの本文は空の JSON オブジェクトになります。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/cloud-platform
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-02-10 UTC。
[null,null,["最終更新日 2025-02-10 UTC。"],[[["This document details how to cancel a long-running Route Optimization operation using a `POST` request to a specific URL."],["Cancellation is attempted but not guaranteed, and the operation's status can be checked using the `Operations.GetOperation` method."],["Successful cancellation results in the operation having an error code indicating it was canceled but the operation itself is not deleted."],["The request must have an empty body and include the operation's name as a path parameter."],["Authorization requires the `https://www.googleapis.com/auth/cloud-platform` OAuth scope."]]],[]]