All Products
Search
Document Center

PolarDB:DescribeGlobalDatabaseNetwork

Last Updated:Mar 01, 2024

Queries the information about a Global Database Network (GDN).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
polardb:DescribeGlobalDatabaseNetworkREAD
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
GDNIdstringYes

The ID of the GDN.

gdn-bp1fttxsrmv*****
ResourceGroupIdstringNo

The ID of the resource group.

rg-************

Response parameters

ParameterTypeDescriptionExample
object
GDNStatusstring

The status of the GDN. Valid values:

  • Creating: The GDN is being created.
  • active: The GDN is running.
  • deleting: The GDN is being deleted.
  • locked: The GDN is locked. If the GDN is locked, you cannot perform operations on clusters in the GDN.
  • removing_member: The secondary cluster is being removed from the GDN.
active
Connectionsobject []

The information about the connection to the cluster.

ConnectionStringstring

The URL of the endpoint.

abc.polardb.rds.aliyuncs.com
NetTypestring

The network type of the endpoint.

Private
Portstring

The port number of the endpoint.

3306
DBVersionstring

The version of the database engine. Only version 8.0 is supported.

8.0
RequestIdstring

The ID of the request.

67F2E75F-AE67-4FB2-821F-A81237EACD15
GDNIdstring

The ID of the GDN.

gdn-bp1fttxsrmv*****
CreateTimestring

The time at which the GDN was created.

2020-02-24T11:57:54Z
DBTypestring

The type of the database engine. Only MySQL is supported.

MySQL
GDNDescriptionstring

The description of the GDN. The description must meet the following requirements:

  • It cannot start with http:// or https://.
  • It must start with a letter.
  • It can contain letters, digits, underscores (_), and hyphens (-).
  • It must be 2 to 126 characters in length.
GDN-fortest
DBClustersobject []

The clusters that are included in the GDN.

ReplicaLagstring

The latency of cross-region data replication between the primary cluster and secondary clusters. Unit: seconds.

1
ExpireTimestring

The expiration time of the cluster.

Note A specific value is returned only for subscription (Prepaid) clusters. For pay-as-you-go (Postpaid) clusters, an empty string is returned.
2020-11-14T16:00:00Z
Expiredstring

Indicates whether the cluster is expired. Valid values:

  • true
  • false
Note This parameter is returned only for subscription (Prepaid) clusters.
false
DBNodeClassstring

The specifications of the node in the cluster.

polar.mysql.x4.large
PayTypestring

The billing method of the cluster. Valid values:

  • Postpaid: pay-as-you-go.
  • Prepaid: subscription.
Prepaid
DBTypestring

The type of the database engine. Only MySQL is supported.

MySQL
RegionIdstring

The ID of the region in which the cluster resides.

cn-hangzhou
DBVersionstring

The version of the database engine. Only version 8.0 is supported.

8.0
DBClusterIdstring

The ID of the cluster in the GDN.

pc-wz9fb5nn44u1d****
DBClusterStatusstring

The status of the cluster in the GDN. For more information, see Cluster status table.

Running
StorageUsedstring

The storage space that is occupied by the cluster. Unit: bytes.

3012558848
DBClusterDescriptionstring

The description of the cluster.

test
Rolestring

The role of the cluster. Valid values:

  • Primary: the primary cluster
  • standby: the secondary cluster
Note A GDN consists of one primary cluster and up to four secondary clusters.
primary
DBNodesobject []

The details of the node.

DBNodeClassstring

The specifications of the node in the cluster.

polar.mysql.x4.large
ZoneIdstring

The zone ID of the cluster.

cn-hangzhou-i
CreationTimestring

The time when the node was created.

2020-03-23T21:35:43Z
DBNodeRolestring

The role of the node. Valid values:

  • Writer: The node is the primary node.
  • Reader: The node is a read-only node.
Reader
DBNodeStatusstring

The status of the node. Valid values:

  • Creating: The cluster is being created.
  • Running: The cluster is running.
  • Deleting: The cluster is being deleted.
  • Rebooting: The cluster is restarting.
  • DBNodeCreating: PolarProxy is being added.
  • DBNodeDeleting: PolarProxy is being deleted.
  • ClassChanging: The specifications of PolarProxy are being changed.
  • NetAddressCreating: The network connection is being created.
  • NetAddressDeleting: The network connection is being deleted.
  • NetAddressModifying: The network connection is being modified.
  • MinorVersionUpgrading: The minor version is being updated.
  • Maintaining: The cluster is being maintained.
  • Switching: A failover is being performed.
Running
FailoverPriorityinteger

The priority of failover. Each node is assigned a failover priority. If a failover occurs, a node can be selected as the primary node based on the priority. A larger value indicates a higher priority. Valid values: 1 to 15.

1
MaxConnectionsinteger

The maximum number of concurrent connections to the cluster.

8000
MaxIOPSinteger

The maximum input/output operations per second (IOPS).

32000
DBNodeIdstring

The ID of the node.

pi-****************
DBClusterIdstring

The ID of the cluster.

pc-bp1s826a1up******
ResourceGroupIdstring

The ID of the resource group.

rg-************

Examples

Sample success responses

JSONformat

{
  "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-****************"
        }
      ]
    }
  ],
  "DBClusterId": "pc-bp1s826a1up******",
  "ResourceGroupId": "rg-************"
}

Error codes

HTTP status codeError codeError messageDescription
400GDN.NotFoundFailed to found GdnInstance by name:%sFailed to find cluster %s by GDN name.
404InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-24The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.
2021-06-21Add Operationsee changesets