Class: AWSCDK::EMR::CfnInstanceGroupConfig::AutoScalingPolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnInstanceGroupConfig::AutoScalingPolicyProperty
- Defined in:
- emr/cfn_instance_group_config.rb
Overview
AutoScalingPolicy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.
For more information, see Using Automatic Scaling in Amazon EMR in the Amazon EMR Management Guide .
Instance Attribute Summary collapse
-
#constraints ⇒ AWSCDK::IResolvable, AWSCDK::EMR::CfnInstanceGroupConfig::ScalingConstraintsProperty
readonly
The upper and lower Amazon EC2 instance limits for an automatic scaling policy.
-
#rules ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::EMR::CfnInstanceGroupConfig::ScalingRuleProperty>
readonly
The scale-in and scale-out rules that comprise the automatic scaling policy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(constraints:, rules:) ⇒ AutoScalingPolicyProperty
constructor
A new instance of AutoScalingPolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(constraints:, rules:) ⇒ AutoScalingPolicyProperty
Returns a new instance of AutoScalingPolicyProperty.
637 638 639 640 641 642 |
# File 'emr/cfn_instance_group_config.rb', line 637 def initialize(constraints:, rules:) @constraints = constraints.is_a?(Hash) ? ::AWSCDK::EMR::CfnInstanceGroupConfig::ScalingConstraintsProperty.new(**constraints.transform_keys(&:to_sym)) : constraints Jsii::Type.check_type(@constraints, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbXIuQ2ZuSW5zdGFuY2VHcm91cENvbmZpZy5TY2FsaW5nQ29uc3RyYWludHNQcm9wZXJ0eSJ9XX19")), "constraints") @rules = rules Jsii::Type.check_type(@rules, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZW1yLkNmbkluc3RhbmNlR3JvdXBDb25maWcuU2NhbGluZ1J1bGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "rules") end |
Instance Attribute Details
#constraints ⇒ AWSCDK::IResolvable, AWSCDK::EMR::CfnInstanceGroupConfig::ScalingConstraintsProperty (readonly)
The upper and lower Amazon EC2 instance limits for an automatic scaling policy.
Automatic scaling activity will not cause an instance group to grow above or below these limits.
650 651 652 |
# File 'emr/cfn_instance_group_config.rb', line 650 def constraints @constraints end |
#rules ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::EMR::CfnInstanceGroupConfig::ScalingRuleProperty> (readonly)
The scale-in and scale-out rules that comprise the automatic scaling policy.
655 656 657 |
# File 'emr/cfn_instance_group_config.rb', line 655 def rules @rules end |
Class Method Details
.jsii_properties ⇒ Object
657 658 659 660 661 662 |
# File 'emr/cfn_instance_group_config.rb', line 657 def self.jsii_properties { :constraints => "constraints", :rules => "rules", } end |
Instance Method Details
#to_jsii ⇒ Object
664 665 666 667 668 669 670 671 |
# File 'emr/cfn_instance_group_config.rb', line 664 def to_jsii result = {} result.merge!({ "constraints" => @constraints, "rules" => @rules, }) result.compact end |