All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.ess20220222.models.CreateScalingRuleRequest Maven / Gradle / Ivy

The newest version!
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ess20220222.models;

import com.aliyun.tea.*;

public class CreateScalingRuleRequest extends TeaModel {
    /**
     * 

The scaling method of the scaling rule. This parameter is required only if you set the ScalingRuleType parameter to SimpleScalingRule or StepScalingRule. Valid values:

*
    *
  • QuantityChangeInCapacity: adds the specified number of ECS instances to or removes the specified number of ECS instances from the scaling group.
  • *
  • PercentChangeInCapacity: adds the specified percentage of ECS instances to or removes the specified percentage of ECS instances from the scaling group.
  • *
  • TotalCapacity: adjusts the number of ECS instances in the scaling group to a specified number.
  • *
* * example: *

QuantityChangeInCapacity

*/ @NameInMap("AdjustmentType") public String adjustmentType; /** *

The number of instances that must be scaled based on the scaling rule. This parameter is required only if you set the ScalingRuleType parameter to SimpleScalingRule or StepScalingRule. The number of ECS instances that are scaled in a single scaling activity cannot exceed 1,000.

*
    *
  • Valid values if you set the AdjustmentType parameter to QuantityChangeInCapacity: -1000 to 1000.
  • *
  • Valid values if you set the AdjustmentType parameter to PercentChangeInCapacity: -100 to 10000.
  • *
  • Valid values if you set the AdjustmentType parameter to TotalCapacity: 0 to 2000.
  • *
* * example: *

100

*/ @NameInMap("AdjustmentValue") public Integer adjustmentValue; /** *

The metric dimensions. This parameter is applicable to target tracking scaling rules. If your predefined metric requires extra dimensions, you must specify this parameter. For example, if you use LoadBalancerRealServerAverageQps as your predefined metric, you must use this parameter to specify the rulePool dimension.

*/ @NameInMap("AlarmDimensions") public java.util.List alarmDimensions; /** *

The cooldown time of the scaling rule. This parameter is available only if you set the ScalingRuleType parameter to SimpleScalingRule. Valid values: 0 to 86400. Unit: seconds.

*

By default, this parameter is left empty.

* * example: *

60

*/ @NameInMap("Cooldown") public Integer cooldown; /** *

Specifies whether to disable scale-in. This parameter is available only if you set ScalingRuleType to TargetTrackingScalingRule.

*

Default value: false.

* * example: *

false

*/ @NameInMap("DisableScaleIn") public Boolean disableScaleIn; /** *

The warmup period of an instance. This parameter is available only if you set the ScalingRuleType parameter to TargetTrackingScalingRule or PredictiveScalingRule. Auto Scaling adds ECS instances that are in the warmup state to a scaling group but does not report monitoring data to CloudMonitor during the warmup period.

*
*

Auto Scaling calculates the number of ECS instances that must be scaled. ECS instances in the warmup state are not counted towards the current capacity of the scaling group.

*
*

Valid values: 0 to 86400. Unit: seconds.

*

Default value: 300.

* * example: *

300

*/ @NameInMap("EstimatedInstanceWarmup") public Integer estimatedInstanceWarmup; @NameInMap("HybridMetrics") public java.util.List hybridMetrics; @NameInMap("HybridMonitorNamespace") public String hybridMonitorNamespace; /** *

The maximum number of ECS instances that can be contained in the scaling group. If you specify InitialMaxSize, you must specify PredictiveValueBehavior.

*

The default value of this parameter is the value of MaxSize.

* * example: *

100

*/ @NameInMap("InitialMaxSize") public Integer initialMaxSize; /** *

The predefined metric that you want to monitor. If you set ScalingRuleType to TargetTrackingScalingRule or PredictiveScalingRule, you must specify this parameter.

*

Valid values if you set ScalingRuleType to TargetTrackingScalingRule:

*
    *
  • CpuUtilizationAgent (recommended): the CPU utilization.
  • *
  • MemoryUtilization (recommended): the memory usage.
  • *
  • CpuUtilization: the average CPU utilization.
  • *
  • IntranetTx: the outbound traffic over an internal network.
  • *
  • IntranetRx: the average inbound traffic over an internal network.
  • *
  • VpcInternetTx: the outbound traffic from a virtual private cloud (VPC) to the Internet.
  • *
  • VpcInternetRx: the inbound traffic from the Internet to a VPC.
  • *
  • LoadBalancerRealServerAverageQps:the queries per second (QPS) per Application Load Balancer (ALB) server group.
  • *
*

Valid values if you set ScalingRuleType to PredictiveScalingRule:

*
    *
  • CpuUtilization: the average CPU utilization.
  • *
  • IntranetRx: the average inbound traffic over an internal network.
  • *
  • IntranetTx: the average outbound traffic over an internal network.
  • *
*

For more information, see Event-triggered tasks of the system monitoring type.

* * example: *

CpuUtilization

*/ @NameInMap("MetricName") public String metricName; @NameInMap("MetricType") public String metricType; /** *

The minimum number of instances that must be scaled when the AdjustmentType parameter is set to PercentChangeInCapacity. This parameter takes effect only if you set the ScalingRuleType parameter to SimpleScalingRule or StepScalingRule.

* * example: *

1

*/ @NameInMap("MinAdjustmentMagnitude") public Integer minAdjustmentMagnitude; @NameInMap("OwnerAccount") public String ownerAccount; @NameInMap("OwnerId") public Long ownerId; /** *

The mode of the predictive scaling rule. Valid values:

*
    *
  • PredictAndScale: produces predictions and creates prediction tasks.
  • *
  • PredictOnly: produces predictions but does not create prediction tasks.
  • *
*

Default value: PredictAndScale.

* * example: *

PredictAndScale

*/ @NameInMap("PredictiveScalingMode") public String predictiveScalingMode; /** *

The amount of buffer time before the prediction task is executed. By default, all prediction tasks that are automatically created for a predictive scaling rule are executed on the hour. You can specify an amount of buffer time for resource preparation before the prediction tasks are executed. Valid values: 0 to 60. Unit: minutes.

*

Default value: 0.

* * example: *

30

*/ @NameInMap("PredictiveTaskBufferTime") public Integer predictiveTaskBufferTime; /** *

The maximum value for predication tasks. Valid values:

*
    *
  • MaxOverridePredictiveValue: uses the initial maximum capacity as the maximum value for prediction tasks if the predicted value is greater than the initial maximum capacity.
  • *
  • PredictiveValueOverrideMax: uses the predicted value as the maximum value for prediction tasks if the predicted value is greater than the initial maximum capacity.
  • *
  • PredictiveValueOverrideMaxWithBuffer: increases the predicted value by a percentage that is specified by the PredictiveValueBuffer parameter. If the predicted value that is increased by the percentage is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks.
  • *
*

Default value: MaxOverridePredictiveValue.

* * example: *

MaxOverridePredictiveValue

*/ @NameInMap("PredictiveValueBehavior") public String predictiveValueBehavior; /** *

The ratio based on which the predicted value is increased when you set PredictiveValueBehavior to PredictiveValueOverrideMaxWithBuffer. If the predicted value increased by this ratio is greater than the initial maximum capacity, the increased value is used as the maximum value for prediction tasks. Valid values: 0 to 100.

*

Default value: 0.

* * example: *

50

*/ @NameInMap("PredictiveValueBuffer") public Integer predictiveValueBuffer; /** *

The region ID of the scaling group.

* * example: *

cn-hangzhou

*/ @NameInMap("RegionId") public String regionId; @NameInMap("ResourceOwnerAccount") public String resourceOwnerAccount; /** *

The number of consecutive times that the event-triggered task created for scale-in activities must meet 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.

* * example: *

15

*/ @NameInMap("ScaleInEvaluationCount") public Integer scaleInEvaluationCount; /** *

The number of consecutive times that the event-triggered task created for scale-out activities must meet 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.

* * example: *

3

*/ @NameInMap("ScaleOutEvaluationCount") public Integer scaleOutEvaluationCount; /** *

The ID of the scaling group to which the scaling rule belongs.

*

This parameter is required.

* * example: *

asg-bp1ffogfdauy0jw0****

*/ @NameInMap("ScalingGroupId") public String scalingGroupId; /** *

The name of the scaling rule. The name must be 2 to 64 characters in length, and can contain letters, digits, underscores (_), hyphens (-), and periods (.). The name must start with a letter or a digit.

*

The name of each scaling rule must be unique under the same account within a region.

*

If you leave this parameter empty, the scaling rule ID is used.

* * example: *

scalingrule****

*/ @NameInMap("ScalingRuleName") public String scalingRuleName; /** *

The type of the scaling rule. Valid values:

*
    *
  • SimpleScalingRule: a simple scaling rule. After you execute a simple scaling rule, Auto Scaling adjusts the number of ECS instances or elastic container instances in the scaling group based on the values of AdjustmentType and AdjustmentValue.
  • *
  • TargetTrackingScalingRule: a target tracking scaling rule. After you execute a target tracking scaling rule, Auto Scaling dynamically calculates the number of ECS instances or elastic container instances to scale based on the predefined metric (MetricName) and attempts to maintain the metric value close to the expected value (TargetValue).
  • *
  • StepScalingRule: a step scaling rule. After you execute a step scaling rule, Auto Scaling scales instances step by step based on the predefined thresholds and metric values.
  • *
  • PredictiveScalingRule: uses machine learning to analyze historical monitoring data of the scaling group and predicts the future values of metrics. In addition, Auto Scaling automatically creates scheduled tasks to specify the value range for the scaling group.
  • *
*

Default value: SimpleScalingRule

* * example: *

SimpleScalingRule

*/ @NameInMap("ScalingRuleType") public String scalingRuleType; /** *

Details of the step adjustments.

*/ @NameInMap("StepAdjustments") public java.util.List stepAdjustments; /** *

The target value. This parameter is required only if you set the ScalingRuleType parameter to TargetTrackingScalingRule or PredictiveScalingRule. The value must be greater than 0 and can have up to three decimal places.

* * example: *

0.125

*/ @NameInMap("TargetValue") public Float targetValue; public static CreateScalingRuleRequest build(java.util.Map map) throws Exception { CreateScalingRuleRequest self = new CreateScalingRuleRequest(); return TeaModel.build(map, self); } public CreateScalingRuleRequest setAdjustmentType(String adjustmentType) { this.adjustmentType = adjustmentType; return this; } public String getAdjustmentType() { return this.adjustmentType; } public CreateScalingRuleRequest setAdjustmentValue(Integer adjustmentValue) { this.adjustmentValue = adjustmentValue; return this; } public Integer getAdjustmentValue() { return this.adjustmentValue; } public CreateScalingRuleRequest setAlarmDimensions(java.util.List alarmDimensions) { this.alarmDimensions = alarmDimensions; return this; } public java.util.List getAlarmDimensions() { return this.alarmDimensions; } public CreateScalingRuleRequest setCooldown(Integer cooldown) { this.cooldown = cooldown; return this; } public Integer getCooldown() { return this.cooldown; } public CreateScalingRuleRequest setDisableScaleIn(Boolean disableScaleIn) { this.disableScaleIn = disableScaleIn; return this; } public Boolean getDisableScaleIn() { return this.disableScaleIn; } public CreateScalingRuleRequest setEstimatedInstanceWarmup(Integer estimatedInstanceWarmup) { this.estimatedInstanceWarmup = estimatedInstanceWarmup; return this; } public Integer getEstimatedInstanceWarmup() { return this.estimatedInstanceWarmup; } public CreateScalingRuleRequest setHybridMetrics(java.util.List hybridMetrics) { this.hybridMetrics = hybridMetrics; return this; } public java.util.List getHybridMetrics() { return this.hybridMetrics; } public CreateScalingRuleRequest setHybridMonitorNamespace(String hybridMonitorNamespace) { this.hybridMonitorNamespace = hybridMonitorNamespace; return this; } public String getHybridMonitorNamespace() { return this.hybridMonitorNamespace; } public CreateScalingRuleRequest setInitialMaxSize(Integer initialMaxSize) { this.initialMaxSize = initialMaxSize; return this; } public Integer getInitialMaxSize() { return this.initialMaxSize; } public CreateScalingRuleRequest setMetricName(String metricName) { this.metricName = metricName; return this; } public String getMetricName() { return this.metricName; } public CreateScalingRuleRequest setMetricType(String metricType) { this.metricType = metricType; return this; } public String getMetricType() { return this.metricType; } public CreateScalingRuleRequest setMinAdjustmentMagnitude(Integer minAdjustmentMagnitude) { this.minAdjustmentMagnitude = minAdjustmentMagnitude; return this; } public Integer getMinAdjustmentMagnitude() { return this.minAdjustmentMagnitude; } public CreateScalingRuleRequest setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; return this; } public String getOwnerAccount() { return this.ownerAccount; } public CreateScalingRuleRequest setOwnerId(Long ownerId) { this.ownerId = ownerId; return this; } public Long getOwnerId() { return this.ownerId; } public CreateScalingRuleRequest setPredictiveScalingMode(String predictiveScalingMode) { this.predictiveScalingMode = predictiveScalingMode; return this; } public String getPredictiveScalingMode() { return this.predictiveScalingMode; } public CreateScalingRuleRequest setPredictiveTaskBufferTime(Integer predictiveTaskBufferTime) { this.predictiveTaskBufferTime = predictiveTaskBufferTime; return this; } public Integer getPredictiveTaskBufferTime() { return this.predictiveTaskBufferTime; } public CreateScalingRuleRequest setPredictiveValueBehavior(String predictiveValueBehavior) { this.predictiveValueBehavior = predictiveValueBehavior; return this; } public String getPredictiveValueBehavior() { return this.predictiveValueBehavior; } public CreateScalingRuleRequest setPredictiveValueBuffer(Integer predictiveValueBuffer) { this.predictiveValueBuffer = predictiveValueBuffer; return this; } public Integer getPredictiveValueBuffer() { return this.predictiveValueBuffer; } public CreateScalingRuleRequest setRegionId(String regionId) { this.regionId = regionId; return this; } public String getRegionId() { return this.regionId; } public CreateScalingRuleRequest setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; return this; } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public CreateScalingRuleRequest setScaleInEvaluationCount(Integer scaleInEvaluationCount) { this.scaleInEvaluationCount = scaleInEvaluationCount; return this; } public Integer getScaleInEvaluationCount() { return this.scaleInEvaluationCount; } public CreateScalingRuleRequest setScaleOutEvaluationCount(Integer scaleOutEvaluationCount) { this.scaleOutEvaluationCount = scaleOutEvaluationCount; return this; } public Integer getScaleOutEvaluationCount() { return this.scaleOutEvaluationCount; } public CreateScalingRuleRequest setScalingGroupId(String scalingGroupId) { this.scalingGroupId = scalingGroupId; return this; } public String getScalingGroupId() { return this.scalingGroupId; } public CreateScalingRuleRequest setScalingRuleName(String scalingRuleName) { this.scalingRuleName = scalingRuleName; return this; } public String getScalingRuleName() { return this.scalingRuleName; } public CreateScalingRuleRequest setScalingRuleType(String scalingRuleType) { this.scalingRuleType = scalingRuleType; return this; } public String getScalingRuleType() { return this.scalingRuleType; } public CreateScalingRuleRequest setStepAdjustments(java.util.List stepAdjustments) { this.stepAdjustments = stepAdjustments; return this; } public java.util.List getStepAdjustments() { return this.stepAdjustments; } public CreateScalingRuleRequest setTargetValue(Float targetValue) { this.targetValue = targetValue; return this; } public Float getTargetValue() { return this.targetValue; } public static class CreateScalingRuleRequestAlarmDimensions extends TeaModel { /** *

The dimension key of the metric.

* * example: *

rulePool

*/ @NameInMap("DimensionKey") public String dimensionKey; /** *

The dimension value of the metric.

* * example: *

sgp-l1cbirz451yxuxxx

*/ @NameInMap("DimensionValue") public String dimensionValue; public static CreateScalingRuleRequestAlarmDimensions build(java.util.Map map) throws Exception { CreateScalingRuleRequestAlarmDimensions self = new CreateScalingRuleRequestAlarmDimensions(); return TeaModel.build(map, self); } public CreateScalingRuleRequestAlarmDimensions setDimensionKey(String dimensionKey) { this.dimensionKey = dimensionKey; return this; } public String getDimensionKey() { return this.dimensionKey; } public CreateScalingRuleRequestAlarmDimensions setDimensionValue(String dimensionValue) { this.dimensionValue = dimensionValue; return this; } public String getDimensionValue() { return this.dimensionValue; } } public static class CreateScalingRuleRequestHybridMetricsDimensions extends TeaModel { @NameInMap("DimensionKey") public String dimensionKey; @NameInMap("DimensionValue") public String dimensionValue; public static CreateScalingRuleRequestHybridMetricsDimensions build(java.util.Map map) throws Exception { CreateScalingRuleRequestHybridMetricsDimensions self = new CreateScalingRuleRequestHybridMetricsDimensions(); return TeaModel.build(map, self); } public CreateScalingRuleRequestHybridMetricsDimensions setDimensionKey(String dimensionKey) { this.dimensionKey = dimensionKey; return this; } public String getDimensionKey() { return this.dimensionKey; } public CreateScalingRuleRequestHybridMetricsDimensions setDimensionValue(String dimensionValue) { this.dimensionValue = dimensionValue; return this; } public String getDimensionValue() { return this.dimensionValue; } } public static class CreateScalingRuleRequestHybridMetrics extends TeaModel { @NameInMap("Dimensions") public java.util.List dimensions; @NameInMap("Expression") public String expression; @NameInMap("Id") public String id; @NameInMap("MetricName") public String metricName; @NameInMap("Statistic") public String statistic; public static CreateScalingRuleRequestHybridMetrics build(java.util.Map map) throws Exception { CreateScalingRuleRequestHybridMetrics self = new CreateScalingRuleRequestHybridMetrics(); return TeaModel.build(map, self); } public CreateScalingRuleRequestHybridMetrics setDimensions(java.util.List dimensions) { this.dimensions = dimensions; return this; } public java.util.List getDimensions() { return this.dimensions; } public CreateScalingRuleRequestHybridMetrics setExpression(String expression) { this.expression = expression; return this; } public String getExpression() { return this.expression; } public CreateScalingRuleRequestHybridMetrics setId(String id) { this.id = id; return this; } public String getId() { return this.id; } public CreateScalingRuleRequestHybridMetrics setMetricName(String metricName) { this.metricName = metricName; return this; } public String getMetricName() { return this.metricName; } public CreateScalingRuleRequestHybridMetrics setStatistic(String statistic) { this.statistic = statistic; return this; } public String getStatistic() { return this.statistic; } } public static class CreateScalingRuleRequestStepAdjustments extends TeaModel { /** *

The lower limit specified in a step adjustment. This parameter is available only if you set the ScalingRuleType parameter to StepScalingRule. Valid values: -9.999999E18 to 9.999999E18.

* * example: *

1.0

*/ @NameInMap("MetricIntervalLowerBound") public Float metricIntervalLowerBound; /** *

The upper limit that is specified in a step adjustment. Valid values: -9.999999E18 to 9.999999E18.

* * example: *

5.0

*/ @NameInMap("MetricIntervalUpperBound") public Float metricIntervalUpperBound; /** *

The number of ECS instances that you want to scale in a step adjustment. This parameter is available only if you set the ScalingRuleType parameter to StepScalingRule.

* * example: *

1

*/ @NameInMap("ScalingAdjustment") public Integer scalingAdjustment; public static CreateScalingRuleRequestStepAdjustments build(java.util.Map map) throws Exception { CreateScalingRuleRequestStepAdjustments self = new CreateScalingRuleRequestStepAdjustments(); return TeaModel.build(map, self); } public CreateScalingRuleRequestStepAdjustments setMetricIntervalLowerBound(Float metricIntervalLowerBound) { this.metricIntervalLowerBound = metricIntervalLowerBound; return this; } public Float getMetricIntervalLowerBound() { return this.metricIntervalLowerBound; } public CreateScalingRuleRequestStepAdjustments setMetricIntervalUpperBound(Float metricIntervalUpperBound) { this.metricIntervalUpperBound = metricIntervalUpperBound; return this; } public Float getMetricIntervalUpperBound() { return this.metricIntervalUpperBound; } public CreateScalingRuleRequestStepAdjustments setScalingAdjustment(Integer scalingAdjustment) { this.scalingAdjustment = scalingAdjustment; return this; } public Integer getScalingAdjustment() { return this.scalingAdjustment; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy