Class TemplateRule
Defines the provisioning template constraints.
Inheritance
System.Object
TemplateRule
Implements
Namespace: Amazon.CDK.AWS.Servicecatalog
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class TemplateRule : Object, ITemplateRule
Syntax (vb)
Public Class TemplateRule
Inherits Object
Implements 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
Constructors
TemplateRule() |
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. |
Constructors
TemplateRule()
public TemplateRule()
Properties
Assertions
A list of assertions that make up the rule.
public ITemplateRuleAssertion[] Assertions { get; set; }
Property Value
Condition
Specify when to apply rule with a rule-specific intrinsic function.
public ICfnRuleConditionExpression Condition { get; set; }
Property Value
Remarks
Default: - no rule condition provided
RuleName
Name of the rule.
public string RuleName { get; set; }
Property Value
System.String