aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 736 B
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0}),exports.findConditions=findConditions,exports.hasCondition=hasCondition;var section_1=()=>{var tmp=require("./section");return section_1=()=>tmp,tmp};function findConditions(template,logicalId,props={}){const section=template.Conditions??{},result=(0,section_1().matchSection)((0,section_1().filterLogicalId)(section,logicalId),props);return result.match?result.matches:{}}function hasCondition(template,logicalId,props){const section=template.Conditions??{},result=(0,section_1().matchSection)((0,section_1().filterLogicalId)(section,logicalId),props);if(!result.match)return(0,section_1().formatSectionMatchFailure)(`conditions with logicalId ${logicalId}`,result)}
;