v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1448206184.6 KB

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.

post/#X-Amz-Target=Logs_20140328.DescribeLogGroups

Query parameters

limitstring

Pagination limit

nextTokenstring

Pagination token

Headers

X-Amz-Target'Logs_20140328.DescribeLogGroups' required

Request body

accountIdentifiersAccountId[]

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

logGroupNamePrefixstring
<p>The prefix to match.</p> <note> <p> <code>logGroupNamePrefix</code> and <code>logGroupNamePattern</code> are mutually exclusive. Only one of these parameters can be passed. </p> </note>
logGroupNamePatternstring
<p>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 <code>Foo</code>, log groups named <code>FooBar</code>, <code>aws/Foo</code>, and <code>GroupFoo</code> would match, but <code>foo</code>, <code>F/o/o</code> and <code>Froo</code> would not match.</p> <note> <p> <code>logGroupNamePattern</code> and <code>logGroupNamePrefix</code> are mutually exclusive. Only one of these parameters can be passed. </p> </note>
nextTokenstring

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

limitinteger

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

includeLinkedAccountsboolean
<p>If you are using a monitoring account, set this to <code>True</code> to have the operation return log groups in the accounts listed in <code>accountIdentifiers</code>.</p> <p>If this parameter is set to <code>true</code> and <code>accountIdentifiers</code> 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. </p> <note> <p> If you specify <code>includeLinkedAccounts</code> in your request, then <code>metricFilterCount</code>, <code>retentionInDays</code>, and <code>storedBytes</code> are not included in the response. </p> </note>

Response

Success

nextTokenstring

The token for the next set of items to return. The token expires after 24 hours.