Menghapus snapshot tertentu. Anda juga dapat memanggil operasi ini untuk membatalkan snapshot yang sedang dibuat.
Deskripsi operasi
Saat Anda memanggil operasi ini, perhatikan hal-hal berikut:
Jika ID snapshot yang ditentukan tidak ada, permintaan akan diabaikan.
Jika snapshot telah digunakan untuk membuat gambar kustom, snapshot tidak dapat dihapus. Anda harus terlebih dahulu menghapus gambar kustom (DeleteImage) sebelum dapat menghapus snapshot.
Jika snapshot telah digunakan untuk membuat cloud disk dan parameter
Forcetidak disetel atau disetel keForce=false, snapshot tidak dapat dihapus secara langsung. Untuk menghapus snapshot, setelForce=trueuntuk menghapusnya secara paksa. Setelah snapshot dihapus secara paksa, cloud disk yang terkait tidak dapat diinisialisasi ulang.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DeleteSnapshot |
delete |
*Snapshot
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| SnapshotId |
string |
Yes |
ID snapshot. |
s-bp1c0doj0taqyzzl**** |
| Force |
boolean |
No |
Apakah akan menghapus snapshot secara paksa yang telah digunakan untuk membuat cloud disk. Nilai valid:
Nilai default: false. |
false |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | The input parameter SnapshotId that is mandatory for processing this request is not supplied. | Setidaknya satu dari parameter yang ditentukan harus disediakan. Parameter-parameter tersebut tidak boleh semuanya kosong. |
| 400 | IncorrectDiskStatus.CreatingSnapshot | A previous snapshot creation is in process. | Snapshot sedang dibuat untuk disk. Tunggu hingga snapshot selesai dibuat, lalu coba lagi. |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | SnapshotCreatedImage | The snapshot has been used to create user defined image(s). | Snapshot tidak dapat dihapus karena telah digunakan untuk membuat gambar kustom. Hapus gambar kustom terlebih dahulu dengan memanggil operasi DeleteImage, lalu hapus snapshot. |
| 403 | SnapshotCreatedDisk | The snapshot has been used to create disk(s). | Snapshot yang Anda coba hapus telah digunakan untuk membuat satu atau beberapa disk. |
| 403 | Operation.Conflict | The operation may conflict with others. Please retry later. | |
| 403 | InvalidOperation.RelatedSnapshotNotFinished | The related standard snapshot is not finished. | Snapshot saat ini memiliki snapshot terkait yang belum selesai. Coba lagi nanti. |
| 403 | InvalidOperation.DeleteSharedSnapshotUnsupported | The current snapshot shares authorization with other users. Please revoke the shared authorization through resource management first. | Snapshot saat ini dibagikan dengan pengguna lain. Cabut otorisasi melalui Resource Management sebelum melakukan operasi ini. |
| 403 | InvalidOperation.ResourceManagedByCloudProduct | The current operation is not supported because the resource is managed by a cloud product. Please contact the relevant cloud product to confirm the reason. | Operasi ini tidak didukung karena resource dikelola oleh layanan cloud. Hubungi layanan cloud terkait untuk mengonfirmasi alasannya. |
| 403 | InvalidOperation.SnapshotIsLocked | The current operation is not supported because the snapshot is locked. Please wait for the lock to expire before retrying. | Operasi ini tidak didukung karena snapshot terkunci. Tunggu hingga kunci kedaluwarsa dan coba lagi. |
| 404 | InvalidSnapshotId.NotFound | The specified snapshot is not found. | Snapshot yang ditentukan tidak ada. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.