public static final class CreateScalingRuleRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
CreateScalingRuleRequest.Builder |
adjustmentType(String adjustmentType)
The scaling method of the scaling rule.
|
CreateScalingRuleRequest.Builder |
adjustmentValue(Integer adjustmentValue)
The number of instances that must be scaled based on the scaling rule.
|
CreateScalingRuleRequest.Builder |
alarmDimensions(List<CreateScalingRuleRequest.AlarmDimensions> alarmDimensions)
The metric dimensions.
|
CreateScalingRuleRequest |
build() |
CreateScalingRuleRequest.Builder |
cooldown(Integer cooldown)
The cooldown time of the scaling rule.
|
CreateScalingRuleRequest.Builder |
disableScaleIn(Boolean disableScaleIn)
Specifies whether to disable scale-in.
|
CreateScalingRuleRequest.Builder |
estimatedInstanceWarmup(Integer estimatedInstanceWarmup)
The warmup period of an instance.
|
CreateScalingRuleRequest.Builder |
initialMaxSize(Integer initialMaxSize)
The maximum number of ECS instances that can be contained in the scaling group.
|
CreateScalingRuleRequest.Builder |
metricName(String metricName)
The predefined metric of the scaling rule.
|
CreateScalingRuleRequest.Builder |
minAdjustmentMagnitude(Integer minAdjustmentMagnitude)
The minimum number of instances that must be scaled when the AdjustmentType parameter is set to PercentChangeInCapacity.
|
CreateScalingRuleRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateScalingRuleRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateScalingRuleRequest.Builder |
predictiveScalingMode(String predictiveScalingMode)
The mode of the predictive scaling rule.
|
CreateScalingRuleRequest.Builder |
predictiveTaskBufferTime(Integer predictiveTaskBufferTime)
The amount of buffer time before the prediction task is executed.
|
CreateScalingRuleRequest.Builder |
predictiveValueBehavior(String predictiveValueBehavior)
The maximum value for predication tasks.
|
CreateScalingRuleRequest.Builder |
predictiveValueBuffer(Integer predictiveValueBuffer)
The ratio based on which the predicted value is increased when you set `PredictiveValueBehavior` to `PredictiveValueOverrideMaxWithBuffer`.
|
CreateScalingRuleRequest.Builder |
regionId(String regionId)
The region ID of the scaling group.
|
CreateScalingRuleRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateScalingRuleRequest.Builder |
scaleInEvaluationCount(Integer scaleInEvaluationCount)
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.
|
CreateScalingRuleRequest.Builder |
scaleOutEvaluationCount(Integer scaleOutEvaluationCount)
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.
|
CreateScalingRuleRequest.Builder |
scalingGroupId(String scalingGroupId)
The ID of the scaling group to which the scaling rule belongs.
|
CreateScalingRuleRequest.Builder |
scalingRuleName(String scalingRuleName)
The name of the scaling rule.
|
CreateScalingRuleRequest.Builder |
scalingRuleType(String scalingRuleType)
The type of the scaling rule.
|
CreateScalingRuleRequest.Builder |
stepAdjustments(List<CreateScalingRuleRequest.StepAdjustments> stepAdjustments)
Details of the step adjustments.
|
CreateScalingRuleRequest.Builder |
targetValue(Float targetValue)
The target value.
|
public CreateScalingRuleRequest.Builder adjustmentType(String adjustmentType)
* 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.
public CreateScalingRuleRequest.Builder adjustmentValue(Integer adjustmentValue)
* 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.
public CreateScalingRuleRequest.Builder alarmDimensions(List<CreateScalingRuleRequest.AlarmDimensions> alarmDimensions)
public CreateScalingRuleRequest.Builder cooldown(Integer cooldown)
By default, this parameter is left empty.
public CreateScalingRuleRequest.Builder disableScaleIn(Boolean disableScaleIn)
Default value: false.
public CreateScalingRuleRequest.Builder estimatedInstanceWarmup(Integer estimatedInstanceWarmup)
> 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.
public CreateScalingRuleRequest.Builder initialMaxSize(Integer initialMaxSize)
The default value of this parameter is the value of MaxSize.
public CreateScalingRuleRequest.Builder metricName(String metricName)
Valid values if you set ScalingRuleType to TargetTrackingScalingRule: * CpuUtilization: the average CPU utilization. * IntranetTx: the outbound traffic over an internal network. * IntranetRx: the 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. * MemoryUtilization: the memory usage. * 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 inbound traffic over an internal network. * IntranetTx: the outbound traffic over an internal network.
public CreateScalingRuleRequest.Builder minAdjustmentMagnitude(Integer minAdjustmentMagnitude)
public CreateScalingRuleRequest.Builder ownerAccount(String ownerAccount)
public CreateScalingRuleRequest.Builder ownerId(Long ownerId)
public CreateScalingRuleRequest.Builder predictiveScalingMode(String predictiveScalingMode)
* PredictAndScale: produces predictions and creates prediction tasks. * PredictOnly: produces predictions but does not create prediction tasks. Default value: PredictAndScale.
public CreateScalingRuleRequest.Builder predictiveTaskBufferTime(Integer predictiveTaskBufferTime)
Default value: 0.
public CreateScalingRuleRequest.Builder predictiveValueBehavior(String predictiveValueBehavior)
* 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.
public CreateScalingRuleRequest.Builder predictiveValueBuffer(Integer predictiveValueBuffer)
Default value: 0.
public CreateScalingRuleRequest.Builder regionId(String regionId)
public CreateScalingRuleRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateScalingRuleRequest.Builder scaleInEvaluationCount(Integer scaleInEvaluationCount)
Default value: 15.
public CreateScalingRuleRequest.Builder scaleOutEvaluationCount(Integer scaleOutEvaluationCount)
Default value: 3.
public CreateScalingRuleRequest.Builder scalingGroupId(String scalingGroupId)
public CreateScalingRuleRequest.Builder scalingRuleName(String scalingRuleName)
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.
public CreateScalingRuleRequest.Builder scalingRuleType(String scalingRuleType)
* SimpleScalingRule: a simple scaling rule. Once a simple scaling rule is executed, 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. Once a target tracking scaling rule is executed, 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 specified target value (TargetValue). * StepScalingRule: a step scaling rule. Once a step scaling rule is executed, Auto Scaling scales instances step by step based on the predefined thresholds and metric values. * PredictiveScalingRule: a predictive scaling rule. Once a predictive scaling rule is executed, Auto Scaling analyzes the historical monitoring data based on the machine learning technology and predicts the trends of metric data. Auto Scaling also creates scheduled tasks to enable dynamic adjustment of the boundary values for the scaling group. Default value: SimpleScalingRule.
public CreateScalingRuleRequest.Builder stepAdjustments(List<CreateScalingRuleRequest.StepAdjustments> stepAdjustments)
public CreateScalingRuleRequest.Builder targetValue(Float targetValue)
public CreateScalingRuleRequest build()
Copyright © 2024. All rights reserved.