interface SnapshotCredentialsFromGeneratedPasswordOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.RDS.SnapshotCredentialsFromGeneratedPasswordOptions |
![]() | software.amazon.awscdk.services.rds.SnapshotCredentialsFromGeneratedPasswordOptions |
![]() | aws_cdk.aws_rds.SnapshotCredentialsFromGeneratedPasswordOptions |
![]() | @aws-cdk/aws-rds » SnapshotCredentialsFromGeneratedPasswordOptions |
Options used in the {@link SnapshotCredentials.fromGeneratedPassword} method.
Example
declare const vpc: ec2.Vpc;
const engine = rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_12_3 });
const myKey = new kms.Key(this, 'MyKey');
new rds.DatabaseInstanceFromSnapshot(this, 'InstanceFromSnapshotWithCustomizedSecret', {
engine,
vpc,
snapshotIdentifier: 'mySnapshot',
credentials: rds.SnapshotCredentials.fromGeneratedSecret('username', {
encryptionKey: myKey,
excludeCharacters: '!&*^#@()',
replicaRegions: [{ region: 'eu-west-1' }, { region: 'eu-west-2' }],
}),
});
Properties
Name | Type | Description |
---|---|---|
encryption | IKey | KMS encryption key to encrypt the generated secret. |
exclude | string | The characters to exclude from the generated password. |
replica | Replica [] | A list of regions where to replicate this secret. |
encryptionKey?
Type:
IKey
(optional, default: default master key)
KMS encryption key to encrypt the generated secret.
excludeCharacters?
Type:
string
(optional, default: the DatabaseSecret default exclude character set (" %+~`#$&()|[]{}:;<>?!'/)*
The characters to exclude from the generated password.
replicaRegions?
Type:
Replica
[]
(optional, default: Secret is not replicated)
A list of regions where to replicate this secret.