

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

# 刪除 RDS Proxy
<a name="rds-proxy-deleting"></a>

 當您不再需要代理時，可以將它刪除。如果您讓與某一代理關聯的資料庫執行個體或叢集停止服務，也可能會刪除該代理。

## AWS 管理主控台
<a name="rds-proxy-deleting.console"></a>

**若要刪除代理**

1. 登入 AWS 管理主控台，開啟位於 [https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/) 的 Amazon RDS 主控台。

1.  在導覽窗格中，選擇 **Proxies** (代理)。

1.  從清單中選擇要刪除的代理。

1.  選擇 **Delete Proxy (刪除代理)**。

## AWS CLI
<a name="rds-proxy-deleting.CLI"></a>

 若要刪除資料庫代理，請使用 AWS CLI 命令 [delete-db-proxy](https://docs.aws.amazon.com/cli/latest/reference/rds/delete-db-proxy.html)。若要移除相關的關聯，請同時使用 [deregister-db-proxy-targets](https://docs.aws.amazon.com/cli/latest/reference/rds/deregister-db-proxy-targets.html) 命令。

```
aws rds delete-db-proxy --name proxy_name
```

```
aws rds deregister-db-proxy-targets
    --db-proxy-name proxy_name
    [--target-group-name target_group_name]
    [--target-ids comma_separated_list]       # or
    [--db-instance-identifiers instance_id]       # or
    [--db-cluster-identifiers cluster_id]
```

## RDS API
<a name="rds-proxy-deleting.API"></a>

 若要刪除資料庫代理，請呼叫 Amazon RDS API 函數 [DeleteDBProxy](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBProxy.html)。若要刪除相關項目和關聯，您也可以呼叫函數 [DeleteDBProxyTargetGroup](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeleteDBProxyTargetGroup.html) 和 [DeregisterDBProxyTargets](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DeregisterDBProxyTargets.html)。