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
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:
|
| Engine | String | Yes | MySQL | The database engine of the instance. Valid values:
|
| EngineVersion | String | Yes | 8.0 | The database engine version of the instance. Valid values:
|
| 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:
|
| Category | String | Yes | HighAvailability | The RDS edition of the instance. Valid values:
|
| CommodityCode | String | No | bards | The commodity code of the instance. Valid values:
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.