首页 > 解决方案 > Can AWS EC2 describe-volumes show ownerarn?

问题描述

I am using the aws ec2 describe-volumes with the out showing this:

{
    "Volumes": [

Is there anyway to include the ownerarn in this?

标签: amazon-web-servicesaws-cliamazon-ebs

解决方案


AWS CLI describe-volumes 文档显示了将返回的输出。

我不确定您所说的 是什么意思ownerarn,但 Amazon EBS 卷属于一个由 12 位数字标识的AWS 账户。帐户 ID不会作为describe-volumes调用的一部分返回,但您可以通过调用aws iam get-user并从返回的用户的 Arn 中提取帐户 ID 来获取它。

在 AWS 中,资源与 AWS 账户相关联。它们链接到 IAM 用户。


推荐阅读