deregister_image(image_id)
Jeff Bauer
Rubicon, Inc.
image_to_be_deleted = conn.get_image(amiToken)
if image_to_be_deleted is not None:
snapshot_id =
image_to_be_deleted.block_device_mapping.current_value.snapshot_id
print "Deregistering the AMI image %s" % str(image_to_be_deleted)
conn.deregister_image(amiToken)
# delete the snapshot volume for this image
print "Deleting snapshot " + snapshot_id
conn.delete_snapshot(snapshot_id)
else:
print "Cannot find image %s. Please delete it manually" % amiToken
On Tue, Mar 15, 2011 at 8:08 PM, ripper234 <ron....@gmail.com> wrote:
> Given an image ID, how can I delete it using boto?
>
> --
> You received this message because you are subscribed to the Google Groups
> "boto-users" group.
> To post to this group, send email to boto-...@googlegroups.com.
> To unsubscribe from this group, send email to
> boto-users+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/boto-users?hl=en.
>