libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CloudWatchLogs.GetQueryResults

Description

Returns the results from the specified query.

Only the fields requested in the query are returned, along with a @ptr field, which is the identifier for the log record. You can use the value of @ptr in a GetLogRecord operation to get the full log record.

GetQueryResults does not start a query execution. To run a query, use StartQuery.

If the value of the Status field in the output is Running, this operation returns only partial results. If you see a value of Scheduled or Running for the status, you can retry the operation later to see the final results.

Synopsis

Creating a Request

data GetQueryResults Source #

See: newGetQueryResults smart constructor.

Constructors

GetQueryResults' 

Fields

Instances

Instances details
Eq GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Read GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Show GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Generic GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Associated Types

type Rep GetQueryResults :: Type -> Type #

NFData GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Methods

rnf :: GetQueryResults -> () #

Hashable GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

ToJSON GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

AWSRequest GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Associated Types

type AWSResponse GetQueryResults #

ToHeaders GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

ToPath GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

ToQuery GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

type Rep GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

type Rep GetQueryResults = D1 ('MetaData "GetQueryResults" "Amazonka.CloudWatchLogs.GetQueryResults" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "GetQueryResults'" 'PrefixI 'True) (S1 ('MetaSel ('Just "queryId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse GetQueryResults Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

newGetQueryResults Source #

Create a value of GetQueryResults with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:queryId:GetQueryResults', getQueryResults_queryId - The ID number of the query.

Request Lenses

Destructuring the Response

data GetQueryResultsResponse Source #

See: newGetQueryResultsResponse smart constructor.

Constructors

GetQueryResultsResponse' 

Fields

  • status :: Maybe QueryStatus

    The status of the most recent running of the query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, Timeout, and Unknown.

    Queries time out after 15 minutes of execution. To avoid having your queries time out, reduce the time range being searched or partition your query into a number of queries.

  • results :: Maybe [[ResultField]]

    The log events that matched the query criteria during the most recent time it ran.

    The results value is an array of arrays. Each log event is one object in the top-level array. Each of these log event objects is an array of field/value pairs.

  • statistics :: Maybe QueryStatistics

    Includes the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the log events that were scanned. These values reflect the full raw results of the query.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Read GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Show GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Generic GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Associated Types

type Rep GetQueryResultsResponse :: Type -> Type #

NFData GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

Methods

rnf :: GetQueryResultsResponse -> () #

type Rep GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetQueryResults

type Rep GetQueryResultsResponse = D1 ('MetaData "GetQueryResultsResponse" "Amazonka.CloudWatchLogs.GetQueryResults" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "GetQueryResultsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe QueryStatus)) :*: S1 ('MetaSel ('Just "results") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [[ResultField]]))) :*: (S1 ('MetaSel ('Just "statistics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe QueryStatistics)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetQueryResultsResponse Source #

Create a value of GetQueryResultsResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:status:GetQueryResultsResponse', getQueryResultsResponse_status - The status of the most recent running of the query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, Timeout, and Unknown.

Queries time out after 15 minutes of execution. To avoid having your queries time out, reduce the time range being searched or partition your query into a number of queries.

$sel:results:GetQueryResultsResponse', getQueryResultsResponse_results - The log events that matched the query criteria during the most recent time it ran.

The results value is an array of arrays. Each log event is one object in the top-level array. Each of these log event objects is an array of field/value pairs.

$sel:statistics:GetQueryResultsResponse', getQueryResultsResponse_statistics - Includes the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the log events that were scanned. These values reflect the full raw results of the query.

$sel:httpStatus:GetQueryResultsResponse', getQueryResultsResponse_httpStatus - The response's http status code.

Response Lenses

getQueryResultsResponse_status :: Lens' GetQueryResultsResponse (Maybe QueryStatus) Source #

The status of the most recent running of the query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, Timeout, and Unknown.

Queries time out after 15 minutes of execution. To avoid having your queries time out, reduce the time range being searched or partition your query into a number of queries.

getQueryResultsResponse_results :: Lens' GetQueryResultsResponse (Maybe [[ResultField]]) Source #

The log events that matched the query criteria during the most recent time it ran.

The results value is an array of arrays. Each log event is one object in the top-level array. Each of these log event objects is an array of field/value pairs.

getQueryResultsResponse_statistics :: Lens' GetQueryResultsResponse (Maybe QueryStatistics) Source #

Includes the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the log events that were scanned. These values reflect the full raw results of the query.