Edit

Share via


Set-AzHDInsightClusterAutoscaleConfiguration

Sets the autoscale configuration of an Azure HDInsight cluster.

Syntax

LoadAutoscaleByNameParameterSet (Default)

Set-AzHDInsightClusterAutoscaleConfiguration
    [[-ResourceGroupName] <String>]
    [-ClusterName] <String>
    [-MinWorkerNodeCount <Int32>]
    [-MaxWorkerNodeCount <Int32>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ScheduleAutoscaleByNameParameterSet

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>]

AutoscaleConfigurationByNameParameterSet

Set-AzHDInsightClusterAutoscaleConfiguration
    [[-ResourceGroupName] <String>]
    [-ClusterName] <String>
    -AutoscaleConfiguration <AzureHDInsightAutoscale>
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

LoadAutoscaleByResourceIdParameterSet

Set-AzHDInsightClusterAutoscaleConfiguration
    [-ResourceId] <String>
    [-MinWorkerNodeCount <Int32>]
    [-MaxWorkerNodeCount <Int32>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ScheduleAutoscaleByResourceIdParameterSet

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>]

AutoscaleConfigurationByResourceIdParameterSet

Set-AzHDInsightClusterAutoscaleConfiguration
    [-ResourceId] <String>
    -AutoscaleConfiguration <AzureHDInsightAutoscale>
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

LoadAutoscaleByInputObjectParameterSet

Set-AzHDInsightClusterAutoscaleConfiguration
    [-InputObject] <AzureHDInsightCluster>
    [-MinWorkerNodeCount <Int32>]
    [-MaxWorkerNodeCount <Int32>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ScheduleAutoscaleByInputObjectParameterSet

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>]

AutoscaleConfigurationByInputObjectParameterSet

Set-AzHDInsightClusterAutoscaleConfiguration
    [-InputObject] <AzureHDInsightCluster>
    -AutoscaleConfiguration <AzureHDInsightAutoscale>
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

This cmdlet Set-AzHDInsightClusterAutoscaleConfiguration sets the autoscale configuration of an Azure HDInsight cluster.

Examples

Example 1: Set the Load-based autoscale configuration of the HDInsight cluster

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

This command sets the Load-based autoscale configuration of an Azure HDInsight cluster.

Example 2: Set the Schedule-based autoscale of the HDInsight cluster

# 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

This command sets the Schedule-based autoscale configuration of the HDInsight cluster.

Example 3: Set the autoscale configuration of the HDInsight cluster based another cluster which has set autoscale configuration

# 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

This command sets the autoscale configuration of the HDInsight cluster based another cluster.

Parameters

-AsJob

Run cmdlet in the background

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AutoscaleConfiguration

Gets or sets the autoscale configuration

Parameter properties

Type:AzureHDInsightAutoscale
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AutoscaleConfigurationByNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
AutoscaleConfigurationByResourceIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
AutoscaleConfigurationByInputObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ClusterName

Gets or sets the name of the cluster.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LoadAutoscaleByNameParameterSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ScheduleAutoscaleByNameParameterSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
AutoscaleConfigurationByNameParameterSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Condition

Gets or sets the condition of schedule-based autoscale.

Parameter properties

Type:

List<T>[AzureHDInsightAutoscaleCondition]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ScheduleAutoscaleByNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ScheduleAutoscaleByResourceIdParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ScheduleAutoscaleByInputObjectParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Gets or sets the input object.

Parameter properties

Type:AzureHDInsightCluster
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LoadAutoscaleByInputObjectParameterSet
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ScheduleAutoscaleByInputObjectParameterSet
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
AutoscaleConfigurationByInputObjectParameterSet
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxWorkerNodeCount

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LoadAutoscaleByNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
LoadAutoscaleByResourceIdParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
LoadAutoscaleByInputObjectParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MinWorkerNodeCount

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LoadAutoscaleByNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
LoadAutoscaleByResourceIdParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
LoadAutoscaleByInputObjectParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

Gets or sets the name of the resource group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LoadAutoscaleByNameParameterSet
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ScheduleAutoscaleByNameParameterSet
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
AutoscaleConfigurationByNameParameterSet
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

Gets or sets the resource id.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

LoadAutoscaleByResourceIdParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ScheduleAutoscaleByResourceIdParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
AutoscaleConfigurationByResourceIdParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Schedule

Set schedule-based parameters

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ScheduleAutoscaleByNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ScheduleAutoscaleByResourceIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ScheduleAutoscaleByInputObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeZone

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ScheduleAutoscaleByNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ScheduleAutoscaleByResourceIdParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ScheduleAutoscaleByInputObjectParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

AzureHDInsightCluster

Outputs

AzureHDInsightAutoscale