Polls a long-running operation and exposes its current state.
Mutating service methods often return an operation instead of the final resource. Operation.wait completes for both successful and failed operations. After it completes, inspect Operation.status or Operation.successful. It rejects only when polling cannot continue.
Returns a JSON-safe value for logs.
Creates an operation wrapper.
Generated clients create this object with the correct operation service. Application code normally receives it from a service request.
Readonly$typeContains the fully qualified runtime type name.
ReadonlyinnerContains the protobuf type name of the wrapped operation.
Returns a JSON-safe value for logs.
Returns the operation creation time.
Returns the ID of the user or service account that created the operation.
Returns the human-readable operation description.
Checks whether the service has returned a final status.
Returns the operation finish time.
Returns the operation ID.
Returns the progress tracker.
Returns undefined when the service does not provide progress.
Returns the latest source protobuf object.
Treat this object as read-only. update replaces it with the next response from the service.
Returns the affected resource ID.
A service can return an empty string before it assigns the resource ID.
Returns the final status, or undefined while the operation is running.
Checks whether the operation finished successfully.
Returns false while the operation is still running.
Converts the value to string.
Gets the latest operation state from the operation service.
The method replaces the wrapped state in place. It does nothing when the operation has no ID. Request errors reject the returned promise.
Optionalmetadata: MetadataOptionaloptions: Partial<CallOptions> & RetryOptionsPolls the operation until the service returns a final status.
The method updates this object in place. It continues after a polling call reaches its deadline, because the remote operation can still be running. Consecutive retriable polling errors use exponential backoff with jitter. It rethrows non-retriable polling errors. A resolved promise does not mean that the operation succeeded; call successful or inspect status. The method returns immediately when the operation ID is empty.
Sets the poll interval in seconds. The default is 1.
Optionalmetadata: Metadata
Sends metadata with every polling request.
Optionaloptions: OperationWaitOptions & Partial<CallOptions>
Sets gRPC deadlines, request retries, and poll-error backoff.
Polls a long-running operation and exposes its current state.
Mutating service methods often return an operation instead of the final resource. Operation.wait completes for both successful and failed operations. After it completes, inspect Operation.status or Operation.successful. It rejects only when polling cannot continue.
Example