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

mongocli iam organizations invitations invite

本页内容

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

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

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

命令语法
mongocli iam organizations invitations invite <email> [options]
名称
类型
必需
描述
email
字符串
您想邀请加入组织的用户的电子邮件地址。
名称
类型
必需
描述
-h, --help
邀请帮助
--orgId
字符串
要使用的组织ID。此选项覆盖配置文件或环境变量中的设置。
-o, --output
字符串
输出格式。有效值是 json、json-path、go-template 或 go-template-file。要查看完整输出,请使用 -o json 选项。
--role
字符串
关联组织的用户角色。要了解MCLI接受的值,请参阅Atlas API规范中角色的枚举项https://mongodb.ac.cn/docs/atlas/reference/api-resources-spec/#operation/createOrganizationInvitation/.
--teamId
字符串
唯一24位字符串,用于标识团队。
名称
类型
必需
描述
-P, --profile
字符串
# 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

返回

描述