Freigeben über


PhoneNumbersClient.CreateOrUpdateReservationAsync Method

Definition

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.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.PhoneNumbers.PhoneNumbersReservation>> CreateOrUpdateReservationAsync(Azure.Communication.PhoneNumbers.CreateOrUpdateReservationOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateReservationAsync : Azure.Communication.PhoneNumbers.CreateOrUpdateReservationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.PhoneNumbers.PhoneNumbersReservation>>
override this.CreateOrUpdateReservationAsync : Azure.Communication.PhoneNumbers.CreateOrUpdateReservationOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.PhoneNumbers.PhoneNumbersReservation>>
Public Overridable Function CreateOrUpdateReservationAsync (options As CreateOrUpdateReservationOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PhoneNumbersReservation))

Parameters

options
CreateOrUpdateReservationOptions

An object describing the parameters for the operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Remarks

Partial success is possible, in which case the result will contain phone numbers with error status.

Applies to