Queries apsaradb for PolarDB clusters under your Alibaba Cloud account or Apsara PolarDB clusters that a RAM user is authorized to access.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No DescribeDBClusters

The operation that you want to perform. Set the value to DescribeDBClusters.

RegionId String Yes cn-hangzhou

The region ID of the Apsara PolarDB cluster.

Note You can call the DescribeRegions operation to query the most recent region list.
DBClusterIds String No pc-xxxxxxxxxxxxxxxxx

The ID of the Apsara PolarDB cluster that you want to manage. You can specify multiple cluster IDs and separate them with commas (,).

DBClusterDescription String No pc-xxxxxxxxxxxxxxxxx

The description of the cluster. You can specify a keyword of the description to filter clusters.

DBClusterStatus String No Running

The status of the cluster. 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: A node is being added to the cluster.
  • DBNodeDeleting: A node is being removed from the cluster.
  • ClassChanging: The node specification is being updated.
  • NetAddressCreating: The network connection is being created.
  • NetAddressDeleting: The network connection is being deleted.
  • NetAddressModifying: The network connection is being modified.
DBType String No MySQL

The engine of the database. Valid values:

  • MySQL
  • PostgreSQL
  • Oracle
Tag.N.Key String No test1

The key of the tag, which can be used as a condition to filter clusters. A tag is a key-value pair. You can specify up to 20 tags in one request. The letter N specifies the sequence number of each key-value pair and must be unique. The values of N must be consecutive integers that start from 1. Each value of the Tag.N.Key parameter is paired with a value of the Tag.N.Value parameter.

Note It can be up to 64 characters in length and cannot start with aliyun, acs:, http://, or https:// the beginning.
Tag.N.Value String No 1111

The value of the tag, which can be used as a condition to filter clusters. A tag is a key-value pair. You can specify up to 20 tags in one request. The letter N specifies the sequence number of each key-value pair and must be unique. The values of N must be consecutive integers that start from 1. Each value of the Tag.N.Value parameter is paired with a value of the Tag.N.Key parameter.

Note
  • If you specify the Tag.N.Key parameter, you must also specify the Tag.N.Value parameter.
  • It can be up to 64 characters in length and cannot start with aliyun, acs:, http://, or https: ///Starts.
PageSize Integer No 30

The number of entries to return on each page. Valid values: 30, 50, and 100.

Default value: 30.

PageNumber Integer No 1

The number of the page to return. Pages start from page 1. Default value: 1.

ResourceGroupId String No rg-rexxxxxxxxxx

The ID of the resource group.

Response parameters

Parameter Type Example Description
Items Array

The list of clusters that were returned.

DBCluster
CreateTime String 2019-01-10T09:33:58Z

The time when the cluster was created.

DBClusterDescription String pc-xxxxxxxxxxxxxxxxx

The description of the Apsara PolarDB cluster.

DBClusterId String pc-xxxxxxxxxxxxxxxxx

The ID of the Apsara PolarDB cluster that you want to manage.

DBClusterNetworkType String VPC

The network type of the cluster.

DBClusterStatus String Running

The status of the cluster.

DBNodeClass String polar.mysql.x4.large

The specification of the available node.

DBNodeNumber Integer 2

The number of nodes.

DBNodes Array

The list of nodes in the cluster.

DBNode
DBNodeClass String polar.mysql.x4.large

The specification of the available node.

DBNodeId String pi-xxxxxxxxxxxxxxxxx

The ID of the node.

DBNodeRole String Writer

The role of the node. Valid values:

  • Writer
  • Reader
RegionId String cn-hangzhou

The ID of the region where the file system resides.

ZoneId String cn-hangzhou-g

The zone ID of the instance.

DBType String MySQL

The database engine that the RDS instance runs.

DBVersion String 5.6

The version of the database.

DeletionLock Integer 0

The status of the deletion protection feature of the cluster. Valid values:

  • 0: disabled.
  • 1: enabled. You cannot delete the cluster when the cluster is in the locked status.
Engine String POLARDB

The engine of the cluster.

ExpireTime String 2020-01-10T09:33:58Z

The time when the cluster expires.

Expired String false

Specifies whether the DRDS instance has expired.

LockMode String Unlock

The lock mode of the cluster. Valid values:

  • Unlock: The cluster is not locked.
  • ManualLock: The cluster is manually locked.
  • LockByExpiration: The cluster is automatically locked after it expires.
PayType String Postpaid

Billing method:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
RegionId String cn-hangzhou

The ID of the region.

ResourceGroupId String rg-rexxxxxxxxxx

The ID of the resource group.

StorageUsed Long 3150970880

The storage usage of the cluster.

Tags Array

The list of tags.

Tag
Key String test1

The key of the tag.

Value String 1111

The value of the tag.

VpcId String vpc-xxxxxxxxxxxxxxxxx

The ID of the VPC network where the cluster is deployed.

