Skip to content

iter_list_email_contacts

iter_list_email_contacts(
    *,
    config_overrides: Optional[NotificationsContactsClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> Iterator[EmailContact]
Source code in docs_src/capo_notificationscontacts/_services/notifications_contacts.py
def iter_list_email_contacts(
    self,
    *,
    config_overrides: Optional[NotificationsContactsClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> "Iterator[capo_notificationscontacts.types.email_contact.EmailContact]":
    _token = next_token
    while True:
        _response = self.list_email_contacts(
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("email_contacts",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break