PhoneNumbersClient.StartSearchAvailablePhoneNumbersAsync Method
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.
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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for .NET