Skip to content

iter_list_snapshot_blocks async

iter_list_snapshot_blocks(
    snapshot_id: SnapshotId,
    *,
    config_overrides: Optional[AsyncEBSClientConfig] = None,
    next_token: Optional[PageToken] = None,
    max_results: Optional[MaxResults] = None,
    starting_block_index: Optional[BlockIndex] = None,
) -> AsyncIterator[ListSnapshotBlocksResponse]
Source code in docs_src/capo_ebs/_services/async_ebs.py
async def iter_list_snapshot_blocks(
    self,
    snapshot_id: "capo_ebs.types.snapshot_id.SnapshotId",
    *,
    config_overrides: Optional[AsyncEBSClientConfig] = None,
    next_token: Optional["capo_ebs.types.page_token.PageToken"] = None,
    max_results: Optional["capo_ebs.types.max_results.MaxResults"] = None,
    starting_block_index: Optional["capo_ebs.types.block_index.BlockIndex"] = None,
) -> "AsyncIterator[capo_ebs.types.list_snapshot_blocks_response.ListSnapshotBlocksResponse]":
    _token = next_token
    while True:
        _response = await self.list_snapshot_blocks(
            snapshot_id,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
            starting_block_index=starting_block_index,
        )
        yield _response
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break