How do the conditions of a condition rule work?

更新时间:
复制 MD 格式

A condition rule consists of conditions and condition groups. Condition groups support the and and or operators.

Each condition consists of a resource feature, an operator, and a desired value. If a condition evaluates to true, the condition rule returns a Compliant result. If a condition evaluates to false, the condition rule returns an Incompliant result.

Example: A condition rule checks whether each Elastic Compute Service (ECS) instance is in the running state. If so, the result is Compliant. If not, the result is Incompliant.

The resource feature Status of ACS::ECS::Instance supports the following values: Running, Starting, and Stopped. If the Desired Value parameter is set to Running and the resource feature value is Running, the condition (Status, StringEquals, Running) evaluates to true and the result is Compliant. If the resource feature value is Stopped, the condition evaluates to false and the result is Incompliant.