

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# CloudTrail Lake 整合事件結構描述
<a name="query-integration-event-schema"></a>

下表說明符合 CloudTrail 事件記錄內容的必要和選用結構描述元素。`eventData` 的內容由您的事件提供；其他欄位則在擷取後由 CloudTrail 提供。

[CloudTrail 記錄管理、資料和網路活動事件的內容](cloudtrail-event-reference-record-contents.md) 將詳細說明 CloudTrail 事件記錄內容。
+ [擷取後由 CloudTrail 提供的欄位](#fields-cloudtrail)
+ [您的事件提供的欄位](#fields-event)<a name="fields-cloudtrail"></a>

CloudTrail 會在擷取後提供下列欄位：


| 欄位名稱 | 輸入類型 | 需求 | Description | 
| --- | --- | --- | --- | 
| eventVersion | string | 必要 | 事件版本。 | 
| eventCategory | string | 必要 | 事件類別。對於非AWS 事件，值為 `ActivityAuditLog`。 | 
| eventType | string | 必要 | 事件類型。對於非AWS 事件，有效值為 `ActivityLog`。 | 
| eventID | string | 必要 | 事件的唯一 ID。 | 
| eventTime | string | 必要 | 事件時間戳記，採用 `yyyy-MM-DDTHH:mm:ss` 格式和國際標準時間 (UTC)。 | 
| awsRegion | string | 必要 | 進行`PutAuditEvents`呼叫 AWS 區域 的 。 | 
| recipientAccountId | string | 必要 | 代表收到此事件的帳戶 ID。CloudTrail 會根據事件承載進行計算，以填入此欄位。 | 
| 附錄 | - | 選用 | 顯示事件處理延遲原因的相關資訊。如果現有事件中缺少資訊，則附錄區塊會包含缺少的資訊，以及缺失的原因。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 選用 | 事件或其部分內容遺失的原因。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 選用 | 附錄所更新的事件記錄欄位。只有當原因是 `UPDATED_DATA` 才提供此資訊。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 選用 | 來自來源的原始事件 UID。只有當原因是 `UPDATED_DATA` 才提供此資訊。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 選用 | 原始事件 ID。只有當原因是 `UPDATED_DATA` 才提供此資訊。 | 
| 中繼資料 | - | 必要 | 事件所使用通道的相關資訊。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 處理事件時的時間戳記，採用 `yyyy-MM-DDTHH:mm:ss` 格式和國際標準時間 (UTC)。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 事件所使用通道的 ARN。 | <a name="fields-event"></a>

下列欄位由客戶事件提供：


| 欄位名稱 | 輸入類型 | 需求 | Description | 
| --- | --- | --- | --- | 
| eventData | - | 必要 | 在 PutAuditEvents 呼叫中傳送至 CloudTrail 的稽核資料。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 來自來源的事件版本。<br />長度限制：長度上限為 256。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | - | 必要 | 提出請求之使用者的相關資訊。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 使用者身分類型。<br />長度限制：長度上限為 128。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 事件執行者的唯一識別碼。<br />長度限制：長度上限為 1024。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | JSON 物件 | 選用 | 身分識別的其他相關資訊。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 選用 | 提出請求的代理程式。<br />長度限制：長度上限為 1024。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 這是合作夥伴事件來源，或記錄事件的自訂應用程式。<br />長度限制：長度上限為 1024。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 請求的動作，來源服務或應用程式的 API 中的動作之一。<br />長度限制：長度上限為 1024。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 事件時間戳記，採用 `yyyy-MM-DDTHH:mm:ss` 格式和國際標準時間 (UTC)。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 識別請求的 UID 值。呼叫的服務或應用程式會產生此值。<br />長度限制：長度上限為 1024。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/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_tw/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_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 選用 | 代表事件錯誤的字串。<br />長度限制：長度上限為 256。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 選用 | 錯誤的描述。<br />長度限制：長度上限為 256。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 選用 | 提出請求的 IP 地址。接受 IPv4 和 IPv6 地址。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/awscloudtrail/latest/userguide/query-integration-event-schema.html)  | string | 必要 | 代表收到此事件的帳戶 ID。帳戶 ID 必須與擁有頻道 AWS 的帳戶 ID 相同。 | 
|  [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/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
        }
    }
}
```