Queries information about preemptible instances in a region in the previous 30 days. The information includes the average release rate of preemptible instances and the percentage of the average preemptible instance price relative to the pay-as-you-go instance price.
Operation description
Usage notes
-
You can call this operation to query information about preemptible instances in the previous 30 days and select suitable instance types based on the query results. The information that you can query includes:
- Average release rate of preemptible instances
- Percentage of the average preemptible instance price relative to the pay-as-you-go instance price
- Average preemptible instance price that is calculated based on the preceding percentage
-
This operation is applicable only to I/O optimized preemptible instances that reside in virtual private clouds (VPCs).
-
You can use one of the following methods to query information about preemptible instances in the previous 30 days:
- Configure the
Cores
andMemory
parameters or theMinCores
andMinMemory
parameters to query information about instance types that meet the specified vCPU and memory requirements. - Configure the
InstanceTypes.N
parameter to query information about specified instance types. - Configure the
Cores
andMemory
parameters or theMinCores
andMinMemory
parameters and then configure theInstanceTypeFamily
orInstanceFamilyLevel
parameter to query information about instance types that meet the specified vCPU and memory requirements within the specified instance family or at a specified instance family level.
- Configure the
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
Cores | integer | No | The number of vCPUs of the instance type. For more information, see Instance families. | 2 |
Memory | float | No | The memory size of the instance type. Unit: GiB. For more information, see Instance families. | 8.0 |
MinCores | integer | No | The minimum number of vCPUs of the instance type. For more information, see Instance families. | 2 |
MinMemory | float | No | The minimum memory size of the instance type. For more information, see Instance families. | 8.0 |
ZoneId | string | No | The zone ID. This parameter is left empty by default, which indicates that all zones in the specified region are queried. | cn-hangzhou-i |
InstanceTypeFamily | string | No | The instance family. For more information, see Instance families. | ecs.c5 |
InstanceFamilyLevel | string | No | The level of the instance family. Valid values:
This parameter is left empty by default, which indicates that instance families at all levels are queried. | EntryLevel |
GpuSpec | string | No | The GPU type. Valid values:
This parameter is left empty by default, which indicates that all GPU types are queried. For more information, see GPU-accelerated compute-optimized and vGPU-accelerated instance families. | NVIDIA T4 |
GpuAmount | integer | No | The number of GPUs that a GPU-accelerated instance has. For information about the valid values, see GPU-accelerated compute optimized instance types. | 2 |
InstanceTypes | array | No | The instance types. You can specify up to 10 instance types. | |
string | No | The instance type. For more information, see Instance families. | ecs.c5.large |
Response parameters
Examples
Sample success responses
JSON
format
{
"RegionId": "cn-hangzhou",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"AvailableSpotZones": {
"AvailableSpotZone": [
{
"ZoneId": "cn-hangzhou-i",
"AvailableSpotResources": {
"AvailableSpotResource": [
{
"InterruptRateDesc": "0-3%",
"AverageSpotDiscount": 20,
"InstanceType": "ecs.c5.large",
"InterruptionRate": 0
}
]
}
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Invalid.SaleStrategy | The specified saleStrategy is not valid. | - |
400 | Invalid.Param | The input parameter DestinationResource that is mandatory for processing this request is not supplied. | The specified DestinationResource parameter is invalid. |
400 | InvalidRegionId.MalFormed | The specified parameter RegionId is not valid. | The specified RegionId parameter is invalid. |
403 | InvalidDedicatedHostId.NotFound | The specified DedicatedHostId does not exist in our records. | - |
403 | InvalidParam.TypeAndCpuMem.Conflict | The specified 'InstanceType' and 'Cores','Memory' are not blank at the same time. | - |
403 | InvalidParam.Cores | The specified parameter 'Cores' should not be empty | - |
403 | InvalidParam.Memory | The specified parameter 'Memory' should not be empty | - |
403 | OperationDenied.RegionIdNotSupported | region not support spot duration instance. | - |
403 | OperationDenied.FlavorNotSupported | flavor not support spot duration instance. | - |
403 | OperationDenied.TimestampNotSupported | timestamp not support spot duration instance. | - |
404 | Invalid.RegionId | The specified RegionId does not exist. | The specified RegionId parameter is invalid. |
404 | Unavailable.Regions | The available regions does not exists | The specified RegionId parameter is invalid. |
404 | Invalid.ResourceType | The ResourceType provided does not exist in our records. | The specified resource type is invalid. |
404 | Invalid.DestinationResource | The specified DestinationResource is not valid. | The specified DestinationResource parameter is invalid. |
404 | Invalid.IoOptimized | The specified IoOptimized is not valid. | The specified IoOptimized parameter is invalid. |
404 | Invalid.NetworkType | The specified NetworkType is not valid. | The specified NetworkType parameter is invalid. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|