interface ServerlessV2ClusterInstanceProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.RDS.ServerlessV2ClusterInstanceProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsrds#ServerlessV2ClusterInstanceProps |
![]() | software.amazon.awscdk.services.rds.ServerlessV2ClusterInstanceProps |
![]() | aws_cdk.aws_rds.ServerlessV2ClusterInstanceProps |
![]() | aws-cdk-lib » aws_rds » ServerlessV2ClusterInstanceProps |
Options for creating a serverless v2 instance.
Example
declare const vpc: ec2.Vpc;
const cluster = new rds.DatabaseCluster(this, 'Database', {
engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_2_08_1 }),
writer: rds.ClusterInstance.provisioned('writer', {
instanceType: ec2.InstanceType.of(ec2.InstanceClass.R6G, ec2.InstanceSize.XLARGE4),
}),
serverlessV2MinCapacity: 6.5,
serverlessV2MaxCapacity: 64,
readers: [
// will be put in promotion tier 1 and will scale with the writer
rds.ClusterInstance.serverlessV2('reader1', { scaleWithWriter: true }),
// will be put in promotion tier 2 and will not scale with the writer
rds.ClusterInstance.serverlessV2('reader2'),
]
vpc,
});
Properties
Name | Type | Description |
---|---|---|
allow | boolean | Whether to allow upgrade of major version for the DB instance. |
auto | boolean | Whether to enable automatic upgrade of minor version for the DB instance. |
enable | boolean | Whether to enable Performance Insights for the DB instance. |
instance | string | The identifier for the database instance. |
parameter | IParameter | The DB parameter group to associate with the instance. |
parameters? | { [string]: string } | The parameters in the DBParameterGroup to create automatically. |
performance | IKey | The AWS KMS key for encryption of Performance Insights data. |
performance | Performance | The amount of time, in days, to retain Performance Insights data. |
publicly | boolean | Indicates whether the DB instance is an internet-facing instance. |
scale | boolean | Only applicable to reader instances. |
allowMajorVersionUpgrade?
Type:
boolean
(optional, default: false)
Whether to allow upgrade of major version for the DB instance.
autoMinorVersionUpgrade?
Type:
boolean
(optional, default: true)
Whether to enable automatic upgrade of minor version for the DB instance.
enablePerformanceInsights?
Type:
boolean
(optional, default: false, unless performanceInsightRentention
or performanceInsightEncryptionKey
is set.)
Whether to enable Performance Insights for the DB instance.
instanceIdentifier?
Type:
string
(optional, default: CloudFormation generated identifier)
The identifier for the database instance.
parameterGroup?
Type:
IParameter
(optional, default: the cluster parameter group is used)
The DB parameter group to associate with the instance.
This is only needed if you need to configure different parameter groups for each individual instance, otherwise you should not provide this and just use the cluster parameter group
parameters?
Type:
{ [string]: string }
(optional, default: None)
The parameters in the DBParameterGroup to create automatically.
You can only specify parameterGroup or parameters but not both. You need to use a versioned engine to auto-generate a DBParameterGroup.
performanceInsightEncryptionKey?
Type:
IKey
(optional, default: default master key)
The AWS KMS key for encryption of Performance Insights data.
performanceInsightRetention?
Type:
Performance
(optional, default: 7)
The amount of time, in days, to retain Performance Insights data.
publiclyAccessible?
Type:
boolean
(optional, default: true if the instance is placed in a public subnet)
Indicates whether the DB instance is an internet-facing instance.
scaleWithWriter?
Type:
boolean
(optional, default: false)
Only applicable to reader instances.
If this is true then the instance will be placed in promotion tier 1, otherwise it will be placed in promotion tier 2.
For serverless v2 instances this means:
- true: The serverless v2 reader will scale to match the writer instance (provisioned or serverless)
- false: The serverless v2 reader will scale with the read workfload on the instance