interface BasicLifecycleHookProps
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.AutoScaling.BasicLifecycleHookProps | 
|  Java | software.amazon.awscdk.services.autoscaling.BasicLifecycleHookProps | 
|  Python | aws_cdk.aws_autoscaling.BasicLifecycleHookProps | 
|  TypeScript (source) | @aws-cdk/aws-autoscaling»BasicLifecycleHookProps | 
Basic properties for a lifecycle hook.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as autoscaling from '@aws-cdk/aws-autoscaling';
import * as iam from '@aws-cdk/aws-iam';
import * as cdk from '@aws-cdk/core';
declare const lifecycleHookTarget: autoscaling.ILifecycleHookTarget;
declare const role: iam.Role;
const basicLifecycleHookProps: autoscaling.BasicLifecycleHookProps = {
  lifecycleTransition: autoscaling.LifecycleTransition.INSTANCE_LAUNCHING,
  // the properties below are optional
  defaultResult: autoscaling.DefaultResult.CONTINUE,
  heartbeatTimeout: cdk.Duration.minutes(30),
  lifecycleHookName: 'lifecycleHookName',
  notificationMetadata: 'notificationMetadata',
  notificationTarget: lifecycleHookTarget,
  role: role,
};
Properties
| Name | Type | Description | 
|---|---|---|
| lifecycle | Lifecycle | The state of the Amazon EC2 instance to which you want to attach the lifecycle hook. | 
| default | Default | The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. | 
| heartbeat | Duration | Maximum time between calls to RecordLifecycleActionHeartbeat for the hook. | 
| lifecycle | string | Name of the lifecycle hook. | 
| notification | string | Additional data to pass to the lifecycle hook target. | 
| notification | ILifecycle | The target of the lifecycle hook. | 
| role? | IRole | The role that allows publishing to the notification target. | 
lifecycleTransition
Type:
Lifecycle
The state of the Amazon EC2 instance to which you want to attach the lifecycle hook.
defaultResult?
Type:
Default
(optional, default: Continue)
The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs.
heartbeatTimeout?
Type:
Duration
(optional, default: No heartbeat timeout.)
Maximum time between calls to RecordLifecycleActionHeartbeat for the hook.
If the lifecycle hook times out, perform the action in DefaultResult.
lifecycleHookName?
Type:
string
(optional, default: Automatically generated name.)
Name of the lifecycle hook.
notificationMetadata?
Type:
string
(optional, default: No metadata.)
Additional data to pass to the lifecycle hook target.
notificationTarget?
Type:
ILifecycle
(optional, default: No target.)
The target of the lifecycle hook.
role?
Type:
IRole
(optional, default: A role will be created if a target is provided. Otherwise, no role is created.)
The role that allows publishing to the notification target.
