

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

# 使用 建立、更新和管理 CloudTrail Lake 整合 AWS CLI
<a name="lake-integrations-cli"></a>

本節說明您可以使用 建立、更新和管理 CloudTrail Lake 整合的命令 AWS CLI。

使用 時 AWS CLI，請記住您的命令會在為設定檔 AWS 區域 設定的 中執行。如果您想在不同區域中執行命令，則可變更設定檔的預設區域，或搭配 **--region** 參數使用命令。

## CloudTrail Lake 整合的可用命令
<a name="lake-integrations-cli-commands"></a>

在 CloudTrail Lake 中建立、更新和管理整合的命令包括：
+ `create-event-data-store` 為 外部的事件建立事件資料存放區 AWS。
+ `delete-channel` 刪除用於整合的頻道。
+ `[delete-resource-policy](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/delete-resource-policy.html)` 刪除連接至頻道的資源政策以進行 CloudTrail Lake 整合。
+ `[get-channel](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/get-channel.html)` 傳回 CloudTrail 頻道的相關資訊。
+ `[get-resource-policy](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/get-resource-policy.html)` 擷取連接至 CloudTrail 頻道之資源型政策文件的 JSON 文字。
+ `[list-channels](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/list-channels.html)` 列出目前帳戶中的頻道及其來源名稱。
+ `[put-audit-events](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail-data/put-audit-events.html)` 將應用程式事件擷取至 CloudTrail Lake。必要參數 `auditEvents`接受您希望 CloudTrail 擷取之事件的 JSON 記錄 （也稱為承載）。每個`PutAuditEvents`請求最多可以新增 100 個事件 （或最多 1 MB)。
+ `[put-resource-policy](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/put-resource-policy.html)` 將資源型許可政策連接到 CloudTrail 頻道，用於與 外部的事件來源整合 AWS。如需資源型政策的詳細資訊，請參閱[AWS CloudTrail 資源型政策範例](security_iam_resource-based-policy-examples.md)。
+ `update-channel` 更新所需頻道 ARN 或 UUID 指定的頻道。

如需 CloudTrail Lake 事件資料存放區的可用命令清單，請參閱 [事件資料存放區的可用命令](lake-eds-cli.md#lake-eds-cli-commands)。

如需 CloudTrail Lake 查詢的可用命令清單，請參閱 [CloudTrail Lake 查詢的可用命令](lake-queries-cli.md#lake-queries-cli-commands)。

如需 CloudTrail Lake 儀表板的可用命令清單，請參閱 [儀表板的可用命令](lake-dashboard-cli.md#lake-dashboard-cli-commands)。