Interface TemplateRule

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
TemplateRule.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:09.885Z") @Stability(Stable) public interface TemplateRule extends software.amazon.jsii.JsiiSerializable
Defines the provisioning template constraints.

Example:

 import software.amazon.awscdk.*;
 Portfolio portfolio;
 CloudFormationProduct product;
 portfolio.constrainCloudFormationParameters(product, CloudFormationRuleConstraintOptions.builder()
         .rule(TemplateRule.builder()
                 .ruleName("testInstanceType")
                 .condition(Fn.conditionEquals(Fn.ref("Environment"), "test"))
                 .assertions(List.of(TemplateRuleAssertion.builder()
                         .assert(Fn.conditionContains(List.of("t2.micro", "t2.small"), Fn.ref("InstanceType")))
                         .description("For test environment, the instance type should be small")
                         .build()))
                 .build())
         .build());