共用方式為


ReservationsExtensions.ExchangeAsync Method

Definition

Returns one or more Reservations in exchange for one or more Reservation purchases.

  • Request Path: /providers/Microsoft.Capacity/exchange
  • Operation Id: Exchange_Post
public static System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Reservations.Models.ExchangeResult>> ExchangeAsync (this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.WaitUntil waitUntil, Azure.ResourceManager.Reservations.Models.ExchangeContent content, System.Threading.CancellationToken cancellationToken = default);
static member ExchangeAsync : Azure.ResourceManager.Resources.TenantResource * Azure.WaitUntil * Azure.ResourceManager.Reservations.Models.ExchangeContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Reservations.Models.ExchangeResult>>
<Extension()>
Public Function ExchangeAsync (tenantResource As TenantResource, waitUntil As WaitUntil, content As ExchangeContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ExchangeResult))

Parameters

tenantResource
TenantResource

The TenantResource instance the method will execute against.

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

content
ExchangeContent

Request containing the refunds and purchases that need to be executed.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

tenantResource or content is null.

Applies to