CfnUserProps Struct
Properties for defining a CfnUser.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticache as elasticache } from 'aws-cdk-lib';
declare const authenticationMode: any;
const cfnUserProps: elasticache.CfnUserProps = {
engine: 'engine',
userId: 'userId',
userName: 'userName',
// the properties below are optional
accessString: 'accessString',
authenticationMode: authenticationMode,
noPasswordRequired: false,
passwords: ['passwords'],
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticache as elasticache
# authentication_mode: Any
cfn_user_props = elasticache.CfnUserProps(
engine="engine",
user_id="userId",
user_name="userName",
# the properties below are optional
access_string="accessString",
authentication_mode=authentication_mode,
no_password_required=False,
passwords=["passwords"],
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticache.*;
Object authenticationMode;
CfnUserProps cfnUserProps = CfnUserProps.builder()
.engine("engine")
.userId("userId")
.userName("userName")
// the properties below are optional
.accessString("accessString")
.authenticationMode(authenticationMode)
.noPasswordRequired(false)
.passwords(List.of("passwords"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElastiCache;
var authenticationMode;
var cfnUserProps = new CfnUserProps {
Engine = "engine",
UserId = "userId",
UserName = "userName",
// the properties below are optional
AccessString = "accessString",
AuthenticationMode = authenticationMode,
NoPasswordRequired = false,
Passwords = new [] { "passwords" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var authenticationMode interface{}
cfnUserProps := &CfnUserProps{
Engine: jsii.String("engine"),
UserId: jsii.String("userId"),
UserName: jsii.String("userName"),
// the properties below are optional
AccessString: jsii.String("accessString"),
AuthenticationMode: authenticationMode,
NoPasswordRequired: jsii.Boolean(false),
Passwords: []*string{
jsii.String("passwords"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
accessStringoptionalstringaccess_stringoptionalstraccessStringoptionalStringAccessStringoptionalstringAccessStringoptional*string #Access permissions string used for this user.
authenticationModeoptionalanyauthentication_modeoptionalAnyauthenticationModeoptionalObjectAuthenticationModeoptionalobjectAuthenticationModeoptionalinterface{} #Specifies the authentication mode to use. Below is an example of the possible JSON values:.
{ Passwords: ["*****", "******"] // If Type is password.
}
The current supported values are valkey and redis.
noPasswordRequiredoptionalboolean | IResolvableno_password_requiredoptionaltyping.Union[bool, IResolvable]noPasswordRequiredoptionalBooleanNoPasswordRequiredoptionalboolNoPasswordRequiredoptionalinterface{} #Indicates a password is not required for this user.
passwordsoptionalstring[]passwordsoptionaltyping.List[str]passwordsoptionalList<String>Passwordsoptionalstring[]Passwordsoptional*[]*string #Passwords used for this user.
You can create up to two passwords for each user.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #The list of tags.
The ID of the user.
The username of the user.