query_results
Creates, updates, deletes, gets or lists a query_results resource.
Overview
| Name | query_results |
| Type | Resource |
| Id | aws.cloudtrail.query_results |
Fields
The following fields are returned by SELECT queries:
- get_query_results
| Name | Datatype | Description |
|---|---|---|
error_message | string | The error message returned if a query failed. (pattern: <code>.*</code>) |
next_token | string | A token you can use to get the next page of query results. (pattern: <code>.*</code>) |
query_result_rows | array | Contains the individual event results of the query. |
query_statistics | object | Shows the count of query results. |
query_status | string | The status of the query. Values include QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT, or CANCELLED. (QUEUED, RUNNING, FINISHED, FAILED, CANCELLED, TIMED_OUT) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_query_results | select | region | Gets event data results of a query. You must specify the QueryID value returned by the StartQuery operation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_query_results
Gets event data results of a query. You must specify the QueryID value returned by the StartQuery operation.
SELECT
error_message,
next_token,
query_result_rows,
query_statistics,
query_status
FROM aws.cloudtrail.query_results
WHERE region = '{{ region }}' -- required
;