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.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.209Z") @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

    Constructors
    Modifier
    Constructor
    Description
     
     
     
    FunctionHook(IFunction fn, IKey encryptionKey)
     
    protected
    FunctionHook(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    FunctionHook(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(software.constructs.Construct _scope, BindHookTargetOptions options)
    If the IRole does not exist in options, will create an IRole 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

      @Stability(Stable) public FunctionHook(@NotNull IFunction fn, @Nullable IKey encryptionKey)
      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

      @Stability(Stable) public FunctionHook(@NotNull IFunction fn)
      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 the IRole does not exist in options, will create an IRole and an SNS Topic and attach both to the lifecycle hook.

      If the IRole does exist in options, will only create an SNS Topic and attach it to the lifecycle hook.

      Specified by:
      bind in interface ILifecycleHookTarget
      Parameters:
      _scope - This parameter is required.
      options - This parameter is required.