共用方式為


Update-AzAutoscaleSetting

更新 現有的自動調整 設定 Resource。 若要更新其他欄位,請使用 CreateOrUpdate 方法。

語法

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

更新 現有的自動調整 設定 Resource。 若要更新其他欄位,請使用 CreateOrUpdate 方法。

範例

範例 1:更新標籤並啟用現有的自動調整設定

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

更新標籤並啟用現有的自動調整設定

參數

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:PSObject
別名:AzureRMContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Enabled

已啟用的旗標。 指定是否為資源啟用自動調整。 默認值為 『false』。

類型:Boolean
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

類型:IAutoscaleIdentity
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

自動調整設定名稱。

類型:String
別名:AutoscaleSettingName
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Notification

通知的集合。 若要建構,請參閱 NOTIFICATION 屬性的 NOTES 一節,並建立哈希表。

類型:IAutoscaleNotification[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-PredictiveAutoscalePolicyScaleLookAheadTime

指定要事先啟動實例的時間量。 它必須是 ISO 8601 格式的 1 分鐘到 60 分鐘。

類型:TimeSpan
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-PredictiveAutoscalePolicyScaleMode

預測性自動調整模式

類型:PredictiveAutoscalePolicyScaleMode
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Profile

自動調整配置檔的集合,這些配置檔會針對不同的時間週期指定不同的縮放參數。 最多可以指定20個配置檔。 若要建構,請參閱 PROFILE 屬性的 NOTES 區段並建立哈希表。

類型:IAutoscaleProfile[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

資源群組的名稱。 名稱不區分大小寫。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-SubscriptionId

目標訂用帳戶的標識碼。

類型:String
Position:Named
預設值:(Get-AzContext).Subscription.Id
必要:False
接受管線輸入:False
接受萬用字元:False

-Tag

資源標籤

類型:Hashtable
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-TargetResourceLocation

應新增自動調整設定的資源位置。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-TargetResourceUri

應加入自動調整設定之資源的資源標識碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

IAutoscaleIdentity

輸出

IAutoscaleSettingResource