Skip to main content

query_results

Creates, updates, deletes, gets or lists a query_results resource.

Overview

Namequery_results
TypeResource
Idaws.cloudtrail.query_results

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
error_messagestringThe error message returned if a query failed. (pattern: <code>.*</code>)
next_tokenstringA token you can use to get the next page of query results. (pattern: <code>.*</code>)
query_result_rowsarrayContains the individual event results of the query.
query_statisticsobjectShows the count of query results.
query_statusstringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_query_resultsselectregionGets 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;