Package google.longrunning
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
オペレーション
API サービスで長時間実行オペレーションを管理します。
完了するまでの時間が通常でも長くなる API メソッドについては、クライアントに Operation
を返すように設計できます。クライアントはこのインターフェースを使用することで、オペレーション リソースをポーリングして実際のレスポンスを非同期的に受信できます。また、オペレーション リソースを別の API(Pub/Sub API など)に渡してレスポンスを受信することもできます。長時間実行オペレーションを返す API サービスでは、デベロッパーがクライアントの動作の一貫性を期待できるように、Operations
インターフェースを実装する必要があります。
CancelOperation |
rpc CancelOperation(CancelOperationRequest ) returns (Empty )
長時間実行オペレーションの非同期キャンセルを開始します。サーバーは操作のキャンセルに全力を尽くしますが、成功は保証されません。このメソッドがサーバーでサポートされていない場合は、google.rpc.Code.UNIMPLEMENTED を返します。クライアントは Operations.GetOperation などのメソッドを使用して、キャンセルが成功したか、あるいはキャンセルしたにもかかわらずオペレーションが完了したかを確認できます。キャンセルが成功してもそのオペレーションは削除されず、google.rpc.Status.code が 1 の Operation.error 値を持つオペレーションになります(これは Code.CANCELLED に相当します)。
- 認可スコープ
-
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/cloud-platform
詳細については、認証の概要をご覧ください。
|
DeleteOperation |
rpc DeleteOperation(DeleteOperationRequest ) returns (Empty )
長時間実行オペレーションを削除します。このメソッドは、クライアントがそのオペレーション結果に関心がなくなったことを表しています。このメソッドではオペレーションはキャンセルされません。このメソッドがサーバーでサポートされていない場合は、google.rpc.Code.UNIMPLEMENTED を返します。
- 認可スコープ
-
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/cloud-platform
詳細については、認証の概要をご覧ください。
|
GetOperation |
rpc GetOperation(GetOperationRequest ) returns (Operation )
長時間実行オペレーションの最新状態を取得します。クライアントはこのメソッドを使用して、API サービスで推奨される間隔でオペレーションの結果をポーリングできます。
- 認可スコープ
-
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/cloud-platform
詳細については、認証の概要をご覧ください。
|
ListOperations |
rpc ListOperations(ListOperationsRequest ) returns (ListOperationsResponse )
指定したフィルタに一致するオペレーションをリクエストで一覧表示します。このメソッドがサーバーでサポートされていない場合は、UNIMPLEMENTED を返します。
- 認可スコープ
-
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/cloud-platform
詳細については、認証の概要をご覧ください。
|
WaitOperation |
rpc WaitOperation(WaitOperationRequest ) returns (Operation )
指定された長時間実行オペレーションが完了するか、指定されたタイムアウトに達するまで待機し、最新の状態を返します。オペレーションがすでに完了している場合は、すぐに最新の状態が返されます。指定されたタイムアウトがデフォルトの HTTP/RPC タイムアウトを上回る場合は、HTTP/RPC タイムアウトが使用されます。サーバーがこのメソッドをサポートしていない場合は、google.rpc.Code.UNIMPLEMENTED を返します。このメソッドはベスト エフォートに基づきます。指定されたタイムアウト(直前を含む)の前に最新の状態を返すことがあります。つまり、すぐにレスポンスがあったとしても、オペレーションが完了したことを保証するものではありません。
- 認可スコープ
-
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/cloud-platform
詳細については、認証の概要をご覧ください。
|
CancelOperationRequest
フィールド |
name |
string
キャンセルするオペレーション リソースの名前。
|
DeleteOperationRequest
フィールド |
name |
string
削除するオペレーション リソースの名前。
|
GetOperationRequest
フィールド |
name |
string
オペレーション リソースの名前。
|
ListOperationsRequest
フィールド |
name |
string
オペレーションの親リソースの名前。
|
filter |
string
標準リストフィルタ。
|
page_size |
int32
標準的なリストのページサイズ。
|
page_token |
string
標準的なリストのページトークン。
|
ListOperationsResponse
フィールド |
operations[] |
Operation
リクエストで指定されたフィルタに一致するオペレーションのリスト。
|
next_page_token |
string
標準的なリストの次ページのトークン。
|
操作
このリソースは、ネットワーク API 呼び出しの結果の長時間実行オペレーションを示します。
フィールド |
name |
string
サーバーによって割り当てられる名前。最初にその名前を返すサービスと同じサービス内でのみ一意になります。デフォルトの HTTP マッピングを使用している場合は、name を operations/{unique_id} で終わるリソース名にします。
|
metadata |
Any
オペレーションに関連付けられているサービス固有のメタデータ。通常は進捗情報や、作成日時などの共通メタデータが含まれます。一部のサービスでは、このようなメタデータが提供されないこともあります。メタデータがある場合、長時間実行オペレーションを返すメソッドでは、メタデータの型をドキュメント化しておく必要があります。
|
done |
bool
値が false の場合は、オペレーションが進行中であることを意味します。true の場合、オペレーションは完了しており、error または response が利用可能です。
|
共用体フィールド result 。オペレーションの結果。error または有効な response になります。done == false の場合、error も response も設定されません。done == true の場合、error または response のどちらか 1 つだけが設定されます。一部のサービスでは結果が返されない場合があります。result は次のいずれかになります。 |
error |
Status
失敗またはキャンセルされた場合のオペレーションのエラー結果。
|
response |
Any
オペレーションの通常の成功レスポンス。元のメソッドで成功時にデータが返されない場合(Delete など)、レスポンスは google.protobuf.Empty になります。元のメソッドが標準の Get /Create /Update である場合、レスポンスはリソースになります。他のメソッドについては、レスポンスのデータ型が XxxResponse (Xxx は元のメソッド名)になります。たとえば、元のメソッド名が TakeSnapshot() であれば、レスポンスのデータ型は TakeSnapshotResponse になると推測できます。
|
WaitOperationRequest
フィールド |
name |
string
待機するオペレーション リソースの名前。
|
timeout |
Duration
タイムアウトするまでの最大待機時間。空白のままにした場合、待機時間は基になる HTTP/RPC プロトコルによって許可される最長の時間になります。RPC コンテキストの期限も指定されている場合は、短い方が使用されます。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-05-16 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-05-16 UTC。"],[],[],null,["# Package google.longrunning\n\nIndex\n-----\n\n- [Operations](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.Operations) (interface)\n- [CancelOperationRequest](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.CancelOperationRequest) (message)\n- [DeleteOperationRequest](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.DeleteOperationRequest) (message)\n- [GetOperationRequest](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.GetOperationRequest) (message)\n- [ListOperationsRequest](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.ListOperationsRequest) (message)\n- [ListOperationsResponse](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.ListOperationsResponse) (message)\n- [Operation](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.Operation) (message)\n- [WaitOperationRequest](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.WaitOperationRequest) (message)\n\nOperations\n----------\n\nManages long-running operations with an API service.\n\nWhen an API method normally takes long time to complete, it can be designed to return [Operation](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.Operation) to the client, and the client can use this interface to receive the real response asynchronously by polling the operation resource, or pass the operation resource to another API (such as Pub/Sub API) to receive the response. Any API service that returns long-running operations should implement the `Operations` interface so developers can have a consistent client experience.\n\nCancelOperationRequest\n----------------------\n\nThe request message for [Operations.CancelOperation](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.Operations.CancelOperation).\n\nDeleteOperationRequest\n----------------------\n\nThe request message for [Operations.DeleteOperation](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.Operations.DeleteOperation).\n\nGetOperationRequest\n-------------------\n\nThe request message for [Operations.GetOperation](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.Operations.GetOperation).\n\nListOperationsRequest\n---------------------\n\nThe request message for [Operations.ListOperations](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.Operations.ListOperations).\n\nListOperationsResponse\n----------------------\n\nThe response message for [Operations.ListOperations](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.Operations.ListOperations).\n\nOperation\n---------\n\nThis resource represents a long-running operation that is the result of a network API call.\n\nWaitOperationRequest\n--------------------\n\nThe request message for [Operations.WaitOperation](/kubernetes-engine/fleet-management/docs/reference/rpc/google.longrunning#google.longrunning.Operations.WaitOperation)."]]