When creating a rule, use a search query to specify the rule conditions.
When a rule is evaluated, the cloud searches for objects that violate the search query. If there are no objects found, then the rule is satisfied.
The definition for a strict rule is limited to the following subset of search syntax:
Strict rules applied to hosts and cloud servers only permit a tag filter. The tag filter can specify a single identifier or a name pattern (containing wildcards), optionally enclosed with double quotes or square brackets, or a list of identifiers or name patterns, separated by semicolons.
Strict rules for databases support three link filter types: tag, server, and host. You can use only one link filter type per strict rule. Unlike weak rules or search queries, a link filter for a strict rule cannot be composed from general search syntax, but can specify either a (quoted) identifier, a (quoted) name pattern, or a tag filter.
The link filter for a weak rule can be composed from general search syntax.
The following command creates a weak rule that restricts both the database with the ID DB-j7w5 and its backups from existing on a host that has the tag UK.
dbcloudcmd run CreateRule 0 "database_copy:(host:(tag:UK)) or backup:(host:(tag:UK))" Database Db-j7w5