Skip to main content
Queries allow clients and resources to filter and select other resources using tags, item properties, or item relations. Queries also support sorting resource lists by property in ascending or descending order. Examples of resources that use queries:
  • Groups can dynamically assign users
  • Policies can target items or principals with queries
  • GVCs can dynamically update assigned locations

Filtering

A query consists of one or more terms that target tags, properties, or relations (rel). For a rel term, the value depends on the resource kind. For example, workloads have a gvc relation, which allows you to filter workloads in an org by the GVC they belong to.
In the Console, each page that lists items of a kind has a query button at the top of the table.The Match Tags By selector values are:
SelectorDefinition
AllAll tag items must match
AnyAt least one tag must match
NoneNo tag items may match
To filter resources based on their tags:
  1. Click the Query button
  2. Select which term you want to target: tag, property, or rel
  3. Type a value for the selected term key
  4. Select the operator and type the term value if needed
  5. Click Apply and the filtered resources will be displayed
To remove the filter, click the Query button again and click Clear.

Sorting

When fetching a list of items, you can sort by various properties in ascending or descending order.

Sort Order

OrderDescription
ascAscending order (A-Z, oldest first, lowest first)
descDescending order (Z-A, newest first, highest first)

Common Sort Fields

The following sort fields are available for most resources:
FieldDescription
idUnique resource identifier
nameResource name
versionResource version number
descriptionResource description
createdCreation timestamp
lastModifiedLast modification timestamp

Resource-Specific Sort Fields

Some resources have additional sort fields:
FieldDescription
originOrigin of the location
providerCloud provider (aws, gcp, azure)
regionCloud region
FieldDescription
originOrigin of the group
FieldDescription
providerCloud provider (aws, gcp, azure, ngs)
FieldDescription
idpIdentity provider
emailUser email address
FieldDescription
originOrigin of the policy