mongocli iam projects invitations update
修改您项目中指定的待处理邀请的详细信息。
您可以使用邀请ID或用户的电子邮件地址来指定邀请。
使用此命令,您必须使用具有项目所有者角色的用户帐户或API密钥进行身份验证。
语法
命令语法
mongocli iam projects invitations update [invitationId] [options]
参数
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
invitationId | 字符串 | false | 唯一24位字符串,用于标识邀请。 |
选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
--email | 字符串 | false | 用户的电子邮件地址。 |
-h, --help | false | update的帮助信息 | |
-o, --output | 字符串 | false | 输出格式。有效值是json, json-path, go-template, 或 go-template-file。要查看完整输出,请使用-o json选项。 |
--projectId | 字符串 | false | 用于标识要使用的项目的十六进制字符串。此选项覆盖配置文件或环境变量中的设置。 |
--role | 字符串 | true | 关联组织的用户角色。要了解MCLI接受的哪些值,请参阅Atlas API规范中角色的Items Enumhttps://mongodb.ac.cn/docs/atlas/reference/api-resources-spec/#operation/createOrganizationInvitation/. 设置此标志将替换现有数据。 |
继承选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
-P, --profile | 字符串 | false | 配置文件中使用的配置文件名。有关MongoCLI配置文件的配置信息,请参阅https://dochub.mongodb.org/core/atlas-cli-configuration-file. |
输出
如果命令成功执行,CLI将返回类似于以下示例的输出。括号中的值代表您的值。
Invitation <ID> updated.
示例
# Modify the pending invitation with the ID 5dd56c847a3e5a1f363d424d to grant GROUP_READ_ONLY access the project with the ID 5f71e5255afec75a3d0f96dc: mongocli iam projects invitations update 5dd56c847a3e5a1f363d424d --projectId 5f71e5255afec75a3d0f96dc --role GROUP_READ_ONLY --output json
# Modify the invitation for the user with the email address user@example.com to grant GROUP_READ_ONLY access the project with the ID 5f71e5255afec75a3d0f96dc: mongocli iam projects invitations update --email user@example.com --projectId 5f71e5255afec75a3d0f96dc --role GROUP_READ_ONLY --output json