Login Struct
Login credentials for a database cluster.
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
excludeCharactersoptionalstringexclude_charactersoptionalstrexcludeCharactersoptionalStringExcludeCharactersoptionalstringExcludeCharactersoptional*string= "\"@/"#Specifies characters to not include in generated passwords.
KMS encryption key to encrypt the generated secret.
Default: default master key
passwordoptionalSecretValuepasswordoptionalSecretValuepasswordoptionalSecretValuePasswordoptionalSecretValuePasswordoptionalSecretValue#Password.
Default: a Secrets Manager generated password
Do not put passwords in your CDK code directly.
secretNameoptionalstringsecret_nameoptionalstrsecretNameoptionalStringSecretNameoptionalstringSecretNameoptional*string#The physical name of the secret, that will be generated.
Default: Secretsmanager will generate a physical name for the secret
Username.