Class LambdaDestination

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.logs.destinations.LambdaDestination
All Implemented Interfaces:
ILogSubscriptionDestination, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:41.187Z") @Stability(Stable) public class LambdaDestination extends software.amazon.jsii.JsiiObject implements ILogSubscriptionDestination
Use a Lambda Function as the destination for a log subscription.

Example:

 import software.amazon.awscdk.services.logs.destinations.*;
 Function fn;
 LogGroup logGroup;
 SubscriptionFilter.Builder.create(this, "Subscription")
         .logGroup(logGroup)
         .destination(new LambdaDestination(fn))
         .filterPattern(FilterPattern.allTerms("ERROR", "MainThread"))
         .build();
 
  • Constructor Details

    • LambdaDestination

      protected LambdaDestination(software.amazon.jsii.JsiiObjectRef objRef)
    • LambdaDestination

      protected LambdaDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • LambdaDestination

      @Stability(Stable) public LambdaDestination(@NotNull IFunction fn, @Nullable LambdaDestinationOptions options)
      LambdaDestinationOptions.

      Parameters:
      fn - This parameter is required.
      options -
    • LambdaDestination

      @Stability(Stable) public LambdaDestination(@NotNull IFunction fn)
      LambdaDestinationOptions.

      Parameters:
      fn - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public LogSubscriptionDestinationConfig bind(@NotNull Construct scope, @NotNull ILogGroup logGroup)
      Return the properties required to send subscription events to this destination.

      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.

      Specified by:
      bind in interface ILogSubscriptionDestination
      Parameters:
      scope - This parameter is required.
      logGroup - This parameter is required.