

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

# 監控 Amazon Keyspaces （適用於 Apache Cassandra)
<a name="monitoring-overview"></a>

監控是維護 Amazon Keyspaces 及其他 AWS 解決方案可靠性、可用性和效能的重要部分。 AWS 提供下列監控工具來監看 Amazon Keyspaces、在發生錯誤時回報，以及適時採取自動動作：
+ *Amazon Keyspaces* 在 中提供預先設定的儀表板， AWS 管理主控台 顯示帳戶內所有資料表彙總的延遲和錯誤。
+ *Amazon CloudWatch* AWS 會即時監控您的 AWS 資源和您在 上執行的應用程式。您可以使用自訂儀表板收集和追蹤指標。例如，您可以在各種時間和不同的負載條件下測量效能，為環境中的一般 Amazon Keyspaces 效能建立基準。當您監控 Amazon Keyspaces 時，請存放歷史監控資料，以便將其與目前的效能資料進行比較，識別正常效能模式和效能異常，並設計方法來解決問題。若要建立基準，您至少應該監控系統錯誤。如需更多資訊，請參閱 [Amazon CloudWatch 使用者指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/)。
+ *Amazon CloudWatch 警示*會在您指定的期間內監控單一指標，並根據相對於指定閾值的指標值，在多個期間內執行一或多個動作。例如，如果您在佈建模式中使用 Amazon Keyspaces 搭配應用程式自動擴展，則動作是由 Amazon Simple Notification Service (Amazon SNS) 傳送的通知，以評估 Application Auto Scaling 政策。

  CloudWatch 警示不會只因為處於特定狀態而叫用動作。狀態必須已變更，且在指定的期間數內維持此狀態。如需詳細資訊，請參閱[使用 Amazon CloudWatch 監控 Amazon Keyspaces](monitoring-cloudwatch.md)。
+ *Amazon CloudWatch Logs* 可讓您監控、存放和存取來自 Amazon Keyspaces 資料表、CloudTrail 和其他來源的日誌檔案。CloudWatch Logs 可監控日誌檔案中的資訊，並在達到特定閾值時通知您。您也可以將日誌資料存檔在高耐用性的儲存空間。如需詳細資訊，請參閱 [Amazon CloudWatch Logs 使用者指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/)。
+ *AWS CloudTrail* 擷取您 AWS 帳戶 發出或代表發出的 API 呼叫和相關事件，並傳送日誌檔案至您指定的 Amazon S3 儲存貯體。您可以找出哪些使用者和帳戶呼叫 AWS、發出呼叫的來源 IP 地址，以及呼叫的發生時間。如需詳細資訊，請參閱 [AWS CloudTrail 使用者指南](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)。

