1
我已經使用AWS的AWS API一段時間了,但不知何故我找不到如何刪除使用CreateImage請求創建的快照。AWS Java刪除使用CreateImage創建的快照
此請求將爲您提供包含圖像ID的圖像。 當你想刪除圖像,你可以取消註冊它給這個ID。 但我找不到如何刪除該圖像正在使用的快照。
我在這裏錯過了什麼嗎?
由於提前,
Giriel
PS:一些代碼來說明我的意思:
final CreateImageResult createAMIResult = AWS.ec2.createImage(new CreateImageRequest().withInstanceId(instanceID).withName(amiName).withNoReboot(noReboot));
final String imageId = createAMIResult.getImageId();
//After a while I want to remove it again
AWS.ec2.deregisterImage(new DeregisterImageRequest(imageId));
//TODO: How to remove the snapshot??