你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AsyncLROPoller 类

用于长时间运行的操作的异步轮询器。

继承
AsyncLROPoller
AsyncLROPoller

构造函数

AsyncLROPoller(client: Any, initial_response: Any, deserialization_callback: Callable[[Any], PollingReturnType_co], polling_method: AsyncPollingMethod[PollingReturnType_co])

参数

名称 说明
client
必需

管道服务客户端

initial_response
必需

初始呼叫响应

deserialization_callback
必需
callable 或 <xref:msrest.serialization.Model>

采用 Response 并返回反序列化对象的回调。 如果给定 Model 的子类,则会将“反序列化”作为回调传递。

polling_method
必需

要采用的投票策略

方法

continuation_token

返回允许稍后重新启动轮询的继续标记。

done

检查长时间运行的操作的状态。

from_continuation_token
polling_method

返回与此轮询器关联的轮询方法。

result

返回长时间运行的操作的结果。

status

返回当前状态字符串。

wait

等待长时间运行的操作。

continuation_token

返回允许稍后重新启动轮询的继续标记。

continuation_token() -> str

返回

类型 说明
str

不透明的继续标记

done

检查长时间运行的操作的状态。

done() -> bool

返回

类型 说明

如果进程已完成,则为“True”,否则为“False”。

from_continuation_token

from_continuation_token(polling_method: AsyncPollingMethod[PollingReturnType_co], continuation_token: str, **kwargs: Any) -> AsyncLROPoller[PollingReturnType_co]

参数

名称 说明
polling_method
必需
continuation_token
必需

polling_method

返回与此轮询器关联的轮询方法。

polling_method() -> AsyncPollingMethod[PollingReturnType_co]

返回

类型 说明

与此轮询器关联的轮询方法。

result

返回长时间运行的操作的结果。

async result() -> PollingReturnType_co

返回

类型 说明
any,

长时间运行的操作的反序列化资源(如果有)。

例外

类型 说明

查询的服务器问题。

status

返回当前状态字符串。

status() -> str

返回

类型 说明
str

当前状态字符串

wait

等待长时间运行的操作。

async wait() -> None

例外

类型 说明

查询的服务器问题。