Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . cloudtrail ]

describe-query

Description

Returns metadata about a query, including query run time in milliseconds, number of events scanned and matched, and query status. You must specify an ARN for EventDataStore , and a value for QueryID .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  describe-query
--event-data-store <value>
--query-id <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--event-data-store (string)

The ARN (or the ID suffix of the ARN) of an event data store on which the specified query was run.

--query-id (string)

The query ID.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

QueryId -> (string)

The ID of the query.

QueryString -> (string)

The SQL code of a query.

QueryStatus -> (string)

The status of a query. Values for QueryStatus include QUEUED , RUNNING , FINISHED , FAILED , TIMED_OUT , or CANCELLED

QueryStatistics -> (structure)

Metadata about a query, including the number of events that were matched, the total number of events scanned, the query run time in milliseconds, and the query's creation time.

EventsMatched -> (long)

The number of events that matched a query.

EventsScanned -> (long)

The number of events that the query scanned in the event data store.

BytesScanned -> (long)

The total bytes that the query scanned in the event data store. This value matches the number of bytes for which your account is billed for the query, unless the query is still running.

ExecutionTimeInMillis -> (integer)

The query's run time, in milliseconds.

CreationTime -> (timestamp)

The creation time of the query.

ErrorMessage -> (string)

The error message returned if a query failed.