Skip to content

ScalingRule

  • Implements: @alicloud/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 { datasource } from '@alicloud/ros-cdk-ess'
new datasource.ScalingRule(scope: Construct, id: string, props: ScalingRuleProps, enableResourcePropertyConstraint?: boolean)
Name Type Description
scope @alicloud/ros-cdk-core.Construct No description.
id string No description.
props ScalingRuleProps No description.
enableResourcePropertyConstraint boolean No description.

scopeRequired

  • Type: @alicloud/ros-cdk-core.Construct

idRequired

  • Type: string

propsRequired


enableResourcePropertyConstraintOptional

  • Type: boolean

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 toString(): string

Returns a string representation of this construct.

synthesize

public synthesize(session: ISynthesisSession): void

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: @alicloud/ros-cdk-core.ISynthesisSession

The synthesis session.


addCondition

public addCondition(condition: RosCondition): void

conditionRequired

  • Type: @alicloud/ros-cdk-core.RosCondition

addCount

public addCount(count: number | IResolvable): void

countRequired

  • Type: number | @alicloud/ros-cdk-core.IResolvable

addDependency

public addDependency(resource: Resource): void

resourceRequired

  • Type: @alicloud/ros-cdk-core.Resource

addResourceDesc

public addResourceDesc(desc: string): void

descRequired

  • Type: string

applyRemovalPolicy

public applyRemovalPolicy(policy: RemovalPolicy): void

policyRequired

  • Type: @alicloud/ros-cdk-core.RemovalPolicy

fetchCondition

public fetchCondition(): RosCondition

fetchDependency

public fetchDependency(): string[]

fetchResourceDesc

public fetchResourceDesc(): string

getAtt

public getAtt(name: string): IResolvable

nameRequired

  • Type: string

setMetadata

public setMetadata(key: string, value: any): void

keyRequired

  • Type: string

valueRequired

  • Type: any

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import { datasource } from '@alicloud/ros-cdk-ess'
datasource.ScalingRule.isConstruct(x: any)

Return whether the given object is a Construct.

xRequired

  • Type: any

Properties

Name Type Description
node @alicloud/ros-cdk-core.ConstructNode The construct tree node associated with this construct.
env @alicloud/ros-cdk-core.IResourceEnvironment The environment this resource belongs to.
ref string No description.
stack @alicloud/ros-cdk-core.Stack The stack in which this resource is defined.
resource @alicloud/ros-cdk-core.RosResource No description.
attrAdjustmentType string | @alicloud/ros-cdk-core.IResolvable Attribute AdjustmentType: The adjustment method of the scaling rule.
attrAdjustmentValue string | @alicloud/ros-cdk-core.IResolvable Attribute AdjustmentValue: The number of instances that must be scaled based on the scaling rule.
attrAlarms string | @alicloud/ros-cdk-core.IResolvable Attribute Alarms: The event-triggered tasks that are associated with the scaling rule.
attrCooldown string | @alicloud/ros-cdk-core.IResolvable Attribute Cooldown: The cooldown period of the scaling rule.
attrDisableScaleIn string | @alicloud/ros-cdk-core.IResolvable Attribute DisableScaleIn: Indicates whether scale-in is disabled.
attrEstimatedInstanceWarmup string | @alicloud/ros-cdk-core.IResolvable Attribute EstimatedInstanceWarmup: The warm-up period of instances.
attrInitialMaxSize string | @alicloud/ros-cdk-core.IResolvable Attribute InitialMaxSize: The maximum number of ECS instances that can be contained in the scaling group.
attrMaxSize string | @alicloud/ros-cdk-core.IResolvable Attribute MaxSize: The maximum number of ECS instances that can be contained in the scaling group.
attrMetricName string | @alicloud/ros-cdk-core.IResolvable Attribute MetricName: The name of the metric of the event-triggered task that is associated with the scaling rule.
attrMinAdjustmentMagnitude string | @alicloud/ros-cdk-core.IResolvable Attribute MinAdjustmentMagnitude: The minimum number of instances that must be scaled.
attrMinSize string | @alicloud/ros-cdk-core.IResolvable Attribute MinSize: The minimum number of ECS instances that must be contained in the scaling group.
attrPredictiveScalingMode string | @alicloud/ros-cdk-core.IResolvable Attribute PredictiveScalingMode: The mode of the predictive scaling rule.
attrPredictiveTaskBufferTime string | @alicloud/ros-cdk-core.IResolvable Attribute PredictiveTaskBufferTime: The amount of buffer time before prediction tasks are executed.
attrPredictiveValueBehavior string | @alicloud/ros-cdk-core.IResolvable Attribute PredictiveValueBehavior: The action on the predicted maximum value.
attrPredictiveValueBuffer string | @alicloud/ros-cdk-core.IResolvable Attribute PredictiveValueBuffer: The ratio based on which the predicted value is increased when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer.
attrScaleInEvaluationCount string | @alicloud/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 string | @alicloud/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 string | @alicloud/ros-cdk-core.IResolvable Attribute ScalingGroupId: The ID of the scaling group.
attrScalingRuleAri string | @alicloud/ros-cdk-core.IResolvable Attribute ScalingRuleAri: The unique identifier of the scaling rule.
attrScalingRuleId string | @alicloud/ros-cdk-core.IResolvable Attribute ScalingRuleId: The ID of the scaling rule.
attrScalingRuleName string | @alicloud/ros-cdk-core.IResolvable Attribute ScalingRuleName: The name of the scaling rule.
attrScalingRuleType string | @alicloud/ros-cdk-core.IResolvable Attribute ScalingRuleType: The type of the scaling rule.
attrStepAdjustments string | @alicloud/ros-cdk-core.IResolvable Attribute StepAdjustments: The step adjustments of the step scaling rule.
attrTargetValue string | @alicloud/ros-cdk-core.IResolvable Attribute TargetValue: The target value of the metric.
props ScalingRuleProps No description.

