

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

# 刪除 ElastiCache 參數群組
<a name="ParameterGroups.Deleting"></a>

您可以使用 ElastiCache 主控台、 AWS CLI或 ElastiCache API 刪除自訂參數群組。

若參數群組已和任何叢集相關聯，您便無法刪除參數群組。您也無法刪除任何預設參數群組。

## 刪除參數群組 (主控台)
<a name="ParameterGroups.Deleting.CON"></a>

下列程序說明如何使用 ElastiCache 主控台刪除參數群組。

**使用 ElastiCache 主控台刪除參數群組**

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

1. 若要查看所有可用參數群組的清單，請從左側的導覽窗格中，選擇 **Parameter Groups (參數群組)**。

1. 透過選擇參數群組名稱左側的方塊，選擇您希望刪除的參數群組。

   **Delete (刪除)** 按鈕即變成作用中。

1. 選擇 **刪除**。

   **Delete Parameter Group (刪除參數群組)** 確認畫面隨即出現。

1. 若要刪除參數群組，請在 **Delete Parameter Groups (刪除參數群組)** 確認畫面上，選擇 **Delete (刪除)**。

   若要保留參數群組，請選擇 **Cancel (取消)**。

## 刪除參數群組 (AWS CLI)
<a name="ParameterGroups.Deleting.CLI"></a>

若要使用 刪除參數群組 AWS CLI，請使用命令 `delete-cache-parameter-group`。針對要刪除的參數群組，以 `--cache-parameter-group-name` 指定的參數群組不能有任何與其相關聯的叢集，也不能是預設參數群組。

以下範本程式碼會刪除 *myMem14* 參數群組。

**Example**  
針對 Linux、macOS 或 Unix：  

```
aws elasticache delete-cache-parameter-group \
    --cache-parameter-group-name {{myRed28}}
```
針對 Windows：  

```
aws elasticache delete-cache-parameter-group ^
    --cache-parameter-group-name {{myRed28}}
```

如需詳細資訊，請參閱[https://docs.aws.amazon.com/cli/latest/reference/elasticache/delete-cache-parameter-group.html](https://docs.aws.amazon.com/cli/latest/reference/elasticache/delete-cache-parameter-group.html)。

## 刪除參數群組 (ElastiCache API)
<a name="ParameterGroups.Deleting.API"></a>

若要使用 ElastiCache API 刪除參數群組，請使用 `DeleteCacheParameterGroup` 動作。針對要刪除的參數群組，以 `CacheParameterGroupName` 指定的參數群組不能有任何與其相關聯的叢集，也不能是預設參數群組。

**Example**  
使用 Memcached 時，下列範例程式碼會刪除 *myMem14* 參數群組。  

```
https://elasticache.us-west-2.amazonaws.com/
   ?Action=DeleteCacheParameterGroup
   &CacheParameterGroupName={{myMem14}}
   &SignatureVersion=4
   &SignatureMethod=HmacSHA256
   &Timestamp=20150202T192317Z
   &Version=2015-02-02
   &X-Amz-Credential=<credential>
```

**Example**  
以下範本程式碼會刪除 *myRed28* 參數群組。  

```
https://elasticache.us-west-2.amazonaws.com/
   ?Action=DeleteCacheParameterGroup
   &CacheParameterGroupName={{myRed28}}
   &SignatureVersion=4
   &SignatureMethod=HmacSHA256
   &Timestamp=20150202T192317Z
   &Version=2015-02-02
   &X-Amz-Credential=<credential>
```

如需詳細資訊，請參閱[https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DeleteCacheParameterGroup.html](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DeleteCacheParameterGroup.html)。