Using AND
AND
can be used in WHEN
and THEN
steps where one step is not sufficient to define the success or failure condition.
Few examples can be ;
Then it must contain tags
And its value must not be null
When it contains policy
And it contains Statement
And its Effect is Allow
And it contains Principal
When its name is not public
And it contains tags
Then it must contain <tag_keys>
And its value must match the "<pattern>" regex