Modifier

Partager via


Invoke-AzReservationCalculateRefund

Calculate price for returning Reservations if there are no policy errors.\n

Syntax

Invoke-AzReservationCalculateRefund
      -ReservationOrderId <String>
      [-Id <String>]
      [-ReservationToReturnQuantity <Int32>]
      [-ReservationToReturnReservationId <String>]
      [-Scope <String>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzReservationCalculateRefund
      -ReservationOrderId <String>
      -Body <ICalculateRefundRequest>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzReservationCalculateRefund
      -InputObject <IReservationsIdentity>
      [-Id <String>]
      [-ReservationToReturnQuantity <Int32>]
      [-ReservationToReturnReservationId <String>]
      [-Scope <String>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzReservationCalculateRefund
      -InputObject <IReservationsIdentity>
      -Body <ICalculateRefundRequest>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Calculate price for returning Reservations if there are no policy errors.\n

Examples

Example 1: Calculate price for returning reservations

$orderId = "50000000-aaaa-bbbb-cccc-100000000003"
$fullyQualifiedId = "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003/reservations/30000000-aaaa-bbbb-cccc-100000000003"
$fullyQualifiedOrderId = "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003"

Invoke-AzReservationCalculateRefund -ReservationOrderId $orderId -ReservationToReturnQuantity 1 -ReservationToReturnReservationId $fullyQualifiedId  -Id $fullyQualifiedOrderId -Scope "Reservation"

BillingInformationBillingCurrencyProratedAmount            : {
                                                               "currencyCode": "USD",
                                                               "amount": 25.05       
                                                             }
BillingInformationBillingCurrencyRemainingCommitmentAmount : {
                                                               "currencyCode": "USD",
                                                               "amount": 18.06       
                                                             }
BillingInformationBillingCurrencyTotalPaidAmount           : {
                                                               "currencyCode": "USD",
                                                               "amount": 25.8        
                                                             }
BillingInformationBillingPlan                              : Monthly
BillingInformationCompletedTransaction                     : 5
BillingInformationTotalTransaction                         : 12
BillingRefundAmount                                        : {
                                                               "currencyCode": "USD",
                                                               "amount": 0.75
                                                             }
ConsumedRefundsTotal                                       : {
                                                               "currencyCode": "USD",
                                                               "amount": 365.43
                                                             }
Id                                                         : /providers/Microsoft.Capacity/reservationOrders/4336d060-da34-4228-91b0-feab5b2a1e1d/reservations/5e012942-5692-41c0-bc71-86303e11104d
MaxRefundLimit                                             : {
                                                               "currencyCode": "USD",
                                                               "amount": 50000
                                                             }
PolicyError                                                : {}
PricingRefundAmount                                        : {
                                                               "currencyCode": "USD",
                                                               "amount": 0.75
                                                             }
Quantity                                                   : 1
ResourceGroupName                                          :
SessionId                                                  : b0a96155-5f75-4138-b01f-443130f5516e

Calculate reservations refund amount. The SessionId in the response is a required input parameter for cmdlet Invoke-AzReservationReturn

Parameters

-Body

Request containing information needed for calculating refund. To construct, see NOTES section for BODY properties and create a hash table.

Type:ICalculateRefundRequest
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

Fully qualified identifier of the reservation order being returned

Type:String
Aliases:ReservationId
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IReservationsIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ReservationOrderId

Order Id of the reservation

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ReservationToReturnQuantity

Quantity to be returned. Must be greater than zero.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReservationToReturnReservationId

Fully qualified identifier of the reservation being returned

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Scope

The scope of the refund, e.g. Reservation

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

ICalculateRefundRequest

IReservationsIdentity

Outputs

ICalculateRefundResponse