ScalingRule
This class encapsulates and extends the ROS resource type DATASOURCE::ESS::ScalingRule.
Initializers
import com.aliyun.ros.cdk.ess.datasource.ScalingRule;
ScalingRule.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.scalingRuleId(java.lang.String)
.scalingRuleId(IResolvable)
// .refreshOptions(java.lang.String)
// .refreshOptions(IResolvable)
.build();
| Name | Type | Description |
|---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
scalingRuleId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property scalingRuleId: The ID of the scaling rule that you want to query. |
refreshOptions |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
scalingRuleIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property scalingRuleId: The ID of the scaling rule that you want to query.
refreshOptionsOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
Valid values:
- Never: Never refresh the datasource resource when the stack is updated.
- Always: Always refresh the datasource resource when the stack is updated. Default is Never.
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.ess.datasource.ScalingRule;
ScalingRule.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrAdjustmentType |
com.aliyun.ros.cdk.core.IResolvable |
Attribute AdjustmentType: The adjustment method of the scaling rule. |
attrAdjustmentValue |
com.aliyun.ros.cdk.core.IResolvable |
Attribute AdjustmentValue: The number of instances that must be scaled based on the scaling rule. |
attrAlarms |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Alarms: The event-triggered tasks that are associated with the scaling rule. |
attrCooldown |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Cooldown: The cooldown period of the scaling rule. |
attrDisableScaleIn |
com.aliyun.ros.cdk.core.IResolvable |
Attribute DisableScaleIn: Indicates whether scale-in is disabled. |
attrEstimatedInstanceWarmup |
com.aliyun.ros.cdk.core.IResolvable |
Attribute EstimatedInstanceWarmup: The warm-up period of instances. |
attrInitialMaxSize |
com.aliyun.ros.cdk.core.IResolvable |
Attribute InitialMaxSize: The maximum number of ECS instances that can be contained in the scaling group. |
attrMaxSize |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MaxSize: The maximum number of ECS instances that can be contained in the scaling group. |
attrMetricName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MetricName: The name of the metric of the event-triggered task that is associated with the scaling rule. |
attrMinAdjustmentMagnitude |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MinAdjustmentMagnitude: The minimum number of instances that must be scaled. |
attrMinSize |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MinSize: The minimum number of ECS instances that must be contained in the scaling group. |
attrPredictiveScalingMode |
com.aliyun.ros.cdk.core.IResolvable |
Attribute PredictiveScalingMode: The mode of the predictive scaling rule. |
attrPredictiveTaskBufferTime |
com.aliyun.ros.cdk.core.IResolvable |
Attribute PredictiveTaskBufferTime: The amount of buffer time before prediction tasks are executed. |
attrPredictiveValueBehavior |
com.aliyun.ros.cdk.core.IResolvable |
Attribute PredictiveValueBehavior: The action on the predicted maximum value. |
attrPredictiveValueBuffer |
com.aliyun.ros.cdk.core.IResolvable |
Attribute PredictiveValueBuffer: The ratio based on which the predicted value is increased when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer. |
attrScaleInEvaluationCount |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ScaleInEvaluationCount: The number of consecutive times that the event-triggered task for scale-in purposes must meet the threshold conditions before an alert is triggered. |
attrScaleOutEvaluationCount |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ScaleOutEvaluationCount: The number of consecutive times that the event-triggered task created for scale-out purposes must meet the threshold conditions before an alert is triggered. |
attrScalingGroupId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ScalingGroupId: The ID of the scaling group. |
attrScalingRuleAri |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ScalingRuleAri: The unique identifier of the scaling rule. |
attrScalingRuleId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ScalingRuleId: The ID of the scaling rule. |
attrScalingRuleName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ScalingRuleName: The name of the scaling rule. |
attrScalingRuleType |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ScalingRuleType: The type of the scaling rule. |
attrStepAdjustments |
com.aliyun.ros.cdk.core.IResolvable |
Attribute StepAdjustments: The step adjustments of the step scaling rule. |
attrTargetValue |
com.aliyun.ros.cdk.core.IResolvable |
Attribute TargetValue: The target value of the metric. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrAdjustmentTypeRequired
public IResolvable getAttrAdjustmentType();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute AdjustmentType: The adjustment method of the scaling rule.
attrAdjustmentValueRequired
public IResolvable getAttrAdjustmentValue();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute AdjustmentValue: The number of instances that must be scaled based on the scaling rule.
attrAlarmsRequired
public IResolvable getAttrAlarms();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Alarms: The event-triggered tasks that are associated with the scaling rule.
The value of this parameter is returned only if you set ShowAlarmRules to true. Otherwise, null is returned.
attrCooldownRequired
public IResolvable getAttrCooldown();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Cooldown: The cooldown period of the scaling rule.
attrDisableScaleInRequired
public IResolvable getAttrDisableScaleIn();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute DisableScaleIn: Indicates whether scale-in is disabled.
attrEstimatedInstanceWarmupRequired
public IResolvable getAttrEstimatedInstanceWarmup();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute EstimatedInstanceWarmup: The warm-up period of instances.
attrInitialMaxSizeRequired
public IResolvable getAttrInitialMaxSize();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute InitialMaxSize: The maximum number of ECS instances that can be contained in the scaling group.
attrMaxSizeRequired
public IResolvable getAttrMaxSize();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute MaxSize: The maximum number of ECS instances that can be contained in the scaling group.
attrMetricNameRequired
public IResolvable getAttrMetricName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute MetricName: The name of the metric of the event-triggered task that is associated with the scaling rule.
attrMinAdjustmentMagnitudeRequired
public IResolvable getAttrMinAdjustmentMagnitude();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute MinAdjustmentMagnitude: The minimum number of instances that must be scaled.
attrMinSizeRequired
public IResolvable getAttrMinSize();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute MinSize: The minimum number of ECS instances that must be contained in the scaling group.
attrPredictiveScalingModeRequired
public IResolvable getAttrPredictiveScalingMode();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute PredictiveScalingMode: The mode of the predictive scaling rule.
attrPredictiveTaskBufferTimeRequired
public IResolvable getAttrPredictiveTaskBufferTime();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute PredictiveTaskBufferTime: The amount of buffer time before prediction tasks are executed.
attrPredictiveValueBehaviorRequired
public IResolvable getAttrPredictiveValueBehavior();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute PredictiveValueBehavior: The action on the predicted maximum value.
attrPredictiveValueBufferRequired
public IResolvable getAttrPredictiveValueBuffer();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute PredictiveValueBuffer: The ratio based on which the predicted value is increased when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer.
attrScaleInEvaluationCountRequired
public IResolvable getAttrScaleInEvaluationCount();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ScaleInEvaluationCount: The number of consecutive times that the event-triggered task for scale-in purposes must meet the threshold conditions before an alert is triggered.
attrScaleOutEvaluationCountRequired
public IResolvable getAttrScaleOutEvaluationCount();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ScaleOutEvaluationCount: The number of consecutive times that the event-triggered task created for scale-out purposes must meet the threshold conditions before an alert is triggered.
attrScalingGroupIdRequired
public IResolvable getAttrScalingGroupId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ScalingGroupId: The ID of the scaling group.
attrScalingRuleAriRequired
public IResolvable getAttrScalingRuleAri();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ScalingRuleAri: The unique identifier of the scaling rule.
attrScalingRuleIdRequired
public IResolvable getAttrScalingRuleId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ScalingRuleId: The ID of the scaling rule.
attrScalingRuleNameRequired
public IResolvable getAttrScalingRuleName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ScalingRuleName: The name of the scaling rule.
attrScalingRuleTypeRequired
public IResolvable getAttrScalingRuleType();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ScalingRuleType: The type of the scaling rule.
attrStepAdjustmentsRequired
public IResolvable getAttrStepAdjustments();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute StepAdjustments: The step adjustments of the step scaling rule.
attrTargetValueRequired
public IResolvable getAttrTargetValue();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute TargetValue: The target value of the metric.