"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.LambdaFunction=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),util_1=require("./util");class LambdaFunction{constructor(handler,props={}){this.handler=handler,this.props=props,jsiiDeprecationWarnings.aws_cdk_lib_aws_lambda_IFunction(handler),jsiiDeprecationWarnings.aws_cdk_lib_aws_events_targets_LambdaFunctionProps(props)}bind(rule,_id){return jsiiDeprecationWarnings.aws_cdk_lib_aws_events_IRule(rule),util_1.addLambdaPermission(rule,this.handler),this.props.deadLetterQueue&&util_1.addToDeadLetterQueueResourcePolicy(rule,this.props.deadLetterQueue),{...util_1.bindBaseTargetConfig(this.props),arn:this.handler.functionArn,input:this.props.event,targetResource:this.handler}}}exports.LambdaFunction=LambdaFunction,_a=JSII_RTTI_SYMBOL_1,LambdaFunction[_a]={fqn:"aws-cdk-lib.aws_events_targets.LambdaFunction",version:"2.13.0"};
//# sourceMappingURL=lambda.js.map
