interface DatabaseSecretProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.DocDB.DatabaseSecretProps |
Java | software.amazon.awscdk.services.docdb.DatabaseSecretProps |
Python | aws_cdk.aws_docdb.DatabaseSecretProps |
TypeScript (source) | @aws-cdk/aws-docdb » DatabaseSecretProps |
Construction properties for a DatabaseSecret.
Example
declare const cluster: docdb.DatabaseCluster;
const myUserSecret = new docdb.DatabaseSecret(this, 'MyUserSecret', {
username: 'myuser',
masterSecret: cluster.secret,
});
const myUserSecretAttached = myUserSecret.attach(cluster); // Adds DB connections information in the secret
cluster.addRotationMultiUser('MyUser', { // Add rotation using the multi user scheme
secret: myUserSecretAttached, // This secret must have the `masterarn` key
});
Properties
Name | Type | Description |
---|---|---|
username | string | The username. |
encryption | IKey | The KMS key to use to encrypt the secret. |
exclude | string | Characters to not include in the generated password. |
master | ISecret | The master secret which will be used to rotate this secret. |
secret | string | The physical name of the secret. |
username
Type:
string
The username.
encryptionKey?
Type:
IKey
(optional, default: default master key)
The KMS key to use to encrypt the secret.
excludeCharacters?
Type:
string
(optional, default: "")
Characters to not include in the generated password.
masterSecret?
Type:
ISecret
(optional, default: no master secret information will be included)
The master secret which will be used to rotate this secret.
secretName?
Type:
string
(optional, default: Secretsmanager will generate a physical name for the secret)
The physical name of the secret.