aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 2.63 kB
JavaScript
;var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigurationSet=exports.SuppressionReasons=exports.ConfigurationSetTlsPolicy=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),core_1=require("../../core"),utils_1=require("./private/utils"),ses_generated_1=require("./ses.generated");var ConfigurationSetTlsPolicy;(function(ConfigurationSetTlsPolicy2){ConfigurationSetTlsPolicy2.REQUIRE="REQUIRE",ConfigurationSetTlsPolicy2.OPTIONAL="OPTIONAL"})(ConfigurationSetTlsPolicy=exports.ConfigurationSetTlsPolicy||(exports.ConfigurationSetTlsPolicy={}));var SuppressionReasons;(function(SuppressionReasons2){SuppressionReasons2.BOUNCES_AND_COMPLAINTS="BOUNCES_AND_COMPLAINTS",SuppressionReasons2.BOUNCES_ONLY="BOUNCES_ONLY",SuppressionReasons2.COMPLAINTS_ONLY="COMPLAINTS_ONLY"})(SuppressionReasons=exports.SuppressionReasons||(exports.SuppressionReasons={}));class ConfigurationSet extends core_1.Resource{constructor(scope,id,props={}){super(scope,id,{physicalName:props.configurationSetName});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ses_ConfigurationSetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ConfigurationSet),error}const configurationSet=new ses_generated_1.CfnConfigurationSet(this,"Resource",{deliveryOptions:utils_1.undefinedIfNoKeys({sendingPoolName:props.dedicatedIpPool?.dedicatedIpPoolName,tlsPolicy:props.tlsPolicy}),name:this.physicalName,reputationOptions:utils_1.undefinedIfNoKeys({reputationMetricsEnabled:props.reputationMetrics}),sendingOptions:utils_1.undefinedIfNoKeys({sendingEnabled:props.sendingEnabled}),suppressionOptions:utils_1.undefinedIfNoKeys({suppressedReasons:renderSuppressedReasons(props.suppressionReasons)}),trackingOptions:utils_1.undefinedIfNoKeys({customRedirectDomain:props.customTrackingRedirectDomain})});this.configurationSetName=configurationSet.ref}static fromConfigurationSetName(scope,id,configurationSetName){class Import extends core_1.Resource{constructor(){super(...arguments),this.configurationSetName=configurationSetName}}return new Import(scope,id)}}exports.ConfigurationSet=ConfigurationSet,_a=JSII_RTTI_SYMBOL_1,ConfigurationSet[_a]={fqn:"aws-cdk-lib.aws_ses.ConfigurationSet",version:"2.70.0"};function renderSuppressedReasons(suppressionReasons){if(suppressionReasons)switch(suppressionReasons){case SuppressionReasons.BOUNCES_AND_COMPLAINTS:return["BOUNCE","COMPLAINT"];case SuppressionReasons.BOUNCES_ONLY:return["BOUNCE"];case SuppressionReasons.COMPLAINTS_ONLY:return["COMPLAINT"]}}