我怎样才能在AWS EC2中删除图像(AMI)使用SDK? [英] How can I delete an image (AMI) in AWS EC2 using the SDK?

查看:1375
本文介绍了我怎样才能在AWS EC2中删除图像(AMI)使用SDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的createImage()从现有实例创建一个新的AMI,我希望有一个 DeleteImage()这将工作在相反的方式。不幸的是这种方法不上EC2Client存在

I am using CreateImage() to create a new AMI from an existing Instance and I was hoping there was a DeleteImage() which would work in the converse fashion. Unfortunately this method does not exist on the EC2Client.

什么是正确的方式,通过SDK使用C#来删除一个AMI?

What is the proper way to delete an AMI through the SDK using C#?

推荐答案

有一个<一个href="http://docs.amazonwebservices.com/sdkfornet/latest/apidocs/html/M_Amazon_EC2_AmazonEC2Client_DeregisterImage.htm"相对=nofollow> DeregisterImage() 应该做你想要什么。请注意,这是给你删除的图像可以基于任何之后的快照。

There is a DeregisterImage() that should do what you want. Note that it's up to you to delete any snapshots the image may be based upon afterward.

这篇关于我怎样才能在AWS EC2中删除图像(AMI)使用SDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