Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data DescribeLogGroups = DescribeLogGroups' {}
- newDescribeLogGroups :: DescribeLogGroups
- describeLogGroups_accountIdentifiers :: Lens' DescribeLogGroups (Maybe [Text])
- describeLogGroups_includeLinkedAccounts :: Lens' DescribeLogGroups (Maybe Bool)
- describeLogGroups_limit :: Lens' DescribeLogGroups (Maybe Natural)
- describeLogGroups_logGroupNamePattern :: Lens' DescribeLogGroups (Maybe Text)
- describeLogGroups_logGroupNamePrefix :: Lens' DescribeLogGroups (Maybe Text)
- describeLogGroups_nextToken :: Lens' DescribeLogGroups (Maybe Text)
- data DescribeLogGroupsResponse = DescribeLogGroupsResponse' {}
- newDescribeLogGroupsResponse :: Int -> DescribeLogGroupsResponse
- describeLogGroupsResponse_logGroups :: Lens' DescribeLogGroupsResponse (Maybe [LogGroup])
- describeLogGroupsResponse_nextToken :: Lens' DescribeLogGroupsResponse (Maybe Text)
- describeLogGroupsResponse_httpStatus :: Lens' DescribeLogGroupsResponse Int
Creating a Request
data DescribeLogGroups Source #
See: newDescribeLogGroups
smart constructor.
DescribeLogGroups' | |
|
Instances
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.
Instances
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.
describeLogGroupsResponse_nextToken :: Lens' DescribeLogGroupsResponse (Maybe Text) Source #
Undocumented member.
describeLogGroupsResponse_httpStatus :: Lens' DescribeLogGroupsResponse Int Source #
The response's http status code.