class CfnRule (construct)
The Rules that define template constraints in an AWS Service Catalog portfolio describe when end users can use the template and which values they can specify for parameters that are declared in the AWS CloudFormation template used to create the product they are attempting to use.
Rules are useful for preventing end users from inadvertently specifying an incorrect value. For example, you can add a rule to verify whether end users specified a valid subnet in a given VPC or used m1.small instance types for test environments. AWS CloudFormation uses rules to validate parameter values before it creates the resources for the product.
A rule can include a RuleCondition property and must include an Assertions property. For each rule, you can define only one rule condition; you can define one or more asserts within the Assertions property. You define a rule condition and assertions by using rule-specific intrinsic functions.
new CfnRule(scope: Construct, id: string, props?: CfnRuleProps)
Creates and adds a rule.
|assertions?||Assertions which define the rule.|
|rule||If the rule condition evaluates to false, the rule doesn't take effect.|
(optional, default: No assertions for the rule.)
Assertions which define the rule.
(optional, default: Rule's assertions will always take effect.)
If the rule condition evaluates to false, the rule doesn't take effect.
If the function in the rule condition evaluates to true, expressions in each assert are evaluated and applied.
|logical||The logical ID for this CloudFormation stack e|