LROPoller Class

Poller for long running operations.

Inheritance
LROPoller

Constructor

LROPoller(client, initial_response, deserialization_callback, polling_method)

Parameters

client
PipelineClient
Required

A pipeline service client

initial_response
PipelineResponse
Required

The initial call response

deserialization_callback
callable or Model
Required

A callback that takes a Response and return a deserialized object. If a subclass of Model is given, this passes "deserialize" as callback.

polling_method
PollingMethod
Required

The polling strategy to adopt

Methods

add_done_callback

Add callback function to be run once the long running operation has completed - regardless of the status of the operation.

continuation_token

Return a continuation token that allows to restart the poller later.

done

Check status of the long running operation.

from_continuation_token
polling_method

Return the polling method associated to this poller.

remove_done_callback

Remove a callback from the long running operation.

result

Return the result of the long running operation, or the result available after the specified timeout.

status

Returns the current status string.

wait

Wait on the long running operation for a specified length of time. You can check if this call as ended with timeout with the "done()" method.

add_done_callback

Add callback function to be run once the long running operation has completed - regardless of the status of the operation.

add_done_callback(func)

Parameters

func
callable
Required

Callback function that takes at least one argument, a completed LongRunningOperation.

continuation_token

Return a continuation token that allows to restart the poller later.

continuation_token()

Returns

An opaque continuation token

Return type

str

done

Check status of the long running operation.

done()

Returns

'True' if the process has completed, else 'False'.

Return type

from_continuation_token

from_continuation_token(polling_method, continuation_token, **kwargs)

Parameters

cls
Required
polling_method
Required
continuation_token
Required

polling_method

Return the polling method associated to this poller.

polling_method()

remove_done_callback

Remove a callback from the long running operation.

remove_done_callback(func)

Parameters

func
callable
Required

The function to be removed from the callbacks.

Exceptions

if the long running operation has already completed.

result

Return the result of the long running operation, or the result available after the specified timeout.

result(timeout=None)

Parameters

timeout
default value: None

Returns

The deserialized resource of the long running operation, if one is available.

Exceptions

~azure.core.exceptions.HttpResponseError

Server problem with the query.

status

Returns the current status string.

status()

Returns

The current status string

Return type

str

wait

Wait on the long running operation for a specified length of time. You can check if this call as ended with timeout with the "done()" method.

wait(timeout=None)

Parameters

timeout
int
Required

Period of time to wait for the long running operation to complete (in seconds).

Exceptions

~azure.core.exceptions.HttpResponseError

Server problem with the query.