查询容灾列表
功能介绍
该接口用于查询容灾列表。
仅支持DWS 2.0集群。
调用方法
请参见如何调用API。
URI
GET /v2/{project_id}/disaster-recoveries
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 参数解释: 项目ID。获取方法请参见获取项目ID。 约束限制: 不涉及。 取值范围: 不涉及。 默认取值: 不涉及。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| primary_cluster_id | 否 | String | 参数解释: 主集群ID。 约束限制: 不涉及。 取值范围: 不涉及。 默认取值: 不涉及。 |
| standby_cluster_id | 否 | String | 参数解释: 备集群ID。 约束限制: 不涉及。 取值范围: 不涉及。 默认取值: 不涉及。 |
| id | 否 | String | 参数解释: 容灾ID。 约束限制: 不涉及。 取值范围: 不涉及。 默认取值: 不涉及。 |
请求参数
无
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| disaster_recovery | Array of DisasterRecovery objects | 参数解释: 容灾对象。 取值范围: 不涉及。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| id | String | 参数解释: 容灾ID。 取值范围: 不涉及。 |
| status | String | 参数解释: 状态。 取值范围: 不涉及。 |
| name | String | 参数解释: 名称。 取值范围: 不涉及。 |
| dr_type | String | 参数解释: 容灾类型。 取值范围: 不涉及。 |
| primary_cluster_id | String | 参数解释: 主集群ID。 取值范围: 不涉及。 |
| primary_cluster_name | String | 参数解释: 主集群名称。 取值范围: 不涉及。 |
| standby_cluster_id | String | 参数解释: 备集群ID。 取值范围: 不涉及。 |
| standby_cluster_name | String | 参数解释: 备集群名称。 取值范围: 不涉及。 |
| primary_cluster_role | String | 参数解释: 主集群角色。 取值范围: 不涉及。 |
| standby_cluster_role | String | 参数解释: 备集群角色。 取值范围: 不涉及。 |
| primary_cluster_status | String | 参数解释: 主集群状态。 取值范围: 不涉及。 |
| standby_cluster_status | String | 参数解释: 备集群状态。 取值范围: 不涉及。 |
| primary_cluster_region | String | 参数解释: 主集群region。 取值范围: 不涉及。 |
| standby_cluster_region | String | 参数解释: 备集群region。 取值范围: 不涉及。 |
| primary_cluster_project_id | String | 参数解释: 主集群项目ID。 取值范围: 不涉及。 |
| standby_cluster_project_id | String | 参数解释: 备集群项目ID。 取值范围: 不涉及。 |
| last_disaster_time | String | 参数解释: 最近同步时间。 取值范围: 不涉及。 |
| start_time | String | 参数解释: 启动时间。 取值范围: 不涉及。 |
| create_time | String | 参数解释: 创建时间。 取值范围: 不涉及。 |
请求示例
无
响应示例
状态码:200
查询成功。
{
"disaster_recovery" : [ {
"id" : "9956ee8a-2f5b-4d76-8c18-4115e2393433",
"name" : "test-dr-1026-3",
"status" : "stop_failed",
"dr_type" : "az",
"primary_cluster_id" : "f6dc1f82-8d66-4750-a5d2-569d3f72cf61",
"primary_cluster_name" : "dr_2",
"standby_cluster_id" : "fb34f3f3-f86a-446b-9f2f-e0581ba55e73",
"standby_cluster_name" : "dr_1",
"primary_cluster_role" : "primary",
"standby_cluster_role" : "standby",
"primary_cluster_status" : "waiting",
"standby_cluster_status" : "waiting",
"primary_cluster_region" : "cn-north-7",
"standby_cluster_region" : "cn-north-7",
"primary_cluster_project_id" : "0536cdee2200d5912f7cc00b877980f1",
"standby_cluster_project_id" : "0536cdee2200d5912f7cc00b877980f1",
"last_disaster_time" : "2022-10-28T02:34:16",
"start_time" : null,
"create_time" : "2022-10-26T12:04:10"
}, {
"id" : "a85dee93-cd49-4c52-a44b-c50b24f6caae",
"name" : "test_dis",
"status" : "creating",
"dr_type" : "az",
"primary_cluster_id" : "3ef5daaa-d017-4354-80b3-8a69caf2e094",
"primary_cluster_name" : "t1031_02",
"standby_cluster_id" : "a07cb2f7-b17e-4d95-923b-a33d0c884d37",
"standby_cluster_name" : "t1028_02",
"primary_cluster_role" : "primary",
"standby_cluster_role" : "standby",
"primary_cluster_status" : null,
"standby_cluster_status" : null,
"primary_cluster_region" : "cn-north-7",
"standby_cluster_region" : "cn-north-7",
"primary_cluster_project_id" : "0536cdee2200d5912f7cc00b877980f1",
"standby_cluster_project_id" : "0536cdee2200d5912f7cc00b877980f1",
"last_disaster_time" : null,
"start_time" : null,
"create_time" : "2022-10-31T06:17:00"
} ]
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | 查询成功。 |
| 400 | 请求错误。 |
| 401 | 鉴权失败。 |
| 403 | 没有操作权限。 |
| 404 | 找不到资源。 |
| 500 | 服务内部错误。 |
| 503 | 服务不可用。 |