Queries AnalyticDB for MySQL clusters in a specific region.

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 Yes DescribeDBClusters

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

RegionId String Yes cn-hangzhou

The region ID.

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

The ID of the cluster.

DBClusterDescription String No test

The description of the cluster.

DBClusterStatus String No Running

The state of the cluster.

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. The value must be an integer that is greater than 0. Default value: 1.

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

The ID of the resource group.

Tag.N.Key String No tag1

The key of tag N, which can be used 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. The value of the Tag.N.Key parameter is the value of the Tag.N.Value parameter.

Note The tag key can be up to 64 characters in length and cannot start with aliyun, acs:, http://, or https://.
Tag.N.Value String No test1

The value of tag N, which can be used 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. The value of the Tag.N.Value parameter is the value of the Tag.N.Key parameter.

Note The tag value can be up to 64 characters in length and cannot start with aliyun, acs:, http://, or https://.

Response parameters

Parameter Type Example Description
TotalCount Integer 1

The total number of entries.

PageSize Integer 30

The number of entries returned on the current page.

RequestId String D65A809F-34CE-4550-9BC1-0ED21E******

The ID of the request.

PageNumber Integer 1

The number of pages returned.

Items Array of DBCluster

Details about the cluster.

DBCluster
DtsJobId String dtsb1***********

The ID of the Data Transmission Service (DTS) synchronization task. This parameter is returned only for MySQL analytic instances.

DBNodeCount Long 1

The number of node groups.

Expired String false

Indicates whether the cluster has expired. Valid values:

  • true: The cluster has expired.
  • false: The cluster has not expired.
CreateTime String 2021-04-01T09:50:18Z

The time when the cluster was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. Example: 2021-04-01T09:50:18Z.

PayType String Postpaid

The billing method of the cluster. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
DiskType String cloud_essd

The type of the disk. Valid values:

  • local_ssd: local disk
  • cloud: basic disk
  • cloud_ssd: standard SSD
  • cloud_efficiency: ultra disk
  • cloud_essd: enhanced SSD (ESSD) at performance level 1 (PL1)
  • cloud_essd2: ESSD at performance level 2 (PL2)
  • cloud_essd3: ESSD at performance level 3 (PL3)
Note For more information about ESSDs, see ESSDs.
Tags Array of Tag

Details about the tag.

Tag
Key String tag1

The key of the tag.

Note You can call the TagResources operation to add a tag to the cluster.
Value String test1

The value of the tag.

Mode String flexible

The mode of the cluster. Valid values:

  • flexible: the elastic mode
  • reserver: the reserved mode
Note For more information about cluster modes, see Editions.
Port String 3306

The port number that is used to connect to the cluster. Default value: 3306.

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 the cluster expires.
  • LockByRestoration: The cluster is automatically locked before a rollback of the cluster.
  • LockByDiskQuota: The cluster is automatically locked because 90% of the cluster storage is used.
StorageResource String 8Core32GB

The specifications of storage resources in elastic mode. These resources are used to read and write data. You can increase the value of this parameter to improve the read and write performance of the cluster.

ExecutorCount String 1

The number of compute nodes that are used by the cluster in elastic mode.

DBClusterId String am-*****************

The ID of the cluster.

ConnectionString String am-************************.ads.aliyuncs.com

The public endpoint of the cluster.

RdsInstanceId String rm-***************

The ID of the ApsaraDB RDS instance from which data is synchronized to the cluster. This parameter is returned only for MySQL analytic instances.

DBClusterType String Common

The type of the cluster or instance. Valid values:

  • Common: common cluster
  • RDS_ANALYSIS: MySQL analytic instance
CommodityCode String ads

The commodity code. ads is returned.

ExpireTime String 2999-09-08T16:00:00Z

The time when the cluster expired. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. Example: 2999-09-08T16:00:00Z.

Note
  • If the billing method of the cluster is set to subscription, the actual expiration time is returned.
  • If the billing method of the cluster is set to pay-as-you-go, 2999-09-08T16:00:00Z is returned.
DBNodeStorage Long 300

The storage capacity of the cluster. Unit: GB.

DBNodeClass String E8

The specifications of the node.

LockReason String instance_expired

The reason why the cluster is locked.

Note This parameter is returned only when the cluster is locked. The value is instance_expire.
VPCId String vpc-********************

The ID of the virtual private cloud (VPC).

RegionId String cn-hangzhou

The region ID of the cluster.

ComputeResource String 8Core32GB

The specifications of computing resources in elastic mode. These resources are used to compute data. The increase of computing resources can speed up queries. You can adjust the value of this parameter to scale the cluster.

ElasticIOResource Integer 0

The elastic I/O unit (EIU). For more information, see EIUs.

Note This parameter is returned only for clusters in elastic mode.
VSwitchId String vsw-********************

The ID of the vSwitch.

DBVersion String 3.0

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

VPCCloudInstanceId String am-****************-controller"

The ID of the instance that is deployed in the VPC.

DBClusterStatus String Running

The state of the cluster. For more information, see Cluster states.

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

The ID of the resource group.

DBClusterNetworkType String vpc

The network type of the cluster. Only VPC is supported.

DBClusterDescription String adb_test

The description of the cluster.

