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

mongocli iam teams users delete

本页内容

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

从您的组织团队中删除指定的用户。

要使用此命令,您必须使用具有组织用户管理员角色的用户帐户或API密钥进行身份验证。

命令语法
mongocli iam teams users delete <userId> [options]
名称
类型
必需
描述
userId
字符串
一个唯一的24位字符串,用于标识用户。
名称
类型
必需
描述
--force
false
标志,表示是否在执行请求的操作之前跳过确认提示。
-h, --help
false
删除的帮助信息
--orgId
字符串
false
要使用的组织ID。此选项会覆盖配置文件或环境变量中的设置。
--teamId
字符串
一个唯一的24位字符串,用于标识团队。
名称
类型
必需
描述
-P, --profile
字符串
false
从您的配置文件中使用的配置文件名称。有关MongoCLI的配置文件信息,请参阅https://dochub.mongodb.org/core/atlas-cli-configuration-file.

如果命令成功执行,CLI将返回类似以下示例的输出。括号内的值表示您的值。

User '<Name>' deleted from the team
# Remove the user with the ID 5dd58c647a3e5a6c5bce46c7 from the team with the ID 5f6a5c6c713184005d72fe6e for the organization with ID 5e2211c17a3e5a48f5497de3:
mongocli iam teams users delete 5dd58c647a3e5a6c5bce46c7 --teamId 5f6a5c6c713184005d72fe6e --orgId 5e1234c17a3e5a48f5497de3

返回

add