本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
刪除啟動範本或啟動範本版本
如果您不再需要啟動範本,即可將其刪除。刪除啟動範本會刪除它的所有版本。如果您只想刪除特定版本的啟動範本,您可以在保留啟動範本的其他版本的同時刪除。
刪除啟動範本或啟動範本版本不會影響您從啟動範本啟動的任何執行個體。
刪除啟動範本及其所有版本
如果您不再需要啟動範本 (包括其所有版本),您可以刪除啟動範本。刪除啟動範本會刪除它的所有版本。
- Console
-
- AWS CLI
-
若要刪除啟動範本及其所有版本
使用 delete-launch-template(AWS CLI) 指令並指定啟動範本。
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
-
- PowerShell
-
使用指Remove-EC2TemplateVersion令程式並指定要刪除的版本號碼。您在單個請求中最多可刪除 200 個啟動範本版本。
Remove-EC2TemplateVersion `
-LaunchTemplateId lt-0abcd290751193123
`
-Version 1