Class LambdaDestination

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:45.636Z") @Stability(Stable) public class LambdaDestination extends software.amazon.jsii.JsiiObject implements IDestination
Use a Lambda function as a Lambda destination.

Example:

 // Auto-extract response payload with a lambda destination
 Function destinationFn;
 Function sourceFn = Function.Builder.create(this, "Source")
         .runtime(Runtime.NODEJS_LATEST)
         .handler("index.handler")
         .code(Code.fromAsset(join(__dirname, "lambda-handler")))
         // auto-extract on success
         .onSuccess(LambdaDestination.Builder.create(destinationFn)
                 .responseOnly(true)
                 .build())
         .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)
      Parameters:
      fn - This parameter is required.
      options -
    • LambdaDestination

      @Stability(Stable) public LambdaDestination(@NotNull IFunction fn)
      Parameters:
      fn - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public DestinationConfig bind(@NotNull software.constructs.Construct scope, @NotNull IFunction fn, @Nullable DestinationOptions options)
      Returns a destination configuration.

      Specified by:
      bind in interface IDestination
      Parameters:
      scope - This parameter is required.
      fn - This parameter is required.
      options -
    • bind

      @Stability(Stable) @NotNull public DestinationConfig bind(@NotNull software.constructs.Construct scope, @NotNull IFunction fn)
      Returns a destination configuration.

      Specified by:
      bind in interface IDestination
      Parameters:
      scope - This parameter is required.
      fn - This parameter is required.