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

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.

DBInstanceId String Yes rm-uf6wjk5xxxxxx

The ID of the instance.

Category String Yes HighAvailability

The RDS edition that the instance runs. Valid values:

  • Basic: Basic Edition
  • HighAvailability: High-availability Edition
  • AlwaysOn: Cluster Edition
  • Finance: Enterprise Edition
DBInstanceStorageType String Yes local_ssd

The type of storage media that is used by the instance. Valid values:

  • local_ssd: local SSD. This is the recommended storage type.
  • cloud_ssd: standard SSD.
  • cloud_essd: enhanced SSD of PL1.
  • cloud_essd2: enhanced SSD of PL2.
  • cloud_essd3: enhanced SSD of PL3.
Engine String Yes MySQL

The database engine that the instance runs. Valid values:

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

The database engine version that the instance runs. Valid values:

  • MySQL:5.5, 5.6, 5.7, and 8.0
  • SQL Server: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, and 2019_ent
  • PostgreSQL:9.4, 10.0, 11.0, and 12.0
  • PPAS:9.3 and 10.0
  • MariaDB:10.3
InstanceChargeType String Yes Prepaid

The billing method of the instance. Valid values:

  • Prepaid: subscription
  • Postpaid: pay-as-you-go
RegionId String Yes cn-hangzhou

The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of an 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 an instance.

OrderType String No BUY

The type of the order. Set the value to BUY.

CommodityCode String No bards

The commodity code of the instance. Valid values:

  • bards: The instance is a primary instance that uses the pay-as-you-go billing method. This value is available on the China site (aliyun.com).
  • rds: The instance is a primary instance that uses the subscription billing method. This value is available on the China site (aliyun.com).
  • rords: The instance is a read-only instance that uses the pay-as-you-go billing method. This value is available on the China site (aliyun.com).
  • rds_rordspre_public_cn: The instance is a read-only instance that uses the subscription billing method. This value is available on the China site (aliyun.com).
  • bards_intl: The instance is a primary instance that uses the pay-as-you-go billing method. This value is available on the International site (alibabacloud.com).
  • rds_intl: The instance is a primary instance that uses the subscription billing method. This value is available on the International site (alibabacloud.com).
  • rords_intl: The instance is a read-only instance that uses the pay-as-you-go billing method. This value is available on the International site (alibabacloud.com).
  • rds_rordspre_public_intl: The instance is a read-only instance that uses the subscription billing method. This value is available on the International site (alibabacloud.com).
Note When you query the specifications that are supported for a read-only instance, you must specify the CommodityCode parameter.

Response parameters

Parameter Type Example Description
DBInstanceClasses Array of DBInstanceClass

An array that consists of the instance types that are supported for the instance.

DBInstanceClass String rds.mysql.c1.large

The instance type that is supported for the instance.

DBInstanceStorageRange Struct

The storage capacity range that is supported for the instance.

MaxValue Integer 2000

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

MinValue Integer 5

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

Step Integer 5

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

RequestId String 7E4448A6-9FE6-4474-A0C1-AA7CFC772CAC

The ID of the request.

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

<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

{
    "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

For a list of error codes, visit the API Error Center.