Returns a list of available machine specifications.
Try it now
Test
RAM authorization
Request syntax
GET /api/v2/public/instance_types HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
No |
The resource type. The default value is `Public`. Valid values:
|
Public |
| ChargeType |
string |
No |
The billing method. The default value is `PostPaid`. Valid values:
|
PostPaid |
InstanceTypes
deprecated
|
array |
No |
This parameter is deprecated. |
|
|
string |
No |
This parameter is deprecated. |
无需填写 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The request ID. |
40325405-579C-4D82*** |
| Types |
array<object> |
The supported combinations of CPU and memory values for deployment. |
|
|
object |
A list of supported combinations. For example:
This indicates that if you set CPU to 1 core, you can set Memory to 1000, 2000, or 4000. |
||
| CPU |
integer |
The valid values for the number of CPU cores. |
1 |
| Memory |
array |
The valid memory values for the specified number of CPU cores. |
|
|
integer |
A list of valid memory values. |
1000 |
|
| InstanceMetas |
array<object> |
A list of available instance types for deployment. |
|
|
object |
The information about an available instance type. |
||
| CPU |
integer |
The number of CPU cores of the instance type. |
32 |
| Memory |
number |
The memory size of the instance type, in GB. |
188 |
| GPU |
string |
The GPU model of the instance type. This field is not returned for non-GPU instance types. |
GU30 |
| GPUAmount |
integer |
The number of GPUs in the instance type. |
1 |
| GPUMemory |
number |
The GPU memory size of the instance type, in GB. |
24 |
| InstanceType |
string |
The instance type name. |
ml.gu7i.c32m188.1-gu30 |
| SpotDiscount |
number |
The current lowest discount for a spot instance with a 1-hour protection period. A value of 0.1 indicates a 90% discount. If this field is not returned, the instance type does not support spot instances. |
0.12 |
| NonProtectSpotDiscount |
number |
The minimum discount currently offered for a spot instance in no-protection mode. A value of 0.1 indicates a 90% discount. If this field is not returned, the instance type does not support spot instances. |
0.1 |
| IsAvailable |
boolean |
Indicates whether the instance type is currently available. |
true |
| Vendor |
string |
The source of the instance type. Valid values:
|
ECS |
| StockStatus |
string |
The inventory status of the instance type. Valid values:
|
WithStock |
Examples
Success response
JSON format
{
"RequestId": "40325405-579C-4D82***",
"Types": [
{
"CPU": 1,
"Memory": [
1000
]
}
],
"InstanceMetas": [
{
"CPU": 32,
"Memory": 188,
"GPU": "GU30",
"GPUAmount": 1,
"GPUMemory": 24,
"InstanceType": "ml.gu7i.c32m188.1-gu30",
"SpotDiscount": 0.12,
"NonProtectSpotDiscount": 0.1,
"IsAvailable": true,
"Vendor": "ECS",
"StockStatus": "WithStock"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.