Skip to content

iter_list_rotations async

iter_list_rotations(
    *,
    config_overrides: Optional[AsyncSSMContactsClientConfig] = None,
    rotation_name_prefix: Optional[RotationName] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> AsyncIterator[Rotation]
Source code in docs_src/capo_ssm_contacts/_services/async_ssm_contacts.py
async def iter_list_rotations(
    self,
    *,
    config_overrides: Optional[AsyncSSMContactsClientConfig] = None,
    rotation_name_prefix: Optional[
        "capo_ssm_contacts.types.rotation_name.RotationName"
    ] = None,
    next_token: Optional[
        "capo_ssm_contacts.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_ssm_contacts.types.max_results.MaxResults"] = None,
) -> "AsyncIterator[capo_ssm_contacts.types.rotation.Rotation]":
    _token = next_token
    while True:
        _response = await self.list_rotations(
            config_overrides=config_overrides,
            rotation_name_prefix=rotation_name_prefix,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("rotations",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break