mongocli iam teams users add
将指定的MongoDB用户添加到您的组织团队中。
在将用户添加到团队之前,用户必须是您组织的当前成员。
要使用此命令,您必须使用具有组织用户管理员角色的用户帐户或API密钥进行身份验证。
语法
命令语法
mongocli iam teams users add <userId>... [options]
参数
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
userId | 字符串 | 是 | 一个用于标识用户的24位唯一字符串。您可以一次指定多个用户ID,用空格分隔。 |
选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
-h, --help | 否 | add的帮助信息 | |
--orgId | 字符串 | 否 | 要使用的组织ID。此选项会覆盖配置文件或环境变量的设置。 |
-o, --output | 字符串 | 否 | 输出格式。有效值是json、json-path、go-template或go-template-file。要查看完整输出,请使用-o json选项。 |
--teamId | 字符串 | 是 | 一个用于标识团队的24位唯一字符串。 |
继承选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
-P, --profile | 字符串 | 否 | 从配置文件中使用的配置文件名。有关MongoCLI配置文件的配置信息,请参阅https://dochub.mongodb.org/core/atlas-cli-configuration-file. |
示例
# Add the users with the IDs 5dd58c647a3e5a6c5bce46c7 and 5dd56c847a3e5a1f363d424d to the team with the ID 5f6a5c6c713184005d72fe6e for the organization with ID 5e2211c17a3e5a48f5497de3: mongocli iam teams users add 5dd58c647a3e5a6c5bce46c7 5dd56c847a3e5a1f363d424d --teamId 5f6a5c6c713184005d72fe6e --orgId 5e1234c17a3e5a48f5497de3 --output json