# Login

Login credentials for a database cluster.

- Source: [`aws-docdb/lib/props.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-docdb/lib/props.ts#L37)
- Type last changed: v2.72.0 · 29 Mar 2023

## Example

```ts
declare const vpc: ec2.Vpc;
const cluster = new docdb.DatabaseCluster(this, 'Database', {
  masterUser: {
    username: 'myuser',
  },
  instanceType: ec2.InstanceType.of(ec2.InstanceClass.MEMORY5, ec2.InstanceSize.LARGE),
  vpcSubnets: {
    subnetType: ec2.SubnetType.PUBLIC,
  },
  vpc,
  deletionProtection: true, // Enable deletion protection.
});
```

## Properties

- `excludeCharacters`: string = "\"@/" — Specifies characters to not include in generated passwords.

- `kmsKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — KMS encryption key to encrypt the generated secret.

  **Default:** default master key

- `password`: [SecretValue](/cdk/api/v2/docs/aws-cdk-lib.SecretValue.html) — Password.

  **Default:** a Secrets Manager generated password

  Do not put passwords in your CDK code directly.

- `secretName`: string — The physical name of the secret, that will be generated.

  **Default:** Secretsmanager will generate a physical name for the secret

- `username`: string (required) — Username.
