Class BasicLifecycleHookProps
- Namespace
- Amazon.CDK.AWS.AutoScaling
- Assembly
- Amazon.CDK.AWS.AutoScaling.dll
Basic properties for a lifecycle hook.
public class BasicLifecycleHookProps : IBasicLifecycleHookProps
- Inheritance
-
BasicLifecycleHookProps
- Implements
- Inherited Members
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AutoScaling;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK;
ILifecycleHookTarget lifecycleHookTarget;
Role role;
var basicLifecycleHookProps = new BasicLifecycleHookProps {
LifecycleTransition = LifecycleTransition.INSTANCE_LAUNCHING,
// the properties below are optional
DefaultResult = DefaultResult.CONTINUE,
HeartbeatTimeout = Duration.Minutes(30),
LifecycleHookName = "lifecycleHookName",
NotificationMetadata = "notificationMetadata",
NotificationTarget = lifecycleHookTarget,
Role = role
};
Remarks
ExampleMetadata: fixture=_generated
Constructors
BasicLifecycleHookProps()
public BasicLifecycleHookProps()
Properties
DefaultResult
The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs.
public DefaultResult? DefaultResult { get; set; }
Property Value
Remarks
Default: Continue
HeartbeatTimeout
Maximum time between calls to RecordLifecycleActionHeartbeat for the hook.
public Duration? HeartbeatTimeout { get; set; }
Property Value
- Duration
Remarks
If the lifecycle hook times out, perform the action in DefaultResult.
Default: - No heartbeat timeout.
LifecycleHookName
Name of the lifecycle hook.
public string? LifecycleHookName { get; set; }
Property Value
Remarks
Default: - Automatically generated name.
LifecycleTransition
The state of the Amazon EC2 instance to which you want to attach the lifecycle hook.
public LifecycleTransition LifecycleTransition { get; set; }
Property Value
NotificationMetadata
Additional data to pass to the lifecycle hook target.
public string? NotificationMetadata { get; set; }
Property Value
Remarks
Default: - No metadata.
NotificationTarget
The target of the lifecycle hook.
public ILifecycleHookTarget? NotificationTarget { get; set; }
Property Value
Remarks
Default: - No target.
Role
The role that allows publishing to the notification target.
public IRole? Role { get; set; }
Property Value
- IRole
Remarks
Default: - A role will be created if a target is provided. Otherwise, no role is created.