Class CfnRuleProps
A rule can include a RuleCondition property and must include an Assertions property.
Inheritance
Implements
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRuleProps : Object, ICfnRuleProps
Syntax (vb)
Public Class CfnRuleProps
Inherits Object
Implements ICfnRuleProps
Remarks
For each rule, you can define only one rule condition; you can define one or more asserts within the Assertions property. You define a rule condition and assertions by using rule-specific intrinsic functions.
You can use the following rule-specific intrinsic functions to define rule conditions and assertions:
Fn::And Fn::Contains Fn::EachMemberEquals Fn::EachMemberIn Fn::Equals Fn::If Fn::Not Fn::Or Fn::RefAll Fn::ValueOf Fn::ValueOfAll
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
ICfnConditionExpression cfnConditionExpression;
var cfnRuleProps = new CfnRuleProps {
Assertions = new [] { new CfnRuleAssertion {
Assert = cfnConditionExpression,
AssertDescription = "assertDescription"
} },
RuleCondition = cfnConditionExpression
};
Synopsis
Constructors
CfnRuleProps() |
Properties
Assertions | Assertions which define the rule. |
RuleCondition | If the rule condition evaluates to false, the rule doesn't take effect. |
Constructors
CfnRuleProps()
public CfnRuleProps()
Properties
Assertions
Assertions which define the rule.
public ICfnRuleAssertion[] Assertions { get; set; }
Property Value
Remarks
Default: - No assertions for the rule.
RuleCondition
If the rule condition evaluates to false, the rule doesn't take effect.
public ICfnConditionExpression RuleCondition { get; set; }
Property Value
Remarks
If the function in the rule condition evaluates to true, expressions in each assert are evaluated and applied.
Default: - Rule's assertions will always take effect.