UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 717 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hasCondition=exports.findConditions=void 0;const section_1=require("./section");function findConditions(template,logicalId,props={}){const section=template.Conditions??{},result=section_1.matchSection(section_1.filterLogicalId(section,logicalId),props);return result.match?result.matches:{}}exports.findConditions=findConditions;function hasCondition(template,logicalId,props){const section=template.Conditions??{},result=section_1.matchSection(section_1.filterLogicalId(section,logicalId),props);if(!result.match)return section_1.formatSectionMatchFailure(`conditions with logicalId ${logicalId}`,result)}exports.hasCondition=hasCondition;