@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-09T19:16:42.391Z") 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.services.autoscaling.*; import software.amazon.awscdk.services.iam.*; import software.amazon.awscdk.core.*; 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 . |
ILifecycleHook.Jsii$Default, ILifecycleHook.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
LifecycleHook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
LifecycleHook(software.amazon.jsii.JsiiObjectRef objRef) |
|
LifecycleHook(software.constructs.Construct scope,
java.lang.String id,
LifecycleHookProps props) |
Modifier and Type | Method and Description |
---|---|
java.lang.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, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected LifecycleHook(software.amazon.jsii.JsiiObjectRef objRef)
protected LifecycleHook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public LifecycleHook(software.constructs.Construct scope, java.lang.String id, LifecycleHookProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public java.lang.String getLifecycleHookName()
public IRole getRole()
Default: - A default role is created if 'notificationTarget' is specified. Otherwise, no role is created.
getRole
in interface ILifecycleHook