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.

UserEngine Class ​

Engine type for ElastiCache users and user groups.

Use the named static members for the engines currently supported by ElastiCache user/user-group resources. To target an engine not yet represented by a named instance, use UserEngine.of(engineType).

Example ​

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

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

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

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

Properties ​

engineTypestringengine_typestrengineTypeStringEngineTypestringEngineType*stringrequired#
The engine type, for example `'valkey'` or `'redis'`.

Maps directly to the Engine property of AWS::ElastiCache::User and AWS::ElastiCache::UserGroup.

REDISUserEngineredisUserEngineREDISUserEngineREDISUserEngineREDISUserEnginerequiredstatic#
Redis engine.
VALKEYUserEnginevalkeyUserEngineVALKEYUserEngineVALKEYUserEngineVALKEYUserEnginerequiredstatic#
Valkey engine.

Methods ​

of(engineType: string): UserEngine // chainable@staticmethod def of(engine_type: str) -> UserEnginepublic static UserEngine of(String engineType)public static UserEngine Of(string engineType)func Of(EngineType *string) UserEnginestatic#
Create a new `UserEngine` with an arbitrary engine type.
1 parameter

Parameters

  • engineTypeengine_typeengineTypeengineTypeEngineType — the engine type (for example, 'valkey' or 'redis').
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns the engine type as a string (for example, `'valkey'`).