Interface ICredentialsBaseOptions
Base options for creating Credentials.
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICredentialsBaseOptions
Syntax (vb)
Public Interface ICredentialsBaseOptions
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
var engine = DatabaseInstanceEngine.Postgres(new PostgresInstanceEngineProps { Version = PostgresEngineVersion.VER_16_3 });
var myKey = new Key(this, "MyKey");
new DatabaseInstance(this, "InstanceWithCustomizedSecret", new DatabaseInstanceProps {
Engine = engine,
Vpc = vpc,
Credentials = Credentials.FromGeneratedSecret("postgres", new CredentialsBaseOptions {
SecretName = "my-cool-name",
EncryptionKey = myKey,
ExcludeCharacters = "!&*^#@()",
ReplicaRegions = new [] { new ReplicaRegion { Region = "eu-west-1" }, new ReplicaRegion { Region = "eu-west-2" } }
})
});
Synopsis
Properties
EncryptionKey | KMS encryption key to encrypt the generated secret. |
ExcludeCharacters | |
ReplicaRegions | A list of regions where to replicate this secret. |
SecretName | The name of the secret. |
Properties
EncryptionKey
KMS encryption key to encrypt the generated secret.
virtual IKey EncryptionKey { get; }
Property Value
Remarks
Default: - default master key
ExcludeCharacters
virtual string ExcludeCharacters { get; }
Property Value
System.String
ReplicaRegions
A list of regions where to replicate this secret.
virtual IReplicaRegion[] ReplicaRegions { get; }
Property Value
Remarks
Default: - Secret is not replicated
SecretName
The name of the secret.
virtual string SecretName { get; }
Property Value
System.String
Remarks
Default: - A name is generated by CloudFormation.