Interface ITemplateRule
Defines the provisioning template constraints.
Namespace: Amazon.CDK.AWS.ServiceCatalog
Assembly: Amazon.CDK.AWS.ServiceCatalog.dll
Syntax (csharp)
public interface ITemplateRule
Syntax (vb)
Public Interface ITemplateRule
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK;
Portfolio portfolio;
CloudFormationProduct product;
portfolio.ConstrainCloudFormationParameters(product, new CloudFormationRuleConstraintOptions {
Rule = new TemplateRule {
RuleName = "testInstanceType",
Condition = Fn.ConditionEquals(Fn.Ref("Environment"), "test"),
Assertions = new [] { new TemplateRuleAssertion {
Assert = Fn.ConditionContains(new [] { "t2.micro", "t2.small" }, Fn.Ref("InstanceType")),
Description = "For test environment, the instance type should be small"
} }
}
});
Synopsis
Properties
Assertions | A list of assertions that make up the rule. |
Condition | Specify when to apply rule with a rule-specific intrinsic function. |
RuleName | Name of the rule. |
Properties
Assertions
A list of assertions that make up the rule.
ITemplateRuleAssertion[] Assertions { get; }
Property Value
Condition
Specify when to apply rule with a rule-specific intrinsic function.
virtual ICfnRuleConditionExpression Condition { get; }
Property Value
Remarks
Default: - no rule condition provided
RuleName
Name of the rule.
string RuleName { get; }
Property Value
System.String