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

mongocli iam projects invitations invite

本页内容

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

邀请指定的 MongoDB 用户加入您的项目。

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

命令语法
mongocli iam projects invitations invite <email> [options]
名称
类型
必需
描述
email
string
true
您想要邀请加入项目的用户的电子邮件地址。
名称
类型
必需
描述
-h, --help
false
邀请的帮助信息
-o, --output
string
false
输出格式。有效值包括 json、json-path、go-template 或 go-template-file。要查看完整输出,请使用 -o json 选项。
--projectId
string
false
表示要使用项目的十六进制字符串。此选项覆盖配置文件或环境变量的设置。
--role
strings
true
关联项目的用户角色。有效值包括 GROUP_CLUSTER_MANAGER、GROUP_DATA_ACCESS_ADMIN、GROUP_DATA_ACCESS_READ_ONLY、GROUP_DATA_ACCESS_READ_WRITE、GROUP_OWNER、GROUP_READ_ONLY、GROUP_AUTOMATION_ADMIN、GROUP_BACKUP_ADMIN 和 GROUP_MONITORING_ADMIN。
--teamId
strings
false
表示团队的唯一24位字符串。
名称
类型
必需
描述
-P, --profile
string
false
从配置文件中使用的配置文件名。有关MongoCLI的配置文件中配置文件的信息,请参阅https://dochub.mongodb.org/core/atlas-cli-configuration-file.
# Invite the MongoDB user with the email user@example.com to the project with the ID 5f71e5255afec75a3d0f96dc with GROUP_READ_ONLY access:
mongocli iam projects invitations invite user@example.com --projectId 5f71e5255afec75a3d0f96dc --role GROUP_READ_ONLY --output json

返回

describe