Operators
When building conditions, you need to be aware of the different types of operators you can use to construct your complex condition rules. There are two types of operators that you need to be aware of - Logical and Comparison.
Logical Operators
There are currently three types of logical operators you need to be aware of. These work like logic gates and represent a boolean function.
Logical Operator | Alias (if any) |
---|---|
AND | allOf |
OR | anyOf |
NOT | not |
Comparison Operators
Comparison operators enable us to construct much more complex conditions and introduce more concrete rules to our policies.
Text | String used in condition | Description |
---|---|---|
EQUALS | equals | a = b |
DOES NOT EQUAL | not-equals | a != b |
LESS THAN | less-than | a < b |
GREATER THAN | greater-than | a > b |
LESS THAN EQUALS | less-than-equals | a ≤ b |
GREATER THAN EQUALS | greater-than-equals | a ≥ b |
IN | in | ["a", "b", "c"] |
CONTAINS | contains | ["a", ?, "b"] |
BETWEEN | between | a > x < b |
MATCH | match | Regex Expression |
Now that we have a basic understanding of the language to construct conditions, lets jump into creating Condition Sets.