ScalingRules
This class encapsulates and extends the ROS resource type DATASOURCE::ESS::ScalingRules
.
Initializers
import com.aliyun.ros.cdk.ess.datasource.ScalingRules;
ScalingRules.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
// .refreshOptions(java.lang.String)
// .refreshOptions(IResolvable)
// .scalingGroupId(java.lang.String)
// .scalingGroupId(IResolvable)
// .scalingRuleAris(java.util.List<java.lang.Object>)
// .scalingRuleAris(IResolvable)
// .scalingRuleIds(java.util.List<java.lang.Object>)
// .scalingRuleIds(IResolvable)
// .scalingRuleNames(java.util.List<java.lang.Object>)
// .scalingRuleNames(IResolvable)
// .scalingRuleType(java.lang.String)
// .scalingRuleType(IResolvable)
// .showAlarmRules(java.lang.Boolean)
// .showAlarmRules(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. |
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. |
scalingGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property scalingGroupId: The ID of the scaling group. |
scalingRuleAris |
java.util.List |
Property scalingRuleAris: The unique identifiers of the scaling rules that you want to query. |
scalingRuleIds |
java.util.List |
Property scalingRuleIds: The IDs of the scaling rules that you want to query. |
scalingRuleNames |
java.util.List |
Property scalingRuleNames: The names of the scaling rules that you want to query. |
scalingRuleType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property scalingRuleType: The type of the scaling rule. |
showAlarmRules |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property showAlarmRules: Specifies whether to return the event-triggered tasks that are associated with the scaling rule. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
refreshOptions
Optional
- 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.
scalingGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property scalingGroupId: The ID of the scaling group.
scalingRuleAris
Optional
- Type: java.util.List
OR com.aliyun.ros.cdk.core.IResolvable
Property scalingRuleAris: The unique identifiers of the scaling rules that you want to query.
scalingRuleIds
Optional
- Type: java.util.List
OR com.aliyun.ros.cdk.core.IResolvable
Property scalingRuleIds: The IDs of the scaling rules that you want to query.
scalingRuleNames
Optional
- Type: java.util.List
OR com.aliyun.ros.cdk.core.IResolvable
Property scalingRuleNames: The names of the scaling rules that you want to query.
scalingRuleType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property scalingRuleType: The type of the scaling rule.
Valid values: SimpleScalingRule: adjusts the number of ECS instances based on the values of the AdjustmentType and AdjustmentValue parameters. TargetTrackingScalingRule: calculates the number of ECS instances that need to be scaled in a dynamic manner and maintains the value of a predefined metric close to the value of the TargetValue parameter. StepScalingRule: scales ECS instances in steps based on the specified 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 adjust the boundary values for the scaling group.
showAlarmRules
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property showAlarmRules: Specifies whether to return the event-triggered tasks that are associated with the scaling rule.
Valid values: true false Default value: false.
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.ScalingRules;
ScalingRules.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. |
attrScalingRuleIds |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ScalingRuleIds: The list of scaling rule IDs. |
attrScalingRules |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ScalingRules: The list of scaling rules. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrScalingRuleIds
Required
public IResolvable getAttrScalingRuleIds();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ScalingRuleIds: The list of scaling rule IDs.
attrScalingRules
Required
public IResolvable getAttrScalingRules();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ScalingRules: The list of scaling rules.