aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 1.13 kB
JavaScript
var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueueHook=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var common_1=()=>{var tmp=require("./common");return common_1=()=>tmp,tmp};class QueueHook{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,QueueHook),error}}bind(_scope,options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_autoscaling_BindHookTargetOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const role=(0,common_1().createRole)(_scope,options.role);return this.queue.grantSendMessages(role),{notificationTargetArn:this.queue.queueArn,createdRole:role}}}exports.QueueHook=QueueHook,_a=JSII_RTTI_SYMBOL_1,QueueHook[_a]={fqn:"aws-cdk-lib.aws_autoscaling_hooktargets.QueueHook",version:"2.185.0"};
;