search_available_phone_numbers
async
¶
search_available_phone_numbers(
*,
config_overrides: Optional[AsyncChimeClientConfig] = None,
area_code: Optional[String] = None,
city: Optional[String] = None,
country: Optional[Alpha2CountryCode] = None,
state: Optional[String] = None,
toll_free_prefix: Optional[TollFreePrefix] = None,
phone_number_type: Optional[PhoneNumberType] = None,
max_results: Optional[PhoneNumberMaxResults] = None,
next_token: Optional[String] = None,
) -> SearchAvailablePhoneNumbersResponse
Searches for phone numbers that can be ordered. For US numbers, provide at least one of the following search filters: AreaCode, City, State, or TollFreePrefix. If you provide City, you must also provide State. Numbers outside the US only support the PhoneNumberType filter, which you must use.
Parameters:
-
area_code(Optional[String], default:None) –The area code used to filter results. Only applies to the US.
-
city(Optional[String], default:None) –The city used to filter results. Only applies to the US.
-
country(Optional[Alpha2CountryCode], default:None) –The country used to filter results. Defaults to the US Format: ISO 3166-1 alpha-2.
-
state(Optional[String], default:None) –The state used to filter results. Required only if you provide
City. Only applies to the US. -
toll_free_prefix(Optional[TollFreePrefix], default:None) –The toll-free prefix that you use to filter results. Only applies to the US.
-
phone_number_type(Optional[PhoneNumberType], default:None) –The phone number type used to filter results. Required for non-US numbers.
-
max_results(Optional[PhoneNumberMaxResults], default:None) –The maximum number of results to return in a single call.
-
next_token(Optional[String], default:None) –The token used to retrieve the next page of results.
Raises:
-
AccessDeniedException–You don't have permissions to perform the requested operation.
-
BadRequestException–The input parameters don't match the service's restrictions.
-
ForbiddenException–The client is permanently forbidden from making the request.
-
ServiceFailureException–The service encountered an unexpected error.
-
ServiceUnavailableException–The service is currently unavailable.
-
ThrottledClientException–The client exceeded its request rate limit.
-
UnauthorizedClientException–The client is not currently authorized to make the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_chime/_services/async_chime.py
3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 | |