# InitUserOptions

Optional parameters used when creating a user.

Extends: InitUserOptions
Used as props by: InitUser

- Source: [`aws-ec2/lib/cfn-init-elements.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ec2/lib/cfn-init-elements.ts#L548)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const initUserOptions: ec2.InitUserOptions = {
  groups: ['groups'],
  homeDir: 'homeDir',
  userId: 123,
};
```

## Properties

- `groups`: string[] — A list of group names.

  **Default:** the user is not associated with any groups.

  The user will be added to each group in the list.

- `homeDir`: string — The user's home directory.

  **Default:** assigned by the OS

- `userId`: number — A user ID.

  **Default:** assigned by the OS

  The creation process fails if the user name exists with a different user ID.
  If the user ID is already assigned to an existing user the operating system may
  reject the creation request.
