@Stability(value=Experimental) public static final class DatabaseCluster.Builder extends Object implements software.amazon.jsii.Builder<DatabaseCluster>
DatabaseCluster.| Modifier and Type | Method and Description |
|---|---|
DatabaseCluster.Builder |
backup(BackupProps backup)
(experimental) Backup settings.
|
DatabaseCluster |
build() |
DatabaseCluster.Builder |
cloudwatchLogsExports(List<String> cloudwatchLogsExports)
(experimental) The list of log types that need to be enabled for exporting to CloudWatch Logs.
|
DatabaseCluster.Builder |
cloudwatchLogsRetention(RetentionDays cloudwatchLogsRetention)
(experimental) The number of days log events are kept in CloudWatch Logs.
|
DatabaseCluster.Builder |
cloudwatchLogsRetentionRole(IRole cloudwatchLogsRetentionRole)
(experimental) The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
|
DatabaseCluster.Builder |
clusterIdentifier(String clusterIdentifier)
(experimental) An optional identifier for the cluster.
|
static DatabaseCluster.Builder |
create(software.constructs.Construct scope,
String id) |
DatabaseCluster.Builder |
credentials(Credentials credentials)
(experimental) Credentials for the administrative user.
|
DatabaseCluster.Builder |
defaultDatabaseName(String defaultDatabaseName)
(experimental) Name of a database which is automatically created inside the cluster.
|
DatabaseCluster.Builder |
deletionProtection(Boolean deletionProtection)
(experimental) Indicates whether the DB cluster should have deletion protection enabled.
|
DatabaseCluster.Builder |
engine(IClusterEngine engine)
(experimental) What kind of database to start.
|
DatabaseCluster.Builder |
iamAuthentication(Boolean iamAuthentication)
(experimental) Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.
|
DatabaseCluster.Builder |
instanceIdentifierBase(String instanceIdentifierBase)
(experimental) Base identifier for instances.
|
DatabaseCluster.Builder |
instanceProps(InstanceProps instanceProps)
(experimental) Settings for the individual instances that are launched.
|
DatabaseCluster.Builder |
instances(Number instances)
(experimental) How many replicas/instances to create.
|
DatabaseCluster.Builder |
monitoringInterval(Duration monitoringInterval)
(experimental) The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances.
|
DatabaseCluster.Builder |
monitoringRole(IRole monitoringRole)
(experimental) Role that will be used to manage DB instances monitoring.
|
DatabaseCluster.Builder |
parameterGroup(IParameterGroup parameterGroup)
(experimental) Additional parameters to pass to the database engine.
|
DatabaseCluster.Builder |
port(Number port)
(experimental) What port to listen on.
|
DatabaseCluster.Builder |
preferredMaintenanceWindow(String preferredMaintenanceWindow)
(experimental) A preferred maintenance window day/time range.
|
DatabaseCluster.Builder |
removalPolicy(RemovalPolicy removalPolicy)
(experimental) The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.
|
DatabaseCluster.Builder |
s3ExportBuckets(List<? extends IBucket> s3ExportBuckets)
(experimental) S3 buckets that you want to load data into.
|
DatabaseCluster.Builder |
s3ExportRole(IRole s3ExportRole)
(experimental) Role that will be associated with this DB cluster to enable S3 export.
|
DatabaseCluster.Builder |
s3ImportBuckets(List<? extends IBucket> s3ImportBuckets)
(experimental) S3 buckets that you want to load data from.
|
DatabaseCluster.Builder |
s3ImportRole(IRole s3ImportRole)
(experimental) Role that will be associated with this DB cluster to enable S3 import.
|
DatabaseCluster.Builder |
storageEncrypted(Boolean storageEncrypted)
(experimental) Whether to enable storage encryption.
|
DatabaseCluster.Builder |
storageEncryptionKey(IKey storageEncryptionKey)
(experimental) The KMS key for storage encryption.
|
DatabaseCluster.Builder |
subnetGroup(ISubnetGroup subnetGroup)
(experimental) Existing subnet group for the cluster.
|
@Stability(value=Experimental) public static DatabaseCluster.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.DatabaseCluster.Builder.@Stability(value=Experimental) public DatabaseCluster.Builder engine(IClusterEngine engine)
engine - What kind of database to start. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder instanceProps(InstanceProps instanceProps)
instanceProps - Settings for the individual instances that are launched. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder backup(BackupProps backup)
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.
backup - Backup settings. This parameter is required.thishttps://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow@Stability(value=Experimental) public DatabaseCluster.Builder cloudwatchLogsExports(List<String> cloudwatchLogsExports)
Default: - no log exports
cloudwatchLogsExports - The list of log types that need to be enabled for exporting to CloudWatch Logs. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder cloudwatchLogsRetention(RetentionDays cloudwatchLogsRetention)
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
cloudwatchLogsRetention - The number of days log events are kept in CloudWatch Logs. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder cloudwatchLogsRetentionRole(IRole cloudwatchLogsRetentionRole)
Default: - a new role is created.
cloudwatchLogsRetentionRole - The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder clusterIdentifier(String clusterIdentifier)
Default: - A name is automatically generated.
clusterIdentifier - An optional identifier for the cluster. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder credentials(Credentials credentials)
Default: - A username of 'admin' (or 'postgres' for PostgreSQL) and SecretsManager-generated password
credentials - Credentials for the administrative user. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder defaultDatabaseName(String defaultDatabaseName)
Default: - Database is not created in cluster.
defaultDatabaseName - Name of a database which is automatically created inside the cluster. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder deletionProtection(Boolean deletionProtection)
Default: - true if ``removalPolicy`` is RETAIN, false otherwise
deletionProtection - Indicates whether the DB cluster should have deletion protection enabled. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder iamAuthentication(Boolean iamAuthentication)
Default: false
iamAuthentication - Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder instanceIdentifierBase(String instanceIdentifierBase)
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.
instanceIdentifierBase - Base identifier for instances. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder instances(Number instances)
Has to be at least 1.
Default: 2
instances - How many replicas/instances to create. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder monitoringInterval(Duration monitoringInterval)
Default: no enhanced monitoring
monitoringInterval - The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder monitoringRole(IRole monitoringRole)
Default: - A role is automatically created for you
monitoringRole - Role that will be used to manage DB instances monitoring. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder parameterGroup(IParameterGroup parameterGroup)
Default: - No parameter group.
parameterGroup - Additional parameters to pass to the database engine. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder port(Number port)
Default: - The default for the engine is used.
port - What port to listen on. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow)
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.
preferredMaintenanceWindow - A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). This parameter is required.thishttps://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance@Stability(value=Experimental) public DatabaseCluster.Builder removalPolicy(RemovalPolicy removalPolicy)
Default: - RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data)
removalPolicy - The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder s3ExportBuckets(List<? extends IBucket> s3ExportBuckets)
This property must not be used if s3ExportRole is used.
For MySQL:
Default: - None
s3ExportBuckets - S3 buckets that you want to load data into. This feature is only supported by the Aurora database engine. This parameter is required.thishttps://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/postgresql-s3-export.html@Stability(value=Experimental) public DatabaseCluster.Builder s3ExportRole(IRole s3ExportRole)
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
s3ExportRole - Role that will be associated with this DB cluster to enable S3 export. This parameter is required.thishttps://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/postgresql-s3-export.html@Stability(value=Experimental) public DatabaseCluster.Builder s3ImportBuckets(List<? extends IBucket> s3ImportBuckets)
This property must not be used if s3ImportRole is used.
For MySQL:
Default: - None
s3ImportBuckets - S3 buckets that you want to load data from. This feature is only supported by the Aurora database engine. This parameter is required.thishttps://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Migrating.html@Stability(value=Experimental) public DatabaseCluster.Builder s3ImportRole(IRole s3ImportRole)
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
s3ImportRole - Role that will be associated with this DB cluster to enable S3 import. This parameter is required.thishttps://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Migrating.html@Stability(value=Experimental) public DatabaseCluster.Builder storageEncrypted(Boolean storageEncrypted)
Default: - true if storageEncryptionKey is provided, false otherwise
storageEncrypted - Whether to enable storage encryption. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder storageEncryptionKey(IKey storageEncryptionKey)
If specified, {@link storageEncrypted} will be set to true.
Default: - if storageEncrypted is true then the default master key, no key otherwise
storageEncryptionKey - The KMS key for storage encryption. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster.Builder subnetGroup(ISubnetGroup subnetGroup)
Default: - a new subnet group will be created.
subnetGroup - Existing subnet group for the cluster. This parameter is required.this@Stability(value=Experimental) public DatabaseCluster build()
build in interface software.amazon.jsii.Builder<DatabaseCluster>Copyright © 2021. All rights reserved.