AuroraPostgresClusterEngineProps Struct
Creation properties of the Aurora PostgreSQL database cluster engine.
Used in DatabaseClusterEngine.auroraPostgres.
Example
ts
declare const vpc: ec2.Vpc;
const cluster = new rds.DatabaseCluster(this, 'Database', {
engine: rds.DatabaseClusterEngine.auroraPostgres({ version: rds.AuroraPostgresEngineVersion.VER_15_2 }),
credentials: rds.Credentials.fromUsername('adminuser', { password: SecretValue.unsafePlainText('7959866cacc02c2d243ecfe177464fe6') }),
writer: rds.ClusterInstance.provisioned('writer', {
publiclyAccessible: false,
}),
readers: [
rds.ClusterInstance.provisioned('reader')
],
storageType: rds.DBClusterStorageType.AURORA_IOPT1,
vpcSubnets: {
subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
},
vpc,
});
python
# vpc: ec2.Vpc
cluster = rds.DatabaseCluster(self, "Database",
engine=rds.DatabaseClusterEngine.aurora_postgres(version=rds.AuroraPostgresEngineVersion.VER_15_2),
credentials=rds.Credentials.from_username("adminuser", password=SecretValue.unsafe_plain_text("7959866cacc02c2d243ecfe177464fe6")),
writer=rds.ClusterInstance.provisioned("writer",
publicly_accessible=False
),
readers=[
rds.ClusterInstance.provisioned("reader")
],
storage_type=rds.DBClusterStorageType.AURORA_IOPT1,
vpc_subnets=ec2.SubnetSelection(
subnet_type=ec2.SubnetType.PRIVATE_WITH_EGRESS
),
vpc=vpc
)
java
Vpc vpc;
DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database")
.engine(DatabaseClusterEngine.auroraPostgres(AuroraPostgresClusterEngineProps.builder().version(AuroraPostgresEngineVersion.VER_15_2).build()))
.credentials(Credentials.fromUsername("adminuser", CredentialsFromUsernameOptions.builder().password(SecretValue.unsafePlainText("7959866cacc02c2d243ecfe177464fe6")).build()))
.writer(ClusterInstance.provisioned("writer", ProvisionedClusterInstanceProps.builder()
.publiclyAccessible(false)
.build()))
.readers(List.of(ClusterInstance.provisioned("reader")))
.storageType(DBClusterStorageType.AURORA_IOPT1)
.vpcSubnets(SubnetSelection.builder()
.subnetType(SubnetType.PRIVATE_WITH_EGRESS)
.build())
.vpc(vpc)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Vpc vpc;
var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
Engine = DatabaseClusterEngine.AuroraPostgres(new AuroraPostgresClusterEngineProps { Version = AuroraPostgresEngineVersion.VER_15_2 }),
Credentials = Credentials.FromUsername("adminuser", new CredentialsFromUsernameOptions { Password = SecretValue.UnsafePlainText("7959866cacc02c2d243ecfe177464fe6") }),
Writer = ClusterInstance.Provisioned("writer", new ProvisionedClusterInstanceProps {
PubliclyAccessible = false
}),
Readers = new [] { ClusterInstance.Provisioned("reader") },
StorageType = DBClusterStorageType.AURORA_IOPT1,
VpcSubnets = new SubnetSelection {
SubnetType = SubnetType.PRIVATE_WITH_EGRESS
},
Vpc = vpc
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var vpc Vpc
cluster := rds.NewDatabaseCluster(this, jsii.String("Database"), &DatabaseClusterProps{
Engine: rds.DatabaseClusterEngine_AuroraPostgres(&AuroraPostgresClusterEngineProps{
Version: rds.AuroraPostgresEngineVersion_VER_15_2(),
}),
Credentials: rds.Credentials_FromUsername(jsii.String("adminuser"), &CredentialsFromUsernameOptions{
Password: awscdk.SecretValue_UnsafePlainText(jsii.String("7959866cacc02c2d243ecfe177464fe6")),
}),
Writer: rds.ClusterInstance_Provisioned(jsii.String("writer"), &ProvisionedClusterInstanceProps{
PubliclyAccessible: jsii.Boolean(false),
}),
Readers: []IClusterInstance{
rds.ClusterInstance_*Provisioned(jsii.String("reader")),
},
StorageType: rds.DBClusterStorageType_AURORA_IOPT1,
VpcSubnets: &SubnetSelection{
SubnetType: ec2.SubnetType_PRIVATE_WITH_EGRESS,
},
Vpc: Vpc,
})
Properties
versionAuroraPostgresEngineVersionversionAuroraPostgresEngineVersionversionAuroraPostgresEngineVersionVersionAuroraPostgresEngineVersionVersionAuroraPostgresEngineVersionrequired#The version of the Aurora PostgreSQL cluster engine.