Class: AWSCDK::EMR::CfnCluster::ScalingRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnCluster::ScalingRuleProperty
- Defined in:
- emr/cfn_cluster.rb
Overview
ScalingRule is a subproperty of the AutoScalingPolicy property type.
ScalingRule defines the scale-in or scale-out rules for scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments. The automatic scaling policy for an instance group can comprise one or more automatic scaling rules.
Instance Attribute Summary collapse
-
#action ⇒ AWSCDK::IResolvable, AWSCDK::EMR::CfnCluster::ScalingActionProperty
readonly
The conditions that trigger an automatic scaling activity.
-
#description ⇒ String?
readonly
A friendly, more verbose description of the automatic scaling rule.
-
#name ⇒ String
readonly
The name used to identify an automatic scaling rule.
-
#trigger ⇒ AWSCDK::IResolvable, AWSCDK::EMR::CfnCluster::ScalingTriggerProperty
readonly
The CloudWatch alarm definition that determines when automatic scaling activity is triggered.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action:, name:, trigger:, description: nil) ⇒ ScalingRuleProperty
constructor
A new instance of ScalingRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action:, name:, trigger:, description: nil) ⇒ ScalingRuleProperty
Returns a new instance of ScalingRuleProperty.
2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 |
# File 'emr/cfn_cluster.rb', line 2745 def initialize(action:, name:, trigger:, description: nil) @action = action.is_a?(Hash) ? ::AWSCDK::EMR::CfnCluster::ScalingActionProperty.new(**action.transform_keys(&:to_sym)) : action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbXIuQ2ZuQ2x1c3Rlci5TY2FsaW5nQWN0aW9uUHJvcGVydHkifV19fQ==")), "action") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @trigger = trigger.is_a?(Hash) ? ::AWSCDK::EMR::CfnCluster::ScalingTriggerProperty.new(**trigger.transform_keys(&:to_sym)) : trigger Jsii::Type.check_type(@trigger, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbXIuQ2ZuQ2x1c3Rlci5TY2FsaW5nVHJpZ2dlclByb3BlcnR5In1dfX0=")), "trigger") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? end |
Instance Attribute Details
#action ⇒ AWSCDK::IResolvable, AWSCDK::EMR::CfnCluster::ScalingActionProperty (readonly)
The conditions that trigger an automatic scaling activity.
2760 2761 2762 |
# File 'emr/cfn_cluster.rb', line 2760 def action @action end |
#description ⇒ String? (readonly)
A friendly, more verbose description of the automatic scaling rule.
2777 2778 2779 |
# File 'emr/cfn_cluster.rb', line 2777 def description @description end |
#name ⇒ String (readonly)
The name used to identify an automatic scaling rule.
Rule names must be unique within a scaling policy.
2767 2768 2769 |
# File 'emr/cfn_cluster.rb', line 2767 def name @name end |
#trigger ⇒ AWSCDK::IResolvable, AWSCDK::EMR::CfnCluster::ScalingTriggerProperty (readonly)
The CloudWatch alarm definition that determines when automatic scaling activity is triggered.
2772 2773 2774 |
# File 'emr/cfn_cluster.rb', line 2772 def trigger @trigger end |
Class Method Details
.jsii_properties ⇒ Object
2779 2780 2781 2782 2783 2784 2785 2786 |
# File 'emr/cfn_cluster.rb', line 2779 def self.jsii_properties { :action => "action", :name => "name", :trigger => "trigger", :description => "description", } end |
Instance Method Details
#to_jsii ⇒ Object
2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 |
# File 'emr/cfn_cluster.rb', line 2788 def to_jsii result = {} result.merge!({ "action" => @action, "name" => @name, "trigger" => @trigger, "description" => @description, }) result.compact end |