# CloudWatch Log Group

## Resource Type

`AWS.CloudWatch.LogGroup`

## Resource ID Format

For CloudWatch Log Groups, the resource ID is the ARN.

`arn:aws:logs:us-west-2:123456789012:log-group:/prefix/groupname:*`

## Background

CloudWatch Logs enables teams to centralize logs from systems, applications, and AWS services.

## Fields

| Field               | Type      | Description                                                                                                             |
| ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------- |
| `KmsKeyId`          | `String`  | The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.                                              |
| `MetricFilterCount` | `Integer` | The number of metric filters.                                                                                           |
| `RetentionInDays`   | `Integer` | The number of days to retain the log events in the specified log group. If this value is `null`, logs are kept forever. |
| `StoredBytes`       | `Integer` | The number of bytes stored in the log group.                                                                            |

```javascript
{
    "AccountId": "123456789012",
    "Arn": "arn:aws:logs:us-west-2:123456789012:log-group:/prefix/groupname:*",
    "KmsKeyId": null,
    "MetricFilterCount": 0,
    "Name": "/prefix/groupname",
    "Region": "us-west-2",
    "ResourceId": "arn:aws:logs:us-west-2:123456789012:log-group:/prefix/groupname:*",
    "ResourceType": "AWS.CloudWatch.LogGroup",
    "RetentionInDays": 365,
    "StoredBytes": 100000,
    "Tags": null,
    "TimeCreated": "2019-01-01T00:00:00.000Z"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.panther.com/cloud-scanning/cloud-resource-attributes/aws/cloudwatch-log-group.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
