ICalculateExchangeOperations.PostWithHttpMessagesAsync Method

Definition

Calculates the refund amounts and price of the new purchases.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Reservations.Models.CalculateExchangeOperationResultResponse,Microsoft.Azure.Management.Reservations.Models.CalculateExchangePostHeaders>> PostWithHttpMessagesAsync (Microsoft.Azure.Management.Reservations.Models.CalculateExchangeRequest body, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PostWithHttpMessagesAsync : Microsoft.Azure.Management.Reservations.Models.CalculateExchangeRequest * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Reservations.Models.CalculateExchangeOperationResultResponse, Microsoft.Azure.Management.Reservations.Models.CalculateExchangePostHeaders>>
Public Function PostWithHttpMessagesAsync (body As CalculateExchangeRequest, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of CalculateExchangeOperationResultResponse, CalculateExchangePostHeaders))

Parameters

body
CalculateExchangeRequest

Request containing purchases and refunds that need to be executed.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

Remarks

Calculates price for exchanging `Reservations` if there are no policy errors.

Applies to