Docs 菜单
Docs 主页
/ /
MongoDB CLI
/ / /

mongocli iam 用户描述

在此页面上

  • 语法
  • 选项
  • 继承选项
  • 输出
  • 示例

返回指定 MongoDB 用户的详细信息。

您可以指定标识 MongoDB 用户的唯一 24 位 ID 或 MongoDB 用户的用户名。

具有任何角色的用户帐户和 API 密钥都可以运行此命令。

命令语法
mongocli iam users describe [options]
名称
类型
必需
说明

-h,--help

false

描述帮助

--id

字符串

false

用户的唯一 24 位标识符。

-o, --output

字符串

false

输出格式。 有效值为 json、json-path、go-template 或 go-template-file。 要查看完整输出,请使用 -o json 选项。

--username

字符串

false

标识用户的名称。 您必须指定有效的电子邮件地址。

名称
类型
必需
说明

-P, --profile

字符串

false

要从配置文件中使用的配置文件的名称。 要了解 MongoCLI 的配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-configuration-file。

如果命令成功,CLI 将返回类似于以下示例的输出。 括号中的值代表您的价值观。

ID FIRST NAME LAST NAME USERNAME EMAIL
<ID> <FirstName> <LastName> <Username> <EmailAddress>
# Return the JSON-formatted details for the MongoDB user with the ID 5dd56c847a3e5a1f363d424d:
mongocli iam users describe --id 5dd56c847a3e5a1f363d424d --output json
# Return the JSON-formatted details for the MongoDB user with the username myUser:
mongocli iam users describe --username myUser --output json

后退

删除