Class SnapshotCredentialsFromGeneratedPasswordOptions
Options used in the SnapshotCredentials.fromGeneratedPassword
method.
Inheritance
System.Object
SnapshotCredentialsFromGeneratedPasswordOptions
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SnapshotCredentialsFromGeneratedPasswordOptions : Object, ISnapshotCredentialsFromGeneratedPasswordOptions
Syntax (vb)
Public Class SnapshotCredentialsFromGeneratedPasswordOptions
Inherits Object
Implements ISnapshotCredentialsFromGeneratedPasswordOptions
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
var engine = DatabaseInstanceEngine.Postgres(new PostgresInstanceEngineProps { Version = PostgresEngineVersion.VER_15_2 });
var myKey = new Key(this, "MyKey");
new DatabaseInstanceFromSnapshot(this, "InstanceFromSnapshotWithCustomizedSecret", new DatabaseInstanceFromSnapshotProps {
Engine = engine,
Vpc = vpc,
SnapshotIdentifier = "mySnapshot",
Credentials = SnapshotCredentials.FromGeneratedSecret("username", new SnapshotCredentialsFromGeneratedPasswordOptions {
EncryptionKey = myKey,
ExcludeCharacters = "!&*^#@()",
ReplicaRegions = new [] { new ReplicaRegion { Region = "eu-west-1" }, new ReplicaRegion { Region = "eu-west-2" } }
})
});
Synopsis
Constructors
SnapshotCredentialsFromGeneratedPasswordOptions() |
Properties
EncryptionKey | KMS encryption key to encrypt the generated secret. |
ExcludeCharacters | |
ReplicaRegions | A list of regions where to replicate this secret. |
Constructors
SnapshotCredentialsFromGeneratedPasswordOptions()
public SnapshotCredentialsFromGeneratedPasswordOptions()
Properties
EncryptionKey
KMS encryption key to encrypt the generated secret.
public IKey EncryptionKey { get; set; }
Property Value
Remarks
Default: - default master key
ExcludeCharacters
public string ExcludeCharacters { get; set; }
Property Value
System.String
ReplicaRegions
A list of regions where to replicate this secret.
public IReplicaRegion[] ReplicaRegions { get; set; }
Property Value
Remarks
Default: - Secret is not replicated