> **Experimental**
>
> `@aws-cdk/aws-elasticache-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# UserBaseAttributes

Attributes for importing an existing ElastiCache user.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/user-base.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-elasticache-alpha/lib/user-base.ts#L93)

## Example

```ts
// use the original `default` user by using import method
const defaultUser = elasticache.NoPasswordUser.fromUserAttributes(this, 'DefaultUser', {
  // userId and userName must be 'default'
  userId: 'default',
});

// create a new default user
const newDefaultUser = new elasticache.NoPasswordUser(this, 'NewDefaultUser', {
  // new default user id must not be 'default'
  userId: 'new-default',
  // new default username must be 'default'
  userName: 'default',
  // set access string
  accessControl: elasticache.AccessControl.fromAccessString("on ~* +@all"),
});
```

## Properties

- `engine`: [UserEngine](/cdk/api/v2/docs/@aws-cdk_aws-elasticache-alpha.UserEngine.html) — The engine type for the user.

  **Default:** engine type is unknown.

- `userArn`: string — The ARN of the user.

  **Default:** derived from userId.

  One of `userId` or `userArn` is required.

- `userId`: string — The ID of the user.

  **Default:** derived from userArn.

  One of `userId` or `userArn` is required.

- `userName`: string — The user's name.

  **Default:** name is unknown.
