search_available_phone_numbers
¶
search_available_phone_numbers(
*,
config_overrides: Optional[ChimeClientConfig] = 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/chime.py
3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 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 | |