Queries PolarDB clusters or the clusters that can be accessed by an authorized RAM user.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the cluster. Note
You can call the DescribeRegions operation to query the available regions.
| cn-hangzhou |
DBClusterIds | string | No | The ID of the cluster. Separate multiple cluster IDs with commas (,). | pc-**************** |
DBClusterDescription | string | No | The description of the cluster. Fuzzy match is supported. | pc-**************** |
ConnectionString | string | No | The endpoint of the cluster. | ********.rwlb.polardb-pg-public.rds.aliyuncs.com |
DBClusterStatus | string | No | The state of the cluster that you want to query. For information about valid values, see Cluster states. | Running |
DBType | string | No | The database engine that the cluster runs. Valid values:
| MySQL |
DescribeType | string | No | 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 |
DBVersion | string | No | The database engine version of the cluster. | 5.6 |
RecentCreationInterval | integer | No | Filters clusters created in the last N days. Valid values: 0 to 15. | 7 |
RecentExpirationInterval | integer | No | Filters clusters that expire after N days. Valid values: 0 to 15. | 6 |
Expired | boolean | No | Specifies whether the cluster has expired. Valid values:
| true |
PageSize | integer | No | The number of entries per page. Valid values: 30, 50, or 100. Default value: 30. | 30 |
PageNumber | integer | No | The page number. The value must be a positive integer that does not exceed the maximum value of the INTEGER data type. Default value: 1. | 10 |
ResourceGroupId | string | No | The ID of the resource group. | rg-********** |
Tag | array<object> | No | The tags of the cluster. | |
object | No | 1 | ||
Key | string | No | 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 |
Value | string | No | 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 |
PayType | string | No | The billing method. Valid values:
| Postpaid |
DBNodeIds | string | No | The ID of the node. You can specify multiple node IDs. Separate multiple node IDs with commas (,). | pi-*************** |
Response parameters
Examples
Sample success responses
JSON
format
{
"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"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidRegionId.Malformed | The specified parameter RegionId is not valid. | The specified RegionId parameter is invalid. |
400 | NumberExceed.Tags | The Tags parameter's number is exceed. | The number of tags specified in the tags parameter exceeds the limit. |
400 | InvalidPageSize.Malformed | The specified parameter PageSize is not valid. | The specified PageSize parameter is invalid. |
400 | InvalidPageNumber.Malformed | The specified parameter PageNumber is not valid. | The specified PageNumber parameter is invalid. |
400 | InvalidRecentCreationInterval.Malformed | The specified parameter RecentCreationInterval is not valid. | The specified RecentCreationInterval parameter is invalid. |
400 | InvalidRecentExpirationInterval.Malformed | The specified parameter RecentExpirationInterval is not valid. | The specified RecentExpirationInterval parameter is invalid. |
404 | DBTypeOrDBVersion.Malformed | The specified DBType does not match DBVersion. | The specified values of DBType and DBVersion do not match. |
500 | InternalError | The 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. |
503 | ServiceUnavailable | The 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 time | Summary of changes | Operation |
---|---|---|
2024-06-25 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-04-09 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-12-26 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-09-12 | The Error code has changed | View Change Details |
2023-08-09 | API Description Update. The Error code has changed | View Change Details |
2023-07-07 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-06-20 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-04-13 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-04-11 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-03-31 | The Error code has changed | View Change Details |
2022-09-15 | The Error code has changed. The response structure of the API has changed | View Change Details |
2022-09-15 | The Error code has changed. The response structure of the API has changed | View Change Details |
2022-06-02 | The Error code has changed. The response structure of the API has changed | View Change Details |