简体   繁体   English

Python boto ec2-删除AMI的快照

[英]Python boto ec2 - Deleting snapshots of an AMI

I want to delete an AMI along with all the snapshots associated with it. 我想删除一个AMI及其关联的所有快照。 According to the docs: 根据文档:

deregister_image(image_id, delete_snapshot=True)
Unregister an AMI.

Parameters: 
image_id (string) – the ID of the Image to unregister
delete_snapshot (bool) – Set to True if we should delete the snapshot associated with an EBS volume mounted at /dev/sda1

So does this mean that this deletes only the snapshot of the root EBS volume? 那么这是否意味着这仅删除了根EBS卷的快照? What about the snapshots of other EBS volumes? 其他EBS卷的快照又如何呢? How do I delete them? 如何删除它们?

Or have I got the concept of snapshots completely wrong? 还是我对快照的概念完全错误? Will there be only one snapshot for all the EBS backed devices? 所有EBS支持的设备是否只有一个快照?

If, when you originally registered the AMI, you supplied a snapshot_id parameter to use as the root device for the image, the delete_snapshot parameter on unregister_image allows you to optionally delete this snapshot when the AMI is unregistered. 如果在最初注册AMI时提供了snapshot_id参数以用作映像的根设备,则在unregister_image上的delete_snapshot参数允许您在unregister_image AMI时有选择地删除此快照。

What other "snapshots associated with" the AMI do you want to delete? 您还想删除与AMI相关的其他“快照”吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM