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).
| Stability | Experimental |
|---|---|
| Source | lib/common.ts |
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"),
});
python
user = elasticache.IamUser(self, "User",
# set user engine
engine=elasticache.UserEngine.REDIS,
# set user id
user_id="my-user",
# set username
user_name="my-user",
# set access string
access_control=elasticache.AccessControl.from_access_string("on ~* +@all")
)
java
IamUser user = IamUser.Builder.create(this, "User")
// set user engine
.engine(UserEngine.REDIS)
// set user id
.userId("my-user")
// set username
.userName("my-user")
// set access string
.accessControl(AccessControl.fromAccessString("on ~* +@all"))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.ElastiCache.Alpha
var user = new IamUser(this, "User", new IamUserProps {
// set user engine
Engine = UserEngine.REDIS,
// set user id
UserId = "my-user",
// set username
UserName = "my-user",
// set access string
AccessControl = AccessControl.FromAccessString("on ~* +@all")
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkelasticachealpha/v2
user := elasticache.NewIamUser(this, jsii.String("User"), &IamUserProps{
// set user engine
Engine: elasticache.UserEngine_REDIS(),
// set user id
UserId: jsii.String("my-user"),
// set username
UserName: jsii.String("my-user"),
// set access string
AccessControl: elasticache.AccessControl_FromAccessString(jsii.String("on ~* +@all")),
})
Properties
The engine type, for example `'valkey'` or `'redis'`.
Maps directly to the Engine property of AWS::ElastiCache::User and AWS::ElastiCache::UserGroup.
Redis engine.
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) UserEngine static #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'`).