Interface DatabaseClusterProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DatabaseClusterProps.Jsii$Proxy
Example:
Vpc vpc; DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database") .engine(DatabaseClusterEngine.auroraMysql(AuroraMysqlClusterEngineProps.builder().version(AuroraMysqlEngineVersion.VER_3_01_0).build())) .writer(ClusterInstance.provisioned("writer", ProvisionedClusterInstanceProps.builder() .instanceType(InstanceType.of(InstanceClass.R6G, InstanceSize.XLARGE4)) .build())) .serverlessV2MinCapacity(6.5) .serverlessV2MaxCapacity(64) .readers(List.of(ClusterInstance.serverlessV2("reader1", ServerlessV2ClusterInstanceProps.builder().scaleWithWriter(true).build()), ClusterInstance.serverlessV2("reader2"))) .vpc(vpc) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forDatabaseClusterProps
static final class
An implementation forDatabaseClusterProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic DatabaseClusterProps.Builder
builder()
default Boolean
Specifies whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window.default Duration
The number of seconds to set a cluster's target backtrack window to.default BackupProps
Backup settings.The list of log types that need to be enabled for exporting to CloudWatch Logs.default RetentionDays
The number of days log events are kept in CloudWatch Logs.default IRole
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.default String
An optional identifier for the cluster.default Boolean
Whether to copy tags to the snapshot when a snapshot is created.default Credentials
Credentials for the administrative user.default String
Name of a database which is automatically created inside the cluster.default Boolean
Indicates whether the DB cluster should have deletion protection enabled.default String
Directory ID for associating the DB cluster with a specific Active Directory.default IRole
The IAM role to be used when making API calls to the Directory Service.default Boolean
Whether to enable the Data API for the cluster.default Boolean
Whether read replicas can forward write operations to the writer DB instance in the DB cluster.default Boolean
Whether to enable Performance Insights for the DB cluster.What kind of database to start.default Boolean
Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.default String
Base identifier for instances.default InstanceProps
Deprecated.use writer and readers insteaddefault Number
Deprecated.use writer and readers insteaddefault InstanceUpdateBehaviour
The ordering of updates for instances.default Duration
The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances.default IRole
Role that will be used to manage DB instances monitoring.default NetworkType
The network type of the DB instance.default IParameterGroup
Additional parameters to pass to the database engine.The parameters in the DBClusterParameterGroup to create automatically.default IKey
The AWS KMS key for encryption of Performance Insights data.default PerformanceInsightRetention
The amount of time, in days, to retain Performance Insights data.default Number
getPort()
What port to listen on.default String
A preferred maintenance window day/time range.default List<IClusterInstance>
A list of instances to create as cluster reader instances.default RemovalPolicy
The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.S3 buckets that you want to load data into.default IRole
Role that will be associated with this DB cluster to enable S3 export.S3 buckets that you want to load data from.default IRole
Role that will be associated with this DB cluster to enable S3 import.default List<ISecurityGroup>
Security group.default Number
The maximum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.default Number
The minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.default Boolean
Whether to enable storage encryption.default IKey
The KMS key for storage encryption.default DBClusterStorageType
The storage type to be associated with the DB cluster.default ISubnetGroup
Existing subnet group for the cluster.default IVpc
getVpc()
What subnets to run the RDS instances in.default SubnetSelection
Where to place the instances within the VPC.default IClusterInstance
The instance to use for the cluster writer.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEngine
What kind of database to start. -
getAutoMinorVersionUpgrade
Specifies whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window.Default: true
-
getBacktrackWindow
The number of seconds to set a cluster's target backtrack window to.This feature is only supported by the Aurora MySQL database engine and cannot be enabled on existing clusters.
Default: 0 seconds (no backtrack)
- See Also:
-
getBackup
Backup settings.Default: - Backup retention period for automated backups is 1 day. Backup preferred window is set to a 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 Also:
-
getCloudwatchLogsExports
The list of log types that need to be enabled for exporting to CloudWatch Logs.Default: - no log exports
-
getCloudwatchLogsRetention
The number of days log events are kept in CloudWatch Logs.When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to
Infinity
.Default: - logs never expire
-
getCloudwatchLogsRetentionRole
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.Default: - a new role is created.
-
getClusterIdentifier
An optional identifier for the cluster.Default: - A name is automatically generated.
-
getCopyTagsToSnapshot
Whether to copy tags to the snapshot when a snapshot is created.Default: - true
-
getCredentials
Credentials for the administrative user.Default: - A username of 'admin' (or 'postgres' for PostgreSQL) and SecretsManager-generated password
-
getDefaultDatabaseName
Name of a database which is automatically created inside the cluster.Default: - Database is not created in cluster.
-
getDeletionProtection
Indicates whether the DB cluster should have deletion protection enabled.Default: - true if `removalPolicy` is RETAIN, `undefined` otherwise, which will not enable deletion protection. To disable deletion protection after it has been enabled, you must explicitly set this value to `false`.
-
getDomain
Directory ID for associating the DB cluster with a specific Active Directory.Necessary for enabling Kerberos authentication. If specified, the DB cluster joins the given Active Directory, enabling Kerberos authentication. If not specified, the DB cluster will not be associated with any Active Directory, and Kerberos authentication will not be enabled.
Default: - DB cluster is not associated with an Active Directory; Kerberos authentication is not enabled.
-
getDomainRole
The IAM role to be used when making API calls to the Directory Service.The role needs the AWS-managed policy
AmazonRDSDirectoryServiceAccess
or equivalent.Default: - If `DatabaseClusterBaseProps.domain` is specified, a role with the `AmazonRDSDirectoryServiceAccess` policy is automatically created.
-
getEnableDataApi
Whether to enable the Data API for the cluster.Default: - false
-
getEnableLocalWriteForwarding
Whether read replicas can forward write operations to the writer DB instance in the DB cluster.This setting can only be enabled for Aurora MySQL 3.04 or higher, and for Aurora PostgreSQL 16.4 or higher (for version 16), 15.8 or higher (for version 15), and 14.13 or higher (for version 14).
Default: false
- See Also:
-
getEnablePerformanceInsights
Whether to enable Performance Insights for the DB cluster.Default: - false, unless `performanceInsightRetention` or `performanceInsightEncryptionKey` is set.
-
getIamAuthentication
Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.Default: false
-
getInstanceIdentifierBase
Base identifier for instances.Every replica is named by appending the replica number to this string, 1-based.
Default: - clusterIdentifier is used with the word "Instance" appended. If clusterIdentifier is not provided, the identifier is automatically generated.
-
getInstanceProps
Deprecated.- use writer and readers instead
(deprecated) Settings for the individual instances that are launched. -
getInstances
Deprecated.- use writer and readers instead
(deprecated) How many replicas/instances to create.Has to be at least 1.
Default: 2
-
getInstanceUpdateBehaviour
The ordering of updates for instances.Default: InstanceUpdateBehaviour.BULK
-
getMonitoringInterval
The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances.Default: no enhanced monitoring
-
getMonitoringRole
Role that will be used to manage DB instances monitoring.Default: - A role is automatically created for you
-
getNetworkType
The network type of the DB instance.Default: - IPV4
-
getParameterGroup
Additional parameters to pass to the database engine.Default: - No parameter group.
-
getParameters
The parameters in the DBClusterParameterGroup to create automatically.You can only specify parameterGroup or parameters but not both. You need to use a versioned engine to auto-generate a DBClusterParameterGroup.
Default: - None
-
getPerformanceInsightEncryptionKey
The AWS KMS key for encryption of Performance Insights data.Default: - default master key
-
getPerformanceInsightRetention
The amount of time, in days, to retain Performance Insights data.Default: 7
-
getPort
What port to listen on.Default: - The default for the engine is used.
-
getPreferredMaintenanceWindow
A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC).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 Also:
-
getReaders
A list of instances to create as cluster reader instances.Default: - no readers are created. The cluster will have a single writer/reader
-
getRemovalPolicy
The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.Default: - RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data)
-
getS3ExportBuckets
S3 buckets that you want to load data into. This feature is only supported by the Aurora database engine.This property must not be used if
s3ExportRole
is used.For MySQL:
Default: - None
- See Also:
-
getS3ExportRole
Role that will be associated with this DB cluster to enable S3 export.This feature is only supported by the Aurora database engine.
This property must not be used if
s3ExportBuckets
is used. To use this property with Aurora PostgreSQL, it must be configured with the S3 export feature enabled when creating the DatabaseClusterEngine For MySQL:Default: - New role is created if `s3ExportBuckets` is set, no role is defined otherwise
- See Also:
-
getS3ImportBuckets
S3 buckets that you want to load data from. This feature is only supported by the Aurora database engine.This property must not be used if
s3ImportRole
is used.For MySQL:
Default: - None
- See Also:
-
getS3ImportRole
Role that will be associated with this DB cluster to enable S3 import.This feature is only supported by the Aurora database engine.
This property must not be used if
s3ImportBuckets
is used. To use this property with Aurora PostgreSQL, it must be configured with the S3 import feature enabled when creating the DatabaseClusterEngine For MySQL:Default: - New role is created if `s3ImportBuckets` is set, no role is defined otherwise
- See Also:
-
getSecurityGroups
Security group.Default: a new security group is created.
-
getServerlessV2MaxCapacity
The maximum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.You can specify ACU values in half-step increments, such as 40, 40.5, 41, and so on. The largest value that you can use is 256.
The maximum capacity must be higher than 0.5 ACUs.
Default: 2
- See Also:
-
getServerlessV2MinCapacity
The minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.You can specify ACU values in half-step increments, such as 8, 8.5, 9, and so on. The smallest value that you can use is 0.5.
Default: 0.5
- See Also:
-
getStorageEncrypted
Whether to enable storage encryption.Default: - true if storageEncryptionKey is provided, false otherwise
-
getStorageEncryptionKey
The KMS key for storage encryption.If specified,
storageEncrypted
will be set totrue
.Default: - if storageEncrypted is true then the default master key, no key otherwise
-
getStorageType
The storage type to be associated with the DB cluster.Default: - DBClusterStorageType.AURORA_IOPT1
-
getSubnetGroup
Existing subnet group for the cluster.Default: - a new subnet group will be created.
-
getVpc
What subnets to run the RDS instances in.Must be at least 2 subnets in two different AZs.
-
getVpcSubnets
Where to place the instances within the VPC.Default: - the Vpc default strategy if not specified.
-
getWriter
The instance to use for the cluster writer.Default: required if instanceProps is not provided
-
builder
- Returns:
- a
DatabaseClusterProps.Builder
ofDatabaseClusterProps
-