nodeRequired

public readonly node: ConstructNode;
  • Type: @alicloud/ros-cdk-core.ConstructNode

The construct tree node associated with this construct.


envRequired

public readonly env: IResourceEnvironment;
  • Type: @alicloud/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 readonly ref: string;
  • Type: string

stackRequired

public readonly stack: Stack;
  • Type: @alicloud/ros-cdk-core.Stack

The stack in which this resource is defined.


resourceOptional

public readonly resource: RosResource;
  • Type: @alicloud/ros-cdk-core.RosResource

attrAdjustmentTypeRequired

public readonly attrAdjustmentType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute AdjustmentType: The adjustment method of the scaling rule.


attrAdjustmentValueRequired

public readonly attrAdjustmentValue: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


attrAlarmsRequired

public readonly attrAlarms: string | IResolvable;
  • Type: string | @alicloud/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 readonly attrCooldown: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute Cooldown: The cooldown period of the scaling rule.


attrDisableScaleInRequired

public readonly attrDisableScaleIn: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute DisableScaleIn: Indicates whether scale-in is disabled.


attrEstimatedInstanceWarmupRequired

public readonly attrEstimatedInstanceWarmup: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute EstimatedInstanceWarmup: The warm-up period of instances.


attrInitialMaxSizeRequired

public readonly attrInitialMaxSize: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


attrMaxSizeRequired

public readonly attrMaxSize: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


attrMetricNameRequired

public readonly attrMetricName: string | IResolvable;
  • Type: string | @alicloud/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 readonly attrMinAdjustmentMagnitude: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


attrMinSizeRequired

public readonly attrMinSize: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


attrPredictiveScalingModeRequired

public readonly attrPredictiveScalingMode: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute PredictiveScalingMode: The mode of the predictive scaling rule.


attrPredictiveTaskBufferTimeRequired

public readonly attrPredictiveTaskBufferTime: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


attrPredictiveValueBehaviorRequired

public readonly attrPredictiveValueBehavior: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute PredictiveValueBehavior: The action on the predicted maximum value.


attrPredictiveValueBufferRequired

public readonly attrPredictiveValueBuffer: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute PredictiveValueBuffer: The ratio based on which the predicted value is increased when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer.


attrScaleInEvaluationCountRequired

public readonly attrScaleInEvaluationCount: string | IResolvable;
  • Type: string | @alicloud/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 readonly attrScaleOutEvaluationCount: string | IResolvable;
  • Type: string | @alicloud/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 readonly attrScalingGroupId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute ScalingGroupId: The ID of the scaling group.


attrScalingRuleAriRequired

public readonly attrScalingRuleAri: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute ScalingRuleAri: The unique identifier of the scaling rule.


attrScalingRuleIdRequired

public readonly attrScalingRuleId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute ScalingRuleId: The ID of the scaling rule.


attrScalingRuleNameRequired

public readonly attrScalingRuleName: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute ScalingRuleName: The name of the scaling rule.


attrScalingRuleTypeRequired

public readonly attrScalingRuleType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute ScalingRuleType: The type of the scaling rule.


attrStepAdjustmentsRequired

public readonly attrStepAdjustments: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

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


attrTargetValueRequired

public readonly attrTargetValue: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute TargetValue: The target value of the metric.


propsRequired

public readonly props: ScalingRuleProps;