A condition rule includes conditions and condition groups. Condition groups support the and
and or
operators.
A condition includes a resource feature, an operator, and a desired value. If a condition is evaluated as true
, the evaluation result of the corresponding condition rule is Compliant. If a condition is evaluated as false
, the evaluation result of the corresponding condition rule is Incompliant.
Example: Checks whether each Elastic Compute Service (ECS) instance is in the running state. If so, the evaluation result is Compliant. If not, the evaluation result is Incompliant.
The resource feature Status
of ACS::ECS::Instance
supports the following values: Running
, Starting
, and Stopped
. The Desired Value parameter is set to Running
. If the value of the resource feature
is Running, the condition (Status, StringEquals, Running) is evaluated as true and the evaluation result is Compliant. If the value of the resource feature
is Stopped, the condition (Status, StringEquals, Running) is evaluated as false and the evaluation result is Incompliant.