

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 将组添加到 Identity Center 目录
<a name="addgroups"></a>

使用以下过程将组添加到您的 Identity Center 目录中。或者，您可以调用 AWS API 操作[https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_CreateGroup.html](https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_CreateGroup.html)来添加群组。

------
#### [ Console ]

**添加组**

1. 打开 [IAM Identity Center 控制台](https://console.aws.amazon.com/singlesignon)。

1. 选择**组**。

1. 选择**创建群组**。

1. 输入**组名称**和**描述 - *可选***。描述应提供有关已分配或将分配给该组的权限的详细信息。在**将用户添加到组——*可选***下，找到要添加为成员的用户。然后选中其中每个用户旁边的复选框。

1. 选择**创建群组**。

------
#### [ AWS CLI ]

**添加组**  
以下 `create-group` 命令会在您的 Identity Center 目录中创建一个新组。

```
aws identitystore create-group \
    --identity-store-id d-1234567890 \
    --display-name "Developers" \
    --description "Group that contains all developers"
```

输出：

```
{
    "GroupId": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
    "IdentityStoreId": "d-1234567890"
}
```

------

将此组添加到 Identity Center 目录后，您可以向该组分配单点登录访问权限。有关更多信息，请参阅 [为用户或群组分配访问权限 AWS 账户](assignusers.md)。