Queries AnalyticDB for MySQL clusters.

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 ID of the region. You can call DescribeRegions to query region IDs.

DBClusterIds String No am-bp1xxxxxxxx47

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

DBClusterDescription String No Test database

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

DBClusterStatus String No Running

The status of the cluster. For example, Creating and Locked. For more information, seeCluster status.

PageSize Integer No 30

The number of entries to return on each page. Valid values:

  • 30
  • 50
  • 100

Default value: 30.

PageNumber Integer No 1

The number of the page to return. The value must be a positive integer. Default value: 1.

Tag.N.Key String No test

The key of a tag that you can use to filter clusters. You can specify a maximum of 20 tags at a time. The number N in each key-value pair must be unique and 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 This parameter value can contain a maximum of 64 characters in length, and cannot start with aliyun, acs:, http://, or https://.
Tag.N.Value String No api

The value of a tag that you can use to filter clusters. You can specify a maximum of 20 tags at a time. The number N in each key-value pair must be unique and 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.

This parameter value can contain a maximum of 64 characters in length, and cannot start with aliyun, acs:, http://, or https://.

ResourceGroupId String No rg-rexxxxxxxxxx

The ID of the resource group.

Response parameters

Parameter Type Example Description
Items Array of DBCluster

A list of clusters.

DBCluster
Category String Basic

The edition of the cluster.

CommodityCode String AnalyticDB for MySQL

The name of the service.

ComputeResource String 24Core192GB

The specifications of computing resources in elastic mode. The increase of resources can speed up queries. AnalyticDB for MySQL automatically scales computing resources. For more information, see Specifications.

ConnectionString String am-bpxxxxxxxx.ads.aliyuncs.com

The endpoint of the cluster.

CreateTime String 2019-03-20T02:18:02Z

The time when the cluster was created.

DBClusterDescription String Test database

The description of the cluster.

DBClusterId String am-bpxxxxxxxx47

The ID of the cluster.

DBClusterNetworkType String VPC

The type of the network. Valid values:

  • Public: the Internet
  • VPC
DBClusterStatus String Running

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

DBClusterType String Common

The type of the cluster. The value Common indicates a primary cluster.

DBNodeClass String C8

The type of the node.

DBNodeCount Long 128

The number of node groups.

DBNodeStorage Long 100

The storage space of each node in the cluster.

DBVersion String 3.0

The version of the cluster. Only version 3.0 is available.

DiskType String cloud

The type of disks. Valid values:

  • cloud: basic disks
  • cloud_ssd: standard SSDs
  • cloud_efficiency: ultra disks
  • cloud_essd: enhanced SSDs at performance level 1. For more information, see Enhanced SSDs.
  • cloud_essd2: enhanced SSDs at performance level 2. For more information, see Enhanced SSDs.
  • cloud_essd3: enhanced SSDs at performance level 3. For more information, see Enhanced SSDs.
DtsJobId String dtsb1xxxxxxxxxx

The ID of the data synchronization task in DTS. This parameter is valid for analytic instances only.

Engine String AnalyticDB

The engine of the database. The value AnalyticDB is returned.

ExecutorCount String 3

The number of nodes. The node resources are used for data computing in elastic mode.

ExpireTime String 2020-03-20T02:18:02Z

The time when the cluster expires.

Note If the billing method of a cluster is pay-as-you-go, the cluster never expires.
Expired String false

Indicates whether the cluster has expired. Valid values:

  • true: The cluster has expired.
  • false: The cluster has not expired.
LockMode String unlock

The lock mode of the cluster. Valid values:

  • Unlock: The cluster is unlocked.
  • ManualLock: The cluster is manually locked.
  • LockByExpiration: The cluster is automatically locked because it has expired.
  • LockByRestoration: The cluster is automatically locked for a rollback.
  • LockByDiskQuota: The cluster is automatically locked because the disk space is used up.
LockReason String instance_expired

Indicates the reason why the cluster is locked.

Mode String flexible

The mode of the cluster. Valid values:

  • flexible: the elastic mode. The cluster uses Elastic Compute Service (ECS) instances.
  • reserver: the reserved mode. The cluster uses physical servers.
PayType String Postpaid

The billing method of the cluster. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
Port String 3306

The port that is used to access the cluster.

RdsInstanceId String rm-bp1oxxxxxxxxxx

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

RegionId String cn-hangzhou

The ID of the region.

ResourceGroupId String rg-rexxxxxxxxxx

The ID of the resource group.

StorageResource String 24Core192GB

The specifications of storage resources in elastic mode. The resources are used for data read and write operations. The increase of resources can improve the read and write performance of your cluster. For more information, see Specifications.

Tags Array of Tag

A list of tags.

Tag
Key String test

The key of a tag.

Value String api

The value of a tag.

VPCCloudInstanceId String vpc-23rsxdfxxxxxxx

