Interface DatabaseInstanceProps

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.151Z") @Stability(Stable) public interface DatabaseInstanceProps extends software.amazon.jsii.JsiiSerializable, DatabaseInstanceSourceProps
Construction properties for a DatabaseInstance.

Example:

 Vpc vpc;
 IInstanceEngine engine = DatabaseInstanceEngine.postgres(PostgresInstanceEngineProps.builder().version(PostgresEngineVersion.VER_12_3).build());
 DatabaseInstance.Builder.create(this, "InstanceWithUsername")
         .engine(engine)
         .vpc(vpc)
         .credentials(Credentials.fromGeneratedSecret("postgres"))
         .build();
 DatabaseInstance.Builder.create(this, "InstanceWithUsernameAndPassword")
         .engine(engine)
         .vpc(vpc)
         .credentials(Credentials.fromPassword("postgres", SecretValue.ssmSecure("/dbPassword", "1")))
         .build();
 ISecret mySecret = Secret.fromSecretName(this, "DBSecret", "myDBLoginInfo");
 DatabaseInstance.Builder.create(this, "InstanceWithSecretLogin")
         .engine(engine)
         .vpc(vpc)
         .credentials(Credentials.fromSecret(mySecret))
         .build();
 
  • Method Details

    • getCharacterSetName

      @Stability(Stable) @Nullable default String getCharacterSetName()
      For supported engines, specifies the character set to associate with the DB instance.

      Default: - RDS default character set name

    • getCredentials

      @Stability(Stable) @Nullable default Credentials getCredentials()
      Credentials for the administrative user.

      Default: - A username of 'admin' (or 'postgres' for PostgreSQL) and SecretsManager-generated password

    • getStorageEncrypted

      @Stability(Stable) @Nullable default Boolean getStorageEncrypted()
      Indicates whether the DB instance is encrypted.

      Default: - true if storageEncryptionKey has been provided, false otherwise

    • getStorageEncryptionKey

      @Stability(Stable) @Nullable default IKey getStorageEncryptionKey()
      The KMS key that's used to encrypt the DB instance.

      Default: - default master key if storageEncrypted is true, no key otherwise

    • builder

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