Class: AWSCDK::StepFunctionsTasks::EMRCreateCluster::SimpleScalingPolicyConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::StepFunctionsTasks::EMRCreateCluster::SimpleScalingPolicyConfigurationProperty
- Defined in:
- step_functions_tasks/emr_create_cluster.rb
Overview
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.
Instance Attribute Summary collapse
-
#adjustment_type ⇒ AWSCDK::StepFunctionsTasks::EMRCreateCluster::ScalingAdjustmentType?
readonly
The way in which 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.
-
#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.
2533 2534 2535 2536 2537 2538 2539 2540 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 2533 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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5FbXJDcmVhdGVDbHVzdGVyLlNjYWxpbmdBZGp1c3RtZW50VHlwZSJ9")), "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 ⇒ AWSCDK::StepFunctionsTasks::EMRCreateCluster::ScalingAdjustmentType? (readonly)
Default: - None
The way in which 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.
2554 2555 2556 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 2554 def adjustment_type @adjustment_type end |
#cool_down ⇒ Numeric? (readonly)
Default: 0
The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
2559 2560 2561 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 2559 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 EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer.
2549 2550 2551 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 2549 def scaling_adjustment @scaling_adjustment end |
Class Method Details
.jsii_properties ⇒ Object
2561 2562 2563 2564 2565 2566 2567 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 2561 def self.jsii_properties { :scaling_adjustment => "scalingAdjustment", :adjustment_type => "adjustmentType", :cool_down => "coolDown", } end |
Instance Method Details
#to_jsii ⇒ Object
2569 2570 2571 2572 2573 2574 2575 2576 2577 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 2569 def to_jsii result = {} result.merge!({ "scalingAdjustment" => @scaling_adjustment, "adjustmentType" => @adjustment_type, "coolDown" => @cool_down, }) result.compact end |