Interface DatabaseInstanceProps
- All Superinterfaces:
DatabaseInstanceNewProps
,DatabaseInstanceSourceProps
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DatabaseInstanceProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-09-11T18:01:22.447Z")
@Stability(Stable)
public interface DatabaseInstanceProps
extends software.amazon.jsii.JsiiSerializable, DatabaseInstanceSourceProps
Construction properties for a DatabaseInstance.
Example:
IVpc vpc; DatabaseInstance instance1 = DatabaseInstance.Builder.create(this, "PostgresInstance1") .engine(DatabaseInstanceEngine.POSTGRES) // Generate the secret with admin username `postgres` and random password .credentials(Credentials.fromGeneratedSecret("postgres")) .vpc(vpc) .build(); // Templated secret with username and password fields Secret templatedSecret = Secret.Builder.create(this, "TemplatedSecret") .generateSecretString(SecretStringGenerator.builder() .secretStringTemplate(JSON.stringify(Map.of("username", "postgres"))) .generateStringKey("password") .excludeCharacters("/@\"") .build()) .build(); // Using the templated secret as credentials DatabaseInstance instance2 = DatabaseInstance.Builder.create(this, "PostgresInstance2") .engine(DatabaseInstanceEngine.POSTGRES) .credentials(Map.of( "username", templatedSecret.secretValueFromJson("username").toString(), "password", templatedSecret.secretValueFromJson("password"))) .vpc(vpc) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forDatabaseInstanceProps
static final class
An implementation forDatabaseInstanceProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
For supported engines, specifies the character set to associate with the DB instance.default Credentials
Credentials for the administrative user.default Boolean
Indicates whether the DB instance is encrypted.default IKey
The KMS key that's used to encrypt the DB instance.Methods inherited from interface software.amazon.awscdk.services.rds.DatabaseInstanceNewProps
getAutoMinorVersionUpgrade, getAvailabilityZone, getBackupRetention, getCaCertificate, getCloudwatchLogsExports, getCloudwatchLogsRetention, getCloudwatchLogsRetentionRole, getCopyTagsToSnapshot, getDeleteAutomatedBackups, getDeletionProtection, getDomain, getDomainRole, getEnablePerformanceInsights, getIamAuthentication, getInstanceIdentifier, getIops, getMaxAllocatedStorage, getMonitoringInterval, getMonitoringRole, getMultiAz, getNetworkType, getOptionGroup, getParameterGroup, getPerformanceInsightEncryptionKey, getPerformanceInsightRetention, getPort, getPreferredBackupWindow, getPreferredMaintenanceWindow, getProcessorFeatures, getPubliclyAccessible, getRemovalPolicy, getS3ExportBuckets, getS3ExportRole, getS3ImportBuckets, getS3ImportRole, getSecurityGroups, getStorageThroughput, getStorageType, getSubnetGroup, getVpc, getVpcSubnets
Methods inherited from interface software.amazon.awscdk.services.rds.DatabaseInstanceSourceProps
getAllocatedStorage, getAllowMajorVersionUpgrade, getDatabaseName, getEngine, getInstanceType, getLicenseModel, getParameters, getTimezone
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCharacterSetName
For supported engines, specifies the character set to associate with the DB instance.Default: - RDS default character set name
-
getCredentials
Credentials for the administrative user.Default: - A username of 'admin' (or 'postgres' for PostgreSQL) and SecretsManager-generated password
-
getStorageEncrypted
Indicates whether the DB instance is encrypted.Default: - true if storageEncryptionKey has been provided, false otherwise
-
getStorageEncryptionKey
The KMS key that's used to encrypt the DB instance.Default: - default master key if storageEncrypted is true, no key otherwise
-
builder
- Returns:
- a
DatabaseInstanceProps.Builder
ofDatabaseInstanceProps
-