Mengkueri detail satu atau beberapa reservasi kapasitas, seperti status, pengatur waktu efektif dan kedaluwarsa, mode private pool, dan jumlah instans yang dikonsumsi.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeCapacityReservations |
get |
*CapacityReservation.
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah reservasi kapasitas. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya. Saat Anda menggunakan parameter ini untuk memfilter sumber daya, jumlah sumber daya tidak boleh melebihi 1000. Catatan
Memfilter berdasarkan kelompok sumber daya default tidak didukung. |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
No |
Tag yang terikat pada reservasi kapasitas. |
|
|
object |
No |
Pasangan tag. |
||
| Key |
string |
No |
Kunci tag. N menunjukkan bahwa Anda dapat menetapkan beberapa kunci tag untuk pemfilteran. Nilai valid N: 1 hingga 20. Jika Anda menggunakan satu tag untuk memfilter sumber daya, jumlah sumber daya dengan tag tersebut tidak boleh melebihi 1000. Jika Anda menggunakan beberapa tag untuk memfilter sumber daya, jumlah sumber daya dengan semua tag yang ditentukan terpasang tidak boleh melebihi 1000. Jika jumlah sumber daya melebihi 1000, panggil operasi ListTagResources untuk mengkueri sumber daya. |
TestKey |
| Value |
string |
No |
Nilai tag. N menunjukkan bahwa Anda dapat menetapkan beberapa nilai tag untuk pemfilteran. Nilai valid N: 1 hingga 20. |
TestValue |
| MaxResults |
integer |
No |
Jumlah entri maksimum per halaman untuk kueri berhalaman. Nilai maksimum: 100. Nilai default: 10. |
10 |
| NextToken |
string |
No |
Token paginasi untuk kueri reservasi kapasitas. Dapatkan nilai dari hasil permintaan sebelumnya. |
caeba0bbb2be03f84eb48b699f0a4883 |
| PrivatePoolOptions.Ids |
string |
No |
Daftar ID reservasi kapasitas. Nilai dapat berupa array JSON yang terdiri dari hingga 100 ID, dipisahkan oleh koma (,). |
["crp-bp1gubrkqutenqdd****", "crp-bp67acfmxazb5****"] |
| Platform |
string |
No |
Sistem operasi instans. Nilai valid:
Nilai default: all. |
linux |
| InstanceType |
string |
No |
Tipe instans. Anda dapat menggunakan tipe instans untuk mengkueri hanya reservasi kapasitas yang aktif. Reservasi kapasitas yang telah dirilis hanya dapat dikueri dengan menggunakan PrivatePoolOptions.Ids. |
ecs.c6.large |
| ZoneId |
string |
No |
ID zona reservasi kapasitas. |
cn-hangzhou-h |
| InstanceChargeType |
string |
No |
Metode penagihan instans. Nilai valid:
Nilai default: PostPaid. |
PostPaid |
| Status |
string |
No |
Status reservasi kapasitas. Nilai valid:
Jika Anda tidak menentukan parameter ini, reservasi kapasitas dalam semua status kecuali Pending dan Released akan dikueri. |
Active |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
Token paginasi untuk kueri berikutnya. |
caeba0bbb2be03f84eb48b699f0a**** |
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| TotalCount |
integer |
Jumlah total entri yang cocok dengan kondisi kueri. |
1 |
| MaxResults |
integer |
Jumlah entri maksimum per halaman. |
10 |
| CapacityReservationSet |
object |
||
| CapacityReservationItem |
array<object> |
Detail reservasi kapasitas. |
|
|
array<object> |
Detail reservasi kapasitas. |
||
| Status |
string |
Status reservasi kapasitas. Nilai valid:
|
Active |
| TimeSlot |
string |
Catatan
Parameter ini berada dalam pratinjau undangan dan tidak tersedia untuk publik. |
null |
| PrivatePoolOptionsMatchCriteria |
string |
Tipe private pool yang dihasilkan setelah reservasi kapasitas berlaku. Nilai valid:
|
Open |
| PrivatePoolOptionsId |
string |
ID reservasi kapasitas. |
crp-bp1gubrkqutenqdd**** |
| PrivatePoolOptionsName |
string |
Nama layanan reservasi kapasitas. |
crpTestName |
| RegionId |
string |
ID wilayah reservasi kapasitas. |
cn-hangzhou |
| InstanceChargeType |
string |
Metode penagihan instans dalam reservasi kapasitas. Nilai valid:
|
PostPaid |
| EndTime |
string |
Pengatur waktu kedaluwarsa reservasi kapasitas. Pengatur waktu mengikuti standar ISO 8601 dalam UTC. |
2021-02-19T03:02Z |
| StartTime |
string |
Pengatur waktu efektif reservasi kapasitas. Pengatur waktu mengikuti standar ISO 8601 dalam UTC. |
2021-02-19T02:01Z |
| Description |
string |
Deskripsi reservasi kapasitas. |
This is description. |
| EndTimeType |
string |
Mode pelepasan reservasi kapasitas. Nilai valid:
|
Unlimited |
| ResourceGroupId |
string |
ID kelompok sumber daya reservasi kapasitas. |
rg-bp67acfmxazb4p**** |
| Platform |
string |
Sistem operasi instans yang cocok. Nilai valid:
|
linux |
| AllocatedResources |
object |
||
| AllocatedResource |
array<object> |
Daftar detail alokasi sumber daya. |
|
|
array<object> |
Detail alokasi sumber daya. |
||
| UsedAmount |
integer |
Jumlah instans yang dikonsumsi. |
2 |
| TotalAmount |
integer |
Jumlah total instans yang akan dipesan untuk tipe instans tertentu. |
2 |
| AvailableAmount |
integer |
Jumlah instans yang tersedia. |
2 |
| FailedAmount |
integer |
Kapasitas yang gagal. |
1 |
| LockedAmount |
integer |
Kapasitas yang terkunci. |
1 |
| zoneId |
string |
ID zona. |
cn-hangzhou-h |
| InstanceType |
string |
Tipe instans. |
ecs.c6.large |
| CapacityReservationUsages |
object |
||
| CapacityReservationUsage |
array<object> |
Daftar detail instans yang dikonsumsi. |
|
|
object |
Detail instans yang dikonsumsi. |
||
| AccountId |
string |
ID akun Alibaba Cloud. |
105909559088**** |
| ServiceName |
string |
Nama layanan Alibaba Cloud. |
maxcompute.aliyuncs.com |
| UsedAmount |
integer |
Jumlah instans yang dikonsumsi oleh akun atau layanan Alibaba Cloud. |
20 |
| Tags |
object |
||
| Tag |
array<object> |
Daftar pasangan kunci tag dan nilai tag yang terikat pada reservasi kapasitas. |
|
|
object |
Pasangan kunci tag dan nilai tag yang terikat pada reservasi kapasitas. |
||
| TagValue |
string |
Nilai tag. |
TestValue |
| TagKey |
string |
Kunci tag. |
TestKey |
| StartTimeType |
string |
Mode berlakunya reservasi kapasitas. Nilai valid:
|
Now |
| SavingPlanId |
string |
ID rencana penghematan yang terkait dengan reservasi kapasitas. |
spn-c29b5e18pJMT**** |
| ReservedInstanceId |
string |
ID instans terjadwal yang terkait dengan reservasi kapasitas. |
ri-bpzhex2ulpzf53**** |
| CapacityReservationOwnerId |
string |
ID pemilik paket sumber daya reservasi kapasitas. |
100************7 |
| DeliveryTime |
string |
Pengatur waktu pengiriman. Pengatur waktu mengikuti standar ISO 8601 dalam UTC. |
|
| UnlockedTime |
string |
Pengatur waktu buka kunci. Pengatur waktu mengikuti standar ISO 8601 dalam UTC. |
Contoh
Respons sukses
JSONformat
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"TotalCount": 1,
"MaxResults": 10,
"CapacityReservationSet": {
"CapacityReservationItem": [
{
"Status": "Active",
"TimeSlot": "null",
"PrivatePoolOptionsMatchCriteria": "Open",
"PrivatePoolOptionsId": "crp-bp1gubrkqutenqdd****",
"PrivatePoolOptionsName": "crpTestName",
"RegionId": "cn-hangzhou",
"InstanceChargeType": "PostPaid",
"EndTime": "2021-02-19T03:02Z",
"StartTime": "2021-02-19T02:01Z",
"Description": "This is description",
"EndTimeType": "Tanpa Batas",
"ResourceGroupId": "rg-bp67acfmxazb4p****",
"Platform": "linux",
"AllocatedResources": {
"AllocatedResource": [
{
"UsedAmount": 2,
"TotalAmount": 2,
"AvailableAmount": 2,
"FailedAmount": 1,
"LockedAmount": 1,
"zoneId": "cn-hangzhou-h",
"InstanceType": "ecs.c6.large",
"CapacityReservationUsages": {
"CapacityReservationUsage": [
{
"AccountId": "105909559088****",
"ServiceName": "maxcompute.aliyuncs.com",
"UsedAmount": 20
}
]
}
}
]
},
"Tags": {
"Tag": [
{
"TagValue": "TestValue",
"TagKey": "TestKey"
}
]
},
"StartTimeType": "Now",
"SavingPlanId": "spn-c29b5e18pJMT****",
"ReservedInstanceId": "ri-bpzhex2ulpzf53****",
"CapacityReservationOwnerId": "100************7\n",
"DeliveryTime": "",
"UnlockedTime": ""
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter.RegionId | The specified RegionId should not be null. | Parameter RegionId tidak boleh kosong. |
| 400 | InvalidParameter.Name | The specified PrivatePoolOptions.Name is invalid. | |
| 400 | InvalidParameter.PrivatePoolOptions.Ids | The specified PrivatePoolOptions.Ids is invalid. | |
| 400 | DedicatedHostNotSupported | DedicatedHost is not supported for PrivatePool. | Private pool tidak mendukung host khusus. |
| 400 | SpotNotSupported | Spot is not supported for PrivatePool. | Private pool tidak mendukung spot instans. |
| 400 | ClassicNetworkNotSupported | Classic network is not supported for PrivatePool. | Private pool tidak mendukung instans jenis jaringan klasik. |
| 400 | Invalid.InstanceId | Instance does not exist. | Instans tidak cocok dengan private pool. |
| 400 | Invalid.PrivatePoolOptions.MatchCriteria | Target mode does not support this operation. | Parameter PrivatePoolOptions.MatchCriteria yang ditentukan tidak cocok dengan private pool. |
| 400 | MissingParameter.PrivatePoolOptions.Id | The specified PrivatePoolOptions.Id should not be null. | Parameter PrivatePoolOptions.Id tidak boleh kosong. |
| 400 | Invalid.PrivatePoolOptions.Id | The PrivatePool does not exist. | Private pool tidak ada. |
| 400 | Invalid.InstanceType | The InstanceType does not match the PrivatePool. | Tipe instans tidak cocok dengan private pool. |
| 400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | Parameter InstanceChargeType yang ditentukan tidak valid. |
| 400 | Invalid.ZoneId | The ZoneId does not match the PrivatePool. | Zona tidak cocok dengan private pool. |
| 400 | Invalid.PrivatePoolOptions.status | The PrivatePool has been used up. | Status private pool yang ditentukan tidak valid. |
| 400 | InvalidPlatform.ValueNotSupported | The Platform does not match the PrivatePool. | Parameter Platform yang ditentukan tidak cocok dengan private pool. |
| 400 | InvalidAliUid | The PrivatePool does not belong to the user of the Instance. | Private pool bukan milik pengguna yang sedang membuat instans. |
| 400 | MissingParameter.PackageType | The specified parameter "PackageType" can not be empty. | Parameter PackageType tidak boleh kosong. |
| 400 | MissingParameter.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" can not be empty. | Parameter PrivatePoolOptions.ids yang ditentukan tidak boleh kosong. |
| 400 | MissingParameter.InstanceCpuCoreCount | The specified parameter "InstanceCpuCoreCount" can not be empty. | Parameter InstanceCpuCocount yang ditentukan tidak boleh kosong. |
| 400 | MissingParameter.InstanceAmount | The specified parameter "InstanceAmount" can not be empty. | Parameter pemasangan yang ditentukan tidak boleh kosong. |
| 400 | MissingParameter.InstanceCpuCoreCountOrInstanceAmount | The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. | Parameter InstanceCpuCoreCount dan InstanceAmount tidak boleh kosong keduanya. |
| 400 | Invalid.TooManyPrivatePoolOptions.Ids | Too many PrivatePoolOptions.Ids in this request. | Jumlah PrivatePoolOptions.Ids melebihi batas atas. |
| 400 | Invalid.TooManyZoneIds | Too many ZoneIds in the request. | Jumlah ZoneIds melebihi batas atas. |
| 400 | Invalid.TooManyInstanceTypes | Too many InstanceTypes in the request. | Jumlah InstanceTypes melebihi batas atas. |
| 400 | Invalid.TooManyUnpaidPrivatePool | Too many PrivatePools create but still unpaid. | Beberapa private pool belum dibayar. |
| 400 | Invalid.InstanceCpuCoreCountOrInstanceAmount | Both InstanceCpuCoreCount and InstanceAmount are provided. | Parameter InstanceCpuCoreCount dan InstanceAmount tidak perlu ditentukan secara bersamaan. |
| 400 | Invalid.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. | ID private pool yang ditentukan tidak ada. |
| 400 | Invalid.PackageType | The specified parameter "PackageType" is invalid. | Parameter PackageType yang ditentukan tidak valid. |
| 400 | Invalid.PrivatePool.Purchase | The PrivatePool has already paid. | Private pool sudah dibayar. |
| 400 | Invalid.AssuranceTimes.NotSupported | The value of AssuranceTimes is not supported. | Nilai parameter AssuranceTimes tidak didukung. |
| 400 | RepeatStartPrivatePool | PrivatePool has already been started. | Private pool sudah dimulai. |
| 400 | InvalidParameter.RegionId | The specified RegionId is not exist. | |
| 400 | InvalidPermission.ResourceShareAssocoated | The current resource is associated to a shared relationship and cannot be released. | Sumber daya saat ini terikat pada hubungan berbagi dan tidak dapat dirilis. |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | Terjadi kesalahan internal. Coba lagi. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.