amazonka-cloudwatch-logs-2.0: Amazon CloudWatch Logs SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CloudWatchLogs.DescribeLogStreams

Description

Lists the log streams for the specified log group. You can list all the log streams or filter the results by prefix. You can also control how the results are ordered.

This operation has a limit of five transactions per second, after which transactions are throttled.

If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view data from the linked source accounts. For more information, see CloudWatch cross-account observability.

This operation returns paginated results.

Synopsis

Creating a Request

data DescribeLogStreams Source #

See: newDescribeLogStreams smart constructor.

Constructors

DescribeLogStreams' 

Fields

  • descending :: Maybe Bool

    If the value is true, results are returned in descending order. If the value is to false, results are returned in ascending order. The default value is false.

  • limit :: Maybe Natural

    The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

  • logGroupIdentifier :: Maybe Text

    Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.

    If you specify values for both logGroupName and logGroupIdentifier, the action returns an InvalidParameterException error.

  • logStreamNamePrefix :: Maybe Text

    The prefix to match.

    If orderBy is LastEventTime, you cannot specify this parameter.

  • nextToken :: Maybe Text

    The token for the next set of items to return. (You received this token from a previous call.)

  • orderBy :: Maybe OrderBy

    If the value is LogStreamName, the results are ordered by log stream name. If the value is LastEventTime, the results are ordered by the event time. The default value is LogStreamName.

    If you order the results by event time, you cannot specify the logStreamNamePrefix parameter.

    lastEventTimestamp represents the time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.

  • logGroupName :: Text

    The name of the log group.

    If you specify values for both logGroupName and logGroupIdentifier, the action returns an InvalidParameterException error.

Instances

Instances details
ToJSON DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

ToHeaders DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

ToPath DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

ToQuery DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

AWSPager DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

AWSRequest DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

Associated Types

type AWSResponse DescribeLogStreams #

Generic DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

Associated Types

type Rep DescribeLogStreams :: Type -> Type #

Read DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

Show DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

NFData DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

Methods

rnf :: DescribeLogStreams -> () #

Eq DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

Hashable DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

type AWSResponse DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

type Rep DescribeLogStreams Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

type Rep DescribeLogStreams = D1 ('MetaData "DescribeLogStreams" "Amazonka.CloudWatchLogs.DescribeLogStreams" "amazonka-cloudwatch-logs-2.0-6gvDalNFsfE8djZ4aTfA4V" 'False) (C1 ('MetaCons "DescribeLogStreams'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "descending") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "logGroupIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "logStreamNamePrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "orderBy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe OrderBy)) :*: S1 ('MetaSel ('Just "logGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newDescribeLogStreams Source #

Create a value of DescribeLogStreams 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:descending:DescribeLogStreams', describeLogStreams_descending - If the value is true, results are returned in descending order. If the value is to false, results are returned in ascending order. The default value is false.

$sel:limit:DescribeLogStreams', describeLogStreams_limit - The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

$sel:logGroupIdentifier:DescribeLogStreams', describeLogStreams_logGroupIdentifier - Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.

If you specify values for both logGroupName and logGroupIdentifier, the action returns an InvalidParameterException error.

$sel:logStreamNamePrefix:DescribeLogStreams', describeLogStreams_logStreamNamePrefix - The prefix to match.

If orderBy is LastEventTime, you cannot specify this parameter.

DescribeLogStreams, describeLogStreams_nextToken - The token for the next set of items to return. (You received this token from a previous call.)

$sel:orderBy:DescribeLogStreams', describeLogStreams_orderBy - If the value is LogStreamName, the results are ordered by log stream name. If the value is LastEventTime, the results are ordered by the event time. The default value is LogStreamName.

If you order the results by event time, you cannot specify the logStreamNamePrefix parameter.

lastEventTimestamp represents the time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.

DescribeLogStreams, describeLogStreams_logGroupName - The name of the log group.

If you specify values for both logGroupName and logGroupIdentifier, the action returns an InvalidParameterException error.

Request Lenses

describeLogStreams_descending :: Lens' DescribeLogStreams (Maybe Bool) Source #

If the value is true, results are returned in descending order. If the value is to false, results are returned in ascending order. The default value is false.

describeLogStreams_limit :: Lens' DescribeLogStreams (Maybe Natural) Source #

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

describeLogStreams_logGroupIdentifier :: Lens' DescribeLogStreams (Maybe Text) Source #

Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.

If you specify values for both logGroupName and logGroupIdentifier, the action returns an InvalidParameterException error.

describeLogStreams_logStreamNamePrefix :: Lens' DescribeLogStreams (Maybe Text) Source #

The prefix to match.

If orderBy is LastEventTime, you cannot specify this parameter.

describeLogStreams_nextToken :: Lens' DescribeLogStreams (Maybe Text) Source #

The token for the next set of items to return. (You received this token from a previous call.)

describeLogStreams_orderBy :: Lens' DescribeLogStreams (Maybe OrderBy) Source #

If the value is LogStreamName, the results are ordered by log stream name. If the value is LastEventTime, the results are ordered by the event time. The default value is LogStreamName.

If you order the results by event time, you cannot specify the logStreamNamePrefix parameter.

lastEventTimestamp represents the time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.

describeLogStreams_logGroupName :: Lens' DescribeLogStreams Text Source #

The name of the log group.

If you specify values for both logGroupName and logGroupIdentifier, the action returns an InvalidParameterException error.

Destructuring the Response

data DescribeLogStreamsResponse Source #

See: newDescribeLogStreamsResponse smart constructor.

Constructors

DescribeLogStreamsResponse' 

Fields

Instances

Instances details
Generic DescribeLogStreamsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

Associated Types

type Rep DescribeLogStreamsResponse :: Type -> Type #

Read DescribeLogStreamsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

Show DescribeLogStreamsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

NFData DescribeLogStreamsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

Eq DescribeLogStreamsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

type Rep DescribeLogStreamsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogStreams

type Rep DescribeLogStreamsResponse = D1 ('MetaData "DescribeLogStreamsResponse" "Amazonka.CloudWatchLogs.DescribeLogStreams" "amazonka-cloudwatch-logs-2.0-6gvDalNFsfE8djZ4aTfA4V" 'False) (C1 ('MetaCons "DescribeLogStreamsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "logStreams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [LogStream])) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newDescribeLogStreamsResponse Source #

Create a value of DescribeLogStreamsResponse 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:logStreams:DescribeLogStreamsResponse', describeLogStreamsResponse_logStreams - The log streams.

DescribeLogStreams, describeLogStreamsResponse_nextToken - Undocumented member.

$sel:httpStatus:DescribeLogStreamsResponse', describeLogStreamsResponse_httpStatus - The response's http status code.

Response Lenses