SimpleScalingPolicyConfiguration class
An automatic scaling configuration, which describes how the policy adds or removes instances, the cooldown period, and the number of EC2 instances that will be added each time the CloudWatch metric alarm condition is satisfied.
Constructors
- SimpleScalingPolicyConfiguration({required int scalingAdjustment, AdjustmentType? adjustmentType, int? coolDown})
-
SimpleScalingPolicyConfiguration.fromJson(Map<
String, dynamic> json) -
factory
Properties
- adjustmentType → AdjustmentType?
-
The way in which EC2 instances are added (if
ScalingAdjustment
is a positive number) or terminated (ifScalingAdjustment
is a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITY
is the default.CHANGE_IN_CAPACITY
indicates that the EC2 instance count increments or decrements byScalingAdjustment
, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITY
indicates the instance count increments or decrements by the percentage specified byScalingAdjustment
, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity.EXACT_CAPACITY
indicates the scaling activity results in an instance group with the number of EC2 instances specified byScalingAdjustment
, which should be expressed as a positive integer.final - coolDown → int?
-
The amount of time, in seconds, after a scaling activity completes before
any further trigger-related scaling activities can start. The default value
is 0.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scalingAdjustment → int
-
The amount by which to scale in or scale out, based on the specified
AdjustmentType
. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. IfAdjustmentType
is set toEXACT_CAPACITY
, the number should only be a positive integer. IfAdjustmentType
is set toPERCENT_CHANGE_IN_CAPACITY
, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited