Class: AWSCDK::EMR::CfnInstanceGroupConfig::SimpleScalingPolicyConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnInstanceGroupConfig::SimpleScalingPolicyConfigurationProperty
- Defined in:
- emr/cfn_instance_group_config.rb
Overview
SimpleScalingPolicyConfiguration is a subproperty of the ScalingAction property type.
SimpleScalingPolicyConfiguration determines how an automatic scaling action adds or removes instances, the cooldown period, and the number of EC2 instances that are added each time the CloudWatch metric alarm condition is satisfied.
Instance Attribute Summary collapse
-
#adjustment_type ⇒ String?
readonly
The way in which Amazon EC2 instances are added (if
ScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered. -
#cool_down ⇒ Numeric?
readonly
The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
-
#scaling_adjustment ⇒ Numeric
readonly
The amount by which to scale in or scale out, based on the specified
AdjustmentType.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(scaling_adjustment:, adjustment_type: nil, cool_down: nil) ⇒ SimpleScalingPolicyConfigurationProperty
constructor
A new instance of SimpleScalingPolicyConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(scaling_adjustment:, adjustment_type: nil, cool_down: nil) ⇒ SimpleScalingPolicyConfigurationProperty
Returns a new instance of SimpleScalingPolicyConfigurationProperty.
1202 1203 1204 1205 1206 1207 1208 1209 |
# File 'emr/cfn_instance_group_config.rb', line 1202 def initialize(scaling_adjustment:, adjustment_type: nil, cool_down: nil) @scaling_adjustment = scaling_adjustment Jsii::Type.check_type(@scaling_adjustment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scalingAdjustment") @adjustment_type = adjustment_type Jsii::Type.check_type(@adjustment_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "adjustmentType") unless @adjustment_type.nil? @cool_down = cool_down Jsii::Type.check_type(@cool_down, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "coolDown") unless @cool_down.nil? end |
Instance Attribute Details
#adjustment_type ⇒ String? (readonly)
The way in which Amazon EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered.
CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count increments or decrements by ScalingAdjustment , which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment , 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 Amazon EC2 instances specified by ScalingAdjustment , which should be expressed as a positive integer.
1224 1225 1226 |
# File 'emr/cfn_instance_group_config.rb', line 1224 def adjustment_type @adjustment_type end |
#cool_down ⇒ Numeric? (readonly)
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.
1231 1232 1233 |
# File 'emr/cfn_instance_group_config.rb', line 1231 def cool_down @cool_down end |
#scaling_adjustment ⇒ Numeric (readonly)
The amount by which to scale in or scale out, based on the specified AdjustmentType .
A positive value adds to the instance group's Amazon EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY , the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY , the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.
1217 1218 1219 |
# File 'emr/cfn_instance_group_config.rb', line 1217 def scaling_adjustment @scaling_adjustment end |
Class Method Details
.jsii_properties ⇒ Object
1233 1234 1235 1236 1237 1238 1239 |
# File 'emr/cfn_instance_group_config.rb', line 1233 def self.jsii_properties { :scaling_adjustment => "scalingAdjustment", :adjustment_type => "adjustmentType", :cool_down => "coolDown", } end |
Instance Method Details
#to_jsii ⇒ Object
1241 1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'emr/cfn_instance_group_config.rb', line 1241 def to_jsii result = {} result.merge!({ "scalingAdjustment" => @scaling_adjustment, "adjustmentType" => @adjustment_type, "coolDown" => @cool_down, }) result.compact end |