Skip to content

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 OR com.aliyun.ros.cdk.core.IResolvable Property scalingRuleAris: The unique identifiers of the scaling rules that you want to query.
scalingRuleIds java.util.List OR com.aliyun.ros.cdk.core.IResolvable Property scalingRuleIds: The IDs of the scaling rules that you want to query.
scalingRuleNames java.util.List OR com.aliyun.ros.cdk.core.IResolvable 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.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

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.

scalingGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property scalingGroupId: The ID of the scaling group.


scalingRuleArisOptional

  • 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.


scalingRuleIdsOptional

  • Type: java.util.List OR com.aliyun.ros.cdk.core.IResolvable

Property scalingRuleIds: The IDs of the scaling rules that you want to query.


scalingRuleNamesOptional

  • Type: java.util.List OR com.aliyun.ros.cdk.core.IResolvable

Property scalingRuleNames: The names of the scaling rules that you want to query.


scalingRuleTypeOptional

  • 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.


showAlarmRulesOptional

  • 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.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • 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.

xRequired

  • 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.

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

attrScalingRuleIdsRequired

public IResolvable getAttrScalingRuleIds();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ScalingRuleIds: The list of scaling rule IDs.


attrScalingRulesRequired

public IResolvable getAttrScalingRules();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ScalingRules: The list of scaling rules.