For the complete documentation index, see llms.txt. This page is also available as Markdown.

Apono Query Language

Learn the key concepts of the Apono Query Language

The Apono Query Language (AQL) provides a simple, intuitive syntax for filtering cloud resources, integrations, and permissions.

AQL query on the Inventory page

This reference documents query construction, available components, and common filtering examples.


Syntax

The following is a basic AQL query.

AQL uses a simple field-operator-value pattern.

Component
Description

Attribute or tag to query

Comparative logic

value

Expected value for the field

AQL values must be enclosed in double quotes (""). A backslash (\) can be used to escape special characters inside a string.

AQL does not support embedded newlines inside string values and rejects single quotes ('').

field

The field component specifies the attribute of your cloud resources to query.

Field
Description
Supported operators
Example

resource_type

Resource type

resource_type = "aws-rds-mysql"

resource_name

Human-readable display name for the resource

resource_name contains "prod"

resource_path

Hierarchical path within the integration

resource_path contains "us-east-1"

resource

Apono internal resource identifier

resource = "res_12345"

resource_status

Current status

resource_status = "active"

resource_source_id

Native identifier in the source system, such as an ARN

resource_source_id = "arn:aws:iam::123:role/admin"

resource_risk_level

Associated risk level

resource_risk_level = "high"

operator

The operator component defines how to evaluate the field against the specified value.

Basic operators that test for equality and inequality between values

Logic
Description
Example

=

Checks if values are the same

resource_type = "aws-account-dynamodb-table"

!=

Checks if values are different

integration != "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Unsupported

Operators not supported by AQL

Not supported
Description
Example

*

Wildcards

resource_name = "prod-*"

<, >, <=, >=

Numeric comparison

resource_risk_level <= "high"

^, $, +, ?

Regular expressions (regex)

resource_name = "^prod" resource_name = "prod-?s"

between

Ranges

between "2024-01-01" and "2024-12-31"

exists

Existence checks

exists(resource_tag["owner"])

null

Null checks

resource_tag["owner"] = null


Common Queries

The following AQL queries demonstrate how to efficiently locate, audit, and manage cloud resources and permissions. They cover common use cases such as identifying high-risk assets, tracking access levels, and enforcing security policies.

Use these queries as a foundation and customize them to fit your specific environment and compliance requirements.

Resource Queries

Queries focused on locating and filtering cloud infrastructure resources

Permission Queries

Queries that manage and audit access control settings

Combined Queries

Advanced patterns that merge resource and permission conditions for precise access control


Best Practices

Follow these best practices to write AQL queries that are clear, efficient, and easy to modify. These guidelines improve readability, execution speed, and adaptability.

Start with a specific condition

AQL processes conditions from left to right. Starting with a specific filter improves efficiency.

Use lists instead of multiple OR conditions

When checking multiple values, in (...) is more concise and performs better than chaining multiple or conditions.

Use parentheses to avoid ambiguity

Without parentheses, complex conditions can be misinterpreted and return unexpected results. Grouping conditions explicitly ensures the query evaluates as intended.

Last updated

Was this helpful?