Docs 菜单
Docs 主页
/ /
MongoDB CLI
/ / / /

mongocli iam 组织邀请 邀请

在此页面上

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

邀请指定的 MongoDB 用户加入您的组织。

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

命令语法
mongocli iam organizations invitations invite <email> [options]
名称
类型
必需
说明

电子邮件

字符串

true

属于您要邀请加入组织的用户的电子邮件地址。

名称
类型
必需
说明

-h,--help

false

邀请帮助

--orgId

字符串

false

要使用的组织 ID。 此选项会覆盖配置文件或环境变量中的设置。

-o, --output

字符串

false

输出格式。 有效值为 json、json-path、go-template 或 go-template-file。 要查看完整输出,请使用 -o json 选项。

--role

字符串

true

用户在关联组织中的角色。 要了解 MCLI 接受哪些值,请参阅 Atlas API 规范中角色的列项枚举: https://www.mongodb.com/zh-cn/docs/atlas/reference/api-resources-spec/#operation/createOrganizationInvitation/。

--teamId

字符串

false

标识团队的唯一 24 位字符串。

名称
类型
必需
说明

-P, --profile

字符串

false

# Invite the MongoDB user with the email user@example.com to the organization with the ID 5f71e5255afec75a3d0f96dc with ORG_OWNER access:
mongocli iam organizations invitations invite user@example.com --orgId 5f71e5255afec75a3d0f96dc --role ORG_OWNER --output json

后退

描述