def iter_list_pages_by_engagement(
self,
engagement_id: "capo_ssm_contacts.types.ssm_contacts_arn.SsmContactsArn",
*,
config_overrides: Optional[SSMContactsClientConfig] = None,
next_token: Optional[
"capo_ssm_contacts.types.pagination_token.PaginationToken"
] = None,
max_results: Optional["capo_ssm_contacts.types.max_results.MaxResults"] = None,
) -> "Iterator[capo_ssm_contacts.types.page.Page]":
_token = next_token
while True:
_response = self.list_pages_by_engagement(
engagement_id,
config_overrides=config_overrides,
next_token=_token,
max_results=max_results,
)
_page = _resolve_path(_response, ("pages",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break