@Stability(value=Stable) 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)
Backup settings.
|
DatabaseCluster |
build() |
DatabaseCluster.Builder |
cloudWatchLogsRetention(RetentionDays cloudWatchLogsRetention)
The number of days log events are kept in CloudWatch Logs.
|
DatabaseCluster.Builder |
cloudWatchLogsRetentionRole(IRole cloudWatchLogsRetentionRole)
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
|
static DatabaseCluster.Builder |
create(software.constructs.Construct scope,
String id) |
DatabaseCluster.Builder |
dbClusterName(String dbClusterName)
An optional identifier for the cluster.
|
DatabaseCluster.Builder |
deletionProtection(Boolean deletionProtection)
Specifies whether this cluster can be deleted.
|
DatabaseCluster.Builder |
engineVersion(String engineVersion)
What version of the database to start.
|
DatabaseCluster.Builder |
exportAuditLogsToCloudWatch(Boolean exportAuditLogsToCloudWatch)
Whether the audit logs should be exported to CloudWatch.
|
DatabaseCluster.Builder |
exportProfilerLogsToCloudWatch(Boolean exportProfilerLogsToCloudWatch)
Whether the profiler logs should be exported to CloudWatch.
|
DatabaseCluster.Builder |
instanceIdentifierBase(String instanceIdentifierBase)
Base identifier for instances.
|
DatabaseCluster.Builder |
instances(Number instances)
Number of DocDB compute instances.
|
DatabaseCluster.Builder |
instanceType(InstanceType instanceType)
What type of instance to start for the replicas.
|
DatabaseCluster.Builder |
kmsKey(IKey kmsKey)
The KMS key for storage encryption.
|
DatabaseCluster.Builder |
masterUser(Login masterUser)
Username and password for the administrative user.
|
DatabaseCluster.Builder |
parameterGroup(IClusterParameterGroup parameterGroup)
The DB parameter group to associate with the instance.
|
DatabaseCluster.Builder |
port(Number port)
The port the DocumentDB cluster will listen on.
|
DatabaseCluster.Builder |
preferredMaintenanceWindow(String preferredMaintenanceWindow)
A weekly time range in which maintenance should preferably execute.
|
DatabaseCluster.Builder |
removalPolicy(RemovalPolicy removalPolicy)
The removal policy to apply when the cluster and its instances are removed or replaced during a stack update, or when the stack is deleted.
|
DatabaseCluster.Builder |
securityGroup(ISecurityGroup securityGroup)
Security group.
|
DatabaseCluster.Builder |
storageEncrypted(Boolean storageEncrypted)
Whether to enable storage encryption.
|
DatabaseCluster.Builder |
vpc(IVpc vpc)
What subnets to run the DocumentDB instances in.
|
DatabaseCluster.Builder |
vpcSubnets(SubnetSelection vpcSubnets)
Where to place the instances within the VPC.
|
@Stability(value=Stable) 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=Stable) public DatabaseCluster.Builder instanceType(InstanceType instanceType)
instanceType - What type of instance to start for the replicas. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder masterUser(Login masterUser)
masterUser - Username and password for the administrative user. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder vpc(IVpc vpc)
Must be at least 2 subnets in two different AZs.
vpc - What subnets to run the DocumentDB instances in. This parameter is required.this@Stability(value=Stable) 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.this@Stability(value=Stable) 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=Stable) 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=Stable) public DatabaseCluster.Builder dbClusterName(String dbClusterName)
Default: - A name is automatically generated.
dbClusterName - An optional identifier for the cluster. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder deletionProtection(Boolean deletionProtection)
If deletionProtection is enabled, the cluster cannot be deleted unless it is modified and deletionProtection is disabled. deletionProtection protects clusters from being accidentally deleted.
Default: - false
deletionProtection - Specifies whether this cluster can be deleted. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder engineVersion(String engineVersion)
Default: - The default engine version.
engineVersion - What version of the database to start. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder exportAuditLogsToCloudWatch(Boolean exportAuditLogsToCloudWatch)
Note that you also have to configure the audit log export in the Cluster's Parameter Group.
Default: false
exportAuditLogsToCloudWatch - Whether the audit logs should be exported to CloudWatch. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder exportProfilerLogsToCloudWatch(Boolean exportProfilerLogsToCloudWatch)
Note that you also have to configure the profiler log export in the Cluster's Parameter Group.
Default: false
exportProfilerLogsToCloudWatch - Whether the profiler logs should be exported to CloudWatch. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder instanceIdentifierBase(String instanceIdentifierBase)
Every replica is named by appending the replica number to this string, 1-based.
Default: - `dbClusterName` is used with the word "Instance" appended. If `dbClusterName` is not provided, the identifier is automatically generated.
instanceIdentifierBase - Base identifier for instances. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder instances(Number instances)
Default: 1
instances - Number of DocDB compute instances. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder kmsKey(IKey kmsKey)
Default: - default master key.
kmsKey - The KMS key for storage encryption. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder parameterGroup(IClusterParameterGroup parameterGroup)
Default: no parameter group
parameterGroup - The DB parameter group to associate with the instance. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder port(Number port)
Default: DatabaseCluster.DEFAULT_PORT
port - The port the DocumentDB cluster will listen on. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow)
Must be at least 30 minutes long.
Example: 'tue:04:17-tue:04:47'
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 weekly time range in which maintenance should preferably execute. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder removalPolicy(RemovalPolicy removalPolicy)
This removal policy also applies to the implicit security group created for the cluster if one is not supplied as a parameter.
Default: - Retain cluster.
removalPolicy - The removal policy to apply when the cluster and its instances are removed or replaced during a stack update, or when the stack is deleted. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder securityGroup(ISecurityGroup securityGroup)
Default: a new security group is created.
securityGroup - Security group. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder storageEncrypted(Boolean storageEncrypted)
Default: true
storageEncrypted - Whether to enable storage encryption. This parameter is required.this@Stability(value=Stable) public DatabaseCluster.Builder vpcSubnets(SubnetSelection vpcSubnets)
Default: private subnets
vpcSubnets - Where to place the instances within the VPC. This parameter is required.this@Stability(value=Stable) public DatabaseCluster build()
build in interface software.amazon.jsii.Builder<DatabaseCluster>Copyright © 2022. All rights reserved.