interface InstanceLifecyclePolicyProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AutoScaling.CfnAutoScalingGroup.InstanceLifecyclePolicyProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#CfnAutoScalingGroup_InstanceLifecyclePolicyProperty |
Java | software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.InstanceLifecyclePolicyProperty |
Python | aws_cdk.aws_autoscaling.CfnAutoScalingGroup.InstanceLifecyclePolicyProperty |
TypeScript | aws-cdk-lib » aws_autoscaling » CfnAutoScalingGroup » InstanceLifecyclePolicyProperty |
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 .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
const instanceLifecyclePolicyProperty: autoscaling.CfnAutoScalingGroup.InstanceLifecyclePolicyProperty = {
retentionTriggers: {
terminateHookAbandon: 'terminateHookAbandon',
},
};
Properties
| Name | Type | Description |
|---|---|---|
| retention | IResolvable | Retention | Specifies the conditions that trigger instance retention behavior. |
retentionTriggers?
Type:
IResolvable | Retention
(optional)
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.

.NET
Go
Java
Python
TypeScript