interface Login
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.DocDB.Login |
Java | software.amazon.awscdk.services.docdb.Login |
Python | aws_cdk.aws_docdb.Login |
TypeScript (source) | @aws-cdk/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', // NOTE: 'admin' is reserved by DocumentDB
excludeCharacters: '\"@/:', // optional, defaults to the set "\"@/" and is also used for eventually created rotations
secretName: '/myapp/mydocdb/masteruser', // optional, if you prefer to specify the secret name
},
instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE),
vpcSubnets: {
subnetType: ec2.SubnetType.PUBLIC,
},
vpc,
});
Properties
Name | Type | Description |
---|---|---|
username | string | Username. |
exclude | string | Specifies characters to not include in generated passwords. |
kms | IKey | KMS encryption key to encrypt the generated secret. |
password? | Secret | Password. |
secret | string | The 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:
Secret
(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.