Class FunctionHook
Use a Lambda Function as a hook target.
Implements
Namespace: Amazon.CDK.AWS.AutoScaling.HookTargets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FunctionHook : DeputyBase, ILifecycleHookTarget
Syntax (vb)
Public Class FunctionHook Inherits DeputyBase Implements ILifecycleHookTarget
Remarks
Internally creates a Topic to make the connection.
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.AWS.AutoScaling.HookTargets;
using Amazon.CDK.AWS.KMS;
using Amazon.CDK.AWS.Lambda;
Function function_;
Key key;
var functionHook = new FunctionHook(function_, key);
Synopsis
Constructors
| FunctionHook(IFunction, IKey?) | Use a Lambda Function as a hook target. |
Methods
| Bind(Construct, IBindHookTargetOptions) | If the |
Constructors
FunctionHook(IFunction, IKey?)
Use a Lambda Function as a hook target.
public FunctionHook(IFunction fn, IKey? encryptionKey = null)
Parameters
- fn IFunction
Function to invoke in response to a lifecycle event.
- encryptionKey IKey
If provided, this key is used to encrypt the contents of the SNS topic.
Remarks
Internally creates a Topic to make the connection.
ExampleMetadata: fixture=_generated
Methods
Bind(Construct, IBindHookTargetOptions)
If the IRole does not exist in options, will create an IRole and an SNS Topic and attach both to the lifecycle hook.
public virtual ILifecycleHookTargetConfig Bind(Construct scope, IBindHookTargetOptions options)
Parameters
- scope Construct
- options IBindHookTargetOptions
Returns
Remarks
If the IRole does exist in options, will only create an SNS Topic and attach it to the lifecycle hook.