aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 1.25 kB
JavaScript
;var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnRule=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cfn_element_1=require("./cfn-element"),util_1=require("./util");class CfnRule extends cfn_element_1.CfnRefElement{constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings.aws_cdk_lib_CfnRuleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnRule),error}this.ruleCondition=props&&props.ruleCondition,this.assertions=props&&props.assertions}addAssertion(condition,description){try{jsiiDeprecationWarnings.aws_cdk_lib_ICfnConditionExpression(condition)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addAssertion),error}this.assertions||(this.assertions=[]),this.assertions.push({assert:condition,assertDescription:description})}_toCloudFormation(){return{Rules:{[this.logicalId]:{RuleCondition:this.ruleCondition,Assertions:util_1.capitalizePropertyNames(this,this.assertions)}}}}}exports.CfnRule=CfnRule,_a=JSII_RTTI_SYMBOL_1,CfnRule[_a]={fqn:"aws-cdk-lib.CfnRule",version:"2.70.0"};