Skip to content

ScalingRule

  • Implements: 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

from ros_cdk_ess import datasource
datasource.ScalingRule(
  scope: Construct,
  id: str,
  scaling_rule_id: typing.Union[str, IResolvable],
  refresh_options: typing.Union[str, IResolvable] = None,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
scaling_rule_id typing.Union[str, ros_cdk_core.IResolvable] Property scalingRuleId: The ID of the scaling rule that you want to query.
refresh_options typing.Union[str, ros_cdk_core.IResolvable] Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

scaling_rule_idRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property scalingRuleId: The ID of the scaling rule that you want to query.


refresh_optionsOptional

  • Type: typing.Union[str, 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.

enable_resource_property_constraintOptional

  • Type: bool

Methods

Name Description
to_string Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
add_condition No description.
add_count No description.
add_dependency No description.
add_resource_desc No description.
apply_removal_policy No description.
fetch_condition No description.
fetch_dependency No description.
fetch_resource_desc No description.
get_att No description.
set_metadata No description.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

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: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

fetch_condition

def fetch_condition() -> RosCondition

fetch_dependency

def fetch_dependency() -> typing.List[str]

fetch_resource_desc

def fetch_resource_desc() -> str

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

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

is_construct

from ros_cdk_ess import datasource
datasource.ScalingRule.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
env ros_cdk_core.IResourceEnvironment The environment this resource belongs to.
ref str No description.
stack ros_cdk_core.Stack The stack in which this resource is defined.
resource ros_cdk_core.RosResource No description.
attr_adjustment_type typing.Union[str, ros_cdk_core.IResolvable] Attribute AdjustmentType: The adjustment method of the scaling rule.
attr_adjustment_value typing.Union[str, ros_cdk_core.IResolvable] Attribute AdjustmentValue: The number of instances that must be scaled based on the scaling rule.
attr_alarms typing.Union[str, ros_cdk_core.IResolvable] Attribute Alarms: The event-triggered tasks that are associated with the scaling rule.
attr_cooldown typing.Union[str, ros_cdk_core.IResolvable] Attribute Cooldown: The cooldown period of the scaling rule.
attr_disable_scale_in typing.Union[str, ros_cdk_core.IResolvable] Attribute DisableScaleIn: Indicates whether scale-in is disabled.
attr_estimated_instance_warmup typing.Union[str, ros_cdk_core.IResolvable] Attribute EstimatedInstanceWarmup: The warm-up period of instances.
attr_initial_max_size typing.Union[str, ros_cdk_core.IResolvable] Attribute InitialMaxSize: The maximum number of ECS instances that can be contained in the scaling group.
attr_max_size typing.Union[str, ros_cdk_core.IResolvable] Attribute MaxSize: The maximum number of ECS instances that can be contained in the scaling group.
attr_metric_name typing.Union[str, ros_cdk_core.IResolvable] Attribute MetricName: The name of the metric of the event-triggered task that is associated with the scaling rule.
attr_min_adjustment_magnitude typing.Union[str, ros_cdk_core.IResolvable] Attribute MinAdjustmentMagnitude: The minimum number of instances that must be scaled.
attr_min_size typing.Union[str, ros_cdk_core.IResolvable] Attribute MinSize: The minimum number of ECS instances that must be contained in the scaling group.
attr_predictive_scaling_mode typing.Union[str, ros_cdk_core.IResolvable] Attribute PredictiveScalingMode: The mode of the predictive scaling rule.
attr_predictive_task_buffer_time typing.Union[str, ros_cdk_core.IResolvable] Attribute PredictiveTaskBufferTime: The amount of buffer time before prediction tasks are executed.
attr_predictive_value_behavior typing.Union[str, ros_cdk_core.IResolvable] Attribute PredictiveValueBehavior: The action on the predicted maximum value.
attr_predictive_value_buffer typing.Union[str, ros_cdk_core.IResolvable] Attribute PredictiveValueBuffer: The ratio based on which the predicted value is increased when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer.
attr_scale_in_evaluation_count typing.Union[str, 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.
attr_scale_out_evaluation_count typing.Union[str, 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.
attr_scaling_group_id typing.Union[str, ros_cdk_core.IResolvable] Attribute ScalingGroupId: The ID of the scaling group.
attr_scaling_rule_ari typing.Union[str, ros_cdk_core.IResolvable] Attribute ScalingRuleAri: The unique identifier of the scaling rule.
attr_scaling_rule_id typing.Union[str, ros_cdk_core.IResolvable] Attribute ScalingRuleId: The ID of the scaling rule.
attr_scaling_rule_name typing.Union[str, ros_cdk_core.IResolvable] Attribute ScalingRuleName: The name of the scaling rule.
attr_scaling_rule_type typing.Union[str, ros_cdk_core.IResolvable] Attribute ScalingRuleType: The type of the scaling rule.
attr_step_adjustments typing.Union[str, ros_cdk_core.IResolvable] Attribute StepAdjustments: The step adjustments of the step scaling rule.
attr_target_value typing.Union[str, ros_cdk_core.IResolvable] Attribute TargetValue: The target value of the metric.
props ScalingRuleProps No description.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


envRequired

env: IResourceEnvironment
  • Type: 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

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_adjustment_typeRequired

attr_adjustment_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute AdjustmentType: The adjustment method of the scaling rule.


attr_adjustment_valueRequired

attr_adjustment_value: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


attr_alarmsRequired

attr_alarms: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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.


attr_cooldownRequired

attr_cooldown: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute Cooldown: The cooldown period of the scaling rule.


attr_disable_scale_inRequired

attr_disable_scale_in: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute DisableScaleIn: Indicates whether scale-in is disabled.


attr_estimated_instance_warmupRequired

attr_estimated_instance_warmup: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute EstimatedInstanceWarmup: The warm-up period of instances.


attr_initial_max_sizeRequired

attr_initial_max_size: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


attr_max_sizeRequired

attr_max_size: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


attr_metric_nameRequired

attr_metric_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute MetricName: The name of the metric of the event-triggered task that is associated with the scaling rule.


attr_min_adjustment_magnitudeRequired

attr_min_adjustment_magnitude: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


attr_min_sizeRequired

attr_min_size: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


attr_predictive_scaling_modeRequired

attr_predictive_scaling_mode: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute PredictiveScalingMode: The mode of the predictive scaling rule.


attr_predictive_task_buffer_timeRequired

attr_predictive_task_buffer_time: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


attr_predictive_value_behaviorRequired

attr_predictive_value_behavior: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute PredictiveValueBehavior: The action on the predicted maximum value.


attr_predictive_value_bufferRequired

attr_predictive_value_buffer: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


attr_scale_in_evaluation_countRequired

attr_scale_in_evaluation_count: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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.


attr_scale_out_evaluation_countRequired

attr_scale_out_evaluation_count: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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.


attr_scaling_group_idRequired

attr_scaling_group_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ScalingGroupId: The ID of the scaling group.


attr_scaling_rule_ariRequired

attr_scaling_rule_ari: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ScalingRuleAri: The unique identifier of the scaling rule.


attr_scaling_rule_idRequired

attr_scaling_rule_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ScalingRuleId: The ID of the scaling rule.


attr_scaling_rule_nameRequired

attr_scaling_rule_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ScalingRuleName: The name of the scaling rule.


attr_scaling_rule_typeRequired

attr_scaling_rule_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ScalingRuleType: The type of the scaling rule.


attr_step_adjustmentsRequired

attr_step_adjustments: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


attr_target_valueRequired

attr_target_value: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute TargetValue: The target value of the metric.


propsRequired

props: ScalingRuleProps