Skip to content
v2.274.0

Experimental

@aws-cdk/aws-elasticache-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

PasswordUserProps Struct ​

Properties for defining an ElastiCache user with password authentication.

Example ​

ts
const user = new elasticache.PasswordUser(this, 'User', {
  // set user engine
  engine: elasticache.UserEngine.VALKEY,

  // set user id
  userId: 'my-user-id',

  // set access string
  accessControl: elasticache.AccessControl.fromAccessString("on ~* +@all"),

  // set username
  userName: 'my-user-name',

  // set up to two passwords
  passwords: [
    // "SecretIdForPassword" is the secret id for the password
    SecretValue.secretsManager('SecretIdForPassword'),
    // "AnotherSecretIdForPassword" is the secret id for the password
    SecretValue.secretsManager('AnotherSecretIdForPassword'),
  ],
});

Properties ​

accessControlAccessControlaccess_controlAccessControlaccessControlAccessControlAccessControlAccessControlAccessControlAccessControlrequired#
Access control configuration for the user.
engineUserEngineengineUserEngineengineUserEngineEngineUserEngineEngineUserEngine= UserEngine.REDIS for NoPasswordU…#
The engine type for the user.

Enum options: UserEngine.VALKEY, UserEngine.REDIS.

default

Default: UserEngine.REDIS for NoPasswordUser, UserEngine.VALKEY for all other user types.

passwordsSecretValue[]passwordstyping.List[SecretValue]passwordsList<SecretValue>PasswordsSecretValue[]Passwords*[]SecretValuerequired#
The passwords for the user.

Password authentication requires using 1-2 passwords.

userIdstringuser_idstruserIdStringUserIdstringUserId*stringrequired#
The ID of the user.
userNamestringuser_namestruserNameStringUserNamestringUserName*string= Same as userId.#
The name of the user.