# CfnUserProps

Properties for defining a `CfnUser`.

Used as props by: [CfnUser](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_memorydb.CfnUser.html)

- Source: Generated at build time
- Type last changed: v2.78.0 · 4 May 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
    } }
};
```

Golang:

```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

- `accessString`: string — Access permissions string used for this user.

- `authenticationMode`: any — Denotes whether the user requires a password to authenticate.

  *Example:*

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

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.

  For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .

- `userName`: string (required) — The name of the user.
