共用方式為


Set-AzHDInsightClusterAutoscaleConfiguration

設定 Azure HDInsight 叢集的自動調整設定。

語法

Set-AzHDInsightClusterAutoscaleConfiguration
   [[-ResourceGroupName] <String>]
   [-ClusterName] <String>
   [-MinWorkerNodeCount <Int32>]
   [-MaxWorkerNodeCount <Int32>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
   [[-ResourceGroupName] <String>]
   [-ClusterName] <String>
   [-TimeZone <String>]
   [-Condition <System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightAutoscaleCondition]>]
   [-Schedule]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
   [[-ResourceGroupName] <String>]
   [-ClusterName] <String>
   -AutoscaleConfiguration <AzureHDInsightAutoscale>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
   [-ResourceId] <String>
   [-MinWorkerNodeCount <Int32>]
   [-MaxWorkerNodeCount <Int32>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
   [-ResourceId] <String>
   [-TimeZone <String>]
   [-Condition <System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightAutoscaleCondition]>]
   [-Schedule]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
   [-ResourceId] <String>
   -AutoscaleConfiguration <AzureHDInsightAutoscale>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
   [-InputObject] <AzureHDInsightCluster>
   [-MinWorkerNodeCount <Int32>]
   [-MaxWorkerNodeCount <Int32>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
   [-InputObject] <AzureHDInsightCluster>
   [-TimeZone <String>]
   [-Condition <System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightAutoscaleCondition]>]
   [-Schedule]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterAutoscaleConfiguration
   [-InputObject] <AzureHDInsightCluster>
   -AutoscaleConfiguration <AzureHDInsightAutoscale>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

此 Cmdlet Set-AzHDInsightClusterAutoscaleConfiguration 設定 Azure HDInsight 叢集的自動調整設定。

範例

範例 1:設定 HDInsight 叢集的負載型自動調整設定

$clusterResourceGroup="group"
$clusterName="MyCluster"
Set-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup `
            -ClusterName $clusterName -MinWorkerNodeCount 3 -MaxWorkerNodeCount 5

此命令會設定 Azure HDInsight 叢集的負載型自動調整組態。

範例 2:設定 HDInsight 叢集的排程型自動調整

# Create autoscale conditions
$condition1=New-AzHDInsightClusterAutoscaleScheduleCondition -Time 09:00 -WorkerNodeCount 5 -Day Monday,Wednesday
$condition2=New-AzHDInsightClusterAutoscaleScheduleCondition -Time 09:00 -WorkerNodeCount 4 -Day Friday

# Set autoscale configuration
$clusterResourceGroup="group"
$clusterName="MyCluster"
Set-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup -ClusterName $clusterName -Schedule -TimeZone "Pacific Standard Time" -Condition $condition1,$condition2

此命令會設定 HDInsight 叢集的排程型自動調整組態。

範例 3:設定 HDInsight 叢集的自動調整設定,以另一個已設定自動調整設定的叢集為基礎

# Get the autoscale configuration of another cluster.
$clusterResourceGroup="group"
$anotherClusterName="anotherClusterName"
$autoscaleConfig=Get-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup -ClusterName $anotherClusterName

# Set autoscale configuration
$clusterResourceGroup="group"
$clusterName="MyCluster"
Set-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup -ClusterName $clusterName `
            -AutoscaleConfiguration $autoscaleConfig

此命令會設定以另一個叢集為基礎的 HDInsight 叢集自動調整組態。

參數

-AsJob

在背景執行 Cmdlet

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

-AutoscaleConfiguration

取得或設定自動調整組態

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

-ClusterName

取得或設定叢集的名稱。

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

-Condition

取得或設定以排程為基礎的自動調整條件。

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

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

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

-DefaultProfile

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

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

-InputObject

取得或設定輸入物件。

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

-MaxWorkerNodeCount

取得或設定負載型自動調整的最大背景工作節點計數。

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

-MinWorkerNodeCount

取得或設定以負載為基礎的自動調整的最低背景工作節點計數。

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

-ResourceGroupName

取得或設定資源群組的名稱。

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

-ResourceId

取得或設定資源標識碼。

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

-Schedule

設定以排程為基礎的參數

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

-TimeZone

取得或設定以排程為基礎的自動調整的時區。

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

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

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

輸入

String

AzureHDInsightCluster

輸出

AzureHDInsightAutoscale