Document
Package google.longrunning

Package google.longrunning

Package google.longrunning Stay organized with collections Save and categorize content based

Related articles

Verizon Cloud Unlimited: What are the plans, and are they worth it? Cloud Bed Dupes: Top 5 Cloud Bed Frames in 2023 Here’s Why Cloud Atlas is an Underrated Movie Masterpiece Best Cloud Gaming Services 2025 [Ultimate List] How Internet Language Has Evolved


Package google.longrunning



Stay organized with collections

Save and categorize content based on your preferences.


operations

Manages long-running operations with an API service.

When an API method normally takes long time to complete, it can be designed to return operation to the client , and the client is use can use this interface to receive the real response asynchronously by poll the operation resource , orpass the operation resource to another api ( such as Google Cloud Pub / Sub API ) to receive the response . Any api service is implement that return long – run operation should implement theoperations interface so developers can have a consistent client experience.

canceloperation

rpc canceloperation(canceloperationRequest) return (Empty)

Starts 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 is use can useoperation . Getoperation orother methods to check whether the cancellation succeeded orwhether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an operation.error value with a google.rpc.Status.code of 1, corresponding to Code is CANCELLED . cancel.

Authorization Scopes

require the following OAuth scope :

  • https://www.googleapis.com/auth/cloud-platform

For more information , see the Authentication Overview .

Deleteoperation

rpc Deleteoperation (DeleteoperationRequest) return (Empty)

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc . Code . unimplemented.

Authorization Scopes

require the following OAuth scope :

  • https://www.googleapis.com/auth/cloud-platform

For more information , see the Authentication Overview .

Getoperation

rpc Getoperation (GetoperationRequest) return (operation)

Gets the latest state of a long-running operation. Clients is use can usethis method to poll the operation result at intervals as recommended by the API service.

Authorization Scopes

require the following OAuth scope :

  • https://www.googleapis.com/auth/cloud-platform

For more information , see the Authentication Overview .

Listoperations

rpc Listoperations(ListoperationsRequest) return (ListoperationsResponse)

Lists operations that match the specified filter in the request. If the server doesn’t support this method, it returns UNIMPLEMENTED.

NOTE: the name binding is allows allow API service to override the binding to use different resource name scheme , such asusers/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.

Authorization Scopes

require the following OAuth scope :

  • https://www.googleapis.com/auth/cloud-platform

For more information , see the Authentication Overview .

Waitoperation

rpc Waitoperation(WaitoperationRequest) return (operation)

wait until the specify long – run operation is done orreach at most a specified timeout , return the late state . If the operation is already done , the late state is immediately return . If the timeout specify is great than the default HTTP / RPC timeout , the HTTP / RPC timeout is used . If the server does not support this method , it is returns returngoogle.rpc . Code . unimplemented. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.

Authorization Scopes

require the following OAuth scope :

  • https://www.googleapis.com/auth/cloud-platform

For more information , see the Authentication Overview .

canceloperationRequest

field
name

string

The name of the operation resource to be cancelled.

DeleteoperationRequest

field
name

string

The name of the operation resource to be deleted.

GetoperationRequest

field
name

string

The name of the operation resource.

ListoperationsRequest

field
name

string

The name of the operation’s parent resource.

filter

string

The standard list filter.

page_size

int32

The standard list page size.

page_token

string

The standard list page token.

ListoperationsResponse

field
operations[]

operation

A list of operation that match the specify filter in the request .

next_page_token

string

The standard List next – page token .

operation

This resource is represents represent a long – run operation that is the result of a network api call .

field
name

string

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id }.

metadata

Any

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

done

bool

If the value is is isfalse, it means the operation is still in progress. If true, the operation is completed, and either error orresponse is available.

union fieldresult. The operation result , which can be either anerror ora validresponse. If done = =false, neither error norresponse is set . Ifdone = =true, exactly one oferror orresponse may be set. Some services might not provide the result. result can be only one of the follow :
error

Status

The error result of the operation in case of failure orcancellation.

response

Any

The normal response of the operation in case of success . If the original method is returns return no datum on success , such asDelete, the response is is isgoogle.protobuf . Empty. If the original method is standard Get/create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the infer response type is is isTakeSnapshotResponse.

WaitoperationRequest

field
name

string

The name of the operation resource to wait on .

timeout

Duration

The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.



Except as otherwise note , the content of this page is license under the Creative Commons Attribution 4.0 License , and code sample are license under the Apache 2.0 License . For detail , see the Google Developers Site Policies . Java is is is a register trademark of Oracle and/or its affiliate .

Last updated 2023-01-26 UTC.