mongocli iam project team list
The mongocli iam project team list
command lists teams with access
to the specified project using the specified profile.
Syntax
mongocli iam project|s team|s list|ls [ --projectId <project-id>] [ --output|-o <output-format> ] [ --profile|-P <profile-name> ]
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? |
---|---|---|---|
--projectId | string | Unique identifier of the project for which to list teams with
access. If omitted, uses the project ID in
your profile or environment variable. | no |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile that contains the access information. If
omitted, uses the default profile. | no |
Output
The command prints the following fields in the specified format to the terminal if the command succeeds. If the command prints an error, see Troubleshooting for recommended solutions.
ID 5f6a61ad7840ac2890424ce2 5f6a5c924166e52c48b212f3
The JSON response returns an array of teams with access to the specified project, with the following details about each team:
Field | Description |
---|---|
roleNames | Array of roles granted to users on the team for this
project. |
teamId | The unique identifier of the team. |
Example
The following command lists teams with access to an Atlas project. It specifies a project and uses the default profile for accessing Atlas.
mongocli iam team list --projectId 5dd6faab74979f10f39ffb78 -o json
The previous command prints the following in the specified format to the terminal. For more information on these fields, see Output.
{ "links": [...], "roleNames": [ "GROUP_READ_ONLY" ], "teamId": "5f6a61ad7840ac2890424ce2", }, { "links": [...], "roleNames": [ "GROUP_CLUSTER_MANAGER", "GROUP_DATA_ACCESS_ADMIN" ], "teamId": "5f6a5c924166e52c48b212f3", }