ScalingRule

Create a ScalingRule Resource

def ScalingRule(resource_name, opts=None, adjustment_type=None, adjustment_value=None, cooldown=None, disable_scale_in=None, estimated_instance_warmup=None, metric_name=None, scaling_group_id=None, scaling_rule_name=None, scaling_rule_type=None, step_adjustments=None, target_value=None, __props__=None);
func NewScalingRule(ctx *Context, name string, args ScalingRuleArgs, opts ...ResourceOption) (*ScalingRule, error)
public ScalingRule(string name, ScalingRuleArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ScalingRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ScalingRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ScalingRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ScalingRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ScalingRule resource accepts the following input properties:

ScalingGroupId string

ID of the scaling group of a scaling rule.

AdjustmentType string

Adjustment mode of a scaling rule. Optional values: - QuantityChangeInCapacity: It is used to increase or decrease a specified number of ECS instances. - PercentChangeInCapacity: It is used to increase or decrease a specified proportion of ECS instances. - TotalCapacity: It is used to adjust the quantity of ECS instances in the current scaling group to a specified value.

AdjustmentValue int

Adjusted value of a scaling rule. Value range: - QuantityChangeInCapacity:(0, 500] U (-500, 0] - PercentChangeInCapacity:[0, 10000] U [-100, 0] - TotalCapacity:[0, 1000]

Cooldown int

Cool-down time of a scaling rule. Value range: [0, 86,400], in seconds. The default value is empty,if not set, the return value will be 0, which is the default value of integer.

DisableScaleIn bool

Indicates whether scale in by the target tracking policy is disabled. Default to false.

EstimatedInstanceWarmup int

The estimated time, in seconds, until a newly launched instance will contribute CloudMonitor metrics. Default to 300.

MetricName string

A CloudMonitor metric name.

ScalingRuleName string

Name shown for the scaling rule, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number, underscores _, hypens -, and decimal point .. If this parameter value is not specified, the default value is scaling rule id.

ScalingRuleType string

The scaling rule type, either “SimpleScalingRule”, “TargetTrackingScalingRule”, “StepScalingRule”. Default to “SimpleScalingRule”.

StepAdjustments List<Pulumi.AliCloud.Ess.Inputs.ScalingRuleStepAdjustmentArgs>

Steps for StepScalingRule. See Block stepAdjustment below for details.

TargetValue double

The target value for the metric.

ScalingGroupId string

ID of the scaling group of a scaling rule.

AdjustmentType string

Adjustment mode of a scaling rule. Optional values: - QuantityChangeInCapacity: It is used to increase or decrease a specified number of ECS instances. - PercentChangeInCapacity: It is used to increase or decrease a specified proportion of ECS instances. - TotalCapacity: It is used to adjust the quantity of ECS instances in the current scaling group to a specified value.

AdjustmentValue int

Adjusted value of a scaling rule. Value range: - QuantityChangeInCapacity:(0, 500] U (-500, 0] - PercentChangeInCapacity:[0, 10000] U [-100, 0] - TotalCapacity:[0, 1000]

Cooldown int

Cool-down time of a scaling rule. Value range: [0, 86,400], in seconds. The default value is empty,if not set, the return value will be 0, which is the default value of integer.

DisableScaleIn bool

Indicates whether scale in by the target tracking policy is disabled. Default to false.

EstimatedInstanceWarmup int

The estimated time, in seconds, until a newly launched instance will contribute CloudMonitor metrics. Default to 300.

MetricName string

A CloudMonitor metric name.

ScalingRuleName string

Name shown for the scaling rule, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number, underscores _, hypens -, and decimal point .. If this parameter value is not specified, the default value is scaling rule id.

ScalingRuleType string

The scaling rule type, either “SimpleScalingRule”, “TargetTrackingScalingRule”, “StepScalingRule”. Default to “SimpleScalingRule”.

StepAdjustments []ScalingRuleStepAdjustment

Steps for StepScalingRule. See Block stepAdjustment below for details.

TargetValue float64

The target value for the metric.

scalingGroupId string

ID of the scaling group of a scaling rule.

adjustmentType string

Adjustment mode of a scaling rule. Optional values: - QuantityChangeInCapacity: It is used to increase or decrease a specified number of ECS instances. - PercentChangeInCapacity: It is used to increase or decrease a specified proportion of ECS instances. - TotalCapacity: It is used to adjust the quantity of ECS instances in the current scaling group to a specified value.

adjustmentValue number

Adjusted value of a scaling rule. Value range: - QuantityChangeInCapacity:(0, 500] U (-500, 0] - PercentChangeInCapacity:[0, 10000] U [-100, 0] - TotalCapacity:[0, 1000]

cooldown number

Cool-down time of a scaling rule. Value range: [0, 86,400], in seconds. The default value is empty,if not set, the return value will be 0, which is the default value of integer.

disableScaleIn boolean

Indicates whether scale in by the target tracking policy is disabled. Default to false.

estimatedInstanceWarmup number

The estimated time, in seconds, until a newly launched instance will contribute CloudMonitor metrics. Default to 300.

metricName string

A CloudMonitor metric name.

scalingRuleName string

Name shown for the scaling rule, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number, underscores _, hypens -, and decimal point .. If this parameter value is not specified, the default value is scaling rule id.

scalingRuleType string

The scaling rule type, either “SimpleScalingRule”, “TargetTrackingScalingRule”, “StepScalingRule”. Default to “SimpleScalingRule”.

stepAdjustments ScalingRuleStepAdjustment[]

Steps for StepScalingRule. See Block stepAdjustment below for details.

targetValue number

The target value for the metric.

scaling_group_id str

ID of the scaling group of a scaling rule.

adjustment_type str

Adjustment mode of a scaling rule. Optional values: - QuantityChangeInCapacity: It is used to increase or decrease a specified number of ECS instances. - PercentChangeInCapacity: It is used to increase or decrease a specified proportion of ECS instances. - TotalCapacity: It is used to adjust the quantity of ECS instances in the current scaling group to a specified value.

adjustment_value float

Adjusted value of a scaling rule. Value range: - QuantityChangeInCapacity:(0, 500] U (-500, 0] - PercentChangeInCapacity:[0, 10000] U [-100, 0] - TotalCapacity:[0, 1000]

cooldown float

Cool-down time of a scaling rule. Value range: [0, 86,400], in seconds. The default value is empty,if not set, the return value will be 0, which is the default value of integer.

disable_scale_in bool

Indicates whether scale in by the target tracking policy is disabled. Default to false.

estimated_instance_warmup float

The estimated time, in seconds, until a newly launched instance will contribute CloudMonitor metrics. Default to 300.

metric_name str

A CloudMonitor metric name.

scaling_rule_name str

Name shown for the scaling rule, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number, underscores _, hypens -, and decimal point .. If this parameter value is not specified, the default value is scaling rule id.

scaling_rule_type str

The scaling rule type, either “SimpleScalingRule”, “TargetTrackingScalingRule”, “StepScalingRule”. Default to “SimpleScalingRule”.

step_adjustments List[ScalingRuleStepAdjustment]

Steps for StepScalingRule. See Block stepAdjustment below for details.

target_value float

The target value for the metric.

Outputs

All input properties are implicitly available as output properties. Additionally, the ScalingRule resource produces the following output properties:

Ari string
Id string
The provider-assigned unique ID for this managed resource.
Ari string
Id string
The provider-assigned unique ID for this managed resource.
ari string
id string
The provider-assigned unique ID for this managed resource.
ari str
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ScalingRule Resource

Get an existing ScalingRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ScalingRuleState, opts?: CustomResourceOptions): ScalingRule
static get(resource_name, id, opts=None, adjustment_type=None, adjustment_value=None, ari=None, cooldown=None, disable_scale_in=None, estimated_instance_warmup=None, metric_name=None, scaling_group_id=None, scaling_rule_name=None, scaling_rule_type=None, step_adjustments=None, target_value=None, __props__=None);
func GetScalingRule(ctx *Context, name string, id IDInput, state *ScalingRuleState, opts ...ResourceOption) (*ScalingRule, error)
public static ScalingRule Get(string name, Input<string> id, ScalingRuleState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AdjustmentType string

Adjustment mode of a scaling rule. Optional values: - QuantityChangeInCapacity: It is used to increase or decrease a specified number of ECS instances. - PercentChangeInCapacity: It is used to increase or decrease a specified proportion of ECS instances. - TotalCapacity: It is used to adjust the quantity of ECS instances in the current scaling group to a specified value.

AdjustmentValue int

Adjusted value of a scaling rule. Value range: - QuantityChangeInCapacity:(0, 500] U (-500, 0] - PercentChangeInCapacity:[0, 10000] U [-100, 0] - TotalCapacity:[0, 1000]

Ari string
Cooldown int

Cool-down time of a scaling rule. Value range: [0, 86,400], in seconds. The default value is empty,if not set, the return value will be 0, which is the default value of integer.

DisableScaleIn bool

Indicates whether scale in by the target tracking policy is disabled. Default to false.

EstimatedInstanceWarmup int

The estimated time, in seconds, until a newly launched instance will contribute CloudMonitor metrics. Default to 300.

MetricName string

A CloudMonitor metric name.

ScalingGroupId string

ID of the scaling group of a scaling rule.

ScalingRuleName string

Name shown for the scaling rule, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number, underscores _, hypens -, and decimal point .. If this parameter value is not specified, the default value is scaling rule id.

ScalingRuleType string

The scaling rule type, either “SimpleScalingRule”, “TargetTrackingScalingRule”, “StepScalingRule”. Default to “SimpleScalingRule”.

StepAdjustments List<Pulumi.AliCloud.Ess.Inputs.ScalingRuleStepAdjustmentArgs>

Steps for StepScalingRule. See Block stepAdjustment below for details.

TargetValue double

The target value for the metric.

AdjustmentType string

Adjustment mode of a scaling rule. Optional values: - QuantityChangeInCapacity: It is used to increase or decrease a specified number of ECS instances. - PercentChangeInCapacity: It is used to increase or decrease a specified proportion of ECS instances. - TotalCapacity: It is used to adjust the quantity of ECS instances in the current scaling group to a specified value.

AdjustmentValue int

Adjusted value of a scaling rule. Value range: - QuantityChangeInCapacity:(0, 500] U (-500, 0] - PercentChangeInCapacity:[0, 10000] U [-100, 0] - TotalCapacity:[0, 1000]

Ari string
Cooldown int

Cool-down time of a scaling rule. Value range: [0, 86,400], in seconds. The default value is empty,if not set, the return value will be 0, which is the default value of integer.

DisableScaleIn bool

Indicates whether scale in by the target tracking policy is disabled. Default to false.

EstimatedInstanceWarmup int

The estimated time, in seconds, until a newly launched instance will contribute CloudMonitor metrics. Default to 300.

MetricName string

A CloudMonitor metric name.

ScalingGroupId string

ID of the scaling group of a scaling rule.

ScalingRuleName string

Name shown for the scaling rule, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number, underscores _, hypens -, and decimal point .. If this parameter value is not specified, the default value is scaling rule id.

ScalingRuleType string

The scaling rule type, either “SimpleScalingRule”, “TargetTrackingScalingRule”, “StepScalingRule”. Default to “SimpleScalingRule”.

StepAdjustments []ScalingRuleStepAdjustment

Steps for StepScalingRule. See Block stepAdjustment below for details.

TargetValue float64

The target value for the metric.

adjustmentType string

Adjustment mode of a scaling rule. Optional values: - QuantityChangeInCapacity: It is used to increase or decrease a specified number of ECS instances. - PercentChangeInCapacity: It is used to increase or decrease a specified proportion of ECS instances. - TotalCapacity: It is used to adjust the quantity of ECS instances in the current scaling group to a specified value.

adjustmentValue number

Adjusted value of a scaling rule. Value range: - QuantityChangeInCapacity:(0, 500] U (-500, 0] - PercentChangeInCapacity:[0, 10000] U [-100, 0] - TotalCapacity:[0, 1000]

ari string
cooldown number

Cool-down time of a scaling rule. Value range: [0, 86,400], in seconds. The default value is empty,if not set, the return value will be 0, which is the default value of integer.

disableScaleIn boolean

Indicates whether scale in by the target tracking policy is disabled. Default to false.

estimatedInstanceWarmup number

The estimated time, in seconds, until a newly launched instance will contribute CloudMonitor metrics. Default to 300.

metricName string

A CloudMonitor metric name.

scalingGroupId string

ID of the scaling group of a scaling rule.

scalingRuleName string

Name shown for the scaling rule, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number, underscores _, hypens -, and decimal point .. If this parameter value is not specified, the default value is scaling rule id.

scalingRuleType string

The scaling rule type, either “SimpleScalingRule”, “TargetTrackingScalingRule”, “StepScalingRule”. Default to “SimpleScalingRule”.

stepAdjustments ScalingRuleStepAdjustment[]

Steps for StepScalingRule. See Block stepAdjustment below for details.

targetValue number

The target value for the metric.

adjustment_type str

Adjustment mode of a scaling rule. Optional values: - QuantityChangeInCapacity: It is used to increase or decrease a specified number of ECS instances. - PercentChangeInCapacity: It is used to increase or decrease a specified proportion of ECS instances. - TotalCapacity: It is used to adjust the quantity of ECS instances in the current scaling group to a specified value.

adjustment_value float

Adjusted value of a scaling rule. Value range: - QuantityChangeInCapacity:(0, 500] U (-500, 0] - PercentChangeInCapacity:[0, 10000] U [-100, 0] - TotalCapacity:[0, 1000]

ari str
cooldown float

Cool-down time of a scaling rule. Value range: [0, 86,400], in seconds. The default value is empty,if not set, the return value will be 0, which is the default value of integer.

disable_scale_in bool

Indicates whether scale in by the target tracking policy is disabled. Default to false.

estimated_instance_warmup float

The estimated time, in seconds, until a newly launched instance will contribute CloudMonitor metrics. Default to 300.

metric_name str

A CloudMonitor metric name.

scaling_group_id str

ID of the scaling group of a scaling rule.

scaling_rule_name str

Name shown for the scaling rule, which must contain 2-64 characters (English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number, underscores _, hypens -, and decimal point .. If this parameter value is not specified, the default value is scaling rule id.

scaling_rule_type str

The scaling rule type, either “SimpleScalingRule”, “TargetTrackingScalingRule”, “StepScalingRule”. Default to “SimpleScalingRule”.

step_adjustments List[ScalingRuleStepAdjustment]

Steps for StepScalingRule. See Block stepAdjustment below for details.

target_value float

The target value for the metric.

Supporting Types

ScalingRuleStepAdjustment

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

MetricIntervalLowerBound string
MetricIntervalUpperBound string
ScalingAdjustment int
MetricIntervalLowerBound string
MetricIntervalUpperBound string
ScalingAdjustment int
metricIntervalLowerBound string
metricIntervalUpperBound string
scalingAdjustment number
metricIntervalLowerBound str
metricIntervalUpperBound str
scalingAdjustment float

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.