Skip to content

ScalingRuleProps

Properties for defining a ScalingRule.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ess-scalingrule

Initializer

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkess"
&alicloudroscdkess.ScalingRuleProps {
    ScalingGroupId: interface{},
    AdjustmentType: interface{},
    AdjustmentValue: interface{},
    Cooldown: interface{},
    DisableScaleIn: interface{},
    EstimatedInstanceWarmup: interface{},
    InitialMaxSize: interface{},
    MetricName: interface{},
    MinAdjustmentMagnitude: interface{},
    PredictiveScalingMode: interface{},
    PredictiveTaskBufferTime: interface{},
    PredictiveValueBehavior: interface{},
    PredictiveValueBuffer: interface{},
    ScaleInEvaluationCount: interface{},
    ScaleOutEvaluationCount: interface{},
    ScalingRuleName: interface{},
    ScalingRuleType: interface{},
    StepAdjustment: interface{},
    TargetValue: interface{},
}

Properties

Name Type Description
ScalingGroupId interface{} Property scalingGroupId: ID of the scaling group of a scaling rule.
AdjustmentType interface{} Property adjustmentType: Adjustment mode of a scaling rule.
AdjustmentValue interface{} Property adjustmentValue: Adjusted value of a scaling rule.
Cooldown interface{} Property cooldown: Cool-down time of a scaling rule.
DisableScaleIn interface{} Property disableScaleIn: Specifies whether to disable scale-in.
EstimatedInstanceWarmup interface{} Property estimatedInstanceWarmup: The warm-up period of the ECS instances.
InitialMaxSize interface{} Property initialMaxSize: The maximum number of ECS instances in the scaling group, which is used together with PredictiveValueBehavior.
MetricName interface{} Property metricName: The predefined metric to monitor.
MinAdjustmentMagnitude interface{} Property minAdjustmentMagnitude: The minimum number of ECS instances to be adjusted in a scaling rule.
PredictiveScalingMode interface{} Property predictiveScalingMode: The mode of the predictive scaling rule.
PredictiveTaskBufferTime interface{} Property predictiveTaskBufferTime: The amount of buffer time ahead of the forecast task execution time.
PredictiveValueBehavior interface{} Property predictiveValueBehavior: The action taken on the predicted maximum value.
PredictiveValueBuffer interface{} Property predictiveValueBuffer: The ratio of the increment to the predicted value when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer.
ScaleInEvaluationCount interface{} Property scaleInEvaluationCount: The number of consecutive times that the event-triggered task created for scale-in activities meets the threshold conditions before an alert is triggered.
ScaleOutEvaluationCount interface{} Property scaleOutEvaluationCount: The number of consecutive times that the event-triggered task created for scale-out activities meets the threshold conditions before an alert is triggered.
ScalingRuleName interface{} Property scalingRuleName: Name shown for the scaling group, which is a string containing 2 to 40 English or Chinese characters.
ScalingRuleType interface{} Property scalingRuleType: The type of the scaling rule.
StepAdjustment interface{} Property stepAdjustment:.
TargetValue interface{} Property targetValue: The target value of a metric.

ScalingGroupIdRequired

ScalingGroupId interface{}
  • Type: interface{}

Property scalingGroupId: ID of the scaling group of a scaling rule.


AdjustmentTypeOptional

AdjustmentType interface{}
  • Type: interface{}

Property adjustmentType: 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.

AdjustmentValueOptional

AdjustmentValue interface{}
  • Type: interface{}

Property adjustmentValue: Adjusted value of a scaling rule.

Value range:

  • QuantityChangeInCapacity: [-500, 500]
  • PercentChangeInCapacity: [-100, 10000]
  • TotalCapacity: [0, 1000]

CooldownOptional

Cooldown interface{}
  • Type: interface{}

Property cooldown: Cool-down time of a scaling rule.

Value range: [0, 86,400], in seconds. The default value is empty.


DisableScaleInOptional

DisableScaleIn interface{}
  • Type: interface{}

Property disableScaleIn: Specifies whether to disable scale-in.

This parameter is applicable only to target tracking scaling rules. Default value: false


EstimatedInstanceWarmupOptional

EstimatedInstanceWarmup interface{}
  • Type: interface{}

Property estimatedInstanceWarmup: The warm-up period of the ECS instances.

This parameter is applicable to target tracking scaling rules and step scaling rules. The system adds ECS instances that are in the warm-up state to the scaling group, but does not report monitoring data during the warm-up period to CloudMonitor. Note: When calculating the number of ECS instances to be adjusted, the system does not count ECS instances in the warm-up state as part of the current capacity of the scaling group. Valid values: 0 to 86400. Unit: seconds. Default value: 300.


InitialMaxSizeOptional

InitialMaxSize interface{}
  • Type: interface{}

Property initialMaxSize: The maximum number of ECS instances in the scaling group, which is used together with PredictiveValueBehavior.

Default value: the same as the value of MaxSize


MetricNameOptional

MetricName interface{}
  • Type: interface{}

Property metricName: The predefined metric to monitor.

