Skip to content

iter_list_devices async

iter_list_devices(
    *,
    config_overrides: Optional[AsyncSnowDeviceManagementClientConfig] = None,
    job_id: Optional[JobId] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> AsyncIterator[DeviceSummary]
Source code in docs_src/capo_snow_device_management/_services/async_snow_device_management.py
async def iter_list_devices(
    self,
    *,
    config_overrides: Optional[AsyncSnowDeviceManagementClientConfig] = None,
    job_id: Optional["capo_snow_device_management.types.job_id.JobId"] = None,
    max_results: Optional[
        "capo_snow_device_management.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_snow_device_management.types.next_token.NextToken"
    ] = None,
) -> (
    "AsyncIterator[capo_snow_device_management.types.device_summary.DeviceSummary]"
):
    _token = next_token
    while True:
        _response = await self.list_devices(
            config_overrides=config_overrides,
            job_id=job_id,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("devices",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break