LROPoller Class
Poller for long running operations.
- Inheritance
-
LROPoller
Constructor
LROPoller(client: Any, initial_response: Any, deserialization_callback: Callable[[Any], PollingReturnType_co], polling_method: PollingMethod[PollingReturnType_co])
Parameters
- deserialization_callback
- callable or <xref:msrest.serialization.Model>
A callback that takes a Response and return a deserialized object. If a subclass of Model is given, this passes "deserialize" as callback.
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: Callable) -> None
Parameters
- func
- callable
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() -> str
Returns
An opaque continuation token
Return type
done
Check status of the long running operation.
done() -> bool
Returns
'True' if the process has completed, else 'False'.
Return type
from_continuation_token
from_continuation_token(polling_method: PollingMethod[PollingReturnType_co], continuation_token: str, **kwargs: Any) -> LROPoller[PollingReturnType_co]
Parameters
- polling_method
- continuation_token
polling_method
Return the polling method associated to this poller.
polling_method() -> PollingMethod[PollingReturnType_co]
Returns
The polling method
Return type
remove_done_callback
Remove a callback from the long running operation.
remove_done_callback(func: Callable) -> None
Parameters
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: float | None = None) -> PollingReturnType_co
Parameters
Returns
The deserialized resource of the long running operation, if one is available.
Return type
Exceptions
Server problem with the query.
status
Returns the current status string.
status() -> str
Returns
The current status string
Return type
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: float | None = None) -> None
Parameters
- timeout
- float
Period of time to wait for the long running operation to complete (in seconds).
Exceptions
Server problem with the query.
Azure SDK for Python
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for