

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

# 使用 建立、更新和管理事件資料存放區 AWS CLI
<a name="lake-eds-cli"></a>

**注意**  
AWS CloudTrail Lake 自 2026 年 5 月 31 日起不再向新客戶開放。如果您想要使用 CloudTrail Lake，請在該日期之前註冊。現有客戶可以繼續正常使用該服務。如需詳細資訊，請參閱[CloudTrail Lake 可用性變更](cloudtrail-lake-service-availability-change.md)。

本節說明可用來建立、更新和管理 CloudTrail Lake 事件資料存放區的 AWS CLI 命令。

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

## 事件資料存放區的可用命令
<a name="lake-eds-cli-commands"></a>

在 CloudTrail Lake 中建立和更新事件資料存放區的命令包括：
+ `create-event-data-store` 來建立事件資料存放區。
+ `get-event-data-store` 傳回事件資料存放區的相關資訊，包括為事件資料存放區設定的進階事件選取器。
+ `update-event-data-store` 變更現有事件資料存放區的組態。
+ `list-event-data-stores` 列出事件資料存放區。
+ `delete-event-data-store` 刪除事件資料存放區。
+ `restore-event-data-store` 還原待刪除的事件資料存放區。
+ `start-import` 開始將追蹤事件匯入事件資料存放區，或重試失敗的匯入。
+ `[get-import](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/get-import.html)` 傳回特定匯入的相關資訊。
+ `[stop-import](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/stop-import.html)` 停止將追蹤事件匯入事件資料存放區。
+ `[list-imports](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/list-imports.html)` 傳回所有匯入的資訊，或由 `ImportStatus`或 選取的匯入集`Destination`。
+ `[list-import-failures](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/list-import-failures.html)` 列出指定匯入的匯入失敗。
+ `stop-event-data-store-ingestion` 停止事件資料存放區上的事件擷取。
+ `start-event-data-store-ingestion` 在事件資料存放區上重新啟動事件擷取。
+ `enable-federation` 在事件資料存放區上啟用聯合，以查詢 Amazon Athena 中的事件資料存放區。
+ `disable-federation` 在事件資料存放區上停用聯合。停用聯合之後，您無法再對 Amazon Athena 中的事件資料存放區資料進行查詢。您可以繼續在 CloudTrail Lake 中查詢。
+ `[put-insight-selectors](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/put-insight-selectors.html)` 新增或修改現有事件資料存放區的 Insights 事件選取器，以及啟用或停用 Insights 事件。
+ `[get-insight-selectors](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/get-insight-selectors.html)` 傳回為事件資料存放區設定的 Insights 事件選取器相關資訊。
+ `[add-tags](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/add-tags.html)` 將一或多個標籤 （鍵/值對） 新增至現有的事件資料存放區。
+ `[remove-tags](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/remove-tags.html)` 從事件資料存放區移除一或多個標籤。
+ `[list-tags](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/list-tags.html)` 傳回與事件資料存放區相關聯的標籤清單。
+ [`get-event-configuration`](lake-cli-manage-eds.md#lake-cli-get-event-configuration) 傳回為事件資料存放區設定的任何資源標籤金鑰和 IAM 全域條件金鑰。命令也會傳回事件資料存放區是否設定為收集`Standard`大小事件或`Large`大小事件。
+ [`put-event-configuration`](lake-cli-manage-eds.md#lake-cli-put-event-configuration) 以展開事件大小，並新增或移除資源標籤金鑰和 IAM 全域條件金鑰。如需詳細資訊，請參閱[透過新增資源標籤索引鍵和 IAM 全域條件索引鍵來豐富 CloudTrail 事件](cloudtrail-context-events.md)。
+ `[put-resource-policy](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/put-resource-policy.html)` 將資源型政策連接到事件資料存放區。以資源為基礎的政策可讓您控制哪些主體可以在事件資料存放區上執行動作。如需範例政策，請參閱 [事件資料存放區的資源型政策範例](security_iam_resource-based-policy-examples.md#security_iam_resource-based-policy-examples-eds)。
+ `[get-resource-policy](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/get-resource-policy.html)` 以取得連接至事件資料存放區的資源型政策。
+ `[delete-resource-policy](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/delete-resource-policy.html)` 刪除連接至事件資料存放區的資源型政策。

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

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

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