OperationResourcePolling Class

Implements a operation resource polling, typically from Operation-Location.

Inheritance
OperationResourcePolling

Constructor

OperationResourcePolling(operation_location_header='operation-location', *, lro_options=None)

Parameters

operation_location_header
str
default value: operation-location

Name of the header to return operation format (default 'operation-location')

any] lro_options
dict[<xref:str,>

Additional options for LRO. For more information, see https://aka.ms/azsdk/autorest/openapi/lro-options

Methods

can_poll

Answer if this polling method could be used.

get_final_get_url

If a final GET is needed, returns the URL.

get_polling_url

Return the polling URL.

get_status

Process the latest status update retrieved from an "Operation-Location" header.

set_initial_status

Process first response after initiating long running operation.

can_poll

Answer if this polling method could be used.

can_poll(pipeline_response)

Parameters

pipeline_response
Required

get_final_get_url

If a final GET is needed, returns the URL.

get_final_get_url(pipeline_response: PipelineResponseType) -> Optional[str]

Parameters

pipeline_response
Required

Return type

str

get_polling_url

Return the polling URL.

get_polling_url() -> str

get_status

Process the latest status update retrieved from an "Operation-Location" header.

get_status(pipeline_response: PipelineResponseType) -> str

Parameters

response
PipelineResponse
Required

The response to extract the status.

Exceptions

<xref:BadResponse if response has no body>, <xref:or body does not contain status.>

set_initial_status

Process first response after initiating long running operation.

set_initial_status(pipeline_response: PipelineResponseType) -> str

Parameters

response
PipelineResponse
Required

initial REST call response.