@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.111Z") @Stability(value=Stable) public interface TemplateRule extends software.amazon.jsii.JsiiSerializable
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());
| Modifier and Type | Interface and Description |
|---|---|
static class |
TemplateRule.Builder
A builder for
TemplateRule |
static class |
TemplateRule.Jsii$Proxy
An implementation for
TemplateRule |
| Modifier and Type | Method and Description |
|---|---|
static TemplateRule.Builder |
builder() |
List<TemplateRuleAssertion> |
getAssertions()
A list of assertions that make up the rule.
|
default ICfnRuleConditionExpression |
getCondition()
Specify when to apply rule with a rule-specific intrinsic function.
|
String |
getRuleName()
Name of the rule.
|
@Stability(value=Stable) @NotNull List<TemplateRuleAssertion> getAssertions()
@Stability(value=Stable) @NotNull String getRuleName()
@Stability(value=Stable) @Nullable default ICfnRuleConditionExpression getCondition()
Default: - no rule condition provided
@Stability(value=Stable) static TemplateRule.Builder builder()
TemplateRule.Builder of TemplateRuleCopyright © 2022. All rights reserved.