ZoneId String cn-hangzhou-h

The zone ID of the cluster.

Category String MIXED_STORAGE

The edition of the cluster. Valid values:

  • BASIC: Basic Edition
  • CLUSTER: Cluster Edition
  • MIXED_STORAGE: elastic mode for Cluster Edition
Note For more information about cluster editions, see Editions.
Engine String AnalyticDB

The engine of the cluster. AnalyticDB is returned.

Examples

Sample requests

http(s)://adb.aliyuncs.com/?Action=DescribeDBClusters
&RegionId=cn-hangzhou
&DBClusterIds=am-************
&DBClusterDescription=adb_test
&DBClusterStatus=Running
&PageSize=30
&PageNumber=1
&ResourceGroupId=rg-***************
&Tag=[{"Key":"tag1","Value":"test1"}]
&<Common request parameters>

Sample success responses

XML format

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

<DescribeDBClustersResponse>
    <TotalCount>1</TotalCount>
    <RequestId>D65A809F-34CE-4550-9BC1-0ED21E******</RequestId>
    <PageSize>30</PageSize>
    <PageNumber>1</PageNumber>
    <Items>
        <DBCluster>
            <StorageResource>8Core32GB</StorageResource>
            <Category>MIXED_STORAGE</Category>
            <ResourceGroupId>rg-***************</ResourceGroupId>
            <Port>3306</Port>
            <DBClusterId>am-****************</DBClusterId>
            <DBClusterNetworkType>VPC</DBClusterNetworkType>
            <DBClusterType>Common</DBClusterType>
            <DiskType>cloud_essd</DiskType>
            <ElasticIOResource>0</ElasticIOResource>
            <DBVersion>3.0</DBVersion>
            <DtsJobId/>
            <DBNodeCount>1</DBNodeCount>
            <CommodityCode>ads</CommodityCode>
            <ExecutorCount>1</ExecutorCount>
            <LockReason/>
            <Engine>AnalyticDB</Engine>
            <Tags>
                <Tag>
                    <Value>test1</Value>
                    <Key>tag1</Key>
                </Tag>
            </Tags>
            <DBNodeStorage>300</DBNodeStorage>
            <ZoneId>cn-hangzhou-h</ZoneId>
            <VPCId>vpc-*******************</VPCId>
            <DBClusterStatus>Running</DBClusterStatus>
            <CreateTime>2021-04-01T09:50:18Z</CreateTime>
            <VSwitchId>vsw-*******************</VSwitchId>
            <Mode>flexible</Mode>
            <DBClusterDescription>adb_test</DBClusterDescription>
            <ComputeResource>8Core32GB</ComputeResource>
            <PayType>Postpaid</PayType>
            <LockMode>Unlock</LockMode>
            <DBNodeClass>E8</DBNodeClass>
            <VPCCloudInstanceId>am-****************-controller</VPCCloudInstanceId>
            <RegionId>cn-hangzhou</RegionId>
            <ExpireTime>2999-09-08T16:00:00Z</ExpireTime>
            <ConnectionString>am-***********************.ads.aliyuncs.com</ConnectionString>
            <RdsInstanceId/>
        </DBCluster>
    </Items>
</DescribeDBClustersResponse>

JSON format

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

{
  "TotalCount" : 1,
  "RequestId" : "D65A809F-34CE-4550-9BC1-0ED21E******",
  "PageSize" : 30,
  "PageNumber" : 1,
  "Items" : {
    "DBCluster" : [ {
      "StorageResource" : "8Core32GB",
      "Category" : "MIXED_STORAGE",
      "ResourceGroupId" : "rg-***************",
      "Port" : "3306",
      "DBClusterId" : "am-****************",
      "DBClusterNetworkType" : "VPC",
      "DBClusterType" : "Common",
      "DiskType" : "cloud_essd",
      "ElasticIOResource" : 0,
      "DBVersion" : "3.0",
      "DtsJobId" : "",
      "DBNodeCount" : 1,
      "CommodityCode" : "ads",
      "ExecutorCount" : 1,
      "LockReason" : "",
      "Engine" : "AnalyticDB",
      "Tags" : {
        "Tag" : [ {
          "Value" : "test1",
          "Key" : "tag1"
        } ]
      },
      "DBNodeStorage" : 300,
      "ZoneId" : "cn-hangzhou-h",
      "VPCId" : "vpc-*******************",
      "DBClusterStatus" : "Running",
      "CreateTime" : "2021-04-01T09:50:18Z",
      "VSwitchId" : "vsw-*******************",
      "Mode" : "flexible",
      "DBClusterDescription" : "adb_test",
      "ComputeResource" : "8Core32GB",
      "PayType" : "Postpaid",
      "LockMode" : "Unlock",
      "DBNodeClass" : "E8",
      "VPCCloudInstanceId" : "am-****************-controller",
      "RegionId" : "cn-hangzhou",
      "ExpireTime" : "2999-09-08T16:00:00Z",
      "ConnectionString" : "am-***********************.ads.aliyuncs.com",
      "RdsInstanceId" : ""
    } ]
  }
}

Error codes

HTTP status code Error code Error message Description
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later.
503 ServiceUnavailable An error occurred while processing your request. The error message returned because the service is unavailable. Try again later.

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