Skip to content
v2.277.0

CfnUserProps Struct ​

Properties for defining a CfnUser.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_memorydb as memorydb } from 'aws-cdk-lib';

declare const authenticationMode: any;
const cfnUserProps: memorydb.CfnUserProps = {
  userName: 'userName',

  // the properties below are optional
  accessString: 'accessString',
  authenticationMode: authenticationMode,
  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_memorydb as memorydb

# authentication_mode: Any

cfn_user_props = memorydb.CfnUserProps(
    user_name="userName",

    # the properties below are optional
    access_string="accessString",
    authentication_mode=authentication_mode,
    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.memorydb.*;

Object authenticationMode;

CfnUserProps cfnUserProps = CfnUserProps.builder()
        .userName("userName")

        // the properties below are optional
        .accessString("accessString")
        .authenticationMode(authenticationMode)
        .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.MemoryDB;

var authenticationMode;

var cfnUserProps = new CfnUserProps {
    UserName = "userName",

    // the properties below are optional
    AccessString = "accessString",
    AuthenticationMode = authenticationMode,
    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{
	UserName: jsii.String("userName"),

	// the properties below are optional
	AccessString: jsii.String("accessString"),
	AuthenticationMode: authenticationMode,
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

accessStringoptionalstringaccess_stringoptionalstraccessStringoptionalStringAccessStringoptionalstringAccessStringoptional*string #
Access permissions string used for this user.
authenticationModeoptionalanyauthentication_modeoptionalAnyauthenticationModeoptionalObjectAuthenticationModeoptionalobjectAuthenticationModeoptionalinterface{} #
Denotes whether the user requires a password to authenticate.
notes

Example:

mynewdbuser: Type: AWS::MemoryDB::User Properties: AccessString: on ~* &* +@all AuthenticationMode: Passwords: '1234567890123456' Type: password UserName: mynewdbuser AuthenticationMode: { "Passwords": ["1234567890123456"], "Type": "Password" }

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.

For more information, see Tag .

userNamestringuser_namestruserNameStringUserNamestringUserName*string required #
The name of the user.