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 | 字符串 | 否 | 从配置文件中使用的配置文件配置文件名。有关MongoCLI配置文件的配置文件信息,请参阅https://dochub.mongodb.org/core/atlas-cli-configuration-file. |
示例
# 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