UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 1.17 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnsPublish=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var target_1=()=>{var tmp=require("./target");return target_1=()=>tmp,tmp};class SnsPublish extends target_1().ScheduleTargetBase{constructor(topic,props={}){super(props,topic.topicArn),this.topic=topic;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_sns_ITopic(topic),jsiiDeprecationWarnings().aws_cdk_lib_aws_scheduler_targets_ScheduleTargetBaseProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SnsPublish),error}}addTargetActionToRole(role){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iam_IRole(role)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addTargetActionToRole),error}this.topic.grantPublish(role)}}exports.SnsPublish=SnsPublish,_a=JSII_RTTI_SYMBOL_1,SnsPublish[_a]={fqn:"aws-cdk-lib.aws_scheduler_targets.SnsPublish",version:"2.211.0"};