Filter Query Syntax
CloudQuery filter queries allow for quick searches of the asset inventory for cases when a full SQL would be too much overhead.
Last updated
Was this helpful?
CloudQuery filter queries allow for quick searches of the asset inventory for cases when a full SQL would be too much overhead.
Last updated
Was this helpful?
CloudQuery Filters come in two flavors, Basic and Advanced, as shown in the UI below:
This page goes over the custom query syntax and provides examples to get you up and running quickly. Filters can be saved, shared and can also be used in other parts of the platform, such as dashboards and alerts.
String values can (optionally) be wrapped in double quotes. This is required when using a value that contains spaces.
Return assets where name
is aws-mysql-db
Return assets where name
is z1d.xlarge
Return assets where name
begins with aws
Return assets where ebs_optimized
is false
Return assets where instance_id
is ID 123456789
Return assets where name does not begin with z1d
Return assets where ami_launch_index
is greater than 5
Return assets where ami_launch_index
is greater than or equal to 5
Return assets where ami_launch_index
is less than 10
Return assets where ami_launch_index
is less than or equal to 10
Return assets where name
is aws-mysql-db
AND ebs_optimized
is false
Return assets where name
is aws-mysql-db
OR ebs_optimized
is false
Return assets where name
is not aws-mysql-db
Return assets where name
is either aws-mysql-db
OR aws-oracle-db
, AND ebs_optimized
is false
Return assets where region
is either eu-west-1
OR us-east-1
Null and Empty operators can be used to check for empty values.
Null checks are applicable when the column type is int, string, boolean, or similar basic types (including JSON).
Empty checks are applicable when the column type is map, array, or similar container type.
Return assets where name
is null
Return assets where name
is NOT null
Return assets where tags
is empty
Return assets where tags
is NOT empty
Return assets where network_interface_ids
contains a specific ID:
Return assets where network_interface_ids
contains a pattern match:
Return assets where tags
contains key service
Return assets where tags
contains a key that has the substringservice
Return assets where tags
contains key service
and value picture-service
Return assets where tags
contains key "service" and pattern-match picture
anywhere in the value.