aws-cdk-lib.aws_docdb.Login

interface Login

LanguageType name
.NETAmazon.CDK.AWS.DocDB.Login
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdocdb#Login
Javasoftware.amazon.awscdk.services.docdb.Login
Pythonaws_cdk.aws_docdb.Login
TypeScript (source)aws-cdk-lib » aws_docdb » Login

Login credentials for a database cluster.

Example

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

NameTypeDescription
usernamestringUsername.
excludeCharacters?stringSpecifies characters to not include in generated passwords.
kmsKey?IKeyKMS encryption key to encrypt the generated secret.
password?SecretValuePassword.
secretName?stringThe physical name of the secret, that will be generated.

username

Type: string

Username.


excludeCharacters?

Type: string (optional, default: ""@/")

Specifies characters to not include in generated passwords.


kmsKey?

Type: IKey (optional, default: default master key)

KMS encryption key to encrypt the generated secret.


password?

Type: SecretValue (optional, default: a Secrets Manager generated password)

Password.

Do not put passwords in your CDK code directly.


secretName?

Type: string (optional, default: Secretsmanager will generate a physical name for the secret)

The physical name of the secret, that will be generated.