Class: AWSCDK::Autoscaling::WarmPoolOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::WarmPoolOptions
- Defined in:
- autoscaling/warm_pool_options.rb
Overview
Options for a warm pool.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#max_group_prepared_capacity ⇒ Numeric?
readonly
The maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.
-
#min_size ⇒ Numeric?
readonly
The minimum number of instances to maintain in the warm pool.
-
#pool_state ⇒ AWSCDK::Autoscaling::PoolState?
readonly
The instance state to transition to after the lifecycle actions are complete.
-
#reuse_on_scale_in ⇒ Boolean?
readonly
Indicates whether instances in the Auto Scaling group can be returned to the warm pool on scale in.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_group_prepared_capacity: nil, min_size: nil, pool_state: nil, reuse_on_scale_in: nil) ⇒ WarmPoolOptions
constructor
A new instance of WarmPoolOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_group_prepared_capacity: nil, min_size: nil, pool_state: nil, reuse_on_scale_in: nil) ⇒ WarmPoolOptions
Returns a new instance of WarmPoolOptions.
11 12 13 14 15 16 17 18 19 20 |
# File 'autoscaling/warm_pool_options.rb', line 11 def initialize(max_group_prepared_capacity: nil, min_size: nil, pool_state: nil, reuse_on_scale_in: nil) @max_group_prepared_capacity = max_group_prepared_capacity Jsii::Type.check_type(@max_group_prepared_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxGroupPreparedCapacity") unless @max_group_prepared_capacity.nil? @min_size = min_size Jsii::Type.check_type(@min_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minSize") unless @min_size.nil? @pool_state = pool_state Jsii::Type.check_type(@pool_state, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuUG9vbFN0YXRlIn0=")), "poolState") unless @pool_state.nil? @reuse_on_scale_in = reuse_on_scale_in Jsii::Type.check_type(@reuse_on_scale_in, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "reuseOnScaleIn") unless @reuse_on_scale_in.nil? end |
Instance Attribute Details
#max_group_prepared_capacity ⇒ Numeric? (readonly)
Default: - max size of the Auto Scaling group
The maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.
If the value is not specified, Amazon EC2 Auto Scaling launches and maintains the difference between the group's maximum capacity and its desired capacity.
29 30 31 |
# File 'autoscaling/warm_pool_options.rb', line 29 def max_group_prepared_capacity @max_group_prepared_capacity end |
#min_size ⇒ Numeric? (readonly)
Default: 0
The minimum number of instances to maintain in the warm pool.
34 35 36 |
# File 'autoscaling/warm_pool_options.rb', line 34 def min_size @min_size end |
#pool_state ⇒ AWSCDK::Autoscaling::PoolState? (readonly)
Default: PoolState.STOPPED
The instance state to transition to after the lifecycle actions are complete.
39 40 41 |
# File 'autoscaling/warm_pool_options.rb', line 39 def pool_state @pool_state end |
#reuse_on_scale_in ⇒ Boolean? (readonly)
Default: false
Indicates whether instances in the Auto Scaling group can be returned to the warm pool on scale in.
If the value is not specified, instances in the Auto Scaling group will be terminated when the group scales in.
47 48 49 |
# File 'autoscaling/warm_pool_options.rb', line 47 def reuse_on_scale_in @reuse_on_scale_in end |
Class Method Details
.jsii_properties ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'autoscaling/warm_pool_options.rb', line 49 def self.jsii_properties { :max_group_prepared_capacity => "maxGroupPreparedCapacity", :min_size => "minSize", :pool_state => "poolState", :reuse_on_scale_in => "reuseOnScaleIn", } end |
Instance Method Details
#to_jsii ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'autoscaling/warm_pool_options.rb', line 58 def to_jsii result = {} result.merge!({ "maxGroupPreparedCapacity" => @max_group_prepared_capacity, "minSize" => @min_size, "poolState" => @pool_state, "reuseOnScaleIn" => @reuse_on_scale_in, }) result.compact end |