UNPKG

929 BTypeScriptView Raw
1import * as events from '@aws-cdk/aws-events';
2import * as lambda from '@aws-cdk/aws-lambda';
3import { TargetBaseProps } from './util';
4/**
5 * Customize the Lambda Event Target
6 */
7export interface LambdaFunctionProps extends TargetBaseProps {
8 /**
9 * The event to send to the Lambda
10 *
11 * This will be the payload sent to the Lambda Function.
12 *
13 * @default the entire EventBridge event
14 */
15 readonly event?: events.RuleTargetInput;
16}
17/**
18 * Use an AWS Lambda function as an event rule target.
19 */
20export declare class LambdaFunction implements events.IRuleTarget {
21 private readonly handler;
22 private readonly props;
23 constructor(handler: lambda.IFunction, props?: LambdaFunctionProps);
24 /**
25 * Returns a RuleTarget that can be used to trigger this Lambda as a
26 * result from an EventBridge event.
27 */
28 bind(rule: events.IRule, _id?: string): events.RuleTargetConfig;
29}