Skip to content
v2.275.0

RetentionTriggersProperty Struct ​

Defines the specific triggers that cause instances to be retained in a Retained state rather than terminated.

Each trigger corresponds to a different failure scenario during the instance lifecycle. This allows fine-grained control over when to preserve instances for manual intervention.

Example ​

ts
// 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 retentionTriggersProperty: autoscaling.CfnAutoScalingGroup.RetentionTriggersProperty = {
  terminateHookAbandon: 'terminateHookAbandon',
};

Properties ​

terminateHookAbandonoptionalstringterminate_hook_abandonoptionalstrterminateHookAbandonoptionalStringTerminateHookAbandonoptionalstringTerminateHookAbandonoptional*string#
Specifies the action when a termination lifecycle hook is abandoned due to failure, timeout, or explicit abandonment (calling CompleteLifecycleAction).

Set to Retain to move instances to a Retained state. Set to Terminate for default termination behavior.

Retained instances don't count toward desired capacity and remain until you call TerminateInstanceInAutoScalingGroup .