All Products
Search
Document Center

AnalyticDB for MySQL:DescribeDBClusters

Last Updated:Mar 15, 2024

Queries a list of AnalyticDB for MySQL clusters within a region.

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
adb:DescribeDBClustersRead
  • DBCluster
    acs:adb:{#regionId}:{#accountId}:dbcluster/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the clusters.

Note You can call the DescribeRegions operation to query the most recent region list.
cn-hangzhou
DBClusterIdsstringNo

The cluster IDs.

Note You can specify the ID of one cluster or IDs of more clusters within the preceding region.
am-bp1r053byu48p****
DBClusterDescriptionstringNo

The description of the cluster.

  • The description cannot start with http:// or https://.
  • The description must be 2 to 256 characters in length
test
DBClusterStatusstringNo

The state of the cluster. Valid values:

  • Preparing: The cluster is being prepared.
  • Creating: The cluster is being created.
  • Restoring: The cluster is being restored from a backup.
  • Running: The cluster is running.
  • Deleting: The cluster is being deleted.
  • ClassChanging: The cluster specifications are being changed.
  • NetAddressCreating: A network connection is being created.
  • NetAddressDeleting: A network connection is being deleted.
Running
PageSizeintegerNo

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
PageNumberintegerNo

The page number. Pages start from page 1. Default value: 1.

1
ResourceGroupIdstringNo

The ID of the resource group.

rg-4690g37929XXXX
Tagobject []No

The tags that are added to the cluster.

KeystringNo

The key of tag N that is added to the cluster. You can use tags 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 Tag.N.Key is paired with a value of Tag.N.Value.

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

The value of tag N that is added to the cluster. You can use tags 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 Tag.N.Key is paired with a value of Tag.N.Value.

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

The version of the cluster. Set the value to 3.0.

3.0

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountinteger

The total number of entries returned.

1
PageSizeinteger

The number of entries per page.

30
RequestIdstring

The request ID.

D65A809F-34CE-4550-9BC1-0ED21ETG380
PageNumberinteger

The page number.

1
Itemsobject []

The queried clusters.

DtsJobIdstring

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

dtsb1578j90XXXX
DBNodeCountlong

The number of node groups.

1
Expiredstring

Indicates whether the cluster has expired. Valid values:

  • true
  • false
false
CreateTimestring

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.

2021-04-01T09:50:18Z
PayTypestring

The billing method of the cluster. Valid values:

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

The disk type of the cluster. Valid values:

  • local_ssd: local disk.
  • cloud: basic disk.
  • cloud_ssd: standard SSD.
  • cloud_efficiency: ultra disk.
  • cloud_essd: PL0 enhanced SSD (ESSD).
  • cloud_essd: PL1 ESSD.
  • cloud_essd2: PL2 ESSD.
  • cloud_essd3: PL3 ESSD.
Note For more information, see ESSDs .
cloud_essd
Tagsobject []

The tags that are added to the cluster.

Keystring

The tag key.

Note You can call the TagResources operation to add tags to a cluster.
tag1
Valuestring

The tag value.

test1
Modestring

The mode of the cluster. Valid values:

  • flexible: elastic mode.
  • reserver: reserved mode.
Note
  • For more information about cluster modes, see Editions .
flexible
Portstring

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

3306
LockModestring

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 due to cluster expiration.
  • LockByRestoration: The cluster is automatically locked due to cluster restoration.
  • LockByDiskQuota: The cluster is automatically locked when it has used 90% of its storage.
Unlock
StorageResourcestring

The specifications of storage resources that are used in the cluster 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.

8Core32GB
ExecutorCountstring

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

1
DBClusterIdstring

The cluster ID.

am-bp163885f8q21****
ConnectionStringstring

The public endpoint that is used to connect to the cluster.

am-bp163885f8q21****.ads.aliyuncs.com
RdsInstanceIdstring

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

rm-bp11q28kvl688****
DBClusterTypestring

The type of the cluster. Valid values:

  • Common: common cluster.
  • RDS_ANALYSIS: MySQL analytic instance.
Common
CommodityCodestring

The commodity code. ads is returned.

ads
ExpireTimestring

The time when the cluster expires. 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 subscription, the actual expiration time is returned.

  • If the billing method of the cluster is pay-as-you-go, 2999-09-08T16:00:00Z is returned.

2999-09-08T16:00:00Z
DBNodeStoragelong

The storage capacity of the cluster. Unit: GB.

300
DBNodeClassstring

The instance type of the cluster.

E8
LockReasonstring

The reason why the cluster is locked.

Note This parameter is returned only when the cluster was locked. instance_expire is returned.
instance_expired
VPCIdstring

The virtual private cloud (VPC) ID of the cluster.

vpc-bp13h7uzhulpuxvnpXXXX
RegionIdstring

The region ID of the cluster.

cn-hangzhou
ComputeResourcestring

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

8Core32GB
ElasticIOResourceinteger

The number of elastic I/O units (EIUs). For more information, see Use EIUs to scale up storage resources.

Note This parameter is returned only for clusters in elastic mode.
0
VSwitchIdstring

The vSwitch ID of the cluster.

vsw-bp1syh8vvw8yech7nXXXX
DBVersionstring

The version of the database engine. 3.0 is returned.

3.0
VPCCloudInstanceIdstring

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

am-bp163885f8q21****-controller
DBClusterStatusstring

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

Running
ResourceGroupIdstring

The resource group ID.

rg-acfmyiu4ekp****
DBClusterNetworkTypestring

The network type of the cluster. VPC is returned.

vpc
DBClusterDescriptionstring

The description of the cluster.

adb_test
ZoneIdstring

The zone ID of the cluster.

cn-hangzhou-h
Categorystring

The edition of the cluster. Valid values:

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

The engine of the cluster. AnalyticDB is returned.

AnalyticDB
InnerIpstring

The public IP address of the cluster.

10.1.xx.xx
InnerPortstring

The port number that is used to connect to the cluster.

3306

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
500InternalErrorAn error occurred while processing your request.An internal error occurred. Please try again later.
503ServiceUnavailableAn error occurred while processing your request.The system is unavailable. Please try again later.

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

Change history

Change timeSummary of changesOperation
No change history