简体   繁体   English

AMAZON EC2通过ebs或ami id查找和删除图像

[英]AMAZON EC2 Find and Delete Images by ebs or ami id

I'm trying to read through the amazon docs for the ruby sdk. 我正在尝试通过亚马逊文档阅读ruby sdk。 I'm trying to filter the list by ami-id and ebs id. 我正在尝试通过ami-id和ebs id过滤列表。 I'm getting an error with my code and im not sure what im doing wrong. 我的代码出错,我不确定我做错了什么。 I'm not entirely sure how to delete them yet. 我还不完全确定如何删除它们。

I attached a screen shot of the error I'm getting. 我附上了我得到的错误的屏幕截图。 Any help would be appriciated. 任何帮助都会得到满足。

this is the var passed truncated numbers. 这是var传递的截断数字。 在此输入图像描述

ami-0000000 AMI-0000000

ec2 = Aws::EC2::Client.new(region:region)
puts ec2.describe_images(:image_id => ebs)

the answer. 答案。

images = ec2.describe_images(
                          image_ids: [ebs,],
                        )

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

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