调用DescribeGlobalDatabaseNetworks接口查看当前阿里云账号下所有全球数据库网络(GDN)列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeGlobalDatabaseNetworks

系统规定参数。取值:DescribeGlobalDatabaseNetworks

DBClusterId String pc-**************

集群ID。

说明 您可以调用DescribeDBClusters接口查看目标地域下所有的集群信息,包括集群ID。
PageSize Integer 30

每页记录数。默认值为30,取值如下:

  • 30
  • 50
  • 100
PageNumber Integer 1

页码。默认值为1,取值为大于0且不超过Integer数据类型的最大值。

GDNDescription String test

GDN描述。要求如下:

  • 不能以http://或https://开头。
  • 必须以大小写字母或中文开头。
  • 可以包含大小写字母、中文、数字、下划线(_)或连字符(-)。
  • 长度为2~126个字符。
GDNId String gdn-****************

GDN ID。

ResourceGroupId String rg-************

资源组ID。

返回数据

名称 类型 示例值 描述
TotalRecordCount Integer 1

总记录数。

PageRecordCount Integer 30

本页记录数量。

RequestId String 69A85BAF-1089-4CDF-A82F-0A140F******

请求ID。

PageNumber Integer 1

页数。

Items Array of GlobalDatabaseNetwork

GDN详情。

DBVersion String 8.0

数据库引擎版本号,当前仅支持8.0版本。

GDNId String gdn-****************

GDN ID。

CreateTime String 2020-03-23T05:46:54Z

GDN创建时间,格式为YYYY-MM-DDThh:mm:ssZ(UTC时间)。

GDNStatus String active

GDN状态,取值范围如下:

  • creating:创建中
  • active:运行中
  • deleting:删除中
  • locked:锁定中(此时无法对GDN下的任一集群执行任何操作)
  • removing_member:从集群正在脱离GDN
DBClusters Array of DBCluster

GDN包含的各集群详情。

DBClusterId String pc-****************

集群ID。

Role String primary

集群角色,取值范围如下:

  • primary:主集群
  • standby:从集群
说明 一个GDN中包含一个主集群和最多四个从集群。更多信息,请参见全球数据库网络(GDN)
RegionId String cn-hangzhou

地域ID。

DBType String MySQL

数据库引擎类型,当前仅支持MySQL类型。

GDNDescription String test

GDN描述。要求如下:

  • 不能以http://或https://开头。
  • 必须以大小写字母或中文开头。
  • 可以包含大小写字母、中文、数字、下划线(_)或连字符(-)。
  • 长度为2~126个字符。

示例

请求示例

http(s)://polardb.aliyuncs.com/?Action=DescribeGlobalDatabaseNetworks
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeGlobalDatabaseNetworksResponse>
<TotalRecordCount>1</TotalRecordCount>
<PageRecordCount>30</PageRecordCount>
<RequestId>69A85BAF-1089-4CDF-A82F-0A140F******</RequestId>
<PageNumber>1</PageNumber>
<Items>
    <GDNStatus>active</GDNStatus>
    <DBVersion>8.0</DBVersion>
    <GDNId>gdn-****************</GDNId>
    <CreateTime>2020-03-23T05:46:54Z</CreateTime>
    <GDNDescription>test</GDNDescription>
    <DBType>MySQL</DBType>
    <DBClusters>
        <Role>primary</Role>
        <DBClusterId>pc-****************</DBClusterId>
        <RegionId>cn-hangzhou</RegionId>
    </DBClusters>
    <DBClusters>
        <Role>standby</Role>
        <DBClusterId>pc-****************</DBClusterId>
        <RegionId>cn-shanghai</RegionId>
    </DBClusters>
</Items>
</DescribeGlobalDatabaseNetworksResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalRecordCount" : 1,
  "PageRecordCount" : 30,
  "RequestId" : "69A85BAF-1089-4CDF-A82F-0A140F******",
  "PageNumber" : 1,
  "Items" : [ {
    "GDNStatus" : "active",
    "DBVersion" : "8.0",
    "GDNId" : "gdn-****************",
    "CreateTime" : "2020-03-23T05:46:54Z",
    "GDNDescription" : "test",
    "DBType" : "MySQL",
    "DBClusters" : [ {
      "Role" : "primary",
      "DBClusterId" : "pc-****************",
      "RegionId" : "cn-hangzhou"
    }, {
      "Role" : "standby",
      "DBClusterId" : "pc-****************",
      "RegionId" : "cn-shanghai"
    } ]
  } ]
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidPageSize.Malformed The specified parameter PageSize is not valid. 指定的参数PageSize无效
400 InvalidPageNumber.Malformed The specified parameter PageNumber is not valid. 指定的参数PageNumber无效
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. 当前的记录中不存在提供的DBClusterId。

访问错误中心查看更多错误码。