*Amazon EventBridge* 為無伺服器事件匯流排服務，可讓您輕鬆將應用程式與來自各種來源的資料互相連線。EventBridge 可從您自己的應用程式、Software-as-a-Service(SaaS) 應用程式 AWS 和服務提供即時資料串流，並將該資料路由到 Lambda 等目標。這可讓您監控在服務中發生的事件，並建置事件導向的架構。如需詳細資訊，請參閱 [Amazon EventBridge 使用者指南](https://docs.aws.amazon.com/eventbridge/latest/userguide/)。

**Topics**
+ [使用 Amazon CloudWatch 監控 Amazon Keyspaces](monitoring-cloudwatch.md)
+ [使用 記錄 Amazon Keyspaces API 呼叫 AWS CloudTrail](logging-using-cloudtrail.md)

# 使用 Amazon CloudWatch 監控 Amazon Keyspaces
<a name="monitoring-cloudwatch"></a>

您可以使用 Amazon CloudWatch 監控 Amazon Keyspaces，這會收集原始資料並將其處理為可讀且近乎即時的指標。這些統計資料會保留 15 個月，以便您存取歷史資訊，並更清楚 Web 應用程式或服務的執行效能。

您也可以設定留意特定閾值的警示，當滿足這些閾值時傳送通知或採取動作。如需詳細資訊，請參閱 [Amazon CloudWatch 使用者指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/)。

**注意**  
若要快速開始使用顯示 Amazon Keyspaces 常見指標的預先設定 CloudWatch 儀表板，您可以使用 提供的 CloudFormation 範本[https://github.com/aws-samples/amazon-keyspaces-cloudwatch-cloudformation-templates](https://github.com/aws-samples/amazon-keyspaces-cloudwatch-cloudformation-templates)。

**Topics**
+ [如何使用 Amazon Keyspaces 指標？](#how-to-use-metrics)
+ [Amazon Keyspaces 指標和維度](metrics-dimensions.md)
+ [在 CloudWatch 中檢視 Amazon Keyspaces 指標](view-metrics.md)
+ [建立 CloudWatch 警示以監控 Amazon Keyspaces](creating-alarms.md)

## 如何使用 Amazon Keyspaces 指標？
<a name="how-to-use-metrics"></a>

Amazon Keyspaces 報告的指標提供您可以以不同方式分析的資訊。下列清單顯示一些常見的指標用途。這些是協助您開始的建議，而不是完整清單。如需指標和保留的詳細資訊，請參閱[指標](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Metric)。


****  

|  如何？  |  相關指標  | 
| --- | --- | 
|  如何判斷是否發生任何系統錯誤？  |  您可以監控 `SystemErrors`來判斷是否有任何請求導致伺服器錯誤碼。這項指標通常應該等於零。如果不是，您可能想要調查。  | 
|  如何比較平均佈建讀取與已耗用讀取容量？  |  監控平均佈建的讀取容量和耗用的讀取容量 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/monitoring-cloudwatch.html) 您現在可以將平均消耗的讀取容量與佈建的容量進行比較。如需基本算術函數以及如何建立時間序列的詳細資訊，請參閱[使用指標數學](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html)。  | 
|  如何比較平均佈建寫入與耗用寫入容量？  |  監控平均佈建的寫入容量和耗用的寫入容量 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/monitoring-cloudwatch.html) 您現在可以將平均耗用寫入容量與佈建容量進行比較。如需基本算術函數以及如何建立時間序列的詳細資訊，請參閱[使用指標數學](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html)。  | 

# Amazon Keyspaces 指標和維度
<a name="metrics-dimensions"></a>

當您與 Amazon Keyspaces 互動時，它會將指標和維度傳送至 Amazon CloudWatch。所有指標都會每分鐘彙總和報告。下列各節概述 Amazon Keyspaces 的所有可用指標。

**Topics**
+ [Amazon Keyspaces 指標](#keyspaces-metrics-dimensions)
+ [Amazon Keyspaces 指標的維度](#keyspaces-metric-dimensions)
+ [Amazon Keyspaces 變更資料擷取 (CDC) 的指標](#keyspaces-cdc-metrics)
+ [Amazon Keyspaces 變更資料擷取 (CDC) 指標的維度](#keyspaces-metric-dimensions-cdc)

## Amazon Keyspaces 指標
<a name="keyspaces-metrics-dimensions"></a>

Amazon CloudWatch 每隔一分鐘彙總 Amazon Keyspaces 指標。

並非所有統計數字，例如 `Average` 或 `Sum`，皆適用於所有指標。不過，所有這些值都可以透過 Amazon Keyspaces 主控台，或使用 CloudWatch 主控台 AWS CLI，或為所有指標提供 AWS SDKs。在下表中，每個指標皆有適用於該指標的有效統計數字列表。


| 指標 | 描述 | 
| --- | --- | 
| AccountMaxTableLevelReads |  帳戶資料表可使用的讀取容量單位數目上限。對於隨需資料表，此限制會限制資料表可以使用的最大讀取請求單位。 單位：`Count` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| AccountMaxTableLevelWrites |  帳戶資料表可使用的最大寫入容量單位數量。對於隨需資料表，此限制會限制資料表可以使用的最大寫入請求單位。 單位：`Count` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| AccountProvisionedReadCapacityUtilization |  帳戶可以使用的佈建讀取容量單元百分比。 單位：`Percent` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| AccountProvisionedWriteCapacityUtilization |  帳戶使用的佈建寫入容量單元百分比。 單位：`Percent` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| BillableTableSizeInBytes |  資料表的計費大小，以位元組為單位。這是資料表中所有資料列的編碼大小總和。此指標可協助您追蹤一段時間內的資料表儲存成本。 單位：`Bytes` 維度：`Keyspace, TableName` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| ConditionalCheckFailedRequests |  失敗的輕量型交易 (LWT) 寫入請求數目。`INSERT`、`UPDATE` 以及 `DELETE` 操作可讓您提供邏輯條件，該條件必須評估為 true，才能繼續操作。如果此條件評估為 false， `ConditionalCheckFailedRequests` 會以 1 遞增。評估為 false 的條件檢查會根據資料列的大小耗用寫入容量單位。如需詳細資訊，請參閱[預估 Amazon Keyspaces 中輕量型交易的容量消耗](lightweight_transactions.md)。 單位：`Count` 維度：`Keyspace, TableName` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| ConsumedReadCapacityUnits |  在指定期間內耗用的讀取容量單位數量。如需詳細資訊，請參閱[讀取/寫入容量模式](https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html)。  若要了解您每秒的平均輸送量使用率，請使用 `Sum` 統計資料來計算一分鐘內消耗的輸送量。然後，將總和除以一分鐘內的秒數 (60)，以計算`ConsumedReadCapacityUnits`每秒平均數 （認識到此平均數不會反白顯示該分鐘內讀取活動中發生任何大型但短暫的峰值）。如需比較平均耗用讀取容量與佈建讀取容量的詳細資訊，請參閱 [如何使用 Amazon Keyspaces 指標？](monitoring-cloudwatch.md#how-to-use-metrics)  單位：`Count` 維度：`Keyspace, TableName` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| ConsumedWriteCapacityUnits |  在指定期間內耗用的寫入容量單位數量。您可以擷取資料表的總耗用寫入容量。如需詳細資訊，請參閱[讀取/寫入容量模式](https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html)。  若要了解您每秒的平均輸送量使用率，請使用 `Sum` 統計資料來計算一分鐘內消耗的輸送量。然後，將總和除以一分鐘內的秒數 (60)，以計算`ConsumedWriteCapacityUnits`每秒平均數 （認識到此平均值不會反白顯示在該分鐘內發生的任何大型但短暫的寫入活動峰值）。如需比較平均耗用寫入容量與佈建寫入容量的詳細資訊，請參閱 [如何使用 Amazon Keyspaces 指標？](monitoring-cloudwatch.md#how-to-use-metrics)  單位：`Count` 維度：`Keyspace, TableName` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| MaxProvisionedTableReadCapacityUtilization |  帳戶的最高佈建讀取資料表所使用的佈建讀取容量單位百分比。 單位：`Percent` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| MaxProvisionedTableWriteCapacityUtilization |  帳戶的最高佈建寫入資料表所使用的佈建寫入容量百分比。 單位：`Percent` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| PerConnectionRequestRateExceeded |  對超過每個連線請求速率配額的 Amazon Keyspaces 的請求。Amazon Keyspaces 的每個用戶端連線每秒最多可支援 3000 個 CQL 請求。用戶端可以建立多個連線來增加輸送量。 當您使用多區域複寫時，每個複寫的寫入也會造成此配額。根據最佳實務，建議您增加資料表的連線數，以避免`PerConnectionRequestRateExceeded`發生錯誤。您可以在 Amazon Keyspaces 中擁有的連線數目沒有限制。 單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| ProvisionedReadCapacityUnits |  資料表的佈建讀取容量單位數目。 `TableName` 維度會傳回資料表`ProvisionedReadCapacityUnits`的 。 單位：`Count` 維度：`Keyspace, TableName` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| ProvisionedWriteCapacityUnits |  資料表的佈建寫入容量單位數目。 `TableName` 維度會傳回資料表`ProvisionedWriteCapacityUnits`的 。 單位：`Count` 維度：`Keyspace, TableName` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| ReadThrottleEvents |  對 Amazon Keyspaces 的請求超過資料表的佈建讀取容量、帳戶層級配額、每個連線配額的請求或分割區層級配額。 單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| ReplicationLatency |  此指標僅適用於多區域金鑰空間`inserts`，並測量`deletes`從一個複本資料表複寫 `updates`、 或 到多區域金鑰空間中另一個複本資料表所花費的時間。 單位：`Millisecond` 維度：`TableName, ReceivingRegion` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| ReturnedItemCountBySelect |  在指定期間內多列`SELECT`查詢傳回的資料列數。多列`SELECT`查詢是不包含完整主索引鍵的查詢，例如完整資料表掃描和範圍查詢。 *傳回*的資料列數不一定與評估的資料列數相同。例如，假設您在具有 100 個資料列的資料表`ALLOW FILTERING`上請求`SELECT *`具有 的 ，但指定的`WHERE`子句縮小了結果範圍，因此只傳回 15 個資料列。在此情況下， 的回應`SELECT`將包含 100 `ScanCount`的 和 15 個傳回資料列`Count`的 。 單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| StoragePartitionThroughputCapacityExceeded |  請求超過分割區輸送量容量的 Amazon Keyspaces 儲存分割區。Amazon Keyspaces 儲存分割區每秒最多可支援 1000 WCU/WRU 和 3000 RCU/RRU。我們建議您檢閱資料模型，將讀取/寫入流量分散到更多分割區，以減輕這些例外狀況。  邏輯 Amazon Keyspaces 分割區可以跨越多個儲存分割區，而且大小幾乎沒有限制。  單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| SuccessfulRequestCount |  在指定期間內處理的成功請求數量。 單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| SuccessfulRequestLatency |  在指定期間內向 Amazon Keyspaces 提出的成功請求。 `SuccessfulRequestLatency` 可以提供兩種不同類型的資訊： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html) `SuccessfulRequestLatency` 只會反映 Amazon Keyspaces 內的活動，不會考慮網路延遲或用戶端活動。 單位：`Milliseconds` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| SystemErrors |  在指定期間內產生 的 Amazon Keyspaces `ServerError` 請求。`ServerError` 通常表示內部服務錯誤。 單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| SystemReconciliationDeletes |  啟用用戶端時間戳記時，用於刪除斷層資料的單位。每個 `SystemReconciliationDelete`都提供足夠的容量來刪除或更新每列最多 1KB 的資料。例如，若要更新儲存 2.5 KB 資料的資料列，並同時刪除資料列中的一或多個資料欄，則需要 3 `SystemReconciliationDeletes`。或者，若要刪除包含 3.5 KB 資料的整個資料列，需要 4 個 `SystemReconciliationDeletes`。 單位：`Count` 維度：`Keyspace, TableName` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| TTLDeletes |  使用存留時間 (TTL) 刪除或更新資料的資料所消耗的單位。每個 `TTLDelete`都提供足夠的容量來刪除或更新每列最多 1KB 的資料。例如，若要更新儲存 2.5 KB 資料的資料列，並同時刪除資料列中的一或多個資料欄，則需要刪除 3 個 TTL。或者，若要刪除包含 3.5 KB 資料的整個資料列，需要 4 個 TTL 刪除。 單位：`Count` 維度：`Keyspace, TableName` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| UserErrors |  在指定期間內產生`InvalidRequest`錯誤的 Amazon Keyspaces 請求。 `InvalidRequest` 錯誤通常代表用戶端錯誤，例如無效的參數組合、嘗試更新不存在的資料表，或不正確的請求簽章。 `UserErrors` 代表目前 AWS 區域 和目前 無效請求的彙總 AWS 帳戶。 單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| WriteThrottleEvents |  對 Amazon Keyspaces 的請求超過資料表的佈建寫入容量、帳戶層級配額、每個連線配額的請求或分割區層級配額。  單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 

## Amazon Keyspaces 指標的維度
<a name="keyspaces-metric-dimensions"></a>

Amazon Keyspaces 的指標取決於帳戶、資料表名稱或操作的值。您可以使用 CloudWatch 主控台，沿著下表中的任何維度擷取 Amazon Keyspaces 資料。


|  維度  |  描述  | 
| --- | --- | 
|  Keyspace  |  此維度會將資料限制在特定的金鑰空間。此值可以是目前 區域和目前 中的任何鍵空間 AWS 帳戶。  | 
|  Operation  |  此維度會將資料限制在其中一個 Amazon Keyspaces CQL 操作，例如 `INSERT`或 `SELECT`操作。  | 
|  TableName  |  此維度將資料限制為特定資料表。此值可以是目前區域和目前區域中的任何資料表名稱 AWS 帳戶。如果資料表名稱在帳戶中不是唯一的，您也必須指定 `Keyspace`。  | 

## Amazon Keyspaces 變更資料擷取 (CDC) 的指標
<a name="keyspaces-cdc-metrics"></a>

CloudWatch 帳戶中提供下列指標，可監控對 Amazon Keyspaces 變更資料擷取 (CDC) 端點的 API 呼叫。


| 指標 | 描述 | 
| --- | --- | 
| ReturnedRecordsCount |  `GetRecords` 操作在指定期間內傳回的串流記錄數目。 單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| SuccessfulRequestLatency |  在指定期間內向 Amazon Keyspaces 提出的成功請求。 `SuccessfulRequestLatency` 可以提供兩種不同類型的資訊： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html) `SuccessfulRequestLatency` 僅反映 Amazon Keyspaces CDC APIs 內的活動，且不考慮網路延遲或用戶端活動。 單位：`Milliseconds` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| SystemErrors |  在指定期間內產生`HTTP 500`狀態碼的 Amazon Keyspaces CDC 請求。`HTTP 500` 狀態碼通常表示內部服務錯誤。 單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 
| UserErrors |  在指定期間內產生`HTTP 400`狀態碼的 Amazon Keyspaces CDC 請求。 `UserErrors` 代表目前 AWS 區域 和目前 Amazon Keyspaces CDC 的`HTTP 400`錯誤彙總 AWS 帳戶。 單位：`Count` 維度：`Keyspace, TableName, Operation` 有效的統計數字： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/keyspaces/latest/devguide/metrics-dimensions.html)  | 

## Amazon Keyspaces 變更資料擷取 (CDC) 指標的維度
<a name="keyspaces-metric-dimensions-cdc"></a>

Amazon Keyspaces 的指標取決於帳戶、資料表名稱或操作的值。您可以使用 CloudWatch 主控台，沿著下表中的任何維度擷取 Amazon Keyspaces 資料。


|  維度  |  描述  | 
| --- | --- | 
|  StreamLabel  |  指定 `KeyspaceName`和 `TableName` 時，此維度會將資料限制在特定變更資料擷取 (CDC) 串流。  | 
|  Keyspace  |  此維度會將資料限制在特定的金鑰空間。此值可以是目前 區域和目前 中的任何鍵空間 AWS 帳戶。  | 
|  TableName  |  此維度將資料限制為特定資料表。此值可以是目前區域和目前區域中的任何資料表名稱 AWS 帳戶。如果資料表名稱在帳戶中不是唯一的，您也必須指定 `Keyspace`。  | 
|  Operation  |  此維度將資料限制為下列其中一個 Amazon Keyspaces Streams API 操作：`GetRecords`、 `GetStream` `GetShardIterator`和 `ListStreams`。  | 

# 在 CloudWatch 中檢視 Amazon Keyspaces 指標
<a name="view-metrics"></a>

當您與 Amazon Keyspaces 互動時，它會將下列指標和維度傳送至 Amazon CloudWatch。所有指標都會每分鐘彙總和報告。您可以使用下列程序來檢視 Amazon Keyspaces 的指標。

**使用 CloudWatch 主控台檢視指標**

指標會先依服務命名空間分組，再依各命名空間內不同的維度組合分類。

1. 在 [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) 開啟 CloudWatch 主控台。

1. 如有需要，請變更 AWS 區域。在導覽列上，選擇 AWS 資源所在的區域。如需詳細資訊，請參閱 [AWS 服務端點](https://docs.aws.amazon.com/general/latest/gr/rande.html)。

1. 在導覽窗格中，選擇 **指標**。

1. **在所有指標**索引標籤下，選擇 `AWS/Cassandra.`

**使用 AWS CLI 檢視指標**
+ 在命令提示中，使用下列命令。

  ```
  1. aws cloudwatch list-metrics --namespace "AWS/Cassandra"                        
  ```

# 建立 CloudWatch 警示以監控 Amazon Keyspaces
<a name="creating-alarms"></a>

您可以為 Amazon Keyspaces 建立 Amazon CloudWatch 警示，在警示變更狀態時傳送 Amazon Simple Notification Service (Amazon SNS) 訊息。警示會在您指定的期間監看單一指標。警示會根據在數個期間與指定閾值相關的指標值，來執行一個或多個動作。動作是傳送至 Amazon SNS 主題或 Application Auto Scaling 政策的通知。

當您以佈建模式搭配 Application Auto Scaling 使用 Amazon Keyspaces 時，此服務會代表您建立兩對 CloudWatch 警示。每對代表佈建和耗用輸送量設定的上限和下限。當資料表的實際使用率持續一段時間偏離您的目標使用率時，就會觸發這些 CloudWatch 警示。若要進一步了解 Application Auto Scaling 建立的 CloudWatch 警示，請參閱 [Amazon Keyspaces 自動擴展的運作方式](autoscaling.md#autoscaling.HowItWorks)。

警示僅會針對持續狀態變更調用動作。CloudWatch 警示不會只因為處於特定狀態而叫用動作。狀態必須已變更，且在指定的期間數內維持此狀態。

如需建立 CloudWatch 警示的詳細資訊，請參閱《[Amazon CloudWatch 使用者指南》中的使用 Amazon CloudWatch 警示](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html)。 *Amazon CloudWatch *

# 使用 記錄 Amazon Keyspaces API 呼叫 AWS CloudTrail
<a name="logging-using-cloudtrail"></a>

Amazon Keyspaces 已與 服務整合 AWS CloudTrail，此服務提供由 Amazon Keyspaces AWS 中的使用者、角色或服務所採取之動作的記錄。CloudTrail 會將 Amazon Keyspaces 的 Data Definition Language (DDL) API 呼叫和 Data Manipulation Language (DML) API 呼叫擷取為事件。擷取的呼叫包括來自 Amazon Keyspaces 主控台的呼叫，以及對 Amazon Keyspaces API 操作的程式設計呼叫。

如果您建立線索，則可以將 CloudTrail 事件持續交付至 Amazon Simple Storage Service (Amazon S3) 儲存貯體，包括 Amazon Keyspaces 的事件。

如果您未設定追蹤，您仍然可以在 CloudTrail 主控台的事件**歷史記錄中檢視最新的支援事件**。您可以使用 CloudTrail 所收集的資訊，判斷對 Amazon Keyspaces 提出的請求、提出請求的 IP 地址、提出請求的人員、提出請求的時間，以及其他詳細資訊。

若要進一步了解 CloudTrail，請參閱[「AWS CloudTrail 使用者指南」](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)。

**Topics**
+ [在 CloudTrail 中設定 Amazon Keyspaces 日誌檔案項目](#configuring-ct-entries)
+ [CloudTrail 中的 Amazon Keyspaces 資料定義語言 (DDL) 資訊](#keyspaces-in-cloudtrail-ddl)
+ [CloudTrail 中的 Amazon Keyspaces 資料處理語言 (DML) 資訊](#keyspaces-in-cloudtrail-dml)
+ [了解 Amazon Keyspaces 日誌檔案項目](#understanding-ct-entries)

## 在 CloudTrail 中設定 Amazon Keyspaces 日誌檔案項目
<a name="configuring-ct-entries"></a>

在 CloudTrail 中記錄的每個 Amazon Keyspaces API 動作都包含以 CQL 查詢語言表示的請求參數。如需更多資訊，請參閱[Amazon Keyspaces 的 CQL 語言參考 （適用於 Apache Cassandra)](cql.md)。

您可以檢視、搜尋和下載 AWS 帳戶的最新事件。如需詳細資訊，請參閱[使用 CloudTrail 事件歷史記錄檢視事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)。

若要持續記錄 中的事件 AWS 帳戶，包括 Amazon Keyspaces 的事件，請建立追蹤。*線索*能讓 CloudTrail 將日誌檔案交付至 Amazon S3 儲存貯體。根據預設，當您在主控台中建立線索時，線索會套用至所有 AWS 區域。線索會記錄 AWS 分割區中所有區域的事件，並將日誌檔案交付至您指定的 Amazon S3 儲存貯體。此外，您可以設定其他 AWS 服務，以進一步分析和處理 CloudTrail 日誌中所收集的事件資料。

如需詳細資訊，請參閱 *AWS CloudTrail 使用者指南*中的以下主題：
+ [建立追蹤的概觀](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail 支援的服務和整合](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations)
+ [設定 CloudTrail 的 Amazon SNS 通知](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/configure-sns-notifications-for-cloudtrail.html)
+ [從多個區域接收 CloudTrail 日誌檔案](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html)
+ [從多個帳戶接收 CloudTrail 日誌檔案](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

每一筆事件或日誌項目都會包含產生請求者的資訊。身分資訊可協助您判斷下列事項：
+ 是否使用根或 AWS Identity and Access Management (IAM) 使用者登入資料提出請求。
+ 提出該請求時，是否使用了特定角色或聯合身分使用者的暫時安全憑證。
+ 請求是否由其他 AWS 服務提出。

如需詳細資訊，請參閱 [CloudTrail userIdentity 元素](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)。

## CloudTrail 中的 Amazon Keyspaces 資料定義語言 (DDL) 資訊
<a name="keyspaces-in-cloudtrail-ddl"></a>

建立帳戶 AWS 帳戶 時，您的 上會啟用 CloudTrail。當 Amazon Keyspaces 中發生 DDL 活動時，該活動會自動記錄為 CloudTrail 事件，以及**事件歷史記錄**中的其他 AWS 服務事件。下表顯示為 Amazon Keyspaces 記錄的 DDL 陳述式。


| CloudTrail `eventName` | 陳述式 | CQL 動作 | AWS SDK 動作 | 
| --- | --- | --- | --- | 
|  CreateKeyspace  |  DDL  |  `CREATE KEYSPACE`  |  `CreateKeyspace`  | 
|  AlterKeyspace  |  DDL  |  `ALTER KEYSPACE`  |  `UpdateKeyspace`  | 
|  DropKeyspace  |  DDL  |  `DROP KEYSPACE`  |  `DeleteKeyspace`  | 
|  CreateTable  |  DDL  |  `CREATE TABLE`  |  `CreateTable`  | 
|  DropTable  |  DDL  |  `DROP TABLE`  |  `DeleteTable`  | 
|  AlterTable  |  DDL  |  `ALTER TABLE`  |  `UpdateTable`, `TagResource`, `UntagResource`  | 
| CreateUdt | DDL | `CREATE TYPE` | `CreateType` | 
| DropUdt | DDL | `DROP TYPE` | `DeleteType` | 
| GetStream | DDL | 沒有可用的 CQL 動作 | `GetStream` | 
| ListStreams | DDL | 沒有可用的 CQL 動作 | `ListStreams` | 

## CloudTrail 中的 Amazon Keyspaces 資料處理語言 (DML) 資訊
<a name="keyspaces-in-cloudtrail-dml"></a>

若要使用 CloudTrail 啟用記錄 Amazon Keyspaces DML 陳述式，您必須先在 CloudTrail 中啟用資料平面 API 活動的記錄。您可以選擇使用 CloudTrail 主控台記錄**資料事件類型 Cassandra 資料表的活動，或使用 CLI 或 CloudTrail API 操作將 值設定為 ，以開始在新的或現有的線索中記錄 Amazon Keyspaces DML 事件**。 **** `resources.type` `AWS::Cassandra::Table` AWS CloudTrail 如需詳細資訊，請參閱[記錄資料事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)。

如需詳細資訊和示範如何為資料事件建立警示的範例，請參閱 資料庫 AWS 部落格上的下列文章：[使用 Amazon Keyspaces 的 DML 稽核 （適用於 Apache Cassandra)](https://aws.amazon.com/blogs/database/using-dml-auditing-for-amazon-keyspaces-for-apache-cassandra/)。

下表顯示 CloudTrail 為 記錄的資料事件`Cassandra table`。


| CloudTrail `eventName` | 陳述式 | CQL 動作 | AWS SDK 動作 | 
| --- | --- | --- | --- | 
|  Select  |  DML  |  `SELECT`  |  `GetKeyspace`, `GetTable`, `GetType`, `ListKeyspaces`, `ListTables`, `ListTypes`, `ListTagsForResource`  | 
|  Insert  |  DML  |  `INSERT`  |  沒有可用的 AWS SDK 動作  | 
|  更新  |  DML  |  `UPDATE`  |  沒有可用的 AWS SDK 動作  | 
|  Delete  |  DML  |  `DELETE`  |  沒有可用的 AWS SDK 動作  | 
|  `GetShardIterator`  |  DML  |  沒有可用的 CQL 動作  |  `GetShardIterator`  | 
|  `GetRecords`  |  DML  |  沒有可用的 CQL 動作  |  `GetRecords`  | 

## 了解 Amazon Keyspaces 日誌檔案項目
<a name="understanding-ct-entries"></a>

CloudTrail 日誌檔案包含一或多個日誌專案。一個事件為任何來源提出的單一請求，並包含請求動作、請求的日期和時間、請求參數等資訊。CloudTrail 日誌檔並非依公有 API 呼叫的堆疊追蹤排序，因此不會以任何特定順序出現。

下列範例顯示示範 `CreateKeyspace`、`CreateTable`、 和 `DropTable`動作的 CloudTrail `DropKeyspace`日誌項目：

```
{
  "Records": [
    {
      "eventVersion": "1.05",
      "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AKIAIOSFODNN7EXAMPLE:alice",
        "arn": "arn:aws:sts::111122223333:assumed-role/users/alice",
        "accountId": "111122223333",
        "sessionContext": {
          "sessionIssuer": {
            "type": "Role",
            "principalId": "AKIAIOSFODNN7EXAMPLE",
            "arn": "arn:aws:iam::111122223333:role/Admin",
            "accountId": "111122223333",
            "userName": "Admin"
          },
          "webIdFederationData": {},
          "attributes": {
            "mfaAuthenticated": "false",
            "creationDate": "2020-01-15T18:47:56Z"
          }
        }
      },
      "eventTime": "2020-01-15T18:53:04Z",
      "eventSource": "cassandra.amazonaws.com",
      "eventName": "CreateKeyspace",
      "awsRegion": "us-east-1",
      "sourceIPAddress": "10.24.34.01",
      "userAgent": "Cassandra Client/ProtocolV4",
      "requestParameters": {
        "rawQuery": "\n\tCREATE KEYSPACE \"mykeyspace\"\n\tWITH\n\t\tREPLICATION = {'class': 'SingleRegionStrategy'}\n\t\t",
        "keyspaceName": "mykeyspace"
      },
      "responseElements": null,
      "requestID": "bfa3e75d-bf4d-4fc0-be5e-89d15850eb41",
      "eventID": "d25beae8-f611-4229-877a-921557a07bb9",
      "readOnly": false,
      "resources": [
        {
          "accountId": "111122223333",
          "type": "AWS::Cassandra::Keyspace",
          "ARN": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/mykeyspace/"
        }
      ],
      "eventType": "AwsApiCall",
      "apiVersion": "3.4.4",
      "recipientAccountId": "111122223333",
      "managementEvent": true,
      "eventCategory": "Management",
      "tlsDetails": {
          "tlsVersion": "TLSv1.2",
          "cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256",
          "clientProvidedHostHeader": "cassandra.us-east-1.amazonaws.com"
    },
    {
      "eventVersion": "1.05",
      "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AKIAIOSFODNN7EXAMPLE:alice",
        "arn": "arn:aws:sts::111122223333:assumed-role/users/alice",
        "accountId": "111122223333",
        "sessionContext": {
          "sessionIssuer": {
            "type": "Role",
            "principalId": "AKIAIOSFODNN7EXAMPLE",
            "arn": "arn:aws:iam::111122223333:role/Admin",
            "accountId": "111122223333",
            "userName": "Admin"
          },
          "webIdFederationData": {},
          "attributes": {
            "mfaAuthenticated": "false",
            "creationDate": "2020-01-15T18:47:56Z"
          }
        }
      },
      "eventTime": "2020-01-15T19:28:39Z",
      "eventSource": "cassandra.amazonaws.com",
      "eventName": "DropKeyspace",
      "awsRegion": "us-east-1",
      "sourceIPAddress": "10.24.34.01",
      "userAgent": "Cassandra Client/ProtocolV4",
      "requestParameters": {
        "rawQuery": "DROP KEYSPACE \"mykeyspace\"",
        "keyspaceName": "mykeyspace"
      },
      "responseElements": null,
      "requestID": "66f3d86a-56ae-4c29-b46f-abcd489ed86b",
      "eventID": "e5aebeac-e1dd-41e3-a515-84fe6aaabd7b",
      "readOnly": false,
      "resources": [
        {
          "accountId": "111122223333",
          "type": "AWS::Cassandra::Keyspace",
          "ARN": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/mykeyspace/"
        }
      ],
      "eventType": "AwsApiCall",
      "apiVersion": "3.4.4",
      "recipientAccountId": "111122223333",
      "managementEvent": true,
      "eventCategory": "Management",
      "tlsDetails": {
          "tlsVersion": "TLSv1.2",
          "cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256",
          "clientProvidedHostHeader": "cassandra.us-east-1.amazonaws.com"
    },
    {
      "eventVersion": "1.05",
      "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AKIAIOSFODNN7EXAMPLE:alice",
        "arn": "arn:aws:sts::111122223333:assumed-role/users/alice",
        "accountId": "111122223333",
        "sessionContext": {
          "sessionIssuer": {
            "type": "Role",
            "principalId": "AKIAIOSFODNN7EXAMPLE",
            "arn": "arn:aws:iam::111122223333:role/Admin",
            "accountId": "111122223333",
            "userName": "Admin"
          },
          "webIdFederationData": {},
          "attributes": {
            "mfaAuthenticated": "false",
            "creationDate": "2020-01-15T18:47:56Z"
          }
        }
      },
      "eventTime": "2020-01-15T18:55:24Z",
      "eventSource": "cassandra.amazonaws.com",
      "eventName": "CreateTable",
      "awsRegion": "us-east-1",
      "sourceIPAddress": "10.24.34.01",
      "userAgent": "Cassandra Client/ProtocolV4",
      "requestParameters": {
        "rawQuery": "\n\tCREATE TABLE \"mykeyspace\".\"mytable\"(\n\t\t\"ID\" int,\n\t\t\"username\" text,\n\t\t\"email\" text,\n\t\t\"post_type\" text,\n\t\tPRIMARY KEY((\"ID\", \"username\", \"email\")))",
        "keyspaceName": "mykeyspace",
        "tableName": "mytable"
      },
      "responseElements": null,
      "requestID": "5f845963-70ea-4988-8a7a-2e66d061aacb",
      "eventID": "fe0dbd2b-7b34-4675-a30c-740f9d8d73f9",
      "readOnly": false,
      "resources": [
        {
          "accountId": "111122223333",
          "type": "AWS::Cassandra::Table",
          "ARN": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/mykeyspace/table/mytable"
        }
      ],
      "eventType": "AwsApiCall",
      "apiVersion": "3.4.4",
      "recipientAccountId": "111122223333",
      "managementEvent": true,
      "eventCategory": "Management",
      "tlsDetails": {
          "tlsVersion": "TLSv1.2",
          "cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256",
          "clientProvidedHostHeader": "cassandra.us-east-1.amazonaws.com"
    },
    {
      "eventVersion": "1.05",
      "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AKIAIOSFODNN7EXAMPLE:alice",
        "arn": "arn:aws:sts::111122223333:assumed-role/users/alice",
        "accountId": "111122223333",
        "sessionContext": {
          "sessionIssuer": {
            "type": "Role",
            "principalId": "AKIAIOSFODNN7EXAMPLE",
            "arn": "arn:aws:iam::111122223333:role/Admin",
            "accountId": "111122223333",
            "userName": "Admin"
          },
          "webIdFederationData": {},
          "attributes": {
            "mfaAuthenticated": "false",
            "creationDate": "2020-01-15T18:47:56Z"
          }
        }
      },
      "eventTime": "2020-01-15T19:27:59Z",
      "eventSource": "cassandra.amazonaws.com",
      "eventName": "DropTable",
      "awsRegion": "us-east-1",
      "sourceIPAddress": "10.24.34.01",
      "userAgent": "Cassandra Client/ProtocolV4",
      "requestParameters": {
        "rawQuery": "DROP TABLE \"mykeyspace\".\"mytable\"",
        "keyspaceName": "mykeyspace",
        "tableName": "mytable"
      },
      "responseElements": null,
      "requestID": "025501b0-3582-437e-9d18-8939e9ef262f",
      "eventID": "1a5cbedc-4e38-4889-8475-3eab98de0ffd",
      "readOnly": false,
      "resources": [
        {
          "accountId": "111122223333",
          "type": "AWS::Cassandra::Table",
          "ARN": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/mykeyspace/table/mytable"
        }
      ],
      "eventType": "AwsApiCall",
      "apiVersion": "3.4.4",
      "recipientAccountId": "111122223333",
      "managementEvent": true,
      "eventCategory": "Management",
      "tlsDetails": {
          "tlsVersion": "TLSv1.2",
          "cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256",
          "clientProvidedHostHeader": "cassandra.us-east-1.amazonaws.com"
    }
  ]
}
```

下列日誌檔案顯示 `SELECT`陳述式的範例。

```
{
    "eventVersion": "1.09",
    "userIdentity": {
        "type": "IAMUser",
        "principalId": "AKIAIOSFODNN7EXAMPLE",
        "arn": "arn:aws:iam::111122223333:user/alice",
        "accountId": "111122223333",
        "userName": "alice"
    },
    "eventTime": "2023-11-17T10:38:04Z",
    "eventSource": "cassandra.amazonaws.com",
    "eventName": "Select",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "10.24.34.01",
    "userAgent": "Cassandra Client/ProtocolV4",
    "requestParameters": {
          "keyspaceName": "my_keyspace",
          "tableName": "my_table",
          "conditions": [
              "pk = **(Redacted)",
              "ck < 3**(Redacted)0",
              "region = 't**(Redacted)t'"
          ],
          "select": [
              "pk",
              "ck",
              "region"
          ],
          "allowFiltering": true
    },
    "responseElements": null,
    "requestID": "6d83bbf0-a3d0-4d49-b1d9-e31779a28628",
    "eventID": "e00552d3-34e9-4092-931a-912c4e08ba17",
    "readOnly": true,
    "resources": [
        {
            "accountId": "111122223333",
            "type": "AWS::Cassandra::Table",
            "ARN": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table"
        }
    ],
    "eventType": "AwsApiCall",
    "apiVersion": "3.4.4",
    "managementEvent": false,
    "recipientAccountId": "111122223333",
    "eventCategory": "Data",
    "tlsDetails": {
        "tlsVersion": "TLSv1.3",
        "cipherSuite": "TLS_AES_128_GCM_SHA256",
        "clientProvidedHostHeader": "cassandra.us-east-1.amazonaws.com"
    }
}
```

下列日誌檔案顯示 `INSERT`陳述式的範例。

```
{
    "eventVersion": "1.09",
    "userIdentity": {
        "type": "IAMUser",
        "principalId": "AKIAIOSFODNN7EXAMPLE",
        "arn": "arn:aws:iam::111122223333:user/alice",
        "accountId": "111122223333",
        "userName": "alice"
    },
    "eventTime": "2023-12-01T22:11:43Z",
    "eventSource": "cassandra.amazonaws.com",
    "eventName": "Insert",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "10.24.34.01",
    "userAgent": "Cassandra Client/ProtocolV4",
    "requestParameters": {
          "keyspaceName": "my_keyspace",
          "tableName": "my_table",
          "primaryKeys": {
              "pk": "**(Redacted)",
              "ck": "1**(Redacted)8"
          },
          "columnNames": [
              "pk",
              "ck",
              "region"
          ],
          "updateParameters": {
              "TTL": "2**(Redacted)0"
          }
      }
    },
    "responseElements": null,
    "requestID": "edf8af47-2f87-4432-864d-a960ac35e471",
    "eventID": "81b56a1c-9bdd-4c92-bb8e-92776b5a3bf1",
    "readOnly": false,
    "resources": [
        {
          "accountId": "111122223333",
          "type": "AWS::Cassandra::Table",
          "ARN": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table"
        }
    ],
    "eventType": "AwsApiCall",
    "apiVersion": "3.4.4",
    "managementEvent": false,
    "recipientAccountId": "111122223333",
    "eventCategory": "Data",
    "tlsDetails": {
        "tlsVersion": "TLSv1.3",
        "cipherSuite": "TLS_AES_128_GCM_SHA256",
        "clientProvidedHostHeader": "cassandra.us-east-1.amazonaws.com"
    }
}
```

下列日誌檔案顯示 `UPDATE`陳述式的範例。

```
{
    "eventVersion": "1.09",
    "userIdentity": {
          "type": "IAMUser",
          "principalId": "AKIAIOSFODNN7EXAMPLE",
          "arn": "arn:aws:iam::111122223333:user/alice",
          "accountId": "111122223333",
          "userName": "alice"
    },
    "eventTime": "2023-12-01T22:11:43Z",
    "eventSource": "cassandra.amazonaws.com",
    "eventName": "Update",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "10.24.34.01",
    "userAgent": "Cassandra Client/ProtocolV4",
    "requestParameters": {
          "keyspaceName": "my_keyspace",
          "tableName": "my_table",
          "primaryKeys": {
              "pk": "'t**(Redacted)t'",
              "ck": "'s**(Redacted)g'"
          },
          "assignmentColumnNames": [
             "nonkey"
          ],
          "conditions": [
              "nonkey < 1**(Redacted)7"
          ]
    },
    "responseElements": null,
    "requestID": "edf8af47-2f87-4432-864d-a960ac35e471",
    "eventID": "81b56a1c-9bdd-4c92-bb8e-92776b5a3bf1",
    "readOnly": false,
    "resources": [
        {
          "accountId": "111122223333",
          "type": "AWS::Cassandra::Table",
          "ARN": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table"
        }
    ],
    "eventType": "AwsApiCall",
    "apiVersion": "3.4.4",
    "managementEvent": false,
    "recipientAccountId": "111122223333",
    "eventCategory": "Data",
    "tlsDetails": {
          "tlsVersion": "TLSv1.3",
          "cipherSuite": "TLS_AES_128_GCM_SHA256",
          "clientProvidedHostHeader": "cassandra.us-east-1.amazonaws.com"
    }
}
```

下列日誌檔案顯示 `DELETE`陳述式的範例。

```
{
    "eventVersion": "1.09",
    "userIdentity": {
        "type": "IAMUser",
        "principalId": "AKIAIOSFODNN7EXAMPLE",
        "arn": "arn:aws:iam::111122223333:user/alice",
        "accountId": "111122223333",
        "userName": "alice",
    },
    "eventTime": "2023-10-23T13:59:05Z",
    "eventSource": "cassandra.amazonaws.com",
    "eventName": "Delete",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "10.24.34.01",
    "userAgent": "Cassandra Client/ProtocolV4",
    "requestParameters": {
        "keyspaceName": "my_keyspace",
        "tableName": "my_table",
        "primaryKeys": {
            "pk": "**(Redacted)",
            "ck": "**(Redacted)"
        },
        "conditions": [],
        "deleteColumnNames": [
            "m",
            "s"
        ],
        "updateParameters": {}
    },
    "responseElements": null,
    "requestID": "3d45e63b-c0c8-48e2-bc64-31afc5b4f49d",
    "eventID": "499da055-c642-4762-8775-d91757f06512",
    "readOnly": false,
    "resources": [
      {
        "accountId": "111122223333",
        "type": "AWS::Cassandra::Table",
        "ARN": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/table/my_table"
      }
    ],
    "eventType": "AwsApiCall",
    "apiVersion": "3.4.4",
    "managementEvent": false,
    "recipientAccountId": "111122223333",
    "eventCategory": "Data",
    "tlsDetails": {
        "tlsVersion": "TLSv1.3",
        "cipherSuite": "TLS_AES_128_GCM_SHA256",
        "clientProvidedHostHeader": "cassandra.us-east-1.amazonaws.com"
    }
}
```