You can call the DescribeAvailableClasses operation to query the specifications that are supported for an instance. The specifications include instance types and the storage capacity range.

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 DescribeAvailableClasses

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

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance.

ZoneId String Yes cn-hangzhou-h

The zone ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the zone ID of the instance.

Note If the DescribeDBInstanceAttribute operation returns multiple zones, you must specify only one of the returned zones. For example, if the DescribeDBInstanceAttribute operation returns cn-hangzhou-MAZ9(g,h), you can set this parameter to cn-hangzhou-g or cn-hangzhou-h.
InstanceChargeType String Yes Prepaid

The billing method of the instance. Valid values:

  • Prepaid: subscription
  • Postpaid: pay-as-you-go
  • Serverless: serverless
Engine String Yes MySQL

The database engine of the instance. Valid values:

  • MySQL
  • SQLServer
  • PostgreSQL
  • MariaDB
EngineVersion String Yes 8.0

The database engine version of the instance. Valid values:

  • Valid values when you set the Engine parameter to MySQL: 5.5, 5.6, 5.7, and 8.0
  • Valid values when you set the Engine parameter to SQLServer: 2008r2, 08r2_ent_ha, 2012, 2012_ent_ha, 2012_std_ha, 2012_web, 2014_std_ha, 2016_ent_ha, 2016_std_ha, 2016_web, 2017_std_ha, 2017_ent, 2019_std_ha, and 2019_ent
  • Valid values when you set the Engine parameter to PostgreSQL: 10.0, 11.0, 12.0, 13.0, 14.0, and 15.0
  • Values that are valid if you set the Engine parameter to MariaDB: 10.3
DBInstanceId String No rm-uf6wjk5xxxxxx

The ID of the instance.

OrderType String No BUY

The type of the order. Set the value to BUY

DBInstanceStorageType String Yes local_ssd

The storage type of the instance. Valid values:

  • local_ssd: local SSD. This is the recommended storage type.
  • cloud_ssd: standard SSD.
  • cloud_essd: enhanced SSD (ESSD) of performance level 1 (PL1).
  • cloud_essd2: ESSD of PL2.
  • cloud_essd3: ESSD of PL3.
Category String Yes HighAvailability

The RDS edition of the instance. Valid values:

  • Basic: RDS Basic Edition
  • HighAvailability: RDS High-availability Edition

  • AlwaysOn: RDS Cluster Edition for SQL Server
  • Finance: RDS Enterprise Edition
  • serverless_basic: RDS Serverless Basic Edition
CommodityCode String No bards

The commodity code of the instance. Valid values:

  • bards: The instance is a pay-as-you-go primary instance. This value is available on the China site (aliyun.com).
  • rds: The instance is a subscription primary instance. This value is available on the China site (aliyun.com).
  • rords: The instance is a pay-as-you-go read-only instance. This value is available on the China site (aliyun.com).
  • rds_rordspre_public_cn: The instance is a subscription read-only instance. This value is available at the China site (aliyun.com).
  • bards_intl: The instance is a pay-as-you-go primary instance. This value is available at the International site (alibabacloud.com).
  • rds_intl: The instance is a subscription primary instance. This value is available at the International site (alibabacloud.com).
  • rords_intl: The instance is a pay-as-you-go read-only instance. This value is available at the International site (alibabacloud.com).
  • rds_rordspre_public_intl: The instance is a subscription read-only instance. This value is available at the International site (alibabacloud.com).
  • rds_serverless_public_cn: The instance is a serverless instance. This value is available at the China site (aliyun.com).
  • rds_serverless_public_intl: The instance is a serverless instance. This value is available at the International site (alibabacloud.com).
Note If the instance is a read-only instance, you must specify this parameter.

Response parameters

Parameter Type Example Description
RequestId String 7E4448A6-9FE6-4474-A0C1-AA7CFC772CAC

The ID of the request.

DBInstanceClasses Array of DBInstanceClass

An array that consists of the details of the instance type for the instance.

DBInstanceClass String rds.mysql.c1.large

The instance type of the instance.

DBInstanceStorageRange Object

The storage capacity range that is supported for the instance.

Step Integer 5

The minimum step size at which you can adjust the storage capacity of the instance. The minimum step size is 5 GB.

MinValue Integer 5

The minimum storage capacity that is supported for the instance. Unit: GB.

MaxValue Integer 2000

The maximum storage capacity that is supported for the instance. Unit: GB.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=DescribeAvailableClasses
&DBInstanceId=rm-uf6wjk5xxxxxx
&Category=HighAvailability
&DBInstanceStorageType=local_ssd
&Engine=MySQL
&EngineVersion=8.0
&InstanceChargeType=Prepaid
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-h
&<Common request parameters>

Sample success responses

XML format

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

<DescribeAvailableClassesResponse>
<DBInstanceClasses>
    <DBInstanceClass>rds.mysql.c1.large</DBInstanceClass>
    <DBInstanceStorageRange>
        <MinValue>5</MinValue>
        <MaxValue>2000</MaxValue>
        <Step>5</Step>
    </DBInstanceStorageRange>
</DBInstanceClasses>
<DBInstanceClasses>
    <DBInstanceClass>rds.mysql.st.v52</DBInstanceClass>
    <DBInstanceStorageRange>
        <MinValue>1000</MinValue>
        <MaxValue>6000</MaxValue>
        <Step>5</Step>
    </DBInstanceStorageRange>
</DBInstanceClasses>
<RequestId>7E4448A6-9FE6-4474-A0C1-AA7CFC772CAC</RequestId>
</DescribeAvailableClassesResponse>

JSON format

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

{
  "DBInstanceClasses" : [ {
    "DBInstanceClass" : "rds.mysql.c1.large",
    "DBInstanceStorageRange" : {
      "MinValue" : 5,
      "MaxValue" : 2000,
      "Step" : 5
    }
  }, {
    "DBInstanceClass" : "rds.mysql.st.v52",
    "DBInstanceStorageRange" : {
      "MinValue" : 1000,
      "MaxValue" : 6000,
      "Step" : 5
    }
  } ],
  "RequestId" : "7E4448A6-9FE6-4474-A0C1-AA7CFC772CAC"
}

Error codes

HTTP status code Error code Error message Description
400 ArticleNotFound Article not found The error message returned because no relevant articles are found.
404 InvalidCondition.NotFound No class found The error message returned because the condition that is specified for the available class is invalid.

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