

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

# 刪除中繼資料表組態
<a name="metadata-tables-delete-configuration"></a>

如果您想要停止更新 Amazon S3 一般用途儲存貯體的中繼資料表組態，您可以刪除連接至儲存貯體的中繼資料表組態。刪除中繼資料表組態只會刪除組態。受 AWS 管資料表儲存貯體和中繼資料資料表仍然存在，即使您刪除中繼資料資料表組態也一樣。不過，中繼資料表將不再更新。

**注意**  
如果刪除中繼資料資料表組態，並想要為相同的一般用途儲存貯體重新建立組態，您必須先從 AWS 受管資料表儲存貯體手動刪除舊日誌和庫存資料表。否則，建立新中繼資料資料表組態會失敗，因為這些資料表已存在。若要刪除您的中繼資料表，請參閱 [刪除中繼資料表](metadata-tables-delete-table.md)。

若要刪除您的中繼資料表，請參閱 [刪除中繼資料表](metadata-tables-delete-table.md#delete-metadata-table-procedure)。若要刪除您的資料表儲存貯體，請參閱 Amazon S3 API 參考**中的[刪除資料表儲存貯體](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-delete.html)和[https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3TableBuckets_DeleteTableBucket.html](https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3TableBuckets_DeleteTableBucket.html)。

您可以使用 Amazon S3 主控台、 AWS Command Line Interface (AWS CLI)、 AWS SDKs 或 Amazon S3 REST API 來刪除中繼資料表組態。

## 刪除中繼資料表組態
<a name="delete-metadata-config-procedure"></a>

### 使用 S3 主控台
<a name="delete-metadata-config-console"></a>

**刪除中繼資料表組態**

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

1. 在左側導覽窗格中，選擇**一般用途儲存貯體**。

1. 選擇您要從中移除中繼資料表組態的一般用途儲存貯體。

1. 在儲存貯體的詳細資訊頁面上，選擇**中繼資料**索引標籤。

1. 在**中繼資料**索引標籤上，選擇**刪除**。

1. 在**刪除中繼資料組態**對話方塊中，輸入 **confirm** 以確認您要刪除組態。然後選擇**刪除**。

### 使用 AWS CLI
<a name="delete-metadata-config-cli"></a>

若要執行下列命令，您必須 AWS CLI 安裝並設定 。如果您尚未 AWS CLI 安裝 ，請參閱*AWS Command Line Interface 《 使用者指南*》中的[安裝或更新至最新版本的 AWS CLI](https://docs.aws.amazon.com//cli/latest/userguide/getting-started-install.html) 。

或者，您可以使用 從主控台執行 AWS CLI 命令 AWS CloudShell。 AWS CloudShell 是一種以瀏覽器為基礎的預先驗證 Shell，您可以直接從 啟動 AWS 管理主控台。如需詳細資訊，請參閱《AWS CloudShell 使用者指南》**中的[什麼是 CloudShell](https://docs.aws.amazon.com//cloudshell/latest/userguide/welcome.html) 和[開始使用 AWS CloudShell](https://docs.aws.amazon.com//cloudshell/latest/userguide/getting-started.html)。

**使用 刪除中繼資料表組態 AWS CLI**

若要使用下列範例命令，請以您自己的資訊取代 `user input placeholders`。

1. 使用下列命令，從您的一般用途儲存貯體 (例如 `amzn-s3-demo-bucket`) 刪除中繼資料表組態：

   ```
   aws s3api delete-bucket-metadata-configuration \
   --bucket amzn-s3-demo-bucket \
   --region us-east-2
   ```

1. 若要確認已刪除組態，請使用下列命令：

   ```
   aws s3api get-bucket-metadata-configuration \
   --bucket amzn-s3-demo-bucket \
   --region us-east-2
   ```

### 使用 REST API
<a name="delete-metadata-config-rest-api"></a>

您可以傳送 REST 請求來刪除中繼資料表組態。如需詳細資訊，請參閱[https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataConfiguration.html](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataConfiguration.html)。

**注意**  
您可以搭配 V1 或 V2 中繼資料表組態來使用 V2 `DeleteBucketMetadataConfiguration` API 操作。不過，如果您嘗試搭配 V2 組態使用 V1 `DeleteBucketMetadataTableConfiguration` API 操作，您將會收到 HTTP `405 Method Not Allowed` 錯誤。

### 使用 AWS SDKs
<a name="delete-metadata-config-sdk"></a>

您可以使用 AWS SDKs來刪除 Amazon S3 中的中繼資料表組態。如需詳細資訊，請參閱[支援的 SDK 清單](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataConfiguration.html#API_DeleteBucketMetadataConfiguration_SeeAlso)。