Menghapus gambar kustom. Jika Anda tidak lagi memerlukan gambar kustom, Anda dapat memanggil operasi ini untuk menghapusnya. Anda juga dapat menghapus beberapa gambar kustom secara bersamaan. Setelah gambar kustom dihapus, Anda tidak dapat menggunakannya untuk mereset simple application server yang dibuat dari gambar tersebut.
Deskripsi operasi
If a custom image is shared, you must unshare the image before you can delete it. After a custom image is unshared, you cannot query the custom image by using the Elastic Compute Service (ECS) console or by calling an ECS API operation. If you want to use a custom image to create ECS instances, we recommend that you copy the custom image before you delete it. For more information, see Copy a custom image.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
swas-open:DeleteCustomImages |
delete |
*CustomImage
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID Wilayah. Anda dapat memanggil operasi ListRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| ImageIds |
string |
Yes |
ID gambar kustom. Nilai dapat berupa array JSON yang terdiri dari hingga 15 ID gambar. Pisahkan beberapa ID gambar dengan koma (,). |
["m-2zehv38jjmwva1ee****", "m-bp1hj0zhmheyq2kz****"] |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan token, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. token hanya dapat berisi karakter ASCII dan tidak boleh melebihi 64 karakter. Untuk informasi selengkapnya, lihat Memastikan idempotensi. |
123e4567-e89b-12d3-a456-426655440000 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
30637AD6-D977-4833-A54C-CC89483E**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "30637AD6-D977-4833-A54C-CC89483E****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | CustomImageInShare | The custom image is in sharing,please unshare first then to retry. | |
| 500 | InternalError | An error occurred while processing your request. | |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.