mongocli iam organizations users list
返回组织中的所有用户。
使用此命令,您必须使用具有组织成员角色的用户帐户或API密钥进行身份验证。
语法
命令语法
mongocli iam organizations users list [options]
选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
-h, --help | false | 列表的帮助信息 | |
--limit | int | false | 每页结果的项目数量,最多为500。如果您有超过500个结果,请指定--page选项以更改结果页。此值默认为100。 |
--orgId | string | false | 要使用的组织ID。此选项将覆盖配置文件或环境变量中的设置。 |
-o, --output | string | false | 输出格式。有效值是json、json-path、go-template或go-template-file。要查看完整的输出,请使用-o json选项。 |
--page | int | false | 指定结果页的页码。此值默认为1。 |
继承选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
-P, --profile | string | false | 从配置文件中使用的配置文件名称。有关MongoCLI配置文件的配置信息,请参阅https://dochub.mongodb.org/core/atlas-cli-configuration-file. |
输出
如果命令成功执行,CLI将返回类似于以下示例的输出。括号中的值表示您的值。
ID FIRST NAME LAST NAME USERNAME <ID> <FirstName> <LastName> <Username>
示例
# Return a JSON-formatted list of all users for the organization with the ID 5e2211c17a3e5a48f5497de3: mongocli iam organizations users list --orgId 5e2211c17a3e5a48f5497de3 --output json