Menghapus satu atau beberapa versi dari template peluncuran tertentu dengan menentukan parameter seperti LaunchTemplateId dan DeleteVersion.
Deskripsi operasi
Saat Anda memanggil operasi ini, perhatikan hal-hal berikut:
-
Versi default tidak dapat dihapus. Anda harus menghapus seluruh template peluncuran untuk menghapus versi default.
-
Jika versi yang ingin Anda hapus adalah versi default, Anda dapat memanggil ModifyLaunchTemplateDefaultVersion atau mengubah versi default di konsol Launch Template, lalu lakukan operasi penghapusan.
-
Menghapus versi tidak memengaruhi instans yang sudah dibuat dari versi tersebut.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DeleteLaunchTemplateVersion |
delete |
*LaunchTemplate
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID region dari template peluncuran. Anda dapat memanggil DescribeRegions untuk menanyakan daftar region terbaru Alibaba Cloud. |
cn-hangzhou |
| DeleteVersion |
array |
Yes |
Nomor versi template peluncuran yang akan dihapus. |
2 |
|
integer |
No |
Nomor versi template peluncuran. Nilai valid N: 1 hingga 29. Anda dapat memanggil DescribeLaunchTemplateVersions untuk menanyakan nomor versi template peluncuran. |
2 |
|
| LaunchTemplateId |
string |
No |
ID template peluncuran yang akan dihapus. Untuk informasi selengkapnya, lihat DescribeLaunchTemplates. |
lt-bp1apo0bbbkuy0rj**** |
| LaunchTemplateName |
string |
No |
Nama template peluncuran. |
testLaunchTemplateName |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| LaunchTemplateVersions |
object |
||
| LaunchTemplateVersion |
array<object> |
Versi template peluncuran yang dihapus. |
|
|
object |
|||
| LaunchTemplateId |
string |
ID template peluncuran. |
lt-bp1apo0bbbkuy0rj**** |
| LaunchTemplateVersionNumber |
integer |
Nomor versi template peluncuran. |
2 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"LaunchTemplateVersions": {
"LaunchTemplateVersion": [
{
"LaunchTemplateId": "lt-bp1apo0bbbkuy0rj****",
"LaunchTemplateVersionNumber": 2
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidRegion.NotExist | %s | The specified region does not exist. Check whether the parameter is correct. |
| 400 | MissingParameter | %s | A parameter is missing. Check whether all required parameters are specified. |
| 400 | InvalidParameter | %s | Invalid parameter. |
| 403 | InvalidOperation.DeleteDefaultVersion | %s | The operation is invalid. Deleting the default version is not supported. |
| 403 | InnerServiceFailed | %s | An internal service call failed. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.