aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 1.18 kB
JavaScript
var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnsEventSource=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var subs=()=>{var tmp=require("../../aws-sns-subscriptions");return subs=()=>tmp,tmp};class SnsEventSource{constructor(topic,props){this.topic=topic;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_sns_ITopic(topic),jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_event_sources_SnsEventSourceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SnsEventSource),error}this.props=props}bind(target){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunction(target)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}this.topic.addSubscription(new(subs()).LambdaSubscription(target,this.props))}}exports.SnsEventSource=SnsEventSource,_a=JSII_RTTI_SYMBOL_1,SnsEventSource[_a]={fqn:"aws-cdk-lib.aws_lambda_event_sources.SnsEventSource",version:"2.202.0"};
;