Class CloudFormationRuleConstraintOptions
Properties for provisoning rule constraint.
Inheritance
System.Object
CloudFormationRuleConstraintOptions
Namespace: Amazon.CDK.AWS.ServiceCatalog
Assembly: Amazon.CDK.AWS.ServiceCatalog.dll
Syntax (csharp)
public class CloudFormationRuleConstraintOptions : Object, ICloudFormationRuleConstraintOptions, ICommonConstraintOptions
Syntax (vb)
Public Class CloudFormationRuleConstraintOptions
Inherits Object
Implements ICloudFormationRuleConstraintOptions, ICommonConstraintOptions
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
CloudFormationRuleConstraintOptions() |
Properties
Description | The description of the constraint. |
MessageLanguage | The language code. |
Rule | The rule with condition and assertions to apply to template. |
Constructors
CloudFormationRuleConstraintOptions()
public CloudFormationRuleConstraintOptions()
Properties
Description
The description of the constraint.
public string Description { get; set; }
Property Value
System.String
Remarks
Default: - No description provided
MessageLanguage
The language code.
public Nullable<MessageLanguage> MessageLanguage { get; set; }
Property Value
System.Nullable<MessageLanguage>
Remarks
Configures the language for error messages from service catalog.
Default: - English
Rule
The rule with condition and assertions to apply to template.
public ITemplateRule Rule { get; set; }
Property Value