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 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.
Cancels a transfer. Use the transferOperations.get method to check if the cancellation succeeded or if the operation completed despite the cancel request.
When you cancel an operation, the currently running transfer is interrupted. For recurring transfer jobs, the next instance of the transfer job will still run. For example, if your job is configured to run every day at 1pm and you cancel Monday's operation at 1:05pm, Monday's transfer will stop. However, a transfer job will still be attempted on Tuesday.
This applies only to currently running operations. If an operation is not currently running, cancel does nothing.
When you cancel a job, the next job computes a delta of files and may repair any inconsistent state. For instance, if you run a job every day, and today's job found 10 new files and transferred five files before you canceled the job, tomorrow's transfer operation will compute a new delta with the five files that were not copied today plus any new files discovered tomorrow.
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
Required. The name of the type being listed; must be transferOperations.
filter
string
Required. A list of query parameters specified as JSON text in the form of: {"projectId":"my_project_id",
"jobNames":["jobid1","jobid2",...],
"jobNamePattern": "job_name_pattern",
"operationNames":["opid1","opid2",...],
"operationNamePattern": "operation_name_pattern",
"minCreationTime": "min_creation_time",
"maxCreationTime": "max_creation_time",
"transferStatuses":["status1","status2",...]}
Since jobNames, operationNames, and transferStatuses support multiple values, they must be specified with array notation. projectId is the only argument that is required. If specified, jobNamePattern and operationNamePattern must match the full job or operation name respectively. '*' is a wildcard matching 0 or more characters. minCreationTime and maxCreationTime should be timestamps encoded as a string in the RFC 3339 format. The valid values for transferStatuses are case-insensitive: IN_PROGRESS, PAUSED, SUCCESS, FAILED, and ABORTED.
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
Union field result. The operation result, which can be either an error or a valid response. If done == false, neither error nor response is set. If done == true, exactly one of error or response can be set. Some services might not provide the result. result can be only one of the following:
The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.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 inferred response type is TakeSnapshotResponse.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[],[],null,["# Package google.longrunning\n\nIndex\n-----\n\n- [Operations](/storage-transfer/docs/reference/rpc/google.longrunning#google.longrunning.Operations) (interface)\n- [CancelOperationRequest](/storage-transfer/docs/reference/rpc/google.longrunning#google.longrunning.CancelOperationRequest) (message)\n- [GetOperationRequest](/storage-transfer/docs/reference/rpc/google.longrunning#google.longrunning.GetOperationRequest) (message)\n- [ListOperationsRequest](/storage-transfer/docs/reference/rpc/google.longrunning#google.longrunning.ListOperationsRequest) (message)\n- [ListOperationsResponse](/storage-transfer/docs/reference/rpc/google.longrunning#google.longrunning.ListOperationsResponse) (message)\n- [Operation](/storage-transfer/docs/reference/rpc/google.longrunning#google.longrunning.Operation) (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](/storage-transfer/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](/storage-transfer/docs/reference/rpc/google.longrunning#google.longrunning.Operations.CancelOperation).\n\nGetOperationRequest\n-------------------\n\nThe request message for [Operations.GetOperation](/storage-transfer/docs/reference/rpc/google.longrunning#google.longrunning.Operations.GetOperation).\n\nListOperationsRequest\n---------------------\n\nThe request message for [Operations.ListOperations](/storage-transfer/docs/reference/rpc/google.longrunning#google.longrunning.Operations.ListOperations).\n\nListOperationsResponse\n----------------------\n\nThe response message for [Operations.ListOperations](/storage-transfer/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."]]