Share via


PhoneNumbersClient.StartSearchAvailablePhoneNumbersAsync Method

Definition

Search for available phone numbers to purchase.

public virtual System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.SearchAvailablePhoneNumbersOperation> StartSearchAvailablePhoneNumbersAsync (string twoLetterIsoCountryName, Azure.Communication.PhoneNumbers.PhoneNumberType phoneNumberType, Azure.Communication.PhoneNumbers.PhoneNumberAssignmentType phoneNumberAssignmentType, Azure.Communication.PhoneNumbers.PhoneNumberCapabilities capabilities, Azure.Communication.PhoneNumbers.PhoneNumberSearchOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member StartSearchAvailablePhoneNumbersAsync : string * Azure.Communication.PhoneNumbers.PhoneNumberType * Azure.Communication.PhoneNumbers.PhoneNumberAssignmentType * Azure.Communication.PhoneNumbers.PhoneNumberCapabilities * Azure.Communication.PhoneNumbers.PhoneNumberSearchOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.SearchAvailablePhoneNumbersOperation>
override this.StartSearchAvailablePhoneNumbersAsync : string * Azure.Communication.PhoneNumbers.PhoneNumberType * Azure.Communication.PhoneNumbers.PhoneNumberAssignmentType * Azure.Communication.PhoneNumbers.PhoneNumberCapabilities * Azure.Communication.PhoneNumbers.PhoneNumberSearchOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.SearchAvailablePhoneNumbersOperation>
Public Overridable Function StartSearchAvailablePhoneNumbersAsync (twoLetterIsoCountryName As String, phoneNumberType As PhoneNumberType, phoneNumberAssignmentType As PhoneNumberAssignmentType, capabilities As PhoneNumberCapabilities, Optional options As PhoneNumberSearchOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of SearchAvailablePhoneNumbersOperation)

Parameters

twoLetterIsoCountryName
String

The ISO 3166-2 country code, e.g. US.

phoneNumberType
PhoneNumberType

The type of phone numbers to search for.

phoneNumberAssignmentType
PhoneNumberAssignmentType

The assignment type of the phone numbers to search for.

capabilities
PhoneNumberCapabilities

Capabilities of a phone number.

options
PhoneNumberSearchOptions

The phone number search options.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

twoLetterIsoCountryName is null.

Applies to