@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.461Z") @Stability(value=Stable) public interface DatabaseInstanceProps extends software.amazon.jsii.JsiiSerializable, DatabaseInstanceSourceProps
Example:
Vpc vpc;
// Simple secret
Secret secret = new Secret(this, "Secret");
// Using the secret
DatabaseInstance instance1 = DatabaseInstance.Builder.create(this, "PostgresInstance1")
.engine(DatabaseInstanceEngine.POSTGRES)
.credentials(Credentials.fromSecret(secret))
.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")
.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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
DatabaseInstanceProps.Builder
A builder for
DatabaseInstanceProps |
static class |
DatabaseInstanceProps.Jsii$Proxy
An implementation for
DatabaseInstanceProps |
| Modifier and Type | Method and Description |
|---|---|
static DatabaseInstanceProps.Builder |
builder() |
default String |
getCharacterSetName()
For supported engines, specifies the character set to associate with the DB instance.
|
default Credentials |
getCredentials()
Credentials for the administrative user.
|
default Boolean |
getStorageEncrypted()
Indicates whether the DB instance is encrypted.
|
default IKey |
getStorageEncryptionKey()
The KMS key that's used to encrypt the DB instance.
|
getAllocatedStorage, getAllowMajorVersionUpgrade, getDatabaseName, getEngine, getInstanceType, getLicenseModel, getParameters, getTimezonegetAutoMinorVersionUpgrade, getAvailabilityZone, getBackupRetention, getCloudwatchLogsExports, getCloudwatchLogsRetention, getCloudwatchLogsRetentionRole, getCopyTagsToSnapshot, getDeleteAutomatedBackups, getDeletionProtection, getDomain, getDomainRole, getEnablePerformanceInsights, getIamAuthentication, getInstanceIdentifier, getIops, getMaxAllocatedStorage, getMonitoringInterval, getMonitoringRole, getMultiAz, getOptionGroup, getParameterGroup, getPerformanceInsightEncryptionKey, getPerformanceInsightRetention, getPort, getPreferredBackupWindow, getPreferredMaintenanceWindow, getProcessorFeatures, getPubliclyAccessible, getRemovalPolicy, getS3ExportBuckets, getS3ExportRole, getS3ImportBuckets, getS3ImportRole, getSecurityGroups, getStorageType, getSubnetGroup, getVpc, getVpcSubnets@Stability(value=Stable) @Nullable default String getCharacterSetName()
Default: - RDS default character set name
@Stability(value=Stable) @Nullable default Credentials getCredentials()
Default: - A username of 'admin' (or 'postgres' for PostgreSQL) and SecretsManager-generated password
@Stability(value=Stable) @Nullable default Boolean getStorageEncrypted()
Default: - true if storageEncryptionKey has been provided, false otherwise
@Stability(value=Stable) @Nullable default IKey getStorageEncryptionKey()
Default: - default master key if storageEncrypted is true, no key otherwise
@Stability(value=Stable) static DatabaseInstanceProps.Builder builder()
builder in interface DatabaseInstanceNewPropsbuilder in interface DatabaseInstanceSourcePropsDatabaseInstanceProps.Builder of DatabaseInstancePropsCopyright © 2022. All rights reserved.