PhoneNumbersClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Azure Communication Services phone numbers client.
public class PhoneNumbersClient
type PhoneNumbersClient = class
Public Class PhoneNumbersClient
- Inheritance
-
PhoneNumbersClient
Constructors
PhoneNumbersClient() |
Initializes a new instance of PhoneNumbersClient for mocking. |
PhoneNumbersClient(String, PhoneNumbersClientOptions) |
Initializes a phone numbers client with an Azure resource connection string and client options. |
PhoneNumbersClient(String) |
Initializes a phone numbers client with an Azure resource connection string and client options. |
PhoneNumbersClient(Uri, AzureKeyCredential, PhoneNumbersClientOptions) |
Initializes a new instance of PhoneNumbersClient. |
PhoneNumbersClient(Uri, TokenCredential, PhoneNumbersClientOptions) |
Initializes a phone numbers client with a token credential. |
Methods
BrowseAvailableNumbers(PhoneNumbersBrowseOptions, CancellationToken) |
Browses for available phone numbers to purchase. The response will be a randomized list of phone numbers available to purchase matching the browsing criteria. Since the results are randomized, repeating the same request will not guarantee the same results. |
BrowseAvailableNumbersAsync(PhoneNumbersBrowseOptions, CancellationToken) |
Browses for available phone numbers to purchase. The response will be a randomized list of phone numbers available to purchase matching the browsing criteria. Since the results are randomized, repeating the same request will not guarantee the same results. |
CreateOrUpdateReservation(CreateOrUpdateReservationOptions, CancellationToken) |
Updates the reservation with the given ID if it exists; or creates a new one otherwise. The response will be the updated state of the reservation. Updating a reservation will extend the expiration time of the reservation to 15 minutes after the last change, up to a maximum of 2 hours from creation time. |
CreateOrUpdateReservationAsync(CreateOrUpdateReservationOptions, CancellationToken) |
Updates the reservation with the given ID if it exists; or creates a new one otherwise. The response will be the updated state of the reservation. Updating a reservation will extend the expiration time of the reservation to 15 minutes after the last change, up to a maximum of 2 hours from creation time. |
DeleteReservation(Guid, CancellationToken) |
Deletes the reservation with the given ID. Any phone number in the reservation will be released and made available for others to purchase. Only active reservations can be deleted. |
DeleteReservationAsync(Guid, CancellationToken) |
Deletes the reservation with the given ID. Any phone number in the reservation will be released and made available for others to purchase. Only active reservations can be deleted. |
GetAvailableAreaCodesGeographic(String, PhoneNumberAssignmentType, String, String, CancellationToken) |
Lists the available area codes within a given country and locality. |
GetAvailableAreaCodesGeographicAsync(String, PhoneNumberAssignmentType, String, String, CancellationToken) |
Lists the available area codes within a given country and locality. |
GetAvailableAreaCodesTollFree(String, CancellationToken) |
Lists the available area codes within a given country and locality. |
GetAvailableAreaCodesTollFreeAsync(String, CancellationToken) |
Lists the available area codes within a given country and locality. |
GetAvailableCountries(CancellationToken) |
Lists the available countries from which to purchase phone numbers. |
GetAvailableCountriesAsync(CancellationToken) |
Lists the available countries from which to purchase phone numbers. |
GetAvailableLocalities(String, String, CancellationToken) |
Lists the available localities (e.g. city or town) in the given country from which to purchase phone numbers. |
GetAvailableLocalitiesAsync(String, String, CancellationToken) |
Lists the available localities (e.g. city or town) in the given country from which to purchase phone numbers. |
GetAvailableOfferings(String, Nullable<PhoneNumberType>, Nullable<PhoneNumberAssignmentType>, CancellationToken) |
Lists the available offerings in the given country. |
GetAvailableOfferingsAsync(String, Nullable<PhoneNumberType>, Nullable<PhoneNumberAssignmentType>, CancellationToken) |
Lists the available offerings in the given country. |
GetPhoneNumberSearchResult(String, CancellationToken) |
Retrieve the search result details. |
GetPhoneNumberSearchResultAsync(String, CancellationToken) |
Retrieve the search result details. |
GetPurchasedPhoneNumber(String, CancellationToken) |
Gets the details of the given purchased phone number. |
GetPurchasedPhoneNumberAsync(String, CancellationToken) |
Gets the details of the given purchased phone number. |
GetPurchasedPhoneNumbers(CancellationToken) |
Gets the list of all purchased phone numbers. |
GetPurchasedPhoneNumbersAsync(CancellationToken) |
Gets the list of all purchased phone numbers. |
GetReservation(Guid, CancellationToken) |
Retrieves the reservation with the given ID, including all of the phone numbers associated with it. |
GetReservationAsync(Guid, CancellationToken) |
Retrieves the reservation with the given ID, including all of the phone numbers associated with it. |
GetReservations(CancellationToken) |
Lists all phone numbers reservations. |
GetReservationsAsync(CancellationToken) |
Lists all phone numbers reservations. |
SearchOperatorInformation(IEnumerable<String>, OperatorInformationOptions, CancellationToken) |
Search for operator information about specified phone numbers. |
SearchOperatorInformationAsync(IEnumerable<String>, OperatorInformationOptions, CancellationToken) |
Search for operator information about specified phone numbers. |
StartPurchasePhoneNumbers(String, Boolean, CancellationToken) |
Purchases phone numbers. |
StartPurchasePhoneNumbers(String, CancellationToken) |
Purchases phone numbers. |
StartPurchasePhoneNumbersAsync(String, Boolean, CancellationToken) |
Purchases phone numbers. |
StartPurchasePhoneNumbersAsync(String, CancellationToken) |
Purchases phone numbers. |
StartPurchaseReservation(Guid, Boolean, CancellationToken) |
Starts a long running operation to purchase all of the phone numbers in the reservation. Purchase can only be started for active reservations that at least one phone number. If any of the phone numbers in the reservation is from a country where reselling is not permitted, do not resell agreement is required. |
StartPurchaseReservationAsync(Guid, Boolean, CancellationToken) |
Starts a long running operation to purchase all of the phone numbers in the reservation. Purchase can only be started for active reservations that at least one phone number. If any of the phone numbers in the reservation is from a country where reselling is not permitted, do not resell agreement is required. |
StartReleasePhoneNumber(String, CancellationToken) |
Releases an purchased phone number. |
StartReleasePhoneNumberAsync(String, CancellationToken) |
Releases an purchased phone number. |
StartSearchAvailablePhoneNumbers(String, PhoneNumberType, PhoneNumberAssignmentType, PhoneNumberCapabilities, PhoneNumberSearchOptions, CancellationToken) |
Search for available phone numbers to purchase. |
StartSearchAvailablePhoneNumbersAsync(String, PhoneNumberType, PhoneNumberAssignmentType, PhoneNumberCapabilities, PhoneNumberSearchOptions, CancellationToken) |
Search for available phone numbers to purchase. |
StartUpdateCapabilities(String, Nullable<PhoneNumberCapabilityType>, Nullable<PhoneNumberCapabilityType>, CancellationToken) |
Updates the capabilities of a phone number. |
StartUpdateCapabilitiesAsync(String, Nullable<PhoneNumberCapabilityType>, Nullable<PhoneNumberCapabilityType>, CancellationToken) |
Updates the capabilities of a phone number. |