Mengkueri laju rilis rata-rata, laju diskon rata-rata, dan informasi lain tentang spot instans di wilayah tertentu selama 30 hari terakhir.
Deskripsi operasi
-
Hanya spot instans yang terhubung ke VPC dan dioptimalkan I/O yang didukung.
-
Anda dapat memanggil operasi ini dengan salah satu cara berikut:
Atur parameter Cores dan Memory atau parameter MinCores dan MinMemory untuk mengkueri tipe instans yang memenuhi persyaratan vCPU dan memori.
Atur parameter InstanceTypes.N untuk mengkueri tipe instans tertentu.
Atur parameter Cores dan Memory atau parameter MinCores dan MinMemory, lalu atur parameter InstanceTypeFamily atau InstanceFamilyLevel untuk mengkueri tipe instans yang memenuhi persyaratan vCPU dan memori dalam keluarga instans tertentu atau pada level tertentu.
-
Anda dapat menghitung harga rata-rata spot instans berdasarkan laju diskon rata-rata dan harga instans pay-as-you-go.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| Cores |
integer |
No |
Jumlah vCPU tipe instans. Untuk informasi lebih lanjut, lihat keluarga instans. |
2 |
| Memory |
number |
No |
Ukuran memori tipe instans. Unit: GiB. Untuk informasi lebih lanjut, lihat keluarga instans. |
8.0 |
| MinCores |
integer |
No |
Jumlah vCPU minimum tipe instans. Untuk informasi lebih lanjut, lihat keluarga instans. |
2 |
| MinMemory |
number |
No |
Ukuran memori minimum tipe instans. Untuk informasi lebih lanjut, lihat keluarga instans. |
8.0 |
| ZoneId |
string |
No |
ID zona. Nilai default: null, yang menunjukkan bahwa semua zona di wilayah yang ditentukan akan dikueri. |
cn-hangzhou-i |
| InstanceTypeFamily |
string |
No |
keluarga instans. Untuk informasi lebih lanjut, lihat keluarga instans. |
ecs.c5 |
| InstanceFamilyLevel |
string |
No |
Level keluarga instans. Nilai valid:
Nilai default: null, yang menunjukkan bahwa semua level akan dikueri. |
EntryLevel |
| GpuSpec |
string |
No |
Tipe GPU. Nilai valid:
Nilai default: null, yang menunjukkan bahwa semua tipe akan dikueri. Untuk informasi lebih lanjut, lihat Ikhtisar instans compute-optimized yang dipercepat GPU. |
NVIDIA T4 |
| GpuAmount |
integer |
No |
Jumlah GPU pada instans compute-optimized yang dipercepat GPU. Untuk informasi lebih lanjut, lihat Ikhtisar instans compute-optimized yang dipercepat GPU. |
2 |
| InstanceTypes |
array |
No |
Daftar tipe instans. Anda dapat menentukan hingga 10 tipe instans. |
ecs.c5.large |
|
string |
No |
Tipe instans. Untuk informasi lebih lanjut, lihat keluarga instans. |
ecs.c5.large |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RegionId |
string |
ID wilayah. |
cn-hangzhou |
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| AvailableSpotZones |
object |
||
| AvailableSpotZone |
array<object> |
Array zona dan informasi spot instans yang sesuai. Catatan
Nilai kembali diurutkan berdasarkan laju diskon rata-rata historis tipe instans. |
|
|
array<object> |
|||
| ZoneId |
string |
The zone ID. |
cn-hangzhou-i |
| AvailableSpotResources |
object |
||
| AvailableSpotResource |
array<object> |
Details about spot instances in the previous 30 days, including the release rate of spot instances and percentages of average spot instance prices relative to pay-as-you-go instance prices. |
|
|
object |
|||
| InterruptRateDesc |
string |
The release rate range of spot instances in the previous 30 days, which corresponds to the
|
0-3% |
| AverageSpotDiscount |
integer |
The percentage of the average spot instance price relative to the pay-as-you-go instance price in the previous 30 days. Unit: %. Valid values: 1 to 100. You can calculate the average spot instance price based on the return value. For example, if the pay-as-you-go instance price is 1 and the return value of this parameter is 20, the average spot instance price in the previous 30 days is 0.2. |
20 |
| InstanceType |
string |
The instance type. |
ecs.c5.large |
| InterruptionRate |
number |
The average release rate of spot instances in the previous 30 days. Unit: %. |
0 |
Contoh
Respons sukses
JSONformat
{
"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
}
]
}
}
]
}
}
Kode kesalahan
|
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. | |
| 400 | InvalidRegionId.MalFormed | The specified parameter RegionId is not valid. | |
| 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. | |
| 404 | Unavailable.Regions | The available regions does not exists | |
| 404 | Invalid.ResourceType | The ResourceType provided does not exist in our records. | |
| 404 | Invalid.DestinationResource | The specified DestinationResource is not valid. | |
| 404 | Invalid.IoOptimized | The specified IoOptimized is not valid. | |
| 404 | Invalid.NetworkType | The specified NetworkType is not valid. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.