Class LifecycleHook
Define a life cycle hook.
Inherited Members
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public class LifecycleHook : Resource, ILifecycleHook, IResource, IConstruct, IDependable
Syntax (vb)
Public Class LifecycleHook
Inherits Resource
Implements ILifecycleHook, IResource, IConstruct, IDependable
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.AWS.AutoScaling;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK;
AutoScalingGroup autoScalingGroup;
ILifecycleHookTarget lifecycleHookTarget;
Role role;
var lifecycleHook = new LifecycleHook(this, "MyLifecycleHook", new LifecycleHookProps {
AutoScalingGroup = autoScalingGroup,
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
Constructors
LifecycleHook(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
LifecycleHook(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
LifecycleHook(Construct, String, ILifecycleHookProps) |
Properties
LifecycleHookName | The name of this lifecycle hook. |
Role | The role that allows the ASG to publish to the notification target. |
Constructors
LifecycleHook(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected LifecycleHook(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
LifecycleHook(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected LifecycleHook(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
LifecycleHook(Construct, String, ILifecycleHookProps)
public LifecycleHook(Construct scope, string id, ILifecycleHookProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ILifecycleHookProps
Properties
LifecycleHookName
The name of this lifecycle hook.
public virtual string LifecycleHookName { get; }
Property Value
System.String
Remarks
Attribute: true
Role
The role that allows the ASG to publish to the notification target.
public virtual IRole Role { get; }
Property Value
Remarks
Default: - A default role is created if 'notificationTarget' is specified. Otherwise, no role is created.