All Products
Search
Document Center

PolarDB:DescribeDBClusters

Last Updated:Dec 26, 2023

Queries PolarDB clusters or the clusters that can be accessed by an authorized RAM user.

Debugging

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

Debug

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:DescribeDBClustersREAD
  • DBCluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the cluster.

Note You can call the DescribeRegions operation to query the available regions.
cn-hangzhou
DBClusterIdsstringNo

The ID of the cluster. Separate multiple cluster IDs with commas (,).

pc-****************
DBClusterDescriptionstringNo

The description of the cluster. Fuzzy match is supported.

pc-****************
ConnectionStringstringNo

The endpoint of the cluster.

********.rwlb.polardb-pg-public.rds.aliyuncs.com
DBClusterStatusstringNo

The state of the cluster that you want to query. For information about valid values, see Cluster states.

Running
DBTypestringNo

The database engine that the cluster runs. Valid values:

  • MySQL
  • PostgreSQL
  • Oracle
MySQL
DBVersionstringNo

The database engine version of the cluster.

5.6
RecentCreationIntervalintegerNo

Filters clusters created in the last N days. Valid values: 0 to 15.

7
RecentExpirationIntervalintegerNo

Filters clusters that expire after N days. Valid values: 0 to 15.

6
ExpiredbooleanNo

Specifies whether the cluster has expired. Valid values:

  • true
  • false
true
PageSizeintegerNo

The number of entries to return per page. Valid values: 30, 50, or 100.

Default value: 30.

30
PageNumberintegerNo

The number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

10
ResourceGroupIdstringNo

The ID of the resource group.

rg-**********
Tagobject []No

The tags of the cluster.

KeystringNo

The key of the tag. You can use tags to filter clusters. You can specify up to 20 tags. N specifies the serial number of each tag. The values that you specify for N must be unique and consecutive integers that start from 1. The value of Tag.N.Key is Tag.N.Value.

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

The value of the tag.

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

The billing method. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
Postpaid
DBNodeIdsstringNo

The ID of the node. You can specify multiple node IDs. Separate multiple node IDs with commas (,).

pi-***************

Response parameters

ParameterTypeDescriptionExample
object
TotalRecordCountinteger

The total number of returned entries.

16
PageRecordCountinteger

The number of clusters returned per page.

5
RequestIdstring

The ID of the request.

9B7BFB11-C077-4FE3-B051-F69CEB******
PageNumberinteger

The number of the page to return.

12
Itemsobject []

The details of the cluster.

VpcIdstring

The VPC ID of the cluster.

vpc-****************
VswitchIdstring

The vSwitch ID of the cluster.

vsw-***************
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 has expired. Valid values:

  • true
  • false
Note A specific value is returned only for subscription (Prepaid) clusters.
false
DBNodeNumberinteger

The number of nodes.

2
CreateTimestring

The time when the cluster was created.

2020-08-14T05:58:42Z
PayTypestring

The billing method of the cluster. Valid values:

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

The billing method of the storage space. Valid values:

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

Indicates whether the cluster is a serverless cluster. AgileServerless indicates a serverless cluster. An empty value indicates a common cluster.

AgileServerless
StrictConsistencystring

Indicates whether multi-zone data consistency is enabled for the cluster. Valid values:

  • ON: multi-zone data consistency is enabled, which is suitable for Standard Edition clusters of Multi-zone Edition.
  • OFF: multi-zone data consistency is disabled.
ON
DBNodeClassstring

The specifications of the node.

polar.mysql.x4.large
Tagsobject []

The tags of the cluster.

Keystring

The key of the tag.

MySQL
Valuestring

The value of the tag.

5.6
DBTypestring

The type of the database engine.

MySQL
LockModestring

The lock status 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.
Unlock
DBNodesobject []

The nodes of the cluster.

DBNodeClassstring

The specifications of the node.

polar.mysql.x4.large
ZoneIdstring

The zone ID of the node.

cn-hangzhou-i
DBNodeRolestring

The role of the node. Valid values:

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

The ID of the node.

pi-****************
RegionIdstring

The ID of the region in which the node resides.

cn-hangzhou
Serverlessstring

Indicates whether the serverless feature is enabled for the current node. ON indicates that the serverless feature is enabled. An empty value indicates that the serverless feature is disabled.

ON
ImciSwitchstring

Indicates whether the In-Memory Column Index (IMCI) feature is enabled. Valid values:

  • ON
  • OFF
OFF
HotReplicaModestring

Indicates whether the hot standby feature is enabled. Valid values:

  • ON
  • OFF
OFF
RegionIdstring

The ID of the region in which the node resides.

cn-hangzhou
DeletionLockinteger

Indicates whether the cluster is protected from deletion. Valid values:

  • 0: The cluster is not locked.
  • 1: The cluster is locked.
Note If the cluster is locked, you cannot delete the cluster.
0
DBVersionstring

The version of the database.

