PhoneNumberAdministrationClient Class
Azure Communication Services Phone Number Management client.
- Inheritance
-
builtins.objectPhoneNumberAdministrationClient
Constructor
PhoneNumberAdministrationClient(endpoint: str, credential: str, **kwargs: Any)
Parameters
- credential
The credentials with which to authenticate. The value is an account shared access key
Methods
| begin_purchase_reservation |
Begins purchase the reserved phone numbers of a phone number search. Caller must provide either reservation_id, or continuation_token keywords to use the method. If both reservation_id and continuation_token are specified, only continuation_token will be used to restart a poller from a saved state, and keyword reservation_id will be ignored. :keyword str reservation_id: The reservation id to be purchased. :keyword str continuation_token: A continuation token to restart a poller from a saved state. :rtype: ~azure.core.polling.LROPoller[~azure.communication.administration.PhoneNumberReservation] |
| begin_release_phone_numbers |
Begins creating a release for the given phone numbers. Caller must provide either phone_numbers, or continuation_token keywords to use the method. If both phone_numbers and continuation_token are specified, only continuation_token will be used to restart a poller from a saved state, and keyword phone_numbers will be ignored. |
| begin_reserve_phone_numbers |
Begins creating a phone number search to reserve phone numbers. Caller must provide either options, or continuation_token keywords to use the method. If both options and continuation_token are specified, only continuation_token will be used to restart a poller from a saved state, and keyword options will be ignored. :keyword azure.communication.administration.CreateSearchOptions options: reservation options. :keyword str continuation_token: A continuation token to restart a poller from a saved state. :rtype: ~azure.core.polling.LROPoller[~azure.communication.administration.PhoneNumberReservation] |
| cancel_reservation |
Cancels the reservation. This means existing numbers in the reservation will be made available. |
| configure_number |
Endpoint for configuring a pstn number. |
| from_connection_string |
Create PhoneNumberAdministrationClient from a Connection String. :param str conn_str: A connection string to an Azure Communication Service resource. |
| get_all_area_codes |
Gets a list of the supported area codes. Represents the underlying list of countries. :rtype: ~azure.communication.administration.AreaCodes |
| get_capabilities_update |
Get capabilities by capabilities update id. |
| get_number_configuration |
Endpoint for getting number configurations. |
| get_phone_plan_location_options |
Gets a list of location options for a phone plan. The default is "en-US". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.communication.administration.LocationOptionsResponse |
| get_release_by_id |
Gets a release by a release id. |
| get_reservation_by_id |
Get reservation by reservation id. |
| list_all_phone_numbers |
Gets the list of the acquired phone numbers. The default is "en-US". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.AcquiredPhoneNumbers] |
| list_all_releases |
Gets a list of all releases. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhoneNumberEntities] |
| list_all_searches |
Gets a list of all searches. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhoneNumberEntities] |
| list_all_supported_countries |
Gets a list of supported countries. The default is "en-US". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhoneNumberCountries] |
| list_phone_plan_groups |
Gets a list of phone plan groups for the given country. The default is "en-US". :keyword include_rate_information bool: An optional boolean parameter for including rate information in result. The default is False". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhonePlanGroups] |
| list_phone_plans |
Gets a list of phone plans for a phone plan group. The default is "en-US". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhonePlansResponse] |
| unconfigure_number |
Endpoint for unconfiguring a pstn number by removing the configuration. |
| update_capabilities |
Adds or removes phone number capabilities. |
begin_purchase_reservation
Begins purchase the reserved phone numbers of a phone number search. Caller must provide either reservation_id, or continuation_token keywords to use the method. If both reservation_id and continuation_token are specified, only continuation_token will be used to restart a poller from a saved state, and keyword reservation_id will be ignored. :keyword str reservation_id: The reservation id to be purchased. :keyword str continuation_token: A continuation token to restart a poller from a saved state. :rtype: ~azure.core.polling.LROPoller[~azure.communication.administration.PhoneNumberReservation]
begin_purchase_reservation(**kwargs: Any) -> LROPoller[PhoneNumberReservation]
begin_release_phone_numbers
Begins creating a release for the given phone numbers. Caller must provide either phone_numbers, or continuation_token keywords to use the method. If both phone_numbers and continuation_token are specified, only continuation_token will be used to restart a poller from a saved state, and keyword phone_numbers will be ignored.
begin_release_phone_numbers(**kwargs: Any) -> LROPoller[PhoneNumberRelease]
Parameters
- continuation_token
- str
A continuation token to restart a poller from a saved state.
Return type
begin_reserve_phone_numbers
Begins creating a phone number search to reserve phone numbers. Caller must provide either options, or continuation_token keywords to use the method. If both options and continuation_token are specified, only continuation_token will be used to restart a poller from a saved state, and keyword options will be ignored. :keyword azure.communication.administration.CreateSearchOptions options: reservation options. :keyword str continuation_token: A continuation token to restart a poller from a saved state. :rtype: ~azure.core.polling.LROPoller[~azure.communication.administration.PhoneNumberReservation]
begin_reserve_phone_numbers(**kwargs: Any) -> LROPoller[PhoneNumberReservation]
cancel_reservation
Cancels the reservation. This means existing numbers in the reservation will be made available.
cancel_reservation(reservation_id: str, **kwargs: Any) -> None
Parameters
Return type
configure_number
Endpoint for configuring a pstn number.
configure_number(pstn_configuration: PstnConfiguration, phone_number: str, **kwargs: Any) -> None
Parameters
Return type
from_connection_string
Create PhoneNumberAdministrationClient from a Connection String. :param str conn_str:
A connection string to an Azure Communication Service resource.
from_connection_string(conn_str: str, **kwargs: Any) -> PhoneNumberAdministrationClient
Parameters
- cls
- conn_str
Returns
Instance of PhoneNumberAdministrationClient.
Return type
get_all_area_codes
Gets a list of the supported area codes.
Represents the underlying list of countries. :rtype: ~azure.communication.administration.AreaCodes
get_all_area_codes(location_type: str, country_code: str, phone_plan_id: str, **kwargs: Any) -> AreaCodes
Parameters
- location_options
- <xref:List>[<xref:"LocationOptionsQuery">]
get_capabilities_update
Get capabilities by capabilities update id.
get_capabilities_update(capabilities_update_id: str, **kwargs: Any) -> UpdatePhoneNumberCapabilitiesResponse
Parameters
- capabilities_update_id
- str
Return type
get_number_configuration
Endpoint for getting number configurations.
get_number_configuration(phone_number: str, **kwargs: Any) -> NumberConfigurationResponse
Parameters
Return type
get_phone_plan_location_options
Gets a list of location options for a phone plan.
The default is "en-US". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.communication.administration.LocationOptionsResponse
get_phone_plan_location_options(country_code: str, phone_plan_group_id: str, phone_plan_id: str, **kwargs: Any) -> LocationOptionsResponse
Parameters
- phone_plan_group_id
- str
- phone_plan_id
- str
- locale
- str
A language-locale pairing which will be used to localise the names of countries.
get_release_by_id
Gets a release by a release id.
get_release_by_id(release_id: str, **kwargs: Any) -> PhoneNumberRelease
Parameters
Return type
get_reservation_by_id
Get reservation by reservation id.
get_reservation_by_id(reservation_id: str, **kwargs: Any) -> PhoneNumberReservation
Parameters
Return type
list_all_phone_numbers
Gets the list of the acquired phone numbers.
The default is "en-US". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.AcquiredPhoneNumbers]
list_all_phone_numbers(**kwargs: Any) -> ItemPaged[AcquiredPhoneNumbers]
Parameters
- locale
- str
A language-locale pairing which will be used to localise the names of countries.
list_all_releases
Gets a list of all releases.
The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhoneNumberEntities]
list_all_releases(**kwargs: Any) -> ItemPaged[PhoneNumberEntities]
Parameters
- skip
- int
An optional parameter for how many entries to skip, for pagination purposes.
list_all_searches
Gets a list of all searches.
The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhoneNumberEntities]
list_all_searches(**kwargs: Any) -> ItemPaged[PhoneNumberEntities]
Parameters
- skip
- int
An optional parameter for how many entries to skip, for pagination purposes.
list_all_supported_countries
Gets a list of supported countries.
The default is "en-US". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhoneNumberCountries]
list_all_supported_countries(**kwargs: Any) -> ItemPaged[PhoneNumberCountries]
Parameters
- locale
- str
A language-locale pairing which will be used to localise the names of countries.
list_phone_plan_groups
Gets a list of phone plan groups for the given country.
The default is "en-US". :keyword include_rate_information bool: An optional boolean parameter for including rate information in result. The default is False". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhonePlanGroups]
list_phone_plan_groups(country_code: str, **kwargs: Any) -> ItemPaged[PhonePlanGroups]
Parameters
- locale
- str
A language-locale pairing which will be used to localise the names of countries.
list_phone_plans
Gets a list of phone plans for a phone plan group.
The default is "en-US". :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhonePlansResponse]
list_phone_plans(country_code: str, phone_plan_group_id: str, **kwargs: Any) -> ItemPaged[PhonePlansResponse]
Parameters
- phone_plan_group_id
- str
- locale
- str
A language-locale pairing which will be used to localise the names of countries.
unconfigure_number
Endpoint for unconfiguring a pstn number by removing the configuration.
unconfigure_number(phone_number: str, **kwargs: Any) -> None
Parameters
Return type
update_capabilities
Adds or removes phone number capabilities.
update_capabilities(phone_number_capabilities_update: Dict[str, NumberUpdateCapabilities], **kwargs: Any) -> UpdateNumberCapabilitiesResponse
Parameters
- phone_number_capabilities_update
- dict[str, NumberUpdateCapabilities]
The map of phone numbers to the capabilities update applied to the phone number.
Return type
Feedback
Submit and view feedback for