本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
刪除啟動範本或啟動範本版本
如果您不再需要啟動範本,即可將其刪除。刪除啟動範本會刪除它的所有版本。如果您只想要刪除特定版本的啟動範本,可以在保留其他版本啟動範本的情況下執行此操作。
刪除啟動範本或啟動範本版本,並不會影響您從啟動範本啟動的任何執行個體。
刪除啟動範本以及其所有版本
如果您不再需要啟動範本,包括其所有版本,可以刪除啟動範本。刪除啟動範本會刪除它的所有版本。
- Console
-
- AWS CLI
-
刪除啟動範本及其所有版本
使用 delete-launch-template 命令並指定啟動範本。
aws ec2 delete-launch-template --launch-template-id lt-01238c059e3466abc
- PowerShell
-
刪除啟動範本及其所有版本
使用 Remove-EC2LaunchTemplate (AWS Tools for PowerShell) 命令,並指定啟動範本。如果省略 -Force
,則 PowerShell 會提示進行確認。
Remove-EC2LaunchTemplate -LaunchTemplateId lt-0123456789example
-Force
刪除啟動範本版本
如果您不再需要啟動範本版本,可以將其刪除。
- Console
-
- AWS CLI
-
若要刪除啟動範本版本
使用 delete-launch-template-versions 命令,並指定要刪除的版本號碼。您在單個請求中最多可刪除 200 個啟動範本版本。
aws ec2 delete-launch-template-versions \
--launch-template-id lt-0abcd290751193123
\
--versions 1
- PowerShell
-
若要刪除啟動範本版本
使用 Remove-EC2TemplateVersion cmdlet 並指定要刪除的版本編號。您在單個請求中最多可刪除 200 個啟動範本版本。
Remove-EC2TemplateVersion `
-LaunchTemplateId lt-0abcd290751193123
`
-Version 1