Show / Hide Table of Contents

Class ServerlessV2ClusterInstanceProps

Options for creating a serverless v2 instance.

Inheritance
object
ServerlessV2ClusterInstanceProps
Implements
IServerlessV2ClusterInstanceProps
IClusterInstanceOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ServerlessV2ClusterInstanceProps : IServerlessV2ClusterInstanceProps, IClusterInstanceOptions
Syntax (vb)
Public Class ServerlessV2ClusterInstanceProps Implements IServerlessV2ClusterInstanceProps, IClusterInstanceOptions
Remarks

ExampleMetadata: infused

Examples
Vpc vpc;

            var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
                Engine = DatabaseClusterEngine.AuroraMysql(new AuroraMysqlClusterEngineProps { Version = AuroraMysqlEngineVersion.VER_3_01_0 }),
                Writer = ClusterInstance.Provisioned("writer", new ProvisionedClusterInstanceProps {
                    CaCertificate = CaCertificate.RDS_CA_RSA2048_G1
                }),
                Readers = new [] { ClusterInstance.ServerlessV2("reader", new ServerlessV2ClusterInstanceProps {
                    CaCertificate = CaCertificate.Of("custom-ca")
                }) },
                Vpc = vpc
            });

Synopsis

Constructors

ServerlessV2ClusterInstanceProps()

Options for creating a serverless v2 instance.

Properties

AllowMajorVersionUpgrade

Whether to allow upgrade of major version for the DB instance.

ApplyImmediately

Specifies whether changes to the DB instance and any pending modifications are applied immediately, regardless of the preferredMaintenanceWindow setting.

AutoMinorVersionUpgrade

Whether to enable automatic upgrade of minor version for the DB instance.

AvailabilityZone

The Availability Zone (AZ) where the database will be created.

CaCertificate

The identifier of the CA certificate for this DB cluster's instances.

EnablePerformanceInsights

Whether to enable Performance Insights for the DB instance.

InstanceIdentifier

The identifier for the database instance.

IsFromLegacyInstanceProps

Only used for migrating existing clusters from using instanceProps to writer and readers.

ParameterGroup

The DB parameter group to associate with the instance.

Parameters

The parameters in the DBParameterGroup to create automatically.

PerformanceInsightEncryptionKey

The AWS KMS key for encryption of Performance Insights data.

PerformanceInsightRetention

The amount of time, in days, to retain Performance Insights data.

PreferredMaintenanceWindow

A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC).

PubliclyAccessible

Indicates whether the DB instance is an internet-facing instance.

ScaleWithWriter

Only applicable to reader instances.

Constructors

ServerlessV2ClusterInstanceProps()

Options for creating a serverless v2 instance.

public ServerlessV2ClusterInstanceProps()
Remarks

ExampleMetadata: infused

Examples
Vpc vpc;

            var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
                Engine = DatabaseClusterEngine.AuroraMysql(new AuroraMysqlClusterEngineProps { Version = AuroraMysqlEngineVersion.VER_3_01_0 }),
                Writer = ClusterInstance.Provisioned("writer", new ProvisionedClusterInstanceProps {
                    CaCertificate = CaCertificate.RDS_CA_RSA2048_G1
                }),
                Readers = new [] { ClusterInstance.ServerlessV2("reader", new ServerlessV2ClusterInstanceProps {
                    CaCertificate = CaCertificate.Of("custom-ca")
                }) },
                Vpc = vpc
            });

Properties

AllowMajorVersionUpgrade

Whether to allow upgrade of major version for the DB instance.

public bool? AllowMajorVersionUpgrade { get; set; }
Property Value

bool?

Remarks

Default: - false

ApplyImmediately

Specifies whether changes to the DB instance and any pending modifications are applied immediately, regardless of the preferredMaintenanceWindow setting.

public bool? ApplyImmediately { get; set; }
Property Value

bool?

Remarks

If set to false, changes are applied during the next maintenance window.

Until RDS applies the changes, the DB instance remains in a drift state. As a result, the configuration doesn't fully reflect the requested modifications and temporarily diverges from the intended state.

This property also determines whether the DB instance reboots when a static parameter is modified in the associated DB parameter group.

Default: - Changes will be applied immediately

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Modifying.html

AutoMinorVersionUpgrade

Whether to enable automatic upgrade of minor version for the DB instance.

public bool? AutoMinorVersionUpgrade { get; set; }
Property Value

bool?

Remarks

Default: - true

AvailabilityZone

The Availability Zone (AZ) where the database will be created.

public string? AvailabilityZone { get; set; }
Property Value

string

Remarks

For Amazon Aurora, each Aurora DB cluster hosts copies of its storage in three separate Availability Zones. Specify one of these Availability Zones. Aurora automatically chooses an appropriate Availability Zone if you don't specify one.

