aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
35 lines (34 loc) • 1.28 kB
TypeScript
import { Construct } from 'constructs';
import * as lambda from '../../aws-lambda';
/**
* Options for a Lambda destination
*/
export interface LambdaDestinationOptions {
/**
* 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.
*/
readonly responseOnly?: boolean;
}
/**
* Use a Lambda function as a Lambda destination
*/
export declare class LambdaDestination implements lambda.IDestination {
private readonly fn;
private readonly options;
constructor(fn: lambda.IFunction, options?: LambdaDestinationOptions);
/**
* Returns a destination configuration
*/
bind(scope: Construct, fn: lambda.IFunction, options?: lambda.DestinationOptions): lambda.DestinationConfig;
}