Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅
中国的 Amazon Web Services 服务入门
(PDF)。
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
将用户添加到组
使用以下过程将用户添加为之前在 Identity Center 目录中创建的组的成员。或者,您也可以调用 Amazon API 操作CreateGroupMembership将用户添加为组成员。
- Console
-
将用户添加为组的成员
-
打开 IAM Identity Center 控制台。
-
选择组。
-
选择您要更新的组名称。
-
在组详细信息页面上的此组中的用户下,选择将用户添加到组。
-
在将用户添加到组页面上的其他用户下,找到要添加为成员的用户。然后,选中每个选项旁边的复选框。
-
选择添加用户。
- Amazon CLI
-
将用户添加为组的成员
以下create-group-membership
命令将用户添加到您的 Identity Center 目录中的组。
aws identitystore create-group-membership \
--identity-store-id d-1234567890 \
--group-id a1b2c3d4-5678-90ab-cdef-EXAMPLE22222 \
--member-id UserId=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
输出:
{
"MembershipId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
"IdentityStoreId": "d-1234567890"
}