

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

# 在 Amazon RDS 中檢視藍/綠部署
<a name="blue-green-deployments-viewing"></a>

您可以使用 AWS 管理主控台、AWS CLI 或 RDS API 檢視藍/綠部署的詳細資訊。

您也可以檢視和訂閱事件，以取得藍/綠部署的相關資訊。如需更多詳細資訊，請參閱 [藍/綠部署事件](USER_Events.Messages.md#USER_Events.Messages.BlueGreenDeployments)。

## 主控台
<a name="blue-green-deployments-viewing-console"></a>

**檢視藍/綠部署的詳細資訊**

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

1. 在導覽窗格中，選擇 **Databases** (資料庫)，然後在清單中尋找藍/綠部署。  
![\[資料庫清單中的藍/綠部署\]](http://docs.aws.amazon.com/zh_tw/AmazonRDS/latest/UserGuide/images/blue-green-deployment-view-db-list.png)

   藍/綠部署的 **Role** (角色) 值是 **Blue/Green Deployment** (藍/綠部署)。

1. 選擇您要檢視以顯示其詳細資訊的藍/綠部署名稱。

   每個索引標籤都有藍色部署的區段，以及綠色部署的區段。例如，在**組態**索引標籤上，如果您要升級綠色環境中的資料庫引擎版本，則資料庫引擎版本在藍色環境和綠色環境中可能會有所不同。

   下圖顯示**連線和安全**索引標籤的範例：  
![\[藍/綠部署詳細資訊\]](http://docs.aws.amazon.com/zh_tw/AmazonRDS/latest/UserGuide/images/blue-green-deployment-view-details.png)

   **連線與安全性**索引標籤也包含名為**複寫**的區段，其中顯示目前的複寫狀態，以及藍色環境與綠色環境之間的複本延遲。如果複寫狀態為 `Replicating`，則表示藍/綠部署成功複寫。

   對於 RDS for PostgreSQL 藍/綠部署 (使用邏輯複寫)，如果您在藍色環境中進行不支援的 DDL 或大型物件變更，則複寫狀態可能會變更為 `Replication degraded`。如需更多詳細資訊，請參閱 [藍/綠部署的邏輯複寫特定限制](blue-green-deployments-considerations.md#blue-green-deployments-limitations-postgres)。

   下圖顯示**組態**索引標籤的範例：  
![\[藍/綠部署組態詳細資訊\]](http://docs.aws.amazon.com/zh_tw/AmazonRDS/latest/UserGuide/images/blue-green-deployment-view-config.png)

   下圖顯示**狀態**索引標籤的範例：  
![\[藍/綠部署狀態\]](http://docs.aws.amazon.com/zh_tw/AmazonRDS/latest/UserGuide/images/blue-green-deployment-view-status.png)

## AWS CLI
<a name="blue-green-deployments-viewing-cli"></a>

若要使用 AWS CLI 檢視藍/綠部署的詳細資訊，請使用 [describe-blue-green-deployments](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-blue-green-deployments.html) 命令。

**Example 透過篩選藍/綠部署的名稱來檢視其詳細資訊**  
使用 [describe-blue-green-deployments](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-blue-green-deployments.html) 命令時，您可以依 `--blue-green-deployment-name` 篩選。  
下列範例顯示藍/綠部署 (名為 `my-blue-green-deployment`) 的詳細資訊。  

```
aws rds describe-blue-green-deployments \
  --filters Name=blue-green-deployment-name,Values=my-blue-green-deployment
```

**Example 透過指定藍/綠部署的識別符來檢視其詳細資訊**  
使用 [describe-blue-green-deployments](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-blue-green-deployments.html) 命令時，您可以指定 `--blue-green-deployment-identifier` 選項。  
下列範例顯示識別符為 `bgd-1234567890abcdef` 的藍/綠部署的詳細資訊。  

```
aws rds describe-blue-green-deployments \
  --blue-green-deployment-identifier bgd-1234567890abcdef
```

## RDS API
<a name="blue-green-deployments-viewing-api"></a>

若要使用 Amazon RDS API 檢視藍/綠部署的詳細資訊，請使用 [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeBlueGreenDeployments.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeBlueGreenDeployments.html) 操作並指定 `BlueGreenDeploymentIdentifier`。