AWS::Cognito::UserPoolGroup
A user pool group. Contains details about the group and the way that it contributes to IAM role decisions with identity pools. Identity pools can make decisions about the IAM role to assign based on groups: users get credentials for the role associated with their highest-priority group.
This data type is a response parameter of AdminListGroupsForUser, CreateGroup, GetGroup, ListGroups, and UpdateGroup.
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" :Integer
, "RoleArn" :String
, "UserPoolId" :String
} }
YAML
Type: AWS::Cognito::UserPoolGroup Properties: Description:
String
GroupName:String
Precedence:Integer
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
Pattern:
[\p{L}\p{M}\p{S}\p{N}\p{P}]+
Minimum:
1
Maximum:
128
Update requires: Replacement
Precedence
-
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
Precedence
values take precedence over groups with higher or nullPrecedence
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 thecognito:roles
andcognito:preferred_role
claims.Two groups can have the same
Precedence
value. If this happens, neither group takes precedence over the other. If two groups with the samePrecedence
have the same role ARN, that role is used in thecognito:preferred_role
claim in tokens for users in each group. If the two groups have different role ARNs, thecognito:preferred_role
claim isn't set in users' tokens.The default
Precedence
value is null. The maximumPrecedence
value is2^31-1
.Required: No
Type: Integer
Minimum:
0
Update requires: No interruption
RoleArn
-
The role Amazon Resource Name (ARN) for the group.
Required: No
Type: String
Pattern:
arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?
Minimum:
20
Maximum:
2048
Update requires: No interruption
UserPoolId
-
The user pool ID for the user pool.
Required: Yes
Type: String
Pattern:
[\w-]+_[0-9a-zA-Z]+
Minimum:
1
Maximum:
55
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
.