

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

# 刪除複寫群組
<a name="Replication.DeletingRepGroup"></a>

若您不再需要您其中一個包含複本的叢集 (在 API/CLI 中稱為「複寫群組」**)，您可以刪除它。刪除複寫群組時，ElastiCache 也會刪除該群組中的所有節點。

此作業開始後便無法中斷或取消。

**警告**  
當您刪除 ElastiCache for Redis OSS 叢集時，會保留您的手動快照。您還可以選擇在刪除叢集之前建立最終快照。自動快取快照則不會保留。
`CreateSnapshot` 需要 許可才能建立最終快照。如果沒有此許可，API 呼叫將會失敗，但有`Access Denied`例外狀況。

## 刪除複寫群組 (主控台)
<a name="Replication.DeletingRepGroup.CON"></a>

若要刪除具有複本的叢集，請參閱[在 ElastiCache 中刪除叢集](Clusters.Delete.md)。

## 刪除複寫群組 (AWS CLI)
<a name="Replication.DeletingRepGroup.CLI"></a>

使用命令 [delete-replication-group](https://docs.aws.amazon.com/AmazonElastiCache/latest/CommandLineReference/CLIReference-cmd-DeleteReplicationGroup.html) 來刪除複寫群組。

```
aws elasticache delete-replication-group --replication-group-id my-repgroup 
```

隨即出現提示，請您確認該項決定。輸入 *y* (是) 來立即啟動操作。在程序啟動後，便無法復原。

```
						
   After you begin deleting this replication group, all of its nodes will be deleted as well.
   Are you sure you want to delete this replication group? [Ny]y

REPLICATIONGROUP  my-repgroup  My replication group  deleting
```

## 刪除複寫群組 (ElastiCache API)
<a name="Replication.DeletingRepGroup.API"></a>

使用 `ReplicationGroup` 參數呼叫 [DeleteReplicationGroup](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DeleteReplicationGroup.html)。

**Example**  

```
https://elasticache.us-west-2.amazonaws.com/
   ?Action=DeleteReplicationGroup
   &ReplicationGroupId=my-repgroup
   &Version=2014-12-01
   &SignatureVersion=4
   &SignatureMethod=HmacSHA256
   &Timestamp=20141201T220302Z
   &X-Amz-Algorithm=&AWS;4-HMAC-SHA256
   &X-Amz-Date=20141201T220302Z
   &X-Amz-SignedHeaders=Host
   &X-Amz-Expires=20141201T220302Z
   &X-Amz-Credential=<credential>
   &X-Amz-Signature=<signature>
```

**注意**  
若您將 `RetainPrimaryCluster` 參數設為 `true`，便會刪除所有僅供讀取複本，但仍會保留主要叢集。