文档菜单
文档首页
/ /
MongoDB CLI
/ / /

mongocli iam users describe

在本页

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

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

您可以指定用于识别 MongoDB 用户的唯一 24 位数字 ID 或用户名。

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

命令语法
mongocli iam users describe [options]
名称
类型
必需
描述
-h, --help
false
describe 帮助
--id
string
false
用户的唯一 24 位数字标识符。
-o, --output
string
false
输出格式。有效值是 json, json-path, go-template 或 go-template-file。要查看完整输出,请使用 -o json 选项。
--username
string
false
标识用户的名称。您必须指定有效的电子邮件地址。
名称
类型
必需
描述
-P, --profile
string
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

返回

删除