Interface IBasicLifecycleHookProps
Basic properties for a lifecycle hook.
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IBasicLifecycleHookProps
Syntax (vb)
Public Interface IBasicLifecycleHookProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.AutoScaling;
using Amazon.CDK.AWS.IAM;
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
};
Synopsis
Properties
DefaultResult | The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. |
HeartbeatTimeout | Maximum time between calls to RecordLifecycleActionHeartbeat for the hook. |
LifecycleHookName | Name of the lifecycle hook. |
LifecycleTransition | The state of the Amazon EC2 instance to which you want to attach the lifecycle hook. |
NotificationMetadata | Additional data to pass to the lifecycle hook target. |
NotificationTarget | The target of the lifecycle hook. |
Role | The role that allows publishing to the notification target. |
Properties
DefaultResult
The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs.
virtual Nullable<DefaultResult> DefaultResult { get; }
Property Value
System.Nullable<DefaultResult>
Remarks
Default: Continue
HeartbeatTimeout
Maximum time between calls to RecordLifecycleActionHeartbeat for the hook.
virtual Duration HeartbeatTimeout { get; }
Property Value
Remarks
If the lifecycle hook times out, perform the action in DefaultResult.
Default: - No heartbeat timeout.
LifecycleHookName
Name of the lifecycle hook.
virtual string LifecycleHookName { get; }
Property Value
System.String
Remarks
Default: - Automatically generated name.
LifecycleTransition
The state of the Amazon EC2 instance to which you want to attach the lifecycle hook.
LifecycleTransition LifecycleTransition { get; }
Property Value
NotificationMetadata
Additional data to pass to the lifecycle hook target.
virtual string NotificationMetadata { get; }
Property Value
System.String
Remarks
Default: - No metadata.
NotificationTarget
The target of the lifecycle hook.
virtual ILifecycleHookTarget NotificationTarget { get; }
Property Value
Remarks
Default: - No target.
Role
The role that allows publishing to the notification target.
virtual IRole Role { get; }
Property Value
Remarks
Default: - A role will be created if a target is provided. Otherwise, no role is created.