New-AzHDInsightClusterAutoscaleScheduleCondition
建立以排程為基礎的自動調整條件。
語法
New-AzHDInsightClusterAutoscaleScheduleCondition
-Time <DateTime>
-WorkerNodeCount <Int32>
-Day <AzureHDInsightDaysOfWeek[]>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
New-AzHDInsightClusterAutoscaleScheduleCondition Cmdlet 會建立以排程為基礎的自動調整條件。
範例
範例 1
New-AzHDInsightClusterAutoscaleScheduleCondition -Time 09:00 -WorkerNodeCount 5 -Day Monday,Wednesday
此命令會建立一個條件,其中叢集自動調整為5個背景工作節點,每個星期一,星期三為09:00。
範例 2:使用自動調整條件啟用叢集的排程型自動調整。
# create a autoscale condition
$condition=New-AzHDInsightClusterAutoscaleScheduleCondition -Time 09:00 -WorkerNodeCount 5 -Day Monday,Wednesday
# Set the cluster autoscale configuration
$clusterResourceGroup="group"
$clusterName="MyCluster"
Set-AzHDInsightClusterAutoscaleConfiguration -ResourceGroupName $clusterResourceGroup -ClusterName $clusterName -Schedule -TimeZone "Pacific Standard Time" -Condition $condition
此命令會建立一個條件,其中叢集自動調整為5個背景工作節點,每個星期一,星期三為09:00。
參數
-Day
取得或設定自動調整排程條件的天數。
類型: | AzureHDInsightDaysOfWeek[] |
接受的值: | Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Time
取得或設定自動調整排程條件的時間。
類型: | DateTime |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-WorkerNodeCount
取得或設定自動調整排程條件的排程背景工作節點計數。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
None
輸出
AzureHDInsightAutoscaleCondition