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.AURORA) .instanceProps(InstanceProps.builder().vpc(vpc).build()) .build(); DatabaseProxy proxy = DatabaseProxy.Builder.create(this, "Proxy") .proxyTarget(ProxyTarget.fromCluster(cluster)) .secrets(List.of(cluster.getSecret())) .vpc(vpc) .build(); Role role = Role.Builder.create(this, "DBProxyRole").assumedBy(new AccountPrincipal(this.account)).build(); proxy.grantConnect(role, "admin");
-
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 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.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.Settings for the individual instances that are launched.default Number
How many replicas/instances to create.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 IParameterGroup
Additional parameters to pass to the database engine.The parameters in the DBClusterParameterGroup to create automatically.default Number
getPort()
What port to listen on.default String
A preferred maintenance window day/time range.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 Boolean
Whether to enable storage encryption.default IKey
The KMS key for storage encryption.default ISubnetGroup
Existing subnet group for the cluster.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEngine
What kind of database to start. -
getInstanceProps
Settings for the individual instances that are launched. -
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, false otherwise
-
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.
-
getInstances
How many replicas/instances to create.Has to be at least 1.
Default: 2
-
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
-
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
-
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:
-
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.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.For MySQL:
Default: - New role is created if `s3ImportBuckets` is set, no role is defined otherwise
- 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,
invalid @link
storageEncrypted
Default: - if storageEncrypted is true then the default master key, no key otherwise
-
getSubnetGroup
Existing subnet group for the cluster.Default: - a new subnet group will be created.
-
builder
- Returns:
- a
DatabaseClusterProps.Builder
ofDatabaseClusterProps
-