Default: - A random, system-chosen Availability Zone in the endpointʼs AWS Region.

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html

CaCertificate

The identifier of the CA certificate for this DB cluster's instances.

public CaCertificate? CaCertificate { get; set; }
Property Value

CaCertificate

Remarks

Specifying or updating this property triggers a reboot.

For RDS DB engines:

Default: - RDS will choose a certificate authority

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL-certificate-rotation.html

EnablePerformanceInsights

Whether to enable Performance Insights for the DB instance.

public bool? EnablePerformanceInsights { get; set; }
Property Value

bool?

Remarks

Default: - false, unless performanceInsightRetention or performanceInsightEncryptionKey is set.

InstanceIdentifier

The identifier for the database instance.

public string? InstanceIdentifier { get; set; }
Property Value

string

Remarks

Default: - CloudFormation generated identifier

IsFromLegacyInstanceProps

Only used for migrating existing clusters from using instanceProps to writer and readers.

public bool? IsFromLegacyInstanceProps { get; set; }
Property Value

bool?

Remarks

Default: false

Examples
// existing cluster
            Vpc vpc;

            var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
                Engine = DatabaseClusterEngine.AuroraMysql(new AuroraMysqlClusterEngineProps {
                    Version = AuroraMysqlEngineVersion.VER_3_03_0
                }),
                Instances = 2,
                InstanceProps = new InstanceProps {
                    InstanceType = InstanceType.Of(InstanceClass.BURSTABLE3, InstanceSize.SMALL),
                    VpcSubnets = new SubnetSelection { SubnetType = SubnetType.PUBLIC },
                    Vpc = vpc
                }
            });

            // migration

            IDictionary<string, object> instanceProps = new Dictionary<string, object> {
                { "instanceType", InstanceType.Of(InstanceClass.BURSTABLE3, InstanceSize.SMALL) },
                { "isFromLegacyInstanceProps", true }
            };

            var myCluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
                Engine = DatabaseClusterEngine.AuroraMysql(new AuroraMysqlClusterEngineProps {
                    Version = AuroraMysqlEngineVersion.VER_3_03_0
                }),
                VpcSubnets = new SubnetSelection { SubnetType = SubnetType.PUBLIC },
                Vpc = vpc,
                Writer = ClusterInstance.Provisioned("Instance1", new ProvisionedClusterInstanceProps {
                    InstanceType = instanceProps.InstanceType,
                    IsFromLegacyInstanceProps = instanceProps.IsFromLegacyInstanceProps
                }),
                Readers = new [] { ClusterInstance.Provisioned("Instance2", new ProvisionedClusterInstanceProps {
                    InstanceType = instanceProps.InstanceType,
                    IsFromLegacyInstanceProps = instanceProps.IsFromLegacyInstanceProps
                }) }
            });

ParameterGroup

The DB parameter group to associate with the instance.

public IParameterGroup? ParameterGroup { get; set; }
Property Value

IParameterGroup

Remarks

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

Default: the cluster parameter group is used

Parameters

The parameters in the DBParameterGroup to create automatically.

public IDictionary<string, string>? Parameters { get; set; }
Property Value

IDictionary<string, string>

Remarks

You can only specify parameterGroup or parameters but not both. You need to use a versioned engine to auto-generate a DBParameterGroup.

Default: - None

PerformanceInsightEncryptionKey

The AWS KMS key for encryption of Performance Insights data.

public IKey? PerformanceInsightEncryptionKey { get; set; }
Property Value

IKey

Remarks

Default: - default master key

PerformanceInsightRetention

The amount of time, in days, to retain Performance Insights data.

public PerformanceInsightRetention? PerformanceInsightRetention { get; set; }
Property Value

PerformanceInsightRetention?

Remarks

Default: 7

PreferredMaintenanceWindow

A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC).

public string? PreferredMaintenanceWindow { get; set; }
Property Value

string

Remarks

Example: 'Sun:23:45-Mon:00:15'

Default: - 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.

See: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance

PubliclyAccessible

Indicates whether the DB instance is an internet-facing instance.

public bool? PubliclyAccessible { get; set; }
Property Value

bool?

Remarks

If not specified, the cluster's vpcSubnets will be used to determine if the instance is internet-facing or not.

Default: - true if the cluster's vpcSubnets is subnetType: SubnetType.PUBLIC, false otherwise

ScaleWithWriter

Only applicable to reader instances.

public bool? ScaleWithWriter { get; set; }
Property Value

bool?

Remarks

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:

    Default: false

    Implements

    IServerlessV2ClusterInstanceProps
    IClusterInstanceOptions
    Back to top Generated by DocFX