Skip to content

iter_list_phone_numbers async

iter_list_phone_numbers(
    *,
    config_overrides: Optional[AsyncChimeClientConfig] = None,
    status: Optional[PhoneNumberStatus] = None,
    product_type: Optional[PhoneNumberProductType] = None,
    filter_name: Optional[PhoneNumberAssociationName] = None,
    filter_value: Optional[String] = None,
    max_results: Optional[ResultMax] = None,
    next_token: Optional[String] = None,
) -> AsyncIterator[ListPhoneNumbersResponse]
Source code in docs_src/capo_chime/_services/async_chime.py
async def iter_list_phone_numbers(
    self,
    *,
    config_overrides: Optional[AsyncChimeClientConfig] = None,
    status: Optional[
        "capo_chime.types.phone_number_status.PhoneNumberStatus"
    ] = None,
    product_type: Optional[
        "capo_chime.types.phone_number_product_type.PhoneNumberProductType"
    ] = None,
    filter_name: Optional[
        "capo_chime.types.phone_number_association_name.PhoneNumberAssociationName"
    ] = None,
    filter_value: Optional["capo_chime.types.string.String"] = None,
    max_results: Optional["capo_chime.types.result_max.ResultMax"] = None,
    next_token: Optional["capo_chime.types.string.String"] = None,
) -> "AsyncIterator[capo_chime.types.list_phone_numbers_response.ListPhoneNumbersResponse]":
    _token = next_token
    while True:
        _response = await self.list_phone_numbers(
            config_overrides=config_overrides,
            status=status,
            product_type=product_type,
            filter_name=filter_name,
            filter_value=filter_value,
            max_results=max_results,
            next_token=_token,
        )
        yield _response
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break