AWS CloudFormation
User Guide (Version )

AWS::Cognito::UserPoolUserToGroupAttachment

The AWS::Cognito::UserPoolUserToGroupAttachment resource attaches a user to an Amazon Cognito user pool user group.

Syntax

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

JSON

{ "Type" : "AWS::Cognito::UserPoolUserToGroupAttachment", "Properties" : { "GroupName" : String, "Username" : String, "UserPoolId" : String } }

YAML

Type: AWS::Cognito::UserPoolUserToGroupAttachment Properties: GroupName: String Username: String UserPoolId: String

Properties

GroupName

The group name.

Required: Yes

Type: String

Minimum: 1

Maximum: 128

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

Update requires: Replacement

Username

The username for the user.

Required: Yes

Type: String

Minimum: 1

Maximum: 128

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

Update requires: Replacement

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 a generated ID, such as UserToGroupAttachment-YejJvzrEXAMPLE.

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