interface CredentialsFromUsernameOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.RDS.CredentialsFromUsernameOptions |
Java | software.amazon.awscdk.services.rds.CredentialsFromUsernameOptions |
Python | aws_cdk.aws_rds.CredentialsFromUsernameOptions |
TypeScript (source) | @aws-cdk/aws-rds » CredentialsFromUsernameOptions |
Options for creating Credentials from a username.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as kms from '@aws-cdk/aws-kms';
import * as rds from '@aws-cdk/aws-rds';
import * as cdk from '@aws-cdk/core';
declare const key: kms.Key;
declare const secretValue: cdk.SecretValue;
const credentialsFromUsernameOptions: rds.CredentialsFromUsernameOptions = {
encryptionKey: key,
excludeCharacters: 'excludeCharacters',
password: secretValue,
replicaRegions: [{
region: 'region',
// the properties below are optional
encryptionKey: key,
}],
secretName: 'secretName',
};
Properties
Name | Type | Description |
---|---|---|
encryption | IKey | KMS encryption key to encrypt the generated secret. |
exclude | string | The characters to exclude from the generated password. |
password? | Secret | Password. |
replica | Replica [] | A list of regions where to replicate this secret. |
secret | string | The name of the 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.
Has no effect if {@link password} has been provided.
password?
Type:
Secret
(optional, default: a Secrets Manager generated password)
Password.
Do not put passwords in your CDK code directly.
replicaRegions?
Type:
Replica
[]
(optional, default: Secret is not replicated)
A list of regions where to replicate this secret.
secretName?
Type:
string
(optional, default: A name is generated by CloudFormation.)
The name of the secret.