Class: AWSCDK::Autoscaling::WarmPoolProps
- Inherits:
-
WarmPoolOptions
- Object
- WarmPoolOptions
- AWSCDK::Autoscaling::WarmPoolProps
- Defined in:
- autoscaling/warm_pool_props.rb
Overview
Properties for a warm pool.
Instance Attribute Summary collapse
-
#auto_scaling_group ⇒ AWSCDK::Interfaces::AWSAutoscaling::IAutoScalingGroupRef
readonly
The Auto Scaling group to add the warm pool to.
-
#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, auto_scaling_group:) ⇒ WarmPoolProps
constructor
A new instance of WarmPoolProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_group_prepared_capacity: nil, min_size: nil, pool_state: nil, reuse_on_scale_in: nil, auto_scaling_group:) ⇒ WarmPoolProps
Returns a new instance of WarmPoolProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'autoscaling/warm_pool_props.rb', line 12 def initialize(max_group_prepared_capacity: nil, min_size: nil, pool_state: nil, reuse_on_scale_in: nil, auto_scaling_group:) @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? @auto_scaling_group = auto_scaling_group Jsii::Type.check_type(@auto_scaling_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hdXRvc2NhbGluZy5JQXV0b1NjYWxpbmdHcm91cFJlZiJ9")), "autoScalingGroup") end |
Instance Attribute Details
#auto_scaling_group ⇒ AWSCDK::Interfaces::AWSAutoscaling::IAutoScalingGroupRef (readonly)
The Auto Scaling group to add the warm pool to.
54 55 56 |
# File 'autoscaling/warm_pool_props.rb', line 54 def auto_scaling_group @auto_scaling_group end |
#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.
32 33 34 |
# File 'autoscaling/warm_pool_props.rb', line 32 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.
37 38 39 |
# File 'autoscaling/warm_pool_props.rb', line 37 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.
42 43 44 |
# File 'autoscaling/warm_pool_props.rb', line 42 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.
50 51 52 |
# File 'autoscaling/warm_pool_props.rb', line 50 def reuse_on_scale_in @reuse_on_scale_in end |
Class Method Details
.jsii_properties ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'autoscaling/warm_pool_props.rb', line 56 def self.jsii_properties { :max_group_prepared_capacity => "maxGroupPreparedCapacity", :min_size => "minSize", :pool_state => "poolState", :reuse_on_scale_in => "reuseOnScaleIn", :auto_scaling_group => "autoScalingGroup", } end |
Instance Method Details
#to_jsii ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'autoscaling/warm_pool_props.rb', line 66 def to_jsii result = {} result.merge!(super) result.merge!({ "maxGroupPreparedCapacity" => @max_group_prepared_capacity, "minSize" => @min_size, "poolState" => @pool_state, "reuseOnScaleIn" => @reuse_on_scale_in, "autoScalingGroup" => @auto_scaling_group, }) result.compact end |