Interface LambdaDestinationOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
LambdaDestinationOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:31.996Z") @Stability(Stable) public interface LambdaDestinationOptions extends software.amazon.jsii.JsiiSerializable
Options for 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();
 
  • Method Details

    • getResponseOnly

      @Stability(Stable) @Nullable default Boolean getResponseOnly()
      Whether the destination function receives only the responsePayload of the source function.

      When set to true and used as onSuccess destination, the destination function will be invoked with the payload returned by the source function.

      When set to true and used as onFailure destination, the destination function will be invoked with the error object returned by source function.

      See the README of this module to see a full explanation of this option.

      Default: false The destination function receives the full invocation record.

    • builder

      @Stability(Stable) static LambdaDestinationOptions.Builder builder()
      Returns:
      a LambdaDestinationOptions.Builder of LambdaDestinationOptions