Invoke-AzReservationCalculateRefund
This cmdlet is part of a Preview module. Preview versions aren't recommended for use in production environments. For more information, see https://aka.ms/azps-refstatus .
Calculate price for returning Reservations if there are no policy errors.\n
Syntax
PostExpanded (Default)
Invoke-AzReservationCalculateRefund
-ReservationOrderId <String>
[-Id <String>]
[-ReservationToReturnQuantity <Int32>]
[-ReservationToReturnReservationId <String>]
[-Scope <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PostViaJsonString
Invoke-AzReservationCalculateRefund
-ReservationOrderId <String>
-JsonString <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PostViaJsonFilePath
Invoke-AzReservationCalculateRefund
-ReservationOrderId <String>
-JsonFilePath <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PostViaIdentityExpanded
Invoke-AzReservationCalculateRefund
-InputObject <IReservationsIdentity>
[-Id <String>]
[-ReservationToReturnQuantity <Int32>]
[-ReservationToReturnReservationId <String>]
[-Scope <String>]
[-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
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Id
Fully qualified identifier of the reservation order being returned
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ReservationId
Parameter sets
PostExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
PostViaIdentityExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
PostViaIdentityExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-JsonFilePath
Path of Json file supplied to the Post operation
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
PostViaJsonFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-JsonString
Json string supplied to the Post operation
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
PostViaJsonString
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReservationOrderId
Order Id of the reservation
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
PostExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
PostViaJsonString
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
PostViaJsonFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReservationToReturnQuantity
Quantity to be returned.
Must be greater than zero.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
PostExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
PostViaIdentityExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReservationToReturnReservationId
Fully qualified identifier of the reservation being returned
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
PostExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
PostViaIdentityExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Scope
The scope of the refund, e.g.
Reservation
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
PostExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
PostViaIdentityExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs