@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.813Z") @Stability(value=Stable) public class LifecycleHook extends Resource implements ILifecycleHook
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.autoscaling.*;
import software.amazon.awscdk.services.iam.*;
AutoScalingGroup autoScalingGroup;
ILifecycleHookTarget lifecycleHookTarget;
Role role;
LifecycleHook lifecycleHook = LifecycleHook.Builder.create(this, "MyLifecycleHook")
.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)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
LifecycleHook.Builder
A fluent builder for
LifecycleHook. |
software.amazon.jsii.JsiiObject.InitializationModeILifecycleHook.Jsii$Default, ILifecycleHook.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
LifecycleHook(software.constructs.Construct scope,
String id,
LifecycleHookProps props) |
protected |
LifecycleHook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
LifecycleHook(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getLifecycleHookName()
The name of this lifecycle hook.
|
IRole |
getRole()
The role that allows the ASG to publish to the notification target.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected LifecycleHook(software.amazon.jsii.JsiiObjectRef objRef)
protected LifecycleHook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public LifecycleHook(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
LifecycleHookProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public String getLifecycleHookName()
@Stability(value=Stable) @NotNull public IRole getRole()
Default: - A default role is created if 'notificationTarget' is specified. Otherwise, no role is created.
getRole in interface ILifecycleHookCopyright © 2022. All rights reserved.