Interface IInstanceProps
Instance properties for database instances.
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IInstanceProps
Syntax (vb)
Public Interface IInstanceProps
Remarks
ExampleMetadata: lit=aws-rds/test/integ.cluster-rotation.lit.ts infused
Examples
var cluster = new DatabaseCluster(stack, "Database", new DatabaseClusterProps {
Engine = DatabaseClusterEngine.AURORA,
InstanceProps = new InstanceProps {
InstanceType = InstanceType.Of(InstanceClass.BURSTABLE3, InstanceSize.SMALL),
Vpc = vpc
}
});
cluster.AddRotationSingleUser();
var clusterWithCustomRotationOptions = new DatabaseCluster(stack, "CustomRotationOptions", new DatabaseClusterProps {
Engine = DatabaseClusterEngine.AURORA,
InstanceProps = new InstanceProps {
InstanceType = InstanceType.Of(InstanceClass.BURSTABLE3, InstanceSize.SMALL),
Vpc = vpc
}
});
clusterWithCustomRotationOptions.AddRotationSingleUser(new RotationSingleUserOptions {
AutomaticallyAfter = Duration.Days(7),
ExcludeCharacters = "!@#$%^&*",
SecurityGroup = securityGroup,
VpcSubnets = new SubnetSelection { SubnetType = SubnetType.PRIVATE_WITH_EGRESS },
Endpoint = endpoint
});
Synopsis
Properties
AllowMajorVersionUpgrade | Whether to allow upgrade of major version for the DB instance. |
AutoMinorVersionUpgrade | Whether to enable automatic upgrade of minor version for the DB instance. |
DeleteAutomatedBackups | Whether to remove automated backups immediately after the DB instance is deleted for the DB instance. |
EnablePerformanceInsights | Whether to enable Performance Insights for the DB instance. |
InstanceType | What type of instance to start for the replicas. |
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. |
SecurityGroups | Security group. |
Vpc | What subnets to run the RDS instances in. |
VpcSubnets | Where to place the instances within the VPC. |
Properties
AllowMajorVersionUpgrade
Whether to allow upgrade of major version for the DB instance.
virtual Nullable<bool> AllowMajorVersionUpgrade { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false
AutoMinorVersionUpgrade
Whether to enable automatic upgrade of minor version for the DB instance.
virtual Nullable<bool> AutoMinorVersionUpgrade { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true
DeleteAutomatedBackups
Whether to remove automated backups immediately after the DB instance is deleted for the DB instance.
virtual Nullable<bool> DeleteAutomatedBackups { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true
EnablePerformanceInsights
Whether to enable Performance Insights for the DB instance.
virtual Nullable<bool> EnablePerformanceInsights { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false, unless performanceInsightRetention
or performanceInsightEncryptionKey
is set.
InstanceType
What type of instance to start for the replicas.
virtual InstanceType InstanceType { get; }
Property Value
Remarks
Default: - t3.medium (or, more precisely, db.t3.medium)
ParameterGroup
The DB parameter group to associate with the instance.
virtual IParameterGroup ParameterGroup { get; }
Property Value
Remarks
Default: no parameter group
Parameters
The parameters in the DBParameterGroup to create automatically.
virtual IDictionary<string, string> Parameters { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.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.
virtual IKey PerformanceInsightEncryptionKey { get; }
Property Value
Remarks
Default: - default master key
PerformanceInsightRetention
The amount of time, in days, to retain Performance Insights data.
virtual Nullable<PerformanceInsightRetention> PerformanceInsightRetention { get; }
Property Value
System.Nullable<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).
virtual string PreferredMaintenanceWindow { get; }
Property Value
System.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.
PubliclyAccessible
Indicates whether the DB instance is an internet-facing instance.
virtual Nullable<bool> PubliclyAccessible { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true
if vpcSubnets
is subnetType: SubnetType.PUBLIC
, false
otherwise
SecurityGroups
Security group.
virtual ISecurityGroup[] SecurityGroups { get; }
Property Value
Remarks
Default: a new security group is created.
Vpc
What subnets to run the RDS instances in.
IVpc Vpc { get; }
Property Value
Remarks
Must be at least 2 subnets in two different AZs.
VpcSubnets
Where to place the instances within the VPC.
virtual ISubnetSelection VpcSubnets { get; }
Property Value
Remarks
Default: - the Vpc default strategy if not specified.