The ID that is assigned by the VPC to the cluster.

VPCId String vpc-xxxxxxxxx

The ID of the VPC.

VSwitchId String vsw-xxxxxx

The ID of the VSwitch.

ZoneId String cn-hangzhou-a

The ID of the zone.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 2

The total number of pages returned.

TotalCount Integer 100

The total number of entries returned.

RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeDBClusters
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<TotalCount>100</TotalCount>
<RequestId>1AD222E9-E606-4A42-BF6D-8A4442913CEF</RequestId>
<PageSize>2</PageSize>
<PageNumber>1</PageNumber>
<Items>
    <DBCluster>
        <StorageResource>24Core192GB</StorageResource>
        <Category>Basic</Category>
        <ResourceGroupId>rg-rexxxxxxxxxx</ResourceGroupId>
        <Port>3306</Port>
        <DBClusterId>am-bpxxxxxxxx47</DBClusterId>
        <DBClusterNetworkType>VPC</DBClusterNetworkType>
        <DBClusterType>Common</DBClusterType>
        <DiskType>cloud</DiskType>
        <DBVersion>3.0</DBVersion>
        <DtsJobId>dtsb1xxxxxxxxxx</DtsJobId>
        <DBNodeCount>128</DBNodeCount>
        <CommodityCode>AnalyticDB for MySQL</CommodityCode>
        <ExecutorCount>3</ExecutorCount>
        <LockReason>instance_expired</LockReason>
        <Engine>AnalyticDB</Engine>
        <DBNodeStorage>100</DBNodeStorage>
        <ZoneId>cn-hangzhou-a</ZoneId>
        <VPCId>vpc-xxxxxxxxx</VPCId>
        <DBClusterStatus>Running</DBClusterStatus>
        <CreateTime>2019-03-20T02:18:02Z</CreateTime>
        <VSwitchId>vsw-xxxxxx</VSwitchId>
        <Mode>flexible</Mode>
        <DBClusterDescription>Test database</DBClusterDescription>
        <ComputeResource>24Core192GB</ComputeResource>
        <Expired>false</Expired>
        <PayType>Postpaid</PayType>
        <LockMode>unlock</LockMode>
        <DBNodeClass>C8</DBNodeClass>
        <VPCCloudInstanceId>vpc-23rsxdfxxxxxxx</VPCCloudInstanceId>
        <RegionId>cn-hangzhou</RegionId>
        <ExpireTime>2020-03-20T02:18:02Z</ExpireTime>
        <ConnectionString>am-bpxxxxxxxx.ads.aliyuncs.com</ConnectionString>
        <RdsInstanceId>rm-bp1oxxxxxxxxxx</RdsInstanceId>
    </DBCluster>
    <DBCluster>
        <Tags>
            <Tag>
                <Value>api</Value>
                <Key>test</Key>
            </Tag>
        </Tags>
    </DBCluster>
</Items>

JSON format

{
    "TotalCount": 100,
    "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
    "PageSize": 2,
    "PageNumber": 1,
    "Items": {
        "DBCluster": [
            {
                "StorageResource": "24Core192GB",
                "Category": "Basic",
                "ResourceGroupId": "rg-rexxxxxxxxxx",
                "Port": 3306,
                "DBClusterId": "am-bpxxxxxxxx47",
                "DBClusterNetworkType": "VPC",
                "DBClusterType": "Common",
                "DiskType": "cloud",
                "DBVersion": 3,
                "DtsJobId": "dtsb1xxxxxxxxxx",
                "DBNodeCount": 128,
                "CommodityCode": "AnalyticDB for MySQL",
                "ExecutorCount": 3,
                "LockReason": "instance_expired",
                "Engine": "AnalyticDB",
                "DBNodeStorage": 100,
                "ZoneId": "cn-hangzhou-a",
                "VPCId": "vpc-xxxxxxxxx",
                "DBClusterStatus": "Running",
                "CreateTime": "2019-03-20T02:18:02Z",
                "VSwitchId": "vsw-xxxxxx",
                "Mode": "flexible",
                "DBClusterDescription": "Test database",
                "ComputeResource": "24Core192GB",
                "Expired": false,
                "PayType": "Postpaid",
                "LockMode": "unlock",
                "DBNodeClass": "C8",
                "VPCCloudInstanceId": "vpc-23rsxdfxxxxxxx",
                "RegionId": "cn-hangzhou",
                "ExpireTime": "2020-03-20T02:18:02Z",
                "ConnectionString": "am-bpxxxxxxxx.ads.aliyuncs.com",
                "RdsInstanceId": "rm-bp1oxxxxxxxxxx"
            },
            {
                "Tags": {
                    "Tag": {
                        "Value": "api",
                        "Key": "test"
                    }
                }
            }
        ]
    }
}

Error codes

HttpCode 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.