

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

# CloudTrail 湖泊集成事件架构
<a name="query-integration-event-schema"></a>

下表描述了与 CloudTrail 事件记录中的架构元素相匹配的必需和可选架构元素。的`eventData`内容由您的事件提供；其他字段由摄取 CloudTrail 后提供。

CloudTrail 中对事件记录内容进行了更详细的描述[CloudTrail 记录管理、数据和网络活动事件的内容](cloudtrail-event-reference-record-contents.md)。
+ [摄取 CloudTrail 后提供的字段](#fields-cloudtrail)
+ [由您的事件提供的字段](#fields-event)<a name="fields-cloudtrail"></a>

以下字段由摄取 CloudTrail 后提供：


| 字段名称 | 输入类型 | 要求 | 说明 | 
| --- | --- | --- | --- | 
| eventVersion | 字符串 | 必需 |  事件版本。  | 
| eventCategory | 字符串 | 必需 |  事件类别。对于非AWS 事件，该值为`ActivityAuditLog`。  | 
| eventType | 字符串 | 必需 |  事件类型。对于非AWS 事件，有效值为`ActivityLog`。  | 
| eventID | 字符串 | 必需 | 事件的唯一 ID。 | 
| eventTime |  字符串  | 必需 |  采用通用协调时间（UTC）的事件时间戳，格式为 `yyyy-MM-DDTHH:mm:ss`。  | 
| awsRegion | 字符串 | 必需 |  `PutAuditEvents`拨打电话 AWS 区域 的地点。  | 
| recipientAccountId | 字符串 | 必需 |  表示收到此事件的账户 ID。 CloudTrail 通过根据事件负载计算来填充此字段。  | 
| 附录 |  -  | 可选 |  显示有关事件处理延迟原因的信息。如果现有事件中缺少信息，则附录块将包含缺失的信息，以及缺失信息的原因。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 可选 |  事件或其部分内容丢失的原因。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 可选 |  由附录更新的事件记录字段。只有在原因为 `UPDATED_DATA` 时才提供此信息。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 可选 |  来自源的原始事件 UID。只有在原因为 `UPDATED_DATA` 时才提供此信息。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 可选 |  原始事件 ID。只有在原因为 `UPDATED_DATA` 时才提供此信息。  | 
| 元数据 |  -  | 必需 |  有关活动使用的通道的信息。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 必需 |  处理事件时的时间戳，格式为 `yyyy-MM-DDTHH:mm:ss`，采用通用协调时间（UTC）。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 必需 |  活动使用的通道的 ARN。  | <a name="fields-event"></a>

客户事件提供以下字段：


| 字段名称 | 输入类型 | 要求 | 说明 | 
| --- | --- | --- | --- | 
| eventData |  -  | 必需 | 在PutAuditEvents通话 CloudTrail 中发送到的审计数据。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 必需 |  来自事件源的事件版本。 长度限制：最大长度为 256。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  -  | 必需 |  有关发出请求的用户的信息。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  字符串  | 必需 |  用户身份的类型。 长度限制：最大长度为 128。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  字符串  | 必需 |  事件的角色的唯一标识符。 长度限制：最大长度为 1024。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  JSON 对象  | 可选 |  有关身份的其他信息。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  字符串  | 可选 |  通过其发出请求的代理。 长度限制：最大长度为 1024。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  字符串  | 必需 |  这是合作伙伴事件源，或有关记录哪些事件的自定义应用程序。 长度限制：最大长度为 1024。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  字符串  | 必需 |  请求的操作，是源服务或应用程序的 API 中的操作之一。 长度限制：最大长度为 1024。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  字符串  | 必需 |  采用通用协调时间（UTC）的事件时间戳，格式为 `yyyy-MM-DDTHH:mm:ss`。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 必需 |  用于标识请求的 UID 值。被调用的服务或应用程序将生成此值。 长度限制：最大长度为 1024。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  JSON 对象  | 可选 |  与请求一起发送的参数（如果有）。此字段的最大大小为 100 kB，超过该限制的内容将被拒绝。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  JSON 对象  | 可选 |  可做出更改的操作（创建、更新或删除操作）的响应元素。此字段的最大大小为 100 kB，超过该限制的内容将被拒绝。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 可选 |  表示事件错误的字符串。 长度限制：最大长度为 256。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 可选 |  错误的描述。 长度限制：最大长度为 256。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  字符串  | 可选 |  已从中发出请求的 IP 地址。 IPv4 和 IPv6 地址都被接受。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | 字符串 | 必需 |  表示已收到此事件的账户 ID。账户 ID 必须与拥有该频道的 AWS 账户 ID 相同。  | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/awscloudtrail/latest/userguide/query-integration-event-schema.html)  |  JSON 对象  | 可选 |  不是请求或响应一部分的关于事件的其他数据。此字段的最大大小为 28 kB，超过该限制的内容将被拒绝。  | 

以下示例显示了与 CloudTrail 事件记录中的架构元素相匹配的架构元素的层次结构。

```
{
    "eventVersion": String,
    "eventCategory": String,
    "eventType": String,
    "eventID": String,
    "eventTime": String,
    "awsRegion": String,
    "recipientAccountId": String,
    "addendum": {
       "reason": String,
       "updatedFields": String,
       "originalUID": String, 
       "originalEventID": String
    },
    "metadata" : { 
       "ingestionTime": String,
       "channelARN": String
    },
    "eventData": {
        "version": String,
        "userIdentity": {
          "type": String,
          "principalId": String,
          "details": {
             JSON
          }
        }, 
        "userAgent": String,
        "eventSource": String,
        "eventName": String,
        "eventTime": String,
        "UID": String,
        "requestParameters": {
           JSON
        },
        "responseElements": {
           JSON
        },
        "errorCode": String,
        "errorMessage": String,
        "sourceIPAddress": String,
        "recipientAccountId": String,
        "additionalEventData": {
           JSON
        }
    }
}
```