Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::Cognito::UserPoolGroup

The AWS::Cognito::UserPoolGroup resource creates a user group in an Amazon Cognito user pool.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "Type" : "AWS::Cognito::UserPoolGroup", "Properties" : { "Description" : String, "GroupName" : String, "Precedence" : Number, "RoleArn" : String, "UserPoolId" : String } }

YAML

Copy
Type: "AWS::Cognito::UserPoolGroup" Properties: Description: String GroupName: String Precedence: Number RoleArn: String UserPoolId: String

Properties

Description

A description of the user group.

Required: No

Type: String

Update requires: No interruption

MaxLength: 2048

GroupName

The name of the user group. GroupName must be unique.

Required: Yes

Type: String

Update requires: Replacement

Precedence

A nonnegative 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 Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, the role ARN of the group with the lowest precedence value is used in the cognito:roles and cognito:preferred_role claims in the user's tokens.

Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence value have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim is not set in users' tokens.

The default Precedence value is null.

Required: No

Type: Number

Update requires: No interruption

RoleArn

The role ARN for the group.

Required: No

Type: String

Update requires: No interruption

UserPoolId

The user pool ID.

Required: Yes

Type: String

Update requires: Replacement

Return Value

Ref

When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the name of the user pool group. For example, Admins.

For more information about using the Ref function, see Ref.