Update-AzureRmReservation

Update a Reservation.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Update-AzureRmReservation
      -ReservationOrderId <Guid>
      -ReservationId <Guid>
      -AppliedScopeType <String>
      [-AppliedScope <String>]
      [-InstanceFlexibility <String>]
      [-Name <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmReservation
      -AppliedScopeType <String>
      [-AppliedScope <String>]
      [-InstanceFlexibility <String>]
      -Reservation <PSReservation>
      [-Name <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Updates the applied scopes of the Reservation.

Examples

Example 1

PS C:\> Update-AzureRmReservation -ReservationOrderId "11111111-1111-1111-1111-1111111111" -ReservationId "00000000-1111-1111-1111-0000000000" -appliedScopeType "Single" -appliedscope "/subscriptions/1111aaaa-b1b2-c0c2-d0d2-00000fffff" -InstanceFlexibility "On"

Updates the AppliedScopeType of the specified Reservation to Single and InstanceFlexibility to On.

Example 2

PS C:\> Update-AzureRmReservation -ReservationOrderId "11111111-1111-1111-1111-1111111111" -ReservationId "00000000-1111-1111-1111-0000000000" -appliedscopetype "Shared" -InstanceFlexibility "Off"

Updates the AppliedScopeType of the specified Reservation to Shared and InstanceFlexibility to Off.

Parameters

-AppliedScope

SubscriptionId for this Reservation to be applied

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

-AppliedScopeType

Type of the Applied Scope

Type:String
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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

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

-InstanceFlexibility

If present, updates the InstanceFlexibility value of the Reservation. If not specified, the existing value remains unchanged.

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

-Name

Name of Reservation

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

-Reservation

Pipe object parameter for Reservation

Type:Microsoft.Azure.Commands.Reservations.Models.PSReservation
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ReservationId

Id of the Reservation to update

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

-ReservationOrderId

Id of the ReservationOrder to update

Type:Guid
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

Microsoft.Azure.Commands.Reservations.Models.PSReservation

Parameters: Reservation (ByValue)

Outputs

Microsoft.Azure.Commands.Reservations.Models.PSReservation