v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-14101465558.4 KB

Creates a new group in the specified user pool.

Calling this action requires developer credentials.

post/#X-Amz-Target=AWSCognitoIdentityProviderService.CreateGroup

Headers

X-Amz-Target'AWSCognitoIdentityProviderService.CreateGroup' required

Request body

GroupNamestring required

The name of the group. Must be unique.

UserPoolIdstring required

The user pool ID for the user pool.

Descriptionstring

A string containing the description of the group.

RoleArnstring

The role Amazon Resource Name (ARN) for the group.

Precedenceinteger
<p>A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower <code>Precedence</code> values take precedence over groups with higher or null <code>Precedence</code> values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the <code>cognito:roles</code> and <code>cognito:preferred_role</code> claims.</p> <p>Two groups can have the same <code>Precedence</code> value. If this happens, neither group takes precedence over the other. If two groups with the same <code>Precedence</code> have the same role ARN, that role is used in the <code>cognito:preferred_role</code> claim in tokens for users in each group. If the two groups have different role ARNs, the <code>cognito:preferred_role</code> claim isn't set in users' tokens.</p> <p>The default <code>Precedence</code> value is null. The maximum <code>Precedence</code> value is <code>2^31-1</code>.</p>

Response

Success