Interface DatabaseInstanceFromSnapshotProps

All Superinterfaces:
DatabaseInstanceNewProps, DatabaseInstanceSourceProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
DatabaseInstanceFromSnapshotProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-07-24T11:33:21.672Z") @Stability(Stable) public interface DatabaseInstanceFromSnapshotProps extends software.amazon.jsii.JsiiSerializable, DatabaseInstanceSourceProps
Construction properties for a DatabaseInstanceFromSnapshot.

Example:

 Vpc vpc;
 IInstanceEngine engine = DatabaseInstanceEngine.postgres(PostgresInstanceEngineProps.builder().version(PostgresEngineVersion.VER_16_3).build());
 Key myKey = new Key(this, "MyKey");
 DatabaseInstanceFromSnapshot.Builder.create(this, "InstanceFromSnapshotWithCustomizedSecret")
         .engine(engine)
         .vpc(vpc)
         .snapshotIdentifier("mySnapshot")
         .credentials(SnapshotCredentials.fromGeneratedSecret("username", SnapshotCredentialsFromGeneratedPasswordOptions.builder()
                 .encryptionKey(myKey)
                 .excludeCharacters("!&*^#@()")
                 .replicaRegions(List.of(ReplicaRegion.builder().region("eu-west-1").build(), ReplicaRegion.builder().region("eu-west-2").build()))
                 .build()))
         .build();
 
  • Method Details

    • getClusterSnapshotIdentifier

      @Stability(Stable) @Nullable default String getClusterSnapshotIdentifier()
      The identifier for the Multi-AZ DB cluster snapshot to restore from.

      For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide .

      Constraints:

      • Can't be specified when snapshotIdentifier is specified.
      • Must be specified when snapshotIdentifier isn't specified.
      • If you are restoring from a shared manual Multi-AZ DB cluster snapshot, the clusterSnapshotIdentifier must be the ARN of the shared snapshot.
      • Can't be the identifier of an Aurora DB cluster snapshot.

      Default: - None

      See Also:
    • getCredentials

      @Stability(Stable) @Nullable default SnapshotCredentials getCredentials()
      Master user credentials.

      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.

    • getSnapshotIdentifier

      @Stability(Stable) @Nullable default String getSnapshotIdentifier()
      The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance.

      If you're restoring from a shared manual DB snapshot, you must specify the ARN of the snapshot. Constraints:

      • Can't be specified when clusterSnapshotIdentifier is specified.
      • Must be specified when clusterSnapshotIdentifier isn't specified.

      Default: - None

    • builder

      @Stability(Stable) static DatabaseInstanceFromSnapshotProps.Builder builder()
      Returns:
      a DatabaseInstanceFromSnapshotProps.Builder of DatabaseInstanceFromSnapshotProps