# CloudTrail

## 리소스 유형

`AWS.CloudTrail`

## 리소스 ID 형식

CloudTrail 트레일의 경우 리소스 ID는 ARN입니다.

`arn:aws:cloudtrail:us-west-2:123456789012:trail/example-trail`

## 배경

그 [CloudTrail](https://aws.amazon.com/cloudtrail/) 리소스는 AWS 내에서 계정 활동을 추적하는 시스템을 나타냅니다.

## 필드

| 필드                           | Type      | 설명                                                                                                               |
| ---------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------- |
| `CloudWatchLogsLogGroupArn`  | `문자열`     | CloudTrail 로그가 전달될 로그 그룹을 나타내는 Amazon 리소스 이름입니다.                                                                 |
| `CloudWatchLogsRoleArn`      | `문자열`     | CloudWatch Logs 엔드포인트가 사용자의 로그 그룹에 쓰기 위해 맡을 역할입니다.                                                               |
| `HasCustomEventSelectors`    | `Boolean` | 트레일에 사용자 지정 이벤트 선택자가 있는지 지정합니다.                                                                                  |
| `HomeRegion`                 | `문자열`     | 트레일이 생성된 리전입니다.                                                                                                  |
| `IncludeGlobalServiceEvents` | `Boolean` | Amazon Global Services의 Amazon Web Services API 호출을 포함할지 여부를 나타내는 부울 값입니다.                                       |
| `IsMultiRegionTrail`         | `Boolean` | 트레일이 하나의 리전에만 존재하는지 또는 모든 리전에 존재하는지 여부입니다.                                                                       |
| `IsOrganizationTrail`        | `Boolean` | 트레일이 조직 트레일인지 여부입니다.                                                                                             |
| `KmsKeyId`                   | `문자열`     | CloudTrail이 전달하는 로그를 암호화하는 KMS 키 ID입니다.                                                                          |
| `LogFileValidationEnabled`   | `Boolean` | 로그 파일 검증이 활성화되어 있는지 여부입니다.                                                                                       |
| `S3BucketName`               | `문자열`     | CloudTrail이 트레일 파일을 전달하는 Amazon S3 버킷의 이름입니다.                                                                    |
| `S3KeyPrefix`                | `문자열`     | S3 버킷 이름 뒤에 오는 Amazon S3 키 접두사입니다.                                                                               |
| `SnsTopicARN`                | `문자열`     | CloudTrail이 로그 파일이 전달될 때 알림을 보내는 데 사용하는 Amazon SNS 주제의 ARN입니다.                                                   |
| `EventSelectors`             | `목록`      | 각 리전의 각 CloudTrail에 걸친 관리 및 데이터 이벤트 설정 모음                                                                        |
| `Status`                     | `맵`       | CloudTrail [상태](https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_GetTrailStatus.html) 마지막 이벤트의. |

## 예시

```javascript
{
    "AccountId": "123456789012",
    "Arn": "arn:aws:cloudtrail:us-west-2:123456789012:trail/example-trail",
    "CloudWatchLogsLogGroupArn": null,
    "CloudWatchLogsRoleArn": null,
    "EventSelectors": [
        {
            "DataResources": [
                {
                    "Type": "AWS::S3::Object",
                    "Values": null
                }
            ],
            "IncludeManagementEvents": true,
            "ReadWriteType": "All"
        }
    ],
    "HasCustomEventSelectors": true,
    "HomeRegion": "us-west-2",
    "IncludeGlobalServiceEvents": true,
    "IsMultiRegionTrail": true,
    "IsOrganizationTrail": true,
    "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/1111",
    "LogFileValidationEnabled": true,
    "Name": "example-trail",
    "Region": "us-west-2",
    "ResourceId": "arn:aws:cloudtrail:us-west-2:123456789012:trail/example-trail",
    "ResourceType": "AWS.CloudTrail",
    "S3BucketName": "example-bucket",
    "S3KeyPrefix": null,
    "SnsTopicARN": "arn:aws:sns:us-west-2:123456789012:example-topic",
    "SnsTopicName": "arn:aws:sns:us-west-2:123456789012:example-topic",
    "Status": {
        "IsLogging": true,
        "LatestCloudWatchLogsDeliveryError": null,
        "LatestCloudWatchLogsDeliveryTime": null,
        "LatestDeliveryAttemptSucceeded": "2019-01-01T00:00:00Z",
        "LatestDeliveryAttemptTime": "2019-01-01T00:00:00Z",
        "LatestDeliveryError": null,
        "LatestDeliveryTime": "2019-01-01T00:00:00Z",
        "LatestDigestDeliveryError": null,
        "LatestDigestDeliveryTime": "2019-01-01T00:00:00Z",
        "LatestNotificationAttemptSucceeded": "2019-01-01T00:00:00Z",
        "LatestNotificationAttemptTime": "2019-01-01T00:00:00Z",
        "LatestNotificationError": null,
        "LatestNotificationTime": "2019-01-01T00:00:00Z",
        "StartLoggingTime": "2019-01-01T00:00:00Z",
        "StopLoggingTime": null,
        "TimeLoggingStarted": "2019-01-01T00:00:00Z",
        "TimeLoggingStopped": null
    },
    "Tags": null,
    "TimeCreated": null
}
```
