New-AzHDInsightClusterAutoscaleScheduleCondition

Creates Schedule-based autoscale condition.

Syntax

New-AzHDInsightClusterAutoscaleScheduleCondition
   -Time <DateTime>
   -WorkerNodeCount <Int32>
   -Day <AzureHDInsightDaysOfWeek[]>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzHDInsightClusterAutoscaleScheduleCondition cmdlet creates Schedule-based autoscale condition.

Examples

Example 1

New-AzHDInsightClusterAutoscaleScheduleCondition -Time 09:00 -WorkerNodeCount 5 -Day Monday,Wednesday

This command creates a condition where cluster autoscale to 5 worker nodes at 09:00 every Monday, Wednesday.

Example 2: Enable Schedule-based autoscale of a cluster with autoscale condition.

# 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

This command creates a condition where cluster autoscale to 5 worker nodes at 09:00 every Monday, Wednesday.

Parameters

-Day

Gets or sets the days of Autoscale schedule condition.

Type:AzureHDInsightDaysOfWeek[]
Accepted values:Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Time

Gets or sets the time of Autoscale schedule condition.

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

-WorkerNodeCount

Gets or sets the schedule workernode count of Autoscale schedule condition.

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

Inputs

None

Outputs

AzureHDInsightAutoscaleCondition