This parameter is required and applicable only to target tracking scaling rules and predictive scaling rules. Valid values of a target tracking scaling rule:

  • CpuUtilization: the average CPU utilization- ClassicInternetRx: the average public network inbound traffic over the classic network
  • ClassicInternetTx: the average public network outbound traffic over the classic network
  • VpcInternetRx: the average public network inbound traffic over the VPC
  • VpcInternetTx: the average public network outbound traffic over the VPC
  • IntranetRx: the average internal network inbound traffic
  • IntranetTx: the average internal network outbound traffic Valid values of a predictive scaling rule:
  • CpuUtilization: the average CPU utilization
  • IntranetRx: the average internal network inbound traffic
  • IntranetTx: the average internal network outbound traffic

MinAdjustmentMagnitudeOptional

MinAdjustmentMagnitude interface{}
  • Type: interface{}

Property minAdjustmentMagnitude: The minimum number of ECS instances to be adjusted in a scaling rule.

This parameter takes effect only when the scaling rule type is SimpleScalingRule or StepScalingRule and AdjustmentType is PercentChangeInCapacity.


PredictiveScalingModeOptional

PredictiveScalingMode interface{}
  • Type: interface{}

Property predictiveScalingMode: The mode of the predictive scaling rule.

Valid values:

  • PredictAndScale: generates forecasts and creates forecast tasks.
  • PredictOnly: generates forecasts but does not create forecast tasks. Default value: PredictAndScale

PredictiveTaskBufferTimeOptional

PredictiveTaskBufferTime interface{}
  • Type: interface{}

Property predictiveTaskBufferTime: The amount of buffer time ahead of the forecast task execution time.

By default, all scheduled tasks that are automatically created for a predictive scaling rule are executed at the beginning of each hour. You can set a buffer time to execute forecast tasks ahead of schedule, so that resources can be prepared in advance. Valid values: 0 to 60. Unit: minutes. Default value: 0


PredictiveValueBehaviorOptional

PredictiveValueBehavior interface{}
  • Type: interface{}

Property predictiveValueBehavior: The action taken on the predicted maximum value.

Valid values:

  • MaxOverridePredictiveValue: uses the initial maximum capacity as the maximum value for forecast tasks when the predicted value is greater than the initial maximum capacity.

  • PredictiveValueOverrideMax: uses the predicted value as the maximum value for forecast tasks when the predicted value is greater than the initial maximum capacity.

  • PredictiveValueOverrideMaxWithBuffer: increases the predicted value with a ratio, which is specified by PredictiveValueBuffer. If the value after the increase is greater than the initial maximum capacity, the value after the increase is used as the maximum value for forecast tasks. Default value: MaxOverridePredictiveValue

PredictiveValueBufferOptional

PredictiveValueBuffer interface{}
  • Type: interface{}

Property predictiveValueBuffer: The ratio of the increment to the predicted value when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer.

When the value after the increase is greater than the initial maximum capacity, the value after the increase is used for forecast tasks. Valid values: 0 to 100 Default value: 0


ScaleInEvaluationCountOptional

ScaleInEvaluationCount interface{}
  • Type: interface{}

Property scaleInEvaluationCount: The number of consecutive times that the event-triggered task created for scale-in activities meets the threshold conditions before an alert is triggered.

After a target tracking scaling rule is created, an event-triggered task is automatically created and then associated with the target tracking scaling rule. Default value: 15.


ScaleOutEvaluationCountOptional

ScaleOutEvaluationCount interface{}
  • Type: interface{}

Property scaleOutEvaluationCount: The number of consecutive times that the event-triggered task created for scale-out activities meets the threshold conditions before an alert is triggered.

After a target tracking scaling rule is created, an event-triggered task is automatically created and then associated with the target tracking scaling rule. Default value: 3.


ScalingRuleNameOptional

ScalingRuleName interface{}
  • Type: interface{}

Property scalingRuleName: Name shown for the scaling group, which is a string containing 2 to 40 English or Chinese characters.

It must begin with a number, a letter (case-insensitive) or a Chinese character and can contain numbers, "_", "-" or ".". The account name in the same scaling group is unique in the same region. If this parameter value is not specified, the default value is ScalingRuleId.


ScalingRuleTypeOptional

ScalingRuleType interface{}
  • Type: interface{}

Property scalingRuleType: The type of the scaling rule.

Valid values:

  • SimpleScalingRule: scales ECS instances based on the values of AdjustmentType and AdjustmentValue.
  • TargetTrackingScalingRule: dynamically calculates the number of ECS instances to be adjusted and tries to keep the value of a predefined monitoring metric close to TargetValue.
  • StepScalingRule: scales ECS instances in steps based on specified thresholds and metric values.
  • PredictiveScalingRule: uses machine learning to analyze historical monitoring data of the scaling group and then predicts the future values of monitored metrics, the rule then automatically creates scheduled tasks to set the boundary values for the scaling group. If this parameter value is not specified, the default value is SimpleScalingRule.

StepAdjustmentOptional

StepAdjustment interface{}
  • Type: interface{}

Property stepAdjustment:.


TargetValueOptional

TargetValue interface{}
  • Type: interface{}

Property targetValue: The target value of a metric.

This parameter is required and applicable only to target tracking scaling rules and predictive scaling rules. The value of TargetValue must be greater than 0 and can have a maximum of three decimal places.