调用DescribeGlobalDatabaseNetwork接口查询全球数据库网络(GDN)详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeGlobalDatabaseNetwork |
系统规定参数。取值:DescribeGlobalDatabaseNetwork。 |
GDNId | String | 是 | gdn-bp1fttxsrmv***** |
GDN ID。 |
ResourceGroupId | String | 否 | rg-************ |
资源组ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
GDNStatus | String | active |
GDN的状态。取值:
|
Connections | Array of Connection |
链接信息。 |
|
ConnectionString | String | abc.polardb.rds.aliyuncs.com |
链接地址。 |
NetType | String | Private |
网络类型。 |
Port | String | 3306 |
链接地址的端口号。 |
DBVersion | String | 8.0 |
数据库引擎版本。当前仅支持8.0版本。 |
RequestId | String | 67F2E75F-AE67-4FB2-821F-A81237EACD15 |
请求ID。 |
GDNId | String | gdn-bp1fttxsrmv***** |
GDN ID。 |
CreateTime | String | 2020-02-24T11:57:54Z |
GDN的创建时间。 |
DBType | String | MySQL |
数据库引擎类型。当前仅支持MySQL类型。 |
GDNDescription | String | GDN-fortest |
GDN备注描述。要求如下:
|
DBClusters | Array of DBCluster |
GDN中包含的集群。 |
|
ReplicaLag | String | 1 |
主从集群间跨地域的复制延迟时间。单位为秒。 |
ExpireTime | String | 2020-11-14T16:00:00Z |
集群到期时间。 说明 仅付费方式为Prepaid(包年包月)的集群会返回具体参数值,Postpaid(按量付费)集群则返回空值。
|
Expired | String | false |
集群是否到期。
说明 仅付费方式为Prepaid(包年包月)的集群支持返回该参数。
|
DBNodeClass | String | polar.mysql.x4.large |
数据库节点规格。 |
PayType | String | Prepaid |
付费类型:
|
DBType | String | MySQL |
数据库引擎类型。当前仅支持MySQL类型。 |
RegionId | String | cn-hangzhou |
地域ID。 |
DBVersion | String | 8.0 |
数据库引擎版本。当前仅支持8.0版本。 |
DBClusterId | String | pc-wz9fb5nn44u1d**** |
GDN中的集群ID。 |
DBClusterStatus | String | Running |
GDN中的集群状态。具体请参见集群状态表。 |
StorageUsed | String | 3012558848 |
存储空间的使用量,单位为Byte。 |
DBClusterDescription | String | test |
集群描述。 |
Role | String | primary |
集群角色。取值:
说明 一个GDN中包含一个主集群和最多四个从集群。
|
DBNodes | Array of DBNode |
数据库节点的信息详情。 |
|
DBNodeClass | String | polar.mysql.x4.large |
数据库节点规格。 |
ZoneId | String | cn-hangzhou-i |
可用区ID。 |
CreationTime | String | 2020-03-23T21:35:43Z |
数据库节点的创建时间。 |
DBNodeRole | String | Reader |
数据库节点的角色。取值:
|
DBNodeStatus | String | Running |
节点状态。取值:
|
FailoverPriority | Integer | 1 |
Failover优先级。每个节点都有一个Failover优先级,决定了当故障切换时,该节点被选举为主节点的概率高低。数值越大,优先级越高,取值范围为1~15。 |
MaxConnections | Integer | 8000 |
集群最大的并发连接数。 |
MaxIOPS | Integer | 32000 |
最大I/O请求次数,即IOPS。 |
DBNodeId | String | pi-**************** |
数据库节点ID。 |
示例
请求示例
http(s)://polardb.aliyuncs.com/?Action=DescribeGlobalDatabaseNetwork
&GDNId=gdn-bp1fttxsrmv*****
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeGlobalDatabaseNetworkResponse>
<GDNStatus>active</GDNStatus>
<Connections>
<ConnectionString>abc.polardb.rds.aliyuncs.com</ConnectionString>
<NetType>Private</NetType>
<Port>3306</Port>
</Connections>
<DBVersion>8.0</DBVersion>
<RequestId>67F2E75F-AE67-4FB2-821F-A81237EACD15</RequestId>
<GDNId>gdn-bp1fttxsrmv*****</GDNId>
<CreateTime>2020-02-24T11:57:54Z</CreateTime>
<DBType>MySQL</DBType>
<GDNDescription>GDN-fortest</GDNDescription>
<DBClusters>
<ReplicaLag>1</ReplicaLag>
<ExpireTime>2020-11-14T16:00:00Z</ExpireTime>
<Expired>false</Expired>
<DBNodeClass>polar.mysql.x4.large</DBNodeClass>
<PayType>Prepaid</PayType>
<DBType>MySQL</DBType>
<RegionId>cn-hangzhou</RegionId>
<DBVersion>8.0</DBVersion>
<DBClusterId>pc-wz9fb5nn44u1d****</DBClusterId>
<DBClusterStatus>Running</DBClusterStatus>
<StorageUsed>3012558848</StorageUsed>
<DBClusterDescription>test</DBClusterDescription>
<Role>primary</Role>
<DBNodes>
<DBNodeClass>polar.mysql.x4.large</DBNodeClass>
<ZoneId>cn-hangzhou-i</ZoneId>
<CreationTime>2020-03-23T21:35:43Z</CreationTime>
<DBNodeRole>Reader</DBNodeRole>
<DBNodeStatus>Running</DBNodeStatus>
<FailoverPriority>1</FailoverPriority>
<MaxConnections>8000</MaxConnections>
<MaxIOPS>32000</MaxIOPS>
<DBNodeId>pi-****************</DBNodeId>
</DBNodes>
</DBClusters>
</DescribeGlobalDatabaseNetworkResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"GDNStatus" : "active",
"Connections" : [ {
"ConnectionString" : "abc.polardb.rds.aliyuncs.com",
"NetType" : "Private",
"Port" : "3306"
} ],
"DBVersion" : "8.0",
"RequestId" : "67F2E75F-AE67-4FB2-821F-A81237EACD15",
"GDNId" : "gdn-bp1fttxsrmv*****",
"CreateTime" : "2020-02-24T11:57:54Z",
"DBType" : "MySQL",
"GDNDescription" : "GDN-fortest",
"DBClusters" : [ {
"ReplicaLag" : "1",
"ExpireTime" : "2020-11-14T16:00:00Z",
"Expired" : "false",
"DBNodeClass" : "polar.mysql.x4.large",
"PayType" : "Prepaid",
"DBType" : "MySQL",
"RegionId" : "cn-hangzhou",
"DBVersion" : "8.0",
"DBClusterId" : "pc-wz9fb5nn44u1d****",
"DBClusterStatus" : "Running",
"StorageUsed" : "3012558848",
"DBClusterDescription" : "test",
"Role" : "primary",
"DBNodes" : [ {
"DBNodeClass" : "polar.mysql.x4.large",
"ZoneId" : "cn-hangzhou-i",
"CreationTime" : "2020-03-23T21:35:43Z",
"DBNodeRole" : "Reader",
"DBNodeStatus" : "Running",
"FailoverPriority" : 1,
"MaxConnections" : 8000,
"MaxIOPS" : 32000,
"DBNodeId" : "pi-****************"
} ]
} ]
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | GDN.NotFound | Failed to found GdnInstance by name:%s | 按名称查找gdn实例失败:%s |
404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的DBClusterId。 |
访问错误中心查看更多错误码。