Breyta

Deila með


Update-AzAutoscaleSetting

Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method.

Syntax

Update-AzAutoscaleSetting
      -Name <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      [-Enabled <Boolean>]
      [-Notification <IAutoscaleNotification[]>]
      [-PredictiveAutoscalePolicyScaleLookAheadTime <TimeSpan>]
      [-PredictiveAutoscalePolicyScaleMode <PredictiveAutoscalePolicyScaleMode>]
      [-Profile <IAutoscaleProfile[]>]
      [-Tag <Hashtable>]
      [-TargetResourceLocation <String>]
      [-TargetResourceUri <String>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzAutoscaleSetting
      -InputObject <IAutoscaleIdentity>
      [-Enabled <Boolean>]
      [-Notification <IAutoscaleNotification[]>]
      [-PredictiveAutoscalePolicyScaleLookAheadTime <TimeSpan>]
      [-PredictiveAutoscalePolicyScaleMode <PredictiveAutoscalePolicyScaleMode>]
      [-Profile <IAutoscaleProfile[]>]
      [-Tag <Hashtable>]
      [-TargetResourceLocation <String>]
      [-TargetResourceUri <String>]
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method.

Examples

Example 1: Update Tag and Enable existing autoscale setting

Update-AzAutoscaleSetting -ResourceGroupName test-group -Name test-autoscalesetting -Tag @{'key'='val'} -Enabled $true

Update Tag and Enable existing autoscale setting

Parameters

-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:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Enabled

the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'.

Type:Boolean
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:IAutoscaleIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The autoscale setting name.

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

-Notification

the collection of notifications. To construct, see NOTES section for NOTIFICATION properties and create a hash table.

Type:IAutoscaleNotification[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PredictiveAutoscalePolicyScaleLookAheadTime

the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format.

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

-PredictiveAutoscalePolicyScaleMode

the predictive autoscale mode

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

-Profile

the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. To construct, see NOTES section for PROFILE properties and create a hash table.

Type:IAutoscaleProfile[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

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

-SubscriptionId

The ID of the target subscription.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tag

Resource tags

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

-TargetResourceLocation

the location of the resource that the autoscale setting should be added to.

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

-TargetResourceUri

the resource identifier of the resource that the autoscale setting should be added to.

Type:String
Position:Named
Default value:None
Required:False
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

IAutoscaleIdentity

Outputs

IAutoscaleSettingResource