amazon-web-services - 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?
解决方案
AWS CLI describe-volumes 文档显示了将返回的输出。
我不确定您所说的 是什么意思ownerarn
,但 Amazon EBS 卷属于一个由 12 位数字标识的AWS 账户。帐户 ID不会作为describe-volumes
调用的一部分返回,但您可以通过调用aws iam get-user
并从返回的用户的 Arn 中提取帐户 ID 来获取它。
在 AWS 中,资源与 AWS 账户相关联。它们未链接到 IAM 用户。
推荐阅读
- python - 使用字典进行字符串压缩
- c# - 如何处理实体框架中存储过程的动态结果?
- javascript - 订阅服务作为 *ngFor 数组的长度
- javascript - 将 excel 文件转换为 Google 电子表格并自动替换现有的电子表格文件
- python - 学校项目的网络抓取
- rest - 在 java 中读取 POST 请求正文的内容(使用 REST)
- json - 如何通过 elasticsearch 将对象转换为 Json 查询
- django - 当我们手动更改表时无法获取模型的所有字段
- c# - 如何读取文本文件并将数据添加到具有绑定源的数据网格视图
- python - 如何从 mongodb 中删除重复的行?