Class: AWSCDK::Autoscaling::CfnAutoScalingGroup::InstanceLifecyclePolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::CfnAutoScalingGroup::InstanceLifecyclePolicyProperty
- Defined in:
- autoscaling/cfn_auto_scaling_group.rb
Overview
The instance lifecycle policy for the Auto Scaling group.
This policy controls instance behavior when an instance transitions through its lifecycle states. Configure retention triggers to specify when instances should move to a Retained state instead of automatic termination.
For more information, see Control instance retention with instance lifecycle policies in the Amazon EC2 Auto Scaling User Guide .
Instance Attribute Summary collapse
-
#retention_triggers ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the conditions that trigger instance retention behavior.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(retention_triggers: nil) ⇒ InstanceLifecyclePolicyProperty
constructor
A new instance of InstanceLifecyclePolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(retention_triggers: nil) ⇒ InstanceLifecyclePolicyProperty
Returns a new instance of InstanceLifecyclePolicyProperty.
1396 1397 1398 1399 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 1396 def initialize(retention_triggers: nil) @retention_triggers = retention_triggers.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::RetentionTriggersProperty.new(**retention_triggers.transform_keys(&:to_sym)) : retention_triggers Jsii::Type.check_type(@retention_triggers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLlJldGVudGlvblRyaWdnZXJzUHJvcGVydHkifV19fQ==")), "retentionTriggers") unless @retention_triggers.nil? end |
Instance Attribute Details
#retention_triggers ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies the conditions that trigger instance retention behavior.
These triggers determine when instances should move to a Retained state instead of automatic termination. This allows you to maintain control over instance management when lifecycles transition and operations fail.
1407 1408 1409 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 1407 def retention_triggers @retention_triggers end |
Class Method Details
.jsii_properties ⇒ Object
1409 1410 1411 1412 1413 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 1409 def self.jsii_properties { :retention_triggers => "retentionTriggers", } end |
Instance Method Details
#to_jsii ⇒ Object
1415 1416 1417 1418 1419 1420 1421 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 1415 def to_jsii result = {} result.merge!({ "retentionTriggers" => @retention_triggers, }) result.compact end |