All Products
Search
Document Center

PolarDB:DescribeDBClusters

最終更新日:Oct 09, 2024

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.

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:DescribeDBClusterslist
  • 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
DescribeTypestringNo

The query mode of the list. The value Simple indicates that the simple mode is used. In this mode, only the basic metadata information of the cluster is returned.

Note If you do not specify this parameter, the detailed mode is used by default. Detailed information about the cluster is returned.
Simple
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 per page. Valid values: 30, 50, and 100.

Default value: 30.

30
PageNumberintegerNo

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

10
ResourceGroupIdstringNo

The ID of the resource group.

rg-**********
Tagarray<object>No

The tags of the cluster.

objectNo

1

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
Itemsarray<object>

The information about the clusters.

DBClusterobject
VpcIdstring

The virtual private cloud (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, no value 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 storage billing method of the cluster. Valid values:

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

Indicates whether the cluster is a serverless cluster. AgileServerless indicates the cluster is a serverless cluster. No value is returned for 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. For Standard Edition clusters of Multi-zone Edition, this value is returned.
  • OFF: Multi-zone data consistency is disabled.
ON
DBNodeClassstring

The specifications of the node.

polar.mysql.x4.large
Tagsarray<object>

The information about the tags.

Tagobject

1

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 state of the cluster. Valid values:

  • Unlock: The cluster is unlocked.
  • ManualLock: The cluster is manually locked.
  • LockByExpiration: The cluster is locked due to cluster expiration.
Unlock
DBNodesarray<object>

The information about the nodes.

DBNodeobject
DBNodeClassstring

The specifications of the node.

polar.mysql.x4.large
ZoneIdstring

The zone ID of the cluster.

cn-hangzhou-i
DBNodeRolestring

The role of the node. Valid values:

  • Writer: primary node
  • Reader: read-only node
  • ColumnReader: column store read-only node
  • AI: AI node
Reader
DBNodeIdstring

The ID of the node.

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

The region ID of the cluster.

cn-hangzhou
Serverlessstring

Indicates whether the serverless feature is enabled for the node.

  • ON indicates that the serverless feature is enabled.
  • No value is returned if 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 region ID of the cluster.

cn-hangzhou
DeletionLockinteger

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

  • 0: The cluster is not protected from deletion.
  • 1: The cluster is protected from deletion.
Note You cannot delete clusters that are protected from deletion.
0
DBVersionstring

The version of the database engine.

5.6
DBClusterIdstring

The cluster ID.

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

The state of the cluster.

Running
ResourceGroupIdstring

The ID of the resource group.

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

The used storage. Unit: bytes.

3009413120
StorageSpacelong

The storage 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 database 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) Edition
Normal
AiTypestring

The type of the AI node. Valid values:

  • SearchNode: search node
  • DLNode: AI node

Enumeration values:

  • SearchNode | DLNode: both
  • DLNode: AI node
  • SearchNode: search node
Enumeration Value:
  • SearchNode|DLNode: Both.
  • DLNode: DLNode.
  • SearchNode: SearchNode.
SearchNode
CpuCoresstring

The number of CPU cores.

1
MemorySizestring

The memory size for local operations. Unit: MB.

2048
RemoteMemorySizestring

The memory size for distributed operations. Unit: MB.

3612
SubCategorystring

The specification type of the compute node. Valid values:

  • Exclusive: dedicated.
  • General: general-purpose.
Exclusive
StorageTypestring

The storage type.

essdautopl
HotStandbyClusterstring

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

  • ON
  • OFF
OFF

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",
        "CpuCores": "1",
        "MemorySize": "2048",
        "RemoteMemorySize": "3612",
        "SubCategory": "Exclusive",
        "StorageType": "essdautopl",
        "HotStandbyCluster": "OFF"
      }
    ]
  }
}

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
2024-07-24The Error code has changed. The response structure of the API has changedView Change Details
2024-06-25The Error code has changed. The response structure of the API has changedView Change Details
2024-04-09The Error code has changed. The response structure of the API has changedView Change Details
2023-12-26The Error code has changed. The request parameters of the API has changedView Change Details
2023-09-12The Error code has changedView Change Details
2023-08-09API Description Update. The Error code has changedView Change Details
2023-07-07The Error code has changed. The response structure of the API has changedView Change Details
2023-06-20The Error code has changed. The response structure of the API has changedView Change Details
2023-04-13The Error code has changed. The response structure of the API has changedView Change Details
2023-04-11The Error code has changed. The response structure of the API has changedView Change Details
2023-03-31The Error code has changedView Change Details
2022-09-15The Error code has changed. The response structure of the API has changedView Change Details
2022-09-15The Error code has changed. The response structure of the API has changedView Change Details
2022-06-02The Error code has changed. The response structure of the API has changedView Change Details