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

Description

Lists the specified log groups. You can list all your log groups or filter the results by prefix. The results are ASCII-sorted by log group name.

CloudWatch Logs doesn’t support IAM policies that control access to the DescribeLogGroups action by using the aws:ResourceTag/key-name condition key. Other CloudWatch Logs actions do support the use of the aws:ResourceTag/key-name condition key to control access. For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.

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 DescribeLogGroups Source #

See: newDescribeLogGroups smart constructor.

Constructors

DescribeLogGroups' 

Fields

  • accountIdentifiers :: Maybe [Text]

    When includeLinkedAccounts is set to True, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array.

  • includeLinkedAccounts :: Maybe Bool

    If you are using a monitoring account, set this to True to have the operation return log groups in the accounts listed in accountIdentifiers.

    If this parameter is set to true and accountIdentifiers contains a null value, the operation returns all log groups in the monitoring account and all log groups in all source accounts that are linked to the monitoring account.

    If you specify includeLinkedAccounts in your request, then metricFilterCount, retentionInDays, and storedBytes are not included in the response.

  • limit :: Maybe Natural

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

  • logGroupNamePattern :: Maybe Text

    If you specify a string for this parameter, the operation returns only log groups that have names that match the string based on a case-sensitive substring search. For example, if you specify Foo, log groups named FooBar, aws/Foo, and GroupFoo would match, but foo, F/o/o and Froo would not match.

    logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these parameters can be passed.

  • logGroupNamePrefix :: Maybe Text

    The prefix to match.

    logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these parameters can be passed.

  • nextToken :: Maybe Text

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

Instances

Instances details
ToJSON DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

ToHeaders DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

ToPath DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

ToQuery DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

AWSPager DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

AWSRequest DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

Associated Types

type AWSResponse DescribeLogGroups #

Generic DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

Associated Types

type Rep DescribeLogGroups :: Type -> Type #

Read DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

Show DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

NFData DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

Methods

rnf :: DescribeLogGroups -> () #

Eq DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

Hashable DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

type AWSResponse DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

type Rep DescribeLogGroups Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

type Rep DescribeLogGroups = D1 ('MetaData "DescribeLogGroups" "Amazonka.CloudWatchLogs.DescribeLogGroups" "amazonka-cloudwatch-logs-2.0-6gvDalNFsfE8djZ4aTfA4V" 'False) (C1 ('MetaCons "DescribeLogGroups'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "accountIdentifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "includeLinkedAccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)))) :*: (S1 ('MetaSel ('Just "logGroupNamePattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "logGroupNamePrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))))

newDescribeLogGroups :: DescribeLogGroups Source #

Create a value of DescribeLogGroups 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:accountIdentifiers:DescribeLogGroups', describeLogGroups_accountIdentifiers - When includeLinkedAccounts is set to True, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array.

$sel:includeLinkedAccounts:DescribeLogGroups', describeLogGroups_includeLinkedAccounts - If you are using a monitoring account, set this to True to have the operation return log groups in the accounts listed in accountIdentifiers.

If this parameter is set to true and accountIdentifiers contains a null value, the operation returns all log groups in the monitoring account and all log groups in all source accounts that are linked to the monitoring account.

If you specify includeLinkedAccounts in your request, then metricFilterCount, retentionInDays, and storedBytes are not included in the response.

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

$sel:logGroupNamePattern:DescribeLogGroups', describeLogGroups_logGroupNamePattern - If you specify a string for this parameter, the operation returns only log groups that have names that match the string based on a case-sensitive substring search. For example, if you specify Foo, log groups named FooBar, aws/Foo, and GroupFoo would match, but foo, F/o/o and Froo would not match.

logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these parameters can be passed.

$sel:logGroupNamePrefix:DescribeLogGroups', describeLogGroups_logGroupNamePrefix - The prefix to match.

logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these parameters can be passed.

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

Request Lenses

describeLogGroups_accountIdentifiers :: Lens' DescribeLogGroups (Maybe [Text]) Source #

When includeLinkedAccounts is set to True, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array.

describeLogGroups_includeLinkedAccounts :: Lens' DescribeLogGroups (Maybe Bool) Source #

If you are using a monitoring account, set this to True to have the operation return log groups in the accounts listed in accountIdentifiers.

If this parameter is set to true and accountIdentifiers contains a null value, the operation returns all log groups in the monitoring account and all log groups in all source accounts that are linked to the monitoring account.

If you specify includeLinkedAccounts in your request, then metricFilterCount, retentionInDays, and storedBytes are not included in the response.

describeLogGroups_limit :: Lens' DescribeLogGroups (Maybe Natural) Source #

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

describeLogGroups_logGroupNamePattern :: Lens' DescribeLogGroups (Maybe Text) Source #

If you specify a string for this parameter, the operation returns only log groups that have names that match the string based on a case-sensitive substring search. For example, if you specify Foo, log groups named FooBar, aws/Foo, and GroupFoo would match, but foo, F/o/o and Froo would not match.

logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these parameters can be passed.

describeLogGroups_logGroupNamePrefix :: Lens' DescribeLogGroups (Maybe Text) Source #

The prefix to match.

logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these parameters can be passed.

describeLogGroups_nextToken :: Lens' DescribeLogGroups (Maybe Text) Source #

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

Destructuring the Response

data DescribeLogGroupsResponse Source #

See: newDescribeLogGroupsResponse smart constructor.

Constructors

DescribeLogGroupsResponse' 

Fields

Instances

Instances details
Generic DescribeLogGroupsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

Associated Types

type Rep DescribeLogGroupsResponse :: Type -> Type #

Read DescribeLogGroupsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

Show DescribeLogGroupsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

NFData DescribeLogGroupsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

Eq DescribeLogGroupsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

type Rep DescribeLogGroupsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.DescribeLogGroups

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

newDescribeLogGroupsResponse Source #

Create a value of DescribeLogGroupsResponse 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:logGroups:DescribeLogGroupsResponse', describeLogGroupsResponse_logGroups - The log groups.

If the retentionInDays value is not included for a log group, then that log group's events do not expire.

DescribeLogGroups, describeLogGroupsResponse_nextToken - Undocumented member.

$sel:httpStatus:DescribeLogGroupsResponse', describeLogGroupsResponse_httpStatus - The response's http status code.

Response Lenses

describeLogGroupsResponse_logGroups :: Lens' DescribeLogGroupsResponse (Maybe [LogGroup]) Source #

The log groups.

If the retentionInDays value is not included for a log group, then that log group's events do not expire.