src/operationsClient.ts
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
Google Cloud 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.
This will be created through a builder function which can be obtained by the module. See the following example of how to initialize the module and how to access to the builder.
Properties |
Methods |
constructor(gaxGrpc: GrpcClient, grpcClients: any, options: OperationsClientOptions)
|
||||||||||||
Defined in src/operationsClient.ts:92
|
||||||||||||
Parameters :
|
auth |
Type : GoogleAuth
|
Defined in src/operationsClient.ts:88
|
cancelOperation | ||||||||||||
cancelOperation(request, options?, callback?)
|
||||||||||||
Defined in src/operationsClient.ts:371
|
||||||||||||
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
Parameters :
Example :
Returns :
any
|
deleteOperation | ||||||||||||
deleteOperation(request, options, callback)
|
||||||||||||
Defined in src/operationsClient.ts:404
|
||||||||||||
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
Parameters :
Example :
Returns :
any
|
getOperation | ||||||||||||||||
getOperation(request: literal type, options: literal type, callback?)
|
||||||||||||||||
Defined in src/operationsClient.ts:194
|
||||||||||||||||
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.
Parameters :
Example :
Returns :
any
|
getProjectId |
getProjectId()
|
Defined in src/operationsClient.ts:155
|
Get the project ID used by this class.
Returns :
Promise<string>
|
getProjectId | ||||||
getProjectId(callback: ProjectIdCallback)
|
||||||
Defined in src/operationsClient.ts:156
|
||||||
Parameters :
Returns :
void
|
getProjectId | ||||||
getProjectId(callback?: ProjectIdCallback)
|
||||||
Defined in src/operationsClient.ts:157
|
||||||
Parameters :
Returns :
void | Promise
|
listOperations | ||||||||||||
listOperations(request, options, callback)
|
||||||||||||
Defined in src/operationsClient.ts:280
|
||||||||||||
Lists operations that match the specified filter in the request. If the
server doesn't support this method, it returns NOTE: the
Parameters :
Example :
Returns :
any
|
listOperationsStream | ||||||||||||
listOperationsStream(request: literal type, options: gax.CallSettings)
|
||||||||||||
Defined in src/operationsClient.ts:333
|
||||||||||||
Equivalent to listOperations, but returns a NodeJS Stream object. This fetches the paged responses for listOperations continuously and invokes the callback registered for 'data' event for each element in the responses. The returned object has 'end' method when no more elements are required. autoPaginate option will be ignored.
Parameters :
Example :
Returns :
any
|