

# 查看 Amazon Aurora 中的蓝绿部署
<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 管理控制台 并通过以下网址打开 Amazon RDS 控制台：[https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/)。

1. 在导航窗格中，选择 **Databases**（数据库），然后在列表中找到蓝绿部署。  
![\[数据库列表中的蓝绿部署\]](http://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/AuroraUserGuide/images/blue-green-deployment-view-db-list-aurora.png)

   蓝绿部署的 **Role**（角色）值为 **Blue/Green Deployment**（蓝绿部署）。

1. 选择要查看的蓝绿部署的名称以显示其详细信息。

   每个选项卡都有一个用于蓝色部署的部分和一个用于绿色部署的部分。例如，在**配置**选项卡上，如果在绿色环境中升级数据库引擎版本，则蓝色环境和绿色环境中的数据库引擎版本可能不同。

   下图显示**连接和安全**选项卡的示例：  
![\[蓝绿部署详细信息\]](http://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/AuroraUserGuide/images/blue-green-deployment-view-details-aurora.png)

   **连接和安全**选项卡还包括一个名为**复制**的部分，其中显示了复制的当前状态以及蓝色和绿色环境之间的副本滞后。如果复制状态为 `Replicating`，则表示蓝绿部署复制成功。

   对于使用逻辑复制的 Aurora PostgreSQL 蓝绿，如果您在蓝色环境中进行了不受支持的 DDL 或大型对象更改，则复制状态会变成 `Replication degraded`。有关更多信息，请参阅 [蓝绿部署的特定于逻辑复制的限制](blue-green-deployments-considerations.md#blue-green-deployments-limitations-postgres)。

   下图显示**配置**选项卡的示例：  
![\[蓝绿部署配置详细信息\]](http://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/AuroraUserGuide/images/blue-green-deployment-view-config-aurora.png)

   下图显示**状态**选项卡的示例：  
![\[蓝绿部署状态\]](http://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/AuroraUserGuide/images/blue-green-deployment-view-status-aurora.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`。