Class FunctionHook
Use a Lambda Function as a hook target.
Inheritance
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
Function |
|
Function |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Function |
Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, IBind |
If the |
Constructors
FunctionHook(IFunction, IKey)
public FunctionHook(IFunction fn, IKey encryptionKey = null)
Parameters
FunctionHook(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected FunctionHook(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
FunctionHook(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected FunctionHook(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
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 Constructs.
Construct - options IBind
Hook Target Options
Returns
Remarks
If the IRole
does exist in options
, will only create an SNS Topic and attach it to the lifecycle hook.