CLI命令“aws iam list-mfa-devices”不能返回属于帐户根用户的MFA设备

0

【以下的问题经过翻译处理】 AWS CLI命令aws iam list-mfa-devices似乎无法返回属于账户根用户的MFA设备。

aws iam list-mfa-devices --user-name root
An error occurred (NoSuchEntity) when calling the ListMFADevices operation: The user with name root cannot be found.

然而,CLI命令aws iam list-virtual-mfa-devices确实返回属于账户根用户的虚拟MFA设备。

这是设计上的吗?

谢谢!

1 Answer
0

【以下的回答经过翻译处理】 是的,这是设计的一部分。请注意,root不是IAM用户,这就是为什么找不到该用户的原因。 aws iam list-users不会在结果中列出root

profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions