MySqlInstanceEngineProps Struct
Properties for MySQL instance engines.
Used in DatabaseInstanceEngine.mysql.
| Source | aws-rds/lib/instance-engine.ts |
|---|
Example
ts
declare const vpc: ec2.Vpc;
declare const kmsKey: kms.Key;
const instance = new rds.DatabaseInstance(this, 'Instance', {
engine: rds.DatabaseInstanceEngine.mysql({ version: rds.MysqlEngineVersion.VER_8_0_39 }),
instanceType: ec2.InstanceType.of(ec2.InstanceClass.R7G, ec2.InstanceSize.LARGE),
vpc,
enablePerformanceInsights: true,
performanceInsightRetention: rds.PerformanceInsightRetention.LONG_TERM,
performanceInsightEncryptionKey: kmsKey,
});
python
# vpc: ec2.Vpc
# kms_key: kms.Key
instance = rds.DatabaseInstance(self, "Instance",
engine=rds.DatabaseInstanceEngine.mysql(version=rds.MysqlEngineVersion.VER_8_0_39),
instance_type=ec2.InstanceType.of(ec2.InstanceClass.R7G, ec2.InstanceSize.LARGE),
vpc=vpc,
enable_performance_insights=True,
performance_insight_retention=rds.PerformanceInsightRetention.LONG_TERM,
performance_insight_encryption_key=kms_key
)
java
Vpc vpc;
Key kmsKey;
DatabaseInstance instance = DatabaseInstance.Builder.create(this, "Instance")
.engine(DatabaseInstanceEngine.mysql(MySqlInstanceEngineProps.builder().version(MysqlEngineVersion.VER_8_0_39).build()))
.instanceType(InstanceType.of(InstanceClass.R7G, InstanceSize.LARGE))
.vpc(vpc)
.enablePerformanceInsights(true)
.performanceInsightRetention(PerformanceInsightRetention.LONG_TERM)
.performanceInsightEncryptionKey(kmsKey)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Vpc vpc;
Key kmsKey;
var instance = new DatabaseInstance(this, "Instance", new DatabaseInstanceProps {
Engine = DatabaseInstanceEngine.Mysql(new MySqlInstanceEngineProps { Version = MysqlEngineVersion.VER_8_0_39 }),
InstanceType = InstanceType.Of(InstanceClass.R7G, InstanceSize.LARGE),
Vpc = vpc,
EnablePerformanceInsights = true,
PerformanceInsightRetention = PerformanceInsightRetention.LONG_TERM,
PerformanceInsightEncryptionKey = kmsKey
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var vpc Vpc
var kmsKey Key
instance := rds.NewDatabaseInstance(this, jsii.String("Instance"), &DatabaseInstanceProps{
Engine: rds.DatabaseInstanceEngine_Mysql(&MySqlInstanceEngineProps{
Version: rds.MysqlEngineVersion_VER_8_0_39(),
}),
InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_R7G, ec2.InstanceSize_LARGE),
Vpc: Vpc,
EnablePerformanceInsights: jsii.Boolean(true),
PerformanceInsightRetention: rds.PerformanceInsightRetention_LONG_TERM,
PerformanceInsightEncryptionKey: kmsKey,
})
Properties
versionMysqlEngineVersionversionMysqlEngineVersionversionMysqlEngineVersionVersionMysqlEngineVersionVersionMysqlEngineVersion required #The exact version of the engine to use.