Interface IDatabaseInstanceFromSnapshotProps
Construction properties for a DatabaseInstanceFromSnapshot.
Inherited Members
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IDatabaseInstanceFromSnapshotProps : IDatabaseInstanceSourceProps, IDatabaseInstanceNewProps
Syntax (vb)
Public Interface IDatabaseInstanceFromSnapshotProps Inherits IDatabaseInstanceSourceProps, IDatabaseInstanceNewProps
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
var engine = DatabaseInstanceEngine.Postgres(new PostgresInstanceEngineProps { Version = PostgresEngineVersion.VER_16_3 });
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
Properties
| ClusterSnapshotIdentifier | The identifier for the Multi-AZ DB cluster snapshot to restore from. |
| Credentials | Master user credentials. |
| SnapshotIdentifier | The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance. |
Properties
ClusterSnapshotIdentifier
The identifier for the Multi-AZ DB cluster snapshot to restore from.
string? ClusterSnapshotIdentifier { get; }
Property Value
Remarks
For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide .
Constraints:
Default: - None
See: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RestoreFromMultiAZDBClusterSnapshot.html
Credentials
Master user credentials.
SnapshotCredentials? Credentials { get; }
Property Value
Remarks
Note - It is not possible to change the master username for a snapshot; however, it is possible to provide (or generate) a new password.
Default: - The existing username and password from the snapshot will be used.
SnapshotIdentifier
The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance.
string? SnapshotIdentifier { get; }
Property Value
Remarks
If you're restoring from a shared manual DB snapshot, you must specify the ARN of the snapshot. Constraints:
Default: - None