mongocli iam organizations list
返回所有组织。
要使用此命令,您必须使用具有组织成员角色的用户帐户或API密钥进行认证。
语法
命令语法
mongocli iam organizations list [options]
选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
-h, --help | false | 列表帮助 | |
--includeDeleted | false | 标志,表示是否要在列表中包含已删除的组织。此选项仅适用于Ops Manager组织。您无法返回已删除的Atlas或Cloud Manager组织。 | |
--limit | int | false | 每页结果的项目数,最多为500。如果您有超过500个结果,请指定--page选项以更改结果页。默认值为100。 |
--name | string | false | 要执行不区分大小写的搜索的组织名称。 |
-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 NAME <ID> <Name>
示例
# Return a JSON-formatted list of all organizations: mongocli iam organizations list --output json
# Return a JSON-formatted list that includes the organizations named org1 and Org1, but doesn't return org123: mongocli iam organizations list --name org1 --output json