Skip to content

ScalingRule

  • Implements: com.aliyun.ros.cdk.ess.datasource.IScalingRule

This class encapsulates and extends the ROS resource type DATASOURCE::ESS::ScalingRule, which is used to query the information about a scaling rule.

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.
fetchCondition No description.
fetchDependency No description.
fetchResourceDesc 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

fetchCondition

public RosCondition fetchCondition()

fetchDependency

public java.util.List<java.lang.String> fetchDependency()

fetchResourceDesc

public java.lang.String fetchResourceDesc()

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.ScalingRule;
ScalingRule.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.
env com.aliyun.ros.cdk.core.IResourceEnvironment The environment this resource belongs to.
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 java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute AdjustmentType: The adjustment method of the scaling rule.
attrAdjustmentValue java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute AdjustmentValue: The number of instances that must be scaled based on the scaling rule.
attrAlarms java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Alarms: The event-triggered tasks that are associated with the scaling rule.
attrCooldown java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Cooldown: The cooldown period of the scaling rule.
attrDisableScaleIn java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute DisableScaleIn: Indicates whether scale-in is disabled.
attrEstimatedInstanceWarmup java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute EstimatedInstanceWarmup: The warm-up period of instances.
attrInitialMaxSize java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute InitialMaxSize: The maximum number of ECS instances that can be contained in the scaling group.
attrMaxSize java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute MaxSize: The maximum number of ECS instances that can be contained in the scaling group.
attrMetricName java.lang.String OR 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 java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute MinAdjustmentMagnitude: The minimum number of instances that must be scaled.
attrMinSize java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute MinSize: The minimum number of ECS instances that must be contained in the scaling group.
attrPredictiveScalingMode java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute PredictiveScalingMode: The mode of the predictive scaling rule.
attrPredictiveTaskBufferTime java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute PredictiveTaskBufferTime: The amount of buffer time before prediction tasks are executed.
attrPredictiveValueBehavior java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute PredictiveValueBehavior: The action on the predicted maximum value.
attrPredictiveValueBuffer java.lang.String OR 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 java.lang.String OR 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 java.lang.String OR 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 java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ScalingGroupId: The ID of the scaling group.
attrScalingRuleAri java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ScalingRuleAri: The unique identifier of the scaling rule.
attrScalingRuleId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ScalingRuleId: The ID of the scaling rule.
attrScalingRuleName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ScalingRuleName: The name of the scaling rule.
attrScalingRuleType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ScalingRuleType: The type of the scaling rule.
attrStepAdjustments java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute StepAdjustments: The step adjustments of the step scaling rule.
attrTargetValue java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute TargetValue: The target value of the metric.
props ScalingRuleProps No description.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


envRequired

public IResourceEnvironment getEnv();
  • Type: com.aliyun.ros.cdk.core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


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 java.lang.Object getAttrAdjustmentType();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute AdjustmentType: The adjustment method of the scaling rule.


attrAdjustmentValueRequired

public java.lang.Object getAttrAdjustmentValue();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute AdjustmentValue: The number of instances that must be scaled based on the scaling rule.


attrAlarmsRequired

public java.lang.Object getAttrAlarms();
  • Type: java.lang.String OR 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 java.lang.Object getAttrCooldown();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Cooldown: The cooldown period of the scaling rule.


attrDisableScaleInRequired

public java.lang.Object getAttrDisableScaleIn();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute DisableScaleIn: Indicates whether scale-in is disabled.


attrEstimatedInstanceWarmupRequired

public java.lang.Object getAttrEstimatedInstanceWarmup();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute EstimatedInstanceWarmup: The warm-up period of instances.


attrInitialMaxSizeRequired

public java.lang.Object getAttrInitialMaxSize();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute InitialMaxSize: The maximum number of ECS instances that can be contained in the scaling group.


attrMaxSizeRequired

public java.lang.Object getAttrMaxSize();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute MaxSize: The maximum number of ECS instances that can be contained in the scaling group.


attrMetricNameRequired

public java.lang.Object getAttrMetricName();
  • Type: java.lang.String OR 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 java.lang.Object getAttrMinAdjustmentMagnitude();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute MinAdjustmentMagnitude: The minimum number of instances that must be scaled.


attrMinSizeRequired

public java.lang.Object getAttrMinSize();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute MinSize: The minimum number of ECS instances that must be contained in the scaling group.


attrPredictiveScalingModeRequired

public java.lang.Object getAttrPredictiveScalingMode();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute PredictiveScalingMode: The mode of the predictive scaling rule.


attrPredictiveTaskBufferTimeRequired

public java.lang.Object getAttrPredictiveTaskBufferTime();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute PredictiveTaskBufferTime: The amount of buffer time before prediction tasks are executed.


attrPredictiveValueBehaviorRequired

public java.lang.Object getAttrPredictiveValueBehavior();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute PredictiveValueBehavior: The action on the predicted maximum value.


attrPredictiveValueBufferRequired

public java.lang.Object getAttrPredictiveValueBuffer();
  • Type: java.lang.String OR 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 java.lang.Object getAttrScaleInEvaluationCount();
  • Type: java.lang.String OR 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 java.lang.Object getAttrScaleOutEvaluationCount();
  • Type: java.lang.String OR 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 java.lang.Object getAttrScalingGroupId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ScalingGroupId: The ID of the scaling group.


attrScalingRuleAriRequired

public java.lang.Object getAttrScalingRuleAri();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ScalingRuleAri: The unique identifier of the scaling rule.


attrScalingRuleIdRequired

public java.lang.Object getAttrScalingRuleId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ScalingRuleId: The ID of the scaling rule.


attrScalingRuleNameRequired

public java.lang.Object getAttrScalingRuleName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ScalingRuleName: The name of the scaling rule.


attrScalingRuleTypeRequired

public java.lang.Object getAttrScalingRuleType();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ScalingRuleType: The type of the scaling rule.


attrStepAdjustmentsRequired

public java.lang.Object getAttrStepAdjustments();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute StepAdjustments: The step adjustments of the step scaling rule.


attrTargetValueRequired

public java.lang.Object getAttrTargetValue();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute TargetValue: The target value of the metric.


propsRequired

public ScalingRuleProps getProps();