AWS CloudFormation
User Guide (Version )

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

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

YAML

Type: AWS::Cognito::UserPoolGroup Properties: Description: String GroupName: String Precedence: Double RoleArn: String UserPoolId: String

Properties

Description

A string containing the description of the group.

Required: No

Type: String

Maximum: 2048

Update requires: No interruption

GroupName

The name of the group. Must be unique.

Required: No

Type: String

Minimum: 1

Maximum: 128

Pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+

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, it is the group with the lowest precedence value whose role ARN will be 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 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: Double

Minimum: 0

Update requires: No interruption

RoleArn

The role ARN for the group.

Required: No

Type: String

Minimum: 20

Maximum: 2048

Pattern: arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?

Update requires: No interruption

UserPoolId

The user pool ID for the user pool.

Required: Yes

Type: String

Minimum: 1

Maximum: 55

Pattern: [\w-]+_[0-9a-zA-Z]+

Update requires: Replacement

Return Values

Ref

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

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