Class FunctionHook
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.autoscaling.hooktargets.FunctionHook
- All Implemented Interfaces:
ILifecycleHookTarget
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)",
date="2024-04-10T22:22:24.170Z")
@Stability(Stable)
public class FunctionHook
extends software.amazon.jsii.JsiiObject
implements ILifecycleHookTarget
Use a Lambda Function as a hook target.
Internally creates a Topic to make the connection.
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.hooktargets.*; import software.amazon.awscdk.services.kms.*; import software.amazon.awscdk.services.lambda.*; Function function_; Key key; FunctionHook functionHook = new FunctionHook(function_, key);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.autoscaling.ILifecycleHookTarget
ILifecycleHookTarget.Jsii$Default, ILifecycleHookTarget.Jsii$Proxy
-
Constructor Summary
ConstructorsModifierConstructorDescriptionFunctionHook
(IFunction fn, IKey encryptionKey) protected
FunctionHook
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
FunctionHook
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind
(software.constructs.Construct _scope, BindHookTargetOptions options) If theIRole
does not exist inoptions
, will create anIRole
and an SNS Topic and attach both to the lifecycle hook.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
FunctionHook
protected FunctionHook(software.amazon.jsii.JsiiObjectRef objRef) -
FunctionHook
protected FunctionHook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
FunctionHook
- Parameters:
fn
- Function to invoke in response to a lifecycle event. This parameter is required.encryptionKey
- If provided, this key is used to encrypt the contents of the SNS topic.
-
FunctionHook
- Parameters:
fn
- Function to invoke in response to a lifecycle event. This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public LifecycleHookTargetConfig bind(@NotNull software.constructs.Construct _scope, @NotNull BindHookTargetOptions options) If theIRole
does not exist inoptions
, will create anIRole
and an SNS Topic and attach both to the lifecycle hook.If the
IRole
does exist inoptions
, will only create an SNS Topic and attach it to the lifecycle hook.- Specified by:
bind
in interfaceILifecycleHookTarget
- Parameters:
_scope
- This parameter is required.options
- This parameter is required.
-