

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# AWS 服务 事件
<a name="non-api-aws-service-events"></a>

CloudTrail 支持记录非 API 服务事件。这些事件由 AWS 服务创建，但不是由对公共 AWS API 的请求直接触发的。对于这些事件，`eventType` 字段为 `AwsServiceEvent`。

以下是客户托管密钥在 AWS Key Management Service (AWS KMS) 中自动轮换时的 AWS 服务事件场景示例。有关轮换 KMS 密钥的更多信息，请参阅[轮换 KMS 密钥](https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html)。

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "accountId": "111122223333",
        "invokedBy": "AWS Internal"
    },
    "eventTime": "2021-01-14T01:41:59Z",
    "eventSource": "kms.amazonaws.com",
    "eventName": "RotateKey",
    "awsRegion": "us-west-2",
    "sourceIPAddress": "AWS Internal",
    "userAgent": "AWS Internal",
    "requestParameters": null,
    "responseElements": null,
    "eventID": "a24b3967-ddad-417f-9b22-2332b918db06",
    "readOnly": false,
    "resources": [
        {
            "accountId": "111122223333",
            "type": "AWS::KMS::Key",
            "ARN": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        }
    ],
    "eventType": "AwsServiceEvent",
    "recipientAccountId": "111122223333",
    "serviceEventDetails": {
        "rotationType": "AUTOMATIC",
        "keyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
    },
    "eventCategory": "Management"
}
```