AWS CLI -AWS EC2 DRECUD -VOLUMES可以在表中的音量大小和音量类型

发布于 2025-02-13 12:26:24 字数 387 浏览 4 评论 0原文

我正在尝试获取所有EBS卷ID的表,实例ID的附件以及通过AWS CLI的卷的大小/类型。 当ID工作正常时,我没有获得大小/类型的输出。

我尝试了以下命令:

aws ec2 describe-volumes --output table --query 'Volumes[*].Attachments[0].{VolumeID:VolumeId,InstanceID:InstanceId,size:Size,type:VolumeType}'

我得到了此输出:

“

感谢您的帮助! :)

I'm trying to get a table of all ebs volume ID's, the instance ID's their attached to and the size/type of the volume via the AWS CLI.
While the ID's are working fine, I'm not getting any output for the size/type.

I tried the following command:

aws ec2 describe-volumes --output table --query 'Volumes[*].Attachments[0].{VolumeID:VolumeId,InstanceID:InstanceId,size:Size,type:VolumeType}'

And I got this output:

Output_EBS-List

Thanks for helping! :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

盛夏已如深秋| 2025-02-20 12:26:25
aws ec2 describe-volumes --query 'Volumes[*].{VolumeID:Attachments[0].VolumeId,InstanceID:Attachments[0].InstanceId,size:Size,type:VolumeType}'
aws ec2 describe-volumes --query 'Volumes[*].{VolumeID:Attachments[0].VolumeId,InstanceID:Attachments[0].InstanceId,size:Size,type:VolumeType}'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文