Class: AWSCDK::EMR::CfnCluster::SimpleScalingPolicyConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnCluster::SimpleScalingPolicyConfigurationProperty
- Defined in:
- emr/cfn_cluster.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.
2893 2894 2895 2896 2897 2898 2899 2900 |
# File 'emr/cfn_cluster.rb', line 2893 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.
2915 2916 2917 |
# File 'emr/cfn_cluster.rb', line 2915 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.
2922 2923 2924 |
# File 'emr/cfn_cluster.rb', line 2922 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.
2908 2909 2910 |
# File 'emr/cfn_cluster.rb', line 2908 def scaling_adjustment @scaling_adjustment end |
Class Method Details
.jsii_properties ⇒ Object
2924 2925 2926 2927 2928 2929 2930 |
# File 'emr/cfn_cluster.rb', line 2924 def self.jsii_properties { :scaling_adjustment => "scalingAdjustment", :adjustment_type => "adjustmentType", :cool_down => "coolDown", } end |
Instance Method Details
#to_jsii ⇒ Object
2932 2933 2934 2935 2936 2937 2938 2939 2940 |
# File 'emr/cfn_cluster.rb', line 2932 def to_jsii result = {} result.merge!({ "scalingAdjustment" => @scaling_adjustment, "adjustmentType" => @adjustment_type, "coolDown" => @cool_down, }) result.compact end |