

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

# 在 Amazon Keyspaces 中停用 CDC 串流
<a name="keyspaces-delete-cdc"></a>

若要停用金鑰空間中的 CDC 串流，您可以在 CQL、 `update-table`命令與 AWS CLI或 主控台中使用 `ALTER TABLE`陳述式。

------
#### [ Cassandra Query Language (CQL) ]

**使用 CQL 停用串流 (CDC 串流）**

1. 若要停用串流，您可以使用下列陳述式。

   ```
   ALTER TABLE mykeyspace.mytable
   WITH cdc = FALSE;
   ```

1. 若要確認串流已停用，您可以使用下列陳述式。

   ```
   SELECT keyspace_name, table_name, cdc, custom_properties FROM system_schema_mcs.tables WHERE keyspace_name = 'mykeyspace' AND table_name = 'mytable';
   ```

   該陳述式的輸出看起來與此類似。

   ```
    keyspace_name | table_name | cdc   | custom_properties
   ---------------+------------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      mykeyspace  |   mytable  | False | {'capacity_mode': {'last_update_to_pay_per_request_timestamp': '1741385668642', 'throughput_mode': 'PAY_PER_REQUEST'}, 'encryption_specification': {'encryption_type': 'AWS_OWNED_KMS_KEY'}, 'point_in_time_recovery': {'status': 'disabled'}}
   ```

------
#### [ CLI ]

**使用 停用串流 (CDC 串流） AWS CLI**

1. 若要停用串流，您可以使用下列命令。

   ```
   aws keyspaces update-table \
   --keyspace-name 'mykeyspace' \
   --table-name 'mytable' \
   --cdc-specification status=DISABLED
   ```

1. 命令的輸出看起來與此範例類似。

   ```
   {
       "keyspaceArn": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/",
       "streamName": "my_stream"
   }
   ```

------
#### [ Console ]

**使用 Amazon Keyspaces 主控台停用串流 (CDC 串流）**

1. 登入 AWS 管理主控台，並在 https：//[https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home) 開啟 Amazon Keyspaces 主控台。

1. 在導覽窗格中，選擇**資料表**，然後從清單中選擇資料表。

1. 選擇**串流**索引標籤。

1. 選擇**編輯**。

1. 取消選取**開啟串流**。

1. 選擇**儲存變更**以停用串流。

------