UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 1.06 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SqsDestination=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class SqsDestination{constructor(queue){this.queue=queue;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_sqs_IQueue(queue)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SqsDestination),error}}bind(_scope,fn,_options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunction(fn),jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_DestinationOptions(_options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}return this.queue.grantSendMessages(fn),{destination:this.queue.queueArn}}}exports.SqsDestination=SqsDestination,_a=JSII_RTTI_SYMBOL_1,SqsDestination[_a]={fqn:"aws-cdk-lib.aws_lambda_destinations.SqsDestination",version:"2.202.0"};