Editar

Compartilhar via


New-AzHDInsightClusterAutoscaleConfiguration

Creates a non-persisted object that describes the autoscale configuration of an Azure HDInsight cluster.

Syntax

New-AzHDInsightClusterAutoscaleConfiguration
   -MinWorkerNodeCount <Int32>
   -MaxWorkerNodeCount <Int32>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
New-AzHDInsightClusterAutoscaleConfiguration
   -TimeZone <String>
   -Condition <System.Collections.Generic.List`1[Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightAutoscaleCondition]>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The cmdlet New-AzHDInsightClusterAutoscaleConfiguration creates a non-persisted object that describes the autoscale configuration of an Azure HDInsight cluster.

Examples

Example 1: Create an object which describes Load-based autoscale configuration

New-AzHDInsightClusterAutoscaleConfiguration -MinWorkerNodeCount 3 -MaxWorkerNodeCount 5

This command creates an object which describes Load-based autoscale configuration.

Example 2: Create an object which describes Schedule-based autoscale configuration

# Create an autoscale condition firstly
$condition=New-AzHDInsightClusterAutoscaleScheduleCondition -Day Monday -Time 09:00 -WorkerNodeCount 5
New-AzHDInsightClusterAutoscaleConfiguration -TimeZone ([System.TimeZoneInfo]::Local).Id `
        -Condition $condition

This command creates an object which describes Schedule-based autoscale configuration.

Parameters

-Condition

Gets or sets the condition of schedule-based autoscale.

Type:List<T>[AzureHDInsightAutoscaleCondition]
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

-MaxWorkerNodeCount

Gets or sets the maximal workernode count of load-based autoscale.

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

-MinWorkerNodeCount

Gets or sets the minimal workernode count of load-based autoscale.

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

-TimeZone

Gets or sets the time zone of schedule-based autoscale.

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

Inputs

None

Outputs

AzureHDInsightAutoscale