mongocli iam organizations invitations update
修改指定待处理的邀请详情到您的组织中。
您可以使用邀请ID或用户的电子邮件地址来指定邀请。
要使用此命令,您必须使用具有组织所有者角色的用户帐户或API密钥进行身份验证。
语法
命令语法
mongocli iam organizations invitations update [invitationId] [options]
参数
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
invitationId | 字符串 | false | 一个唯一24位字符串,用于标识邀请。 |
选项
名称 | 类型 | 必需 | 描述 |
---|---|---|---|
--email | 字符串 | false | 用户的电子邮件地址。 |
-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://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 ORG_OWNER access the organization with the ID 5f71e5255afec75a3d0f96dc: mongocli iam organizations invitations update 5dd56c847a3e5a1f363d424d --orgId 5f71e5255afec75a3d0f96dc --role ORG_OWNER --output json
# Modify the invitation for the user with the email address user@example.com to grant ORG_OWNER access the organization with the ID 5f71e5255afec75a3d0f96dc: mongocli iam organizations invitations update --email user@example.com --orgId 5f71e5255afec75a3d0f96dc --role ORG_OWNER --output json