5.6
DBClusterIdstring

The ID of the cluster.

pc-****************
DBClusterStatusstring

The status of the cluster.

Running
ResourceGroupIdstring

The ID of the resource group.

rg-************
StorageUsedlong

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

3009413120
StorageSpacelong

The storage space that is billed based on the subscription billing method. Unit: bytes.

50
DBClusterNetworkTypestring

The network type of the cluster.

VPC
DBClusterDescriptionstring

The description of the cluster.

GDN-1
ZoneIdstring

The zone ID of the cluster.

cn-hangzhou-i
Enginestring

The engine of the cluster.

POLARDB
Categorystring

The edition of the cluster. Valid values:

  • Normal: Cluster Edition
  • Basic: Single Node Edition
  • Archive: X-Engine Edition
  • NormalMultimaster: Multi-master Cluster (Database/Table)
Normal
AiTypestring

The type of the AI node. Valid values:

  • SearchNode: Search node
  • DLNode: ai node

Enumeration values:

  • SearchNode | DLNode

    :

    both

    .

  • DLNode

    :

    DLNode

    .

  • DLNode

    :

    DLNode

    .

Enumeration Value:
  • SearchNode|DLNode
  • DLNode
  • SearchNode
SearchNode

Examples

Sample success responses

JSONformat

{
  "TotalRecordCount": 16,
  "PageRecordCount": 5,
  "RequestId": "9B7BFB11-C077-4FE3-B051-F69CEB******",
  "PageNumber": 12,
  "Items": {
    "DBCluster": [
      {
        "VpcId": "vpc-****************",
        "VswitchId": "vsw-***************",
        "ExpireTime": "2020-11-14T16:00:00Z",
        "Expired": "false",
        "DBNodeNumber": 2,
        "CreateTime": "2020-08-14T05:58:42Z",
        "PayType": "Prepaid",
        "StoragePayType": "Prepaid",
        "ServerlessType": "AgileServerless",
        "StrictConsistency": "ON",
        "DBNodeClass": "polar.mysql.x4.large",
        "Tags": {
          "Tag": [
            {
              "Key": "MySQL",
              "Value": "5.6"
            }
          ]
        },
        "DBType": "MySQL",
        "LockMode": "Unlock",
        "DBNodes": {
          "DBNode": [
            {
              "DBNodeClass": "polar.mysql.x4.large",
              "ZoneId": "cn-hangzhou-i",
              "DBNodeRole": "Reader",
              "DBNodeId": "pi-****************",
              "RegionId": "cn-hangzhou",
              "Serverless": "ON",
              "ImciSwitch": "OFF",
              "HotReplicaMode": "OFF"
            }
          ]
        },
        "RegionId": "cn-hangzhou",
        "DeletionLock": 0,
        "DBVersion": "5.6",
        "DBClusterId": "pc-****************",
        "DBClusterStatus": "Running",
        "ResourceGroupId": "rg-************",
        "StorageUsed": 3009413120,
        "StorageSpace": 50,
        "DBClusterNetworkType": "VPC",
        "DBClusterDescription": "GDN-1",
        "ZoneId": "cn-hangzhou-i",
        "Engine": "POLARDB",
        "Category": "Normal",
        "AiType": "SearchNode"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidRegionId.MalformedThe specified parameter RegionId is not valid.The specified RegionId parameter is invalid.
400NumberExceed.TagsThe Tags parameter's number is exceed.The number of tags specified in the tags parameter exceeds the limit.
400InvalidPageSize.MalformedThe specified parameter PageSize is not valid.The specified PageSize parameter is invalid.
400InvalidPageNumber.MalformedThe specified parameter PageNumber is not valid.The specified PageNumber parameter is invalid.
400InvalidRecentCreationInterval.MalformedThe specified parameter RecentCreationInterval is not valid.The specified RecentCreationInterval parameter is invalid.
400InvalidRecentExpirationInterval.MalformedThe specified parameter RecentExpirationInterval is not valid.The specified RecentExpirationInterval parameter is invalid.
404DBTypeOrDBVersion.MalformedThe specified DBType does not match DBVersion.The specified values of DBType and DBVersion do not match.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.The request failed to be processed because unknown errors, exceptions, or failures have occurred.
503ServiceUnavailableThe request has failed due to a temporary failure of the server.A temporary server error occurred.

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

Change history

Change timeSummary of changesOperation
2023-12-26The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
    delete Error Codes: 500
    delete Error Codes: 503
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: DescribeType
2023-09-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 500
    delete Error Codes: 503
    Added Error Codes: 404
2023-08-09API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 500
    delete Error Codes: 503
2023-07-07The 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: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-06-20The 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: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-04-13The 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: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-04-11The 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: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2023-03-31The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 500
    delete Error Codes: 503
2022-09-15The 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: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2022-09-15The 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: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.
2022-06-02The 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: 500
    delete Error Codes: 503
Output ParametersThe response structure of the API has changed.