external help file | Module Name | online version | schema |
---|---|---|---|
Az.Reservations-help.xml |
Az.Reservations |
2.0.0 |
Updates the applied scopes of the Reservation
.
Update-AzReservation -Id <String> -OrderId <String> [-AppliedScope <String[]>]
[-AppliedScopePropertyDisplayName <String>] [-AppliedScopePropertyManagementGroupId <String>]
[-AppliedScopePropertyResourceGroupId <String>] [-AppliedScopePropertySubscriptionId <String>]
[-AppliedScopePropertyTenantId <String>] [-AppliedScopeType <AppliedScopeType>]
[-InstanceFlexibility <InstanceFlexibility>] [-Name <String>] [-Renew]
[-RenewProperty <IPatchPropertiesRenewProperties>] [-ReviewDateTime <DateTime>] [-DefaultProfile <PSObject>]
[-AsJob] [-NoWait] [-WhatIf] [-Confirm] [<CommonParameters>]
Update-AzReservation -Id <String> -OrderId <String> -Reservation <IPatch> [-DefaultProfile <PSObject>] [-AsJob]
[-NoWait] [-WhatIf] [-Confirm] [<CommonParameters>]
Update-AzReservation -InputObject <IReservationsIdentity> [-AppliedScope <String[]>]
[-AppliedScopePropertyDisplayName <String>] [-AppliedScopePropertyManagementGroupId <String>]
[-AppliedScopePropertyResourceGroupId <String>] [-AppliedScopePropertySubscriptionId <String>]
[-AppliedScopePropertyTenantId <String>] [-AppliedScopeType <AppliedScopeType>]
[-InstanceFlexibility <InstanceFlexibility>] [-Name <String>] [-Renew]
[-RenewProperty <IPatchPropertiesRenewProperties>] [-ReviewDateTime <DateTime>] [-DefaultProfile <PSObject>]
[-AsJob] [-NoWait] [-WhatIf] [-Confirm] [<CommonParameters>]
Update-AzReservation -InputObject <IReservationsIdentity> -Reservation <IPatch> [-DefaultProfile <PSObject>]
[-AsJob] [-NoWait] [-WhatIf] [-Confirm] [<CommonParameters>]
Updates the applied scopes of the Reservation
.
Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -Name "testName"
Location ReservationOrderId/ReservationId Sku State BenefitStartTime ExpiryDate LastUpdatedDateTime SkuDescription
-------- -------------------------------- --- ----- ---------------- ---------- ------------------- --------------
westeurope 30000000-aaaa-bbbb-cccc-200000000013/10000000-aaaa-bbbb-cccc-200000000007/16 Standard_B4ms Succeeded 6/14/2022 9:41:17 PM 6/14/2025 12:00:00 AM 7/7/2022 11:37:58 PM Reserved VM In…
Update Reservation's properties including name, renew, appliedScopeType, appliedScope
# Shared scope:
Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -AppliedScopeType "Shared"
# Single scope:
Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -AppliedScopeType "Single" -AppliedScope "/subscriptions/30000000-aaaa-bbbb-cccc-200000000018"
# Single scope with resource group:
Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -AppliedScopeType "Single" -AppliedScope "/subscriptions/30000000-aaaa-bbbb-cccc-200000000018/resourcegroups/{your resource group name}"
Similar to example 1
Update Reservation's applied scope type. For Shared scope, don't pass in any applied scope id. For Single scope, pass in applied scope id and for Single scope with resource group, also pass in resource group name in the applied scope id
List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
Type: System.String[]
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Display name
Type: System.String
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Fully-qualified identifier of the management group where the benefit must be applied.
Type: System.String
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Fully-qualified identifier of the resource group.
Type: System.String
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Fully-qualified identifier of the subscription.
Type: System.String
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Tenant ID where the savings plan should apply benefit.
Type: System.String
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type of the Applied Scope.
Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Run the command as a job
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: System.Management.Automation.PSObject
Parameter Sets: (All)
Aliases: AzureRMContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Id of the reservation item
Type: System.String
Parameter Sets: UpdateExpanded, Update
Aliases: ReservationId
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
Parameter Sets: UpdateViaIdentityExpanded, UpdateViaIdentity
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Display name of the reservation
Type: System.String
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Run the command asynchronously
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Order Id of the reservation
Type: System.String
Parameter Sets: UpdateExpanded, Update
Aliases: ReservationOrderId
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Setting this to true will automatically purchase a new reservation on the expiration date time.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
. To construct, see NOTES section for RENEWPROPERTY properties and create a hash table.
Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPatchPropertiesRenewProperties
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The request for reservation patch To construct, see NOTES section for RESERVATION properties and create a hash table.
Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPatch
Parameter Sets: Update, UpdateViaIdentity
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
This is the date-time when the Azure hybrid benefit needs to be reviewed.
Type: System.DateTime
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.