You can call the ListClasses operation to query the instance types that are available to specific instances.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ListClasses |
The operation that you want to perform. Set the value to ListClasses. |
| ClientToken | String | No | ETnLKlblzczshOTUbOCzxxxxxxx |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the generated token is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. |
| CommodityCode | String | Yes | bards |
The commodity code of the instances.
|
| DBInstanceId | String | No | rm-uf6wjk5xxxxxxx |
The ID of the primary instance. You can call the DescribeDBInstances operation to query the IDs of instances. Note If you use the CommodityCode parameter to query the instance types that are available to read-only instances,
you must specify the DBInstanceId parameter.
|
| OrderType | String | Yes | BUY |
The type of order that you want to query. Valid values:
|
| RegionId | String | No | cn-hangzhou |
The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. Note If you are using an Alibaba Cloud account on the International site (alibabacloud.com),
you must specify the RegionId parameter.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | CF8D35BF-263D-4F7B-883A-1163B79A9EC6 |
The ID of the request. |
| RegionId | String | cn-hangzhou |
The region ID of the instance. |
| Items | Array of ClassList |
An array that consists of the instance types that are available. |
|
| MaxIOPS | String | 10000 |
The maximum input/output operations per second (IOPS) that is supported by the instance type. Unit: operations per second. |
| Cpu | String | 1 |
The number of cores that are supported by the instance type. Unit: cores. |
| ReferencePrice | String | 2500 |
The fee that you must pay for the instance type.
Note
|
| MaxConnections | String | 2000 |
The maximum number of connections that are supported by the instance type. Unit: connections. |
| MemoryClass | String | 1 GB (RDS Basic Edition) |
The memory capacity that is supported by the instance type. Unit: GB. |
| ClassCode | String | mysql.n1.micro.1 |
The code of the instance type. For more information, see Primary ApsaraDB RDS instance types and Read-only ApsaraDB RDS instance types. |
| ClassGroup | String | General-purpose |
The instance family of the instance. For more information, see Instance families. |
| MaxIOMBPS | String | 1024Mbps |
The maximum I/O bandwidth that is supported by the instance type. Unit: Mbit/s. |
| EncryptedMemory | String | 4 |
The size of the encrypted memory that is supported by the security-enhanced instance type. Unit: GB. |
| InstructionSetArch | String | arm |
The architecture of the instance type. Note If the architecture of the instance type is x86, an empty string is returned by default. If the architecture of the instance type
is ARM, arm is returned.
|
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=ListClasses
&CommodityCode=bards
&OrderType=BUY
&<Common request parameters>Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListClassesResponse>
<RequestId>CF8D35BF-263D-4F7B-883A-1163B79A9EC6</RequestId>
<Items>
<MaxIOMBPS>1024Mbps</MaxIOMBPS>
<ClassCode>mysql.n2.medium.1</ClassCode>
<MaxConnections>4000</MaxConnections>
<ClassGroup>General-purpose</ClassGroup>
<Cpu>2 </Cpu>
<MemoryClass>4 GB (RDS Basic Edition)</MemoryClass>
<ReferencePrice>32.6</ReferencePrice>
<MaxIOPS>10000</MaxIOPS>
</Items>
<Items>
<MaxIOMBPS>1024Mbps</MaxIOMBPS>
<ClassCode>mysql.n1.micro.1</ClassCode>
<MaxConnections>2000</MaxConnections>
<ClassGroup>General-purpose</ClassGroup>
<Cpu>1 </Cpu>
<MemoryClass>1 GB (RDS Basic Edition)</MemoryClass>
<ReferencePrice>5.2</ReferencePrice>
<MaxIOPS>10000</MaxIOPS>
</Items>
</ListClassesResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "CF8D35BF-263D-4F7B-883A-1163B79A9EC6",
"Items" : [ {
"MaxIOMBPS" : "1024Mbps",
"ClassCode" : "mysql.n2.medium.1",
"MaxConnections" : "4000",
"ClassGroup" : "General-purpose",
"Cpu" : "2 ",
"MemoryClass" : " 4 GB (RDS Basic Edition)",
"ReferencePrice" : "32.6",
"MaxIOPS" : "10000"
}, {
"MaxIOMBPS" : "1024Mbps",
"ClassCode" : "mysql.n1.micro.1",
"MaxConnections" : "2000",
"ClassGroup" : "General-purpose",
"Cpu" : "1 ",
"MemoryClass" : " 1 GB (RDS Basic Edition)",
"ReferencePrice" : "5.2",
"MaxIOPS" : "10000"
} ]
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidSecurityIPList.Duplicate | The Security IP address is not in the available range or occupied. | The error message returned because the specified IP address is in use or is not within the valid range. Specify a valid IP address and try again. |
| 400 | InvalidCommodityCode.Malformed | The commodity code is invalid. | The error message returned because the commodity code that you specified is invalid. |
| 403 | Forbidden.Authentication | The operation is forbidden by Aliyun Realname Authentication System. | The error message returned because this operation is prohibited by the real-name verification system of Alibaba Cloud. |
| 404 | GetCommodity.Failed | Get commodity failed. | The error message returned because the value that you specified for the CommodityCode parameter is invalid. Enter a valid value and try again. |
| 404 | InvalidDBInstanceName.NotFound | Invalid DBInstanceId NotFound. | The error message returned because the ID of the database instance cannot be found. |
For a list of error codes, visit the API Error Center.