Edit

Invoke-AzReservationArchiveReservation

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.

Archiving a Reservation moves it to Archived state.

Syntax

Archive (Default)

Invoke-AzReservationArchiveReservation
    -ReservationId <String>
    -ReservationOrderId <String>
    [-DefaultProfile <PSObject>]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ArchiveViaIdentityReservationOrder

Invoke-AzReservationArchiveReservation
    -ReservationId <String>
    -ReservationOrderInputObject <IReservationsIdentity>
    [-DefaultProfile <PSObject>]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ArchiveViaIdentity

Invoke-AzReservationArchiveReservation
    -InputObject <IReservationsIdentity>
    [-DefaultProfile <PSObject>]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Archiving a Reservation moves it to Archived state.

Examples

Example 1: Archive Reservation which is in cancelled/expired/failed state

Invoke-AzReservationArchiveReservation -ReservationId "50000000-aaaa-bbbb-cccc-100000000003" -ReservationOrderId "30000000-aaaa-bbbb-cccc-100000000003"
200

Archive Reservation which is in cancelled/expired/failed state

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

-InputObject

Identity Parameter

Parameter properties

Type:IReservationsIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ArchiveViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Returns true when the command succeeds

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReservationId

Id of the reservation item

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Archive
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ArchiveViaIdentityReservationOrder
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

Archive
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReservationOrderInputObject

Identity Parameter

Parameter properties

Type:IReservationsIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ArchiveViaIdentityReservationOrder
Position:Named
Mandatory:True
Value from pipeline:True
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.

Inputs

IReservationsIdentity

Outputs

Boolean