class CfnLifecycleHookPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.AutoScaling.Mixins.CfnLifecycleHookPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsautoscaling/mixins#CfnLifecycleHookPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.autoscaling.mixins.CfnLifecycleHookPropsMixin |
Python | aws_cdk.mixins_preview.aws_autoscaling.mixins.CfnLifecycleHookPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_autoscaling » mixins » CfnLifecycleHookPropsMixin |
Implements
IMixin
Extends
Mixin
The AWS::AutoScaling::LifecycleHook resource specifies lifecycle hooks for an Auto Scaling group.
These hooks let you create solutions that are aware of events in the Auto Scaling instance lifecycle, and then perform a custom action on instances when the corresponding lifecycle event occurs. A lifecycle hook provides a specified amount of time (one hour by default) to wait for the action to complete before the instance transitions to the next state.
Use lifecycle hooks to prepare new instances for use or to delay them from being registered behind a load balancer before their configuration has been applied completely. You can also use lifecycle hooks to prepare running instances to be terminated by, for example, downloading logs or other data.
For more information, see Amazon EC2 Auto Scaling lifecycle hooks 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 { mixins } from '@aws-cdk/mixins-preview';
import { mixins as autoscaling_mixins } from '@aws-cdk/mixins-preview/aws-autoscaling';
const cfnLifecycleHookPropsMixin = new autoscaling_mixins.CfnLifecycleHookPropsMixin({
autoScalingGroupName: 'autoScalingGroupName',
defaultResult: 'defaultResult',
heartbeatTimeout: 123,
lifecycleHookName: 'lifecycleHookName',
lifecycleTransition: 'lifecycleTransition',
notificationMetadata: 'notificationMetadata',
notificationTargetArn: 'notificationTargetArn',
roleArn: 'roleArn',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnLifecycleHookPropsMixin(props: CfnLifecycleHookMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Lifecycle Hook Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::AutoScaling::LifecycleHook.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript