你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

PhoneNumbersClient.StartSearchAvailablePhoneNumbersAsync 方法

定义

搜索要购买的可用电话号码。

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)

参数

twoLetterIsoCountryName
String

ISO 3166-2 国家/地区代码,例如美国。

phoneNumberType
PhoneNumberType

要搜索的电话号码的类型。

phoneNumberAssignmentType
PhoneNumberAssignmentType

要搜索的电话号码的分配类型。

capabilities
PhoneNumberCapabilities

电话号码的功能。

options
PhoneNumberSearchOptions

电话号码搜索选项。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

twoLetterIsoCountryName 为 null。

适用于