Invoke-AzReservationReturn
Return a Reservation.
Syntax
Invoke-AzReservationReturn
-ReservationOrderId <String>
-ReservationToReturnReservationId <String>
-ReservationToReturnQuantity <Int32>
-SessionId <String>
-Scope <String>
-ReturnReason <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzReservationReturn
-InputObject <IReservationsIdentity>
-Body <IRefundRequest>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzReservationReturn
-InputObject <IReservationsIdentity>
-ReservationToReturnReservationId <String>
-ReservationToReturnQuantity <Int32>
-SessionId <String>
-Scope <String>
-ReturnReason <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzReservationReturn
-ReservationOrderId <String>
-Body <IRefundRequest>
[-WhatIf]
[-Confirm]
[<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
Azure PowerShell