Show / Hide Table of Contents

Class LifecycleHook

Define a life cycle hook.

Inheritance
object
Resource
LifecycleHook
Implements
ILifecycleHook
IResource
IConstruct
IDependable
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.Lib.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;
            using Amazon.CDK.AWS.AutoScaling;
            using Amazon.CDK.AWS.IAM;

            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(Construct, string, ILifecycleHookProps)

Define a life cycle hook.

Properties

LifecycleHookName

The name of this lifecycle hook.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

Role

The role that allows the ASG to publish to the notification target.

Constructors

LifecycleHook(Construct, string, ILifecycleHookProps)

Define a life cycle hook.

public LifecycleHook(Construct scope, string id, ILifecycleHookProps props)
Parameters
scope Construct
id string
props ILifecycleHookProps
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;

            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
            });

Properties

LifecycleHookName

The name of this lifecycle hook.

public virtual string LifecycleHookName { get; }
Property Value

string

Remarks

Attribute: true

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

ExampleMetadata: fixture=_generated

Role

The role that allows the ASG to publish to the notification target.

public virtual IRole Role { get; }
Property Value

IRole

Remarks

Default: - A default role is created if 'notificationTarget' is specified. Otherwise, no role is created.

Implements

ILifecycleHook
IResource
Constructs.IConstruct
Constructs.IDependable
Back to top Generated by DocFX