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.StartQuery

Description

Schedules a query of a log group using CloudWatch Logs Insights. You specify the log group and time range to query and the query string to use.

For more information, see CloudWatch Logs Insights Query Syntax.

Queries time out after 15 minutes of execution. If your queries are timing out, reduce the time range being searched or partition your query into a number of queries.

Synopsis

Creating a Request

data StartQuery Source #

See: newStartQuery smart constructor.

Constructors

StartQuery' 

Fields

  • logGroupNames :: Maybe [Text]

    The list of log groups to be queried. You can include up to 20 log groups.

    A StartQuery operation must include a logGroupNames or a logGroupName parameter, but not both.

  • logGroupName :: Maybe Text

    The log group on which to perform the query.

    A StartQuery operation must include a logGroupNames or a logGroupName parameter, but not both.

  • limit :: Maybe Natural

    The maximum number of log events to return in the query. If the query string uses the fields command, only the specified fields and their values are returned. The default is 1000.

  • startTime :: Natural

    The beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

  • endTime :: Natural

    The end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

  • queryString :: Text

    The query string to use. For more information, see CloudWatch Logs Insights Query Syntax.

Instances

Instances details
Eq StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Read StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Show StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Generic StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Associated Types

type Rep StartQuery :: Type -> Type #

NFData StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Methods

rnf :: StartQuery -> () #

Hashable StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

ToJSON StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

AWSRequest StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Associated Types

type AWSResponse StartQuery #

ToHeaders StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Methods

toHeaders :: StartQuery -> [Header] #

ToPath StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

ToQuery StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

type Rep StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

type Rep StartQuery = D1 ('MetaData "StartQuery" "Amazonka.CloudWatchLogs.StartQuery" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "StartQuery'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "logGroupNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "logGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)))) :*: (S1 ('MetaSel ('Just "startTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural) :*: (S1 ('MetaSel ('Just "endTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Just "queryString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse StartQuery Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

newStartQuery Source #

Create a value of StartQuery 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:logGroupNames:StartQuery', startQuery_logGroupNames - The list of log groups to be queried. You can include up to 20 log groups.

A StartQuery operation must include a logGroupNames or a logGroupName parameter, but not both.

$sel:logGroupName:StartQuery', startQuery_logGroupName - The log group on which to perform the query.

A StartQuery operation must include a logGroupNames or a logGroupName parameter, but not both.

$sel:limit:StartQuery', startQuery_limit - The maximum number of log events to return in the query. If the query string uses the fields command, only the specified fields and their values are returned. The default is 1000.

$sel:startTime:StartQuery', startQuery_startTime - The beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

$sel:endTime:StartQuery', startQuery_endTime - The end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

$sel:queryString:StartQuery', startQuery_queryString - The query string to use. For more information, see CloudWatch Logs Insights Query Syntax.

Request Lenses

startQuery_logGroupNames :: Lens' StartQuery (Maybe [Text]) Source #

The list of log groups to be queried. You can include up to 20 log groups.

A StartQuery operation must include a logGroupNames or a logGroupName parameter, but not both.

startQuery_logGroupName :: Lens' StartQuery (Maybe Text) Source #

The log group on which to perform the query.

A StartQuery operation must include a logGroupNames or a logGroupName parameter, but not both.

startQuery_limit :: Lens' StartQuery (Maybe Natural) Source #

The maximum number of log events to return in the query. If the query string uses the fields command, only the specified fields and their values are returned. The default is 1000.

startQuery_startTime :: Lens' StartQuery Natural Source #

The beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

startQuery_endTime :: Lens' StartQuery Natural Source #

The end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

startQuery_queryString :: Lens' StartQuery Text Source #

The query string to use. For more information, see CloudWatch Logs Insights Query Syntax.

Destructuring the Response

data StartQueryResponse Source #

See: newStartQueryResponse smart constructor.

Constructors

StartQueryResponse' 

Fields

Instances

Instances details
Eq StartQueryResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Read StartQueryResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Show StartQueryResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Generic StartQueryResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Associated Types

type Rep StartQueryResponse :: Type -> Type #

NFData StartQueryResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

Methods

rnf :: StartQueryResponse -> () #

type Rep StartQueryResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.StartQuery

type Rep StartQueryResponse = D1 ('MetaData "StartQueryResponse" "Amazonka.CloudWatchLogs.StartQuery" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "StartQueryResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "queryId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newStartQueryResponse Source #

Create a value of StartQueryResponse 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:StartQueryResponse', startQueryResponse_queryId - The unique ID of the query.

$sel:httpStatus:StartQueryResponse', startQueryResponse_httpStatus - The response's http status code.

Response Lenses