PhoneNumbersClient.StartPurchasePhoneNumbersAsync 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.
Overloads
StartPurchasePhoneNumbersAsync(String, CancellationToken) |
Purchases phone numbers. |
StartPurchasePhoneNumbersAsync(String, Boolean, CancellationToken) |
Purchases phone numbers. |
StartPurchasePhoneNumbersAsync(String, CancellationToken)
- Source:
- PhoneNumbersClient.cs
- Source:
- PhoneNumbersClient.cs
Purchases phone numbers.
public virtual System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.PurchasePhoneNumbersOperation> StartPurchasePhoneNumbersAsync(string searchId, System.Threading.CancellationToken cancellationToken = default);
abstract member StartPurchasePhoneNumbersAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.PurchasePhoneNumbersOperation>
override this.StartPurchasePhoneNumbersAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.PurchasePhoneNumbersOperation>
Public Overridable Function StartPurchasePhoneNumbersAsync (searchId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of PurchasePhoneNumbersOperation)
Parameters
- searchId
- String
The search id.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Applies to
StartPurchasePhoneNumbersAsync(String, Boolean, CancellationToken)
- Source:
- PhoneNumbersClient.cs
Purchases phone numbers.
public virtual System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.PurchasePhoneNumbersOperation> StartPurchasePhoneNumbersAsync(string searchId, bool agreeToNotResell, System.Threading.CancellationToken cancellationToken = default);
abstract member StartPurchasePhoneNumbersAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.PurchasePhoneNumbersOperation>
override this.StartPurchasePhoneNumbersAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.PurchasePhoneNumbersOperation>
Public Overridable Function StartPurchasePhoneNumbersAsync (searchId As String, agreeToNotResell As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task(Of PurchasePhoneNumbersOperation)
Parameters
- searchId
- String
The search id.
- agreeToNotResell
- Boolean
The user-provided agreement to not resell the numbers purchased by this operation.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Remarks
The agreement to not resell is a legal requirement in some countries in order to purchase phone numbers. For more information on which countries require this agreement, please refer to this documentation: https://learn.microsoft.com/azure/communication-services/concepts/numbers/sub-eligibility-number-capability