async def iter_list_grants(
self,
key_id: "capo_kms.types.key_id_type.KeyIdType",
*,
config_overrides: Optional[AsyncKMSClientConfig] = None,
limit: Optional["capo_kms.types.limit_type.LimitType"] = None,
marker: Optional["capo_kms.types.marker_type.MarkerType"] = None,
grant_id: Optional["capo_kms.types.grant_id_type.GrantIdType"] = None,
grantee_principal: Optional[
"capo_kms.types.principal_id_type.PrincipalIdType"
] = None,
grantee_service_principal: Optional[
"capo_kms.types.service_principal_type.ServicePrincipalType"
] = None,
) -> "AsyncIterator[capo_kms.types.grant_list_entry.GrantListEntry]":
_token = marker
while True:
_response = await self.list_grants(
key_id,
config_overrides=config_overrides,
limit=limit,
marker=_token,
grant_id=grant_id,
grantee_principal=grantee_principal,
grantee_service_principal=grantee_service_principal,
)
_page = _resolve_path(_response, ("grants",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_marker",))
if not _token:
break