Skip to content

iter_list_key_rotations async

iter_list_key_rotations(
    key_id: KeyIdType,
    *,
    config_overrides: Optional[AsyncKMSClientConfig] = None,
    include_key_material: Optional[IncludeKeyMaterial] = None,
    limit: Optional[LimitType] = None,
    marker: Optional[MarkerType] = None,
) -> AsyncIterator[RotationsListEntry]
Source code in docs_src/capo_kms/_services/async_kms.py
async def iter_list_key_rotations(
    self,
    key_id: "capo_kms.types.key_id_type.KeyIdType",
    *,
    config_overrides: Optional[AsyncKMSClientConfig] = None,
    include_key_material: Optional[
        "capo_kms.types.include_key_material.IncludeKeyMaterial"
    ] = None,
    limit: Optional["capo_kms.types.limit_type.LimitType"] = None,
    marker: Optional["capo_kms.types.marker_type.MarkerType"] = None,
) -> "AsyncIterator[capo_kms.types.rotations_list_entry.RotationsListEntry]":
    _token = marker
    while True:
        _response = await self.list_key_rotations(
            key_id,
            config_overrides=config_overrides,
            include_key_material=include_key_material,
            limit=limit,
            marker=_token,
        )
        _page = _resolve_path(_response, ("rotations",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_marker",))
        if not _token:
            break