Invoke-AzReservationReturn
Return a Reservation.
Syntax
Invoke-AzReservationReturn
-ReservationOrderId <String>
-ReservationToReturnQuantity <Int32>
-ReservationToReturnReservationId <String>
-ReturnReason <String>
-Scope <String>
-SessionId <String>
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Invoke-AzReservationReturn
-Body <IRefundRequest>
-ReservationOrderId <String>
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Invoke-AzReservationReturn
-InputObject <IReservationsIdentity>
-Body <IRefundRequest>
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Invoke-AzReservationReturn
-InputObject <IReservationsIdentity>
-ReservationToReturnQuantity <Int32>
-ReservationToReturnReservationId <String>
-ReturnReason <String>
-Scope <String>
-SessionId <String>
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Description
Return a Reservation.
Examples
Example 1: Return a reservation using the session ID obtained from calculateRefund command.
$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"
ReservationOrderId DisplayName Term State Quantity Reservations
------------------ ----------- ---- ----- -------- ------------
179ef21b-90ec-4fe4-9423-f794b856dfee VM_RI_08-20-2021_15-47 P3Y Succeeded 1 {{…
Proceed reservations return with session ID obtained from Invoke-AzReservationCalculateRefund.
Parameters
-Body
The return request body. To construct, see NOTES section for BODY properties and create a hash table.
Type: | IRefundRequest |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
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 |
-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
Reservation Order Id.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReservationToReturnQuantity
Quantity to return.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReservationToReturnReservationId
Reservation Id to return.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReturnReason
The reason for this reservation return.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Scope
The scope of this return, e.g. Reservation.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SessionId
The session id obtained from Invoke-AzReservationCalculateRefund..
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
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
Outputs
Notes
ALIASES
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
BODY <IRefundRequest>
: The return request body.
[ReservationToReturnQuantity <Int32?>]
: Quantity to be returned. Must be greater than zero.[ReservationToReturnReservationId <String>]
: Fully qualified identifier of the reservation being returned[ReturnReason <String>]
: The reason of returning the reservation[Scope <String>]
: The scope of the refund, e.g. Reservation[SessionId <String>]
: SessionId that was returned by CalculateRefund API.
INPUTOBJECT <IReservationsIdentity>
: Identity Parameter
[Id <String>]
: Resource identity path[ReservationId <String>]
: Id of the reservation item[ReservationOrderId <String>]
: Order Id of the reservation[SubscriptionId <String>]
: Id of the subscription
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for