Queries available resources in a PolarDB cluster.

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 Yes DescribeDBClusterAvailableResources

The operation that you want to perform. Set the value to DescribeDBClusterAvailableResources.

PayType String Yes Postpaid

The billing method of the cluster. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
DBType String No MySQL

The type of the database engine. Valid values:

  • MySQL
  • PostgreSQL
  • Oracle
DBVersion String No 5.6

The version of the database engine.

Valid values for the MySQL database engine:

  • 5.6
  • 5.7
  • 8.0

Valid values for the PostgreSQL database engine:

  • 11
  • 14

Valid value for the Oracle database engine: 11

Note If you specify the DBType parameter, you must specify the DBVersion parameter.
DBNodeClass String No polar.mysql.x4.large

The specifications of the node. For more information, see Specifications of compute nodes.

RegionId String No cn-hangzhou

The region ID of the cluster. Default value: cn-hangzhou.

Note You can call the DescribeRegions operation to query available regions.
ZoneId String No cn-hangzhou-i

The zone ID of the cluster.

Note You can call the DescribeRegions operation to query available zones.

Response parameters

Parameter Type Example Description
RequestId String 2B19F698-8FFC-4918-B9E2-58D878******

The ID of the request.

AvailableZones Array of AvailableZone

The available zones of the cluster.

SupportedEngines Array of SupportedEngine

The database engines that the available resources support.

Engine String mysql57

The version of the database engine.

AvailableResources Array of AvailableResource

The list of available resources.

DBNodeClass String polar.mysql.x4.large

The specifications of the node.

Category String Normal

The edition of the cluster. Valid values:

  • Normal: Cluster Edition
  • Basic: Single Node Edition
  • ArchiveNormal: X-Engine Edition
  • NormalMultimaster: Multi-master Cluster (Database/Table) Edition
  • SENormal: Standard Edition
    Note
    • Only PolarDB for MySQL supports Single Node Edition.
    • Only PolarDB for MySQL clusters that run MySQL 8.0 support X-Engine Edition and Multi-master Cluster (Database/Table) Edition.
ZoneId String cn-hangzhou-i

The zone ID of the cluster.

RegionId String cn-hangzhou

The region ID of the cluster.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=DescribeDBClusterAvailableResources
&PayType=Postpaid
&DBType=MySQL
&DBVersion=5.6
&DBNodeClass=polar.mysql.x4.large
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-i
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDBClusterAvailableResourcesResponse>
    <RequestId>2B19F698-8FFC-4918-B9E2-58D878******</RequestId>
    <AvailableZones>
        <SupportedEngines>
            <Engine>mysql57</Engine>
            <AvailableResources>
                <DBNodeClass>polar.mysql.x4.large</DBNodeClass>
                <Category>Normal</Category>
            </AvailableResources>
        </SupportedEngines>
        <ZoneId>cn-hangzhou-i</ZoneId>
        <RegionId>cn-hangzhou</RegionId>
    </AvailableZones>
</DescribeDBClusterAvailableResourcesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "2B19F698-8FFC-4918-B9E2-58D878******",
  "AvailableZones" : [ {
    "SupportedEngines" : [ {
      "Engine" : "mysql57",
      "AvailableResources" : [ {
        "DBNodeClass" : "polar.mysql.x4.large",
        "Category" : "Normal"
      } ]
    } ],
    "ZoneId" : "cn-hangzhou-i",
    "RegionId" : "cn-hangzhou"
  } ]
}

Error codes

HTTP status code Error code Error message Description
400 InvalidDBVersion.Malformed The Specified DBVersion is not valid. The error message returned because the specified DBVersion parameter is invalid.

For a list of error codes, see Service error codes.