Class LambdaDestination
Use a Lambda Function as the destination for a log subscription.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Logs.Destinations
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LambdaDestination : DeputyBase, ILogSubscriptionDestination
Syntax (vb)
Public Class LambdaDestination
Inherits DeputyBase
Implements ILogSubscriptionDestination
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Logs.Destinations;
Function fn;
LogGroup logGroup;
new SubscriptionFilter(this, "Subscription", new SubscriptionFilterProps {
LogGroup = logGroup,
Destination = new LambdaDestination(fn),
FilterPattern = FilterPattern.AllTerms("ERROR", "MainThread"),
FilterName = "ErrorInMainThread"
});
Synopsis
Constructors
LambdaDestination(IFunction, ILambdaDestinationOptions) | LambdaDestinationOptions. |
LambdaDestination(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
LambdaDestination(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, ILogGroup) | Return the properties required to send subscription events to this destination. |
Constructors
LambdaDestination(IFunction, ILambdaDestinationOptions)
LambdaDestinationOptions.
public LambdaDestination(IFunction fn, ILambdaDestinationOptions options = null)
Parameters
- fn IFunction
- options ILambdaDestinationOptions
LambdaDestination(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected LambdaDestination(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
LambdaDestination(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected LambdaDestination(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, ILogGroup)
Return the properties required to send subscription events to this destination.
public virtual ILogSubscriptionDestinationConfig Bind(Construct scope, ILogGroup logGroup)
Parameters
- scope Constructs.Construct
- logGroup ILogGroup
Returns
ILogSubscriptionDestinationConfig
Remarks
If necessary, the destination can use the properties of the SubscriptionFilter object itself to configure its permissions to allow the subscription to write to it.
The destination may reconfigure its own permissions in response to this function call.