# CfnUserPoolUserToGroupAttachmentProps

Properties for defining a `CfnUserPoolUserToGroupAttachment`.

Extends: CfnUserPoolUserToGroupAttachmentProps
Used as props by: CfnUserPoolUserToGroupAttachment

- Source: Generated code
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';
const cfnUserPoolUserToGroupAttachmentProps: cognito.CfnUserPoolUserToGroupAttachmentProps = {
  groupName: 'groupName',
  username: 'username',
  userPoolId: 'userPoolId',
};
```

## Properties

- `groupName`: string | [IUserPoolGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cognito.IUserPoolGroupRef.html) (required) — The name of the group that you want to add your user to.

- `username`: string | [IUserPoolUserRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cognito.IUserPoolUserRef.html) (required) — The user's username.

- `userPoolId`: string | [IUserPoolRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cognito.IUserPoolRef.html) (required) — The ID of the user pool that contains the group that you want to add the user to.