ZoneId String cn-hangzhou-g

The zone ID of the instance.

PageNumber Integer 1

The page number of the returned page.

PageRecordCount Integer 1

The number of clusters on the page.

RequestId String F7036AE7-20B7-43F8-9E58-558CCDED8CCB

The ID of the request.

TotalRecordCount Integer 1

The total number of entries returned.

Examples

Sample requests:

http(s)://polardb.aliyuncs.com/? Action=DescribeDBClusters
&RegionId=cn-hangzhou
&<Common request parameter>

Sample success responses

XML format

<DescribeDBClustersResponse>  
      <Items>
            <DBCluster>
                  <DBVersion>5.6</DBVersion>
                  <LockMode>Unlock</LockMode>
                  <DBClusterDescription>pc-xxxxxxxxxxxxxxxxx</DBClusterDescription>
                  <DBClusterNetworkType>VPC</DBClusterNetworkType>
                  <StorageUsed>3150970880</StorageUsed>
                  <ZoneId>cn-hangzhou-g</ZoneId>
                  <DBClusterId>pc-xxxxxxxxxxxxxxxxx</DBClusterId>
                  <VpcId>vpc-xxxxxxxxxxxxxxxxx</VpcId>
                  <Engine>POLARDB</Engine>
                  <DBClusterStatus>Running</DBClusterStatus>
                  <Tags>
                        <Tag>
                              <Value>1111</Value>
                              <Key>test1</Key>
                        </Tag>
                        <Tag>
                              <Value>2222</Value>
                              <Key>test2</Key>
                        </Tag>
                  </Tags>
                  <ExpireTime></ExpireTime>
                  <DBNodeClass>polar.mysql.x4.large</DBNodeClass>
                  <RegionId>cn-hangzhou</RegionId>
                  <Expired>false</Expired>
                  <CreateTime>2019-01-10T09:33:58Z</CreateTime>
                  <DBType>MySQL</DBType>
                  <DBNodes>
                        <DBNode>
                              <DBNodeRole>Writer</DBNodeRole>
                              <DBNodeClass>polar.mysql.x4.large</DBNodeClass>
                              <DBNodeId>pi-xxxxxxxxxxxxxxxxx</DBNodeId>
                        </DBNode>
                        <DBNode>
                              <DBNodeRole>Reader</DBNodeRole>
                              <DBNodeClass>polar.mysql.x4.large</DBNodeClass>
                              <DBNodeId>pi-xxxxxxxxxxxxxxxxx</DBNodeId>
                        </DBNode>
                  </DBNodes>
                  <DBNodeNumber>2</DBNodeNumber>
                  <PayType>Postpaid</PayType>
            </DBCluster>
      </Items>
      <TotalRecordCount>1</TotalRecordCount>
      <PageNumber>1</PageNumber>
      <RequestId>F7036AE7-20B7-43F8-9E58-558CCDED8CCB</RequestId>
      <PageRecordCount>1</PageRecordCount>
  </DescribeDBClustersResponse>

JSON format

{
    "Items": {
        "DBCluster": [
            {
                "DBVersion": "5.6",
                "LockMode": "Unlock",
                "DBClusterDescription": "pc-xxxxxxxxxxxxxxxxx",
                "DBClusterNetworkType": "VPC",
                "StorageUsed": 3150970880,
                "ZoneId": "cn-hangzhou-g",
                "DBClusterId": "pc-xxxxxxxxxxxxxxxxx",
                "VpcId": "vpc-xxxxxxxxxxxxxxxxx",
                "Engine": "POLARDB",
                "DBClusterStatus": "Running",
                "Tags": {
                    "Tag": [
                        {
                            "Value": "1111",
                            "Key": "test1"
                        },
                        {
                            "Value": "2222",
                            "Key": "test2"
                        }
                    ]
                },
                "ExpireTime": "",
                "DBNodeClass": "polar.mysql.x4.large",
                "RegionId": "cn-hangzhou",
                "Expired": false,
                "CreateTime": "2019-01-10T09:33:58Z",
                "DBType": "MySQL",
                "DBNodes": {
                    "DBNode": [
                        {
                            "DBNodeRole": "Writer",
                            "DBNodeClass": "polar.mysql.x4.large",
                            "DBNodeId": "pi-xxxxxxxxxxxxxxxxx"
                        },
                        {
                            "DBNodeRole": "Reader",
                            "DBNodeClass": "polar.mysql.x4.large",
                            "DBNodeId": "pi-xxxxxxxxxxxxxxxxx"
                        }
                    ]
                },
                "DBNodeNumber": "2",
                "PayType": "Postpaid"
            }
        ]
    },
    "TotalRecordCount": 1,
    "PageNumber": 1,
    "RequestId": "F7036AE7-20B7-43F8-9E58-558CCDED8CCB",
    "PageRecordCount": 1
}

Error codes

For a list of error codes, visit the API Error Center.