public static final class DatabaseClusterProps.Builder
extends java.lang.Object
DatabaseClusterProps
Constructor and Description |
---|
Builder() |
public DatabaseClusterProps.Builder instanceType(InstanceType instanceType)
DatabaseClusterProps.getInstanceType()
instanceType
- What type of instance to start for the replicas. This parameter is required.this
public DatabaseClusterProps.Builder masterUser(Login masterUser)
DatabaseClusterProps.getMasterUser()
masterUser
- Username and password for the administrative user. This parameter is required.this
public DatabaseClusterProps.Builder vpc(IVpc vpc)
DatabaseClusterProps.getVpc()
vpc
- What subnets to run the DocumentDB instances in. This parameter is required.
Must be at least 2 subnets in two different AZs.this
public DatabaseClusterProps.Builder backup(BackupProps backup)
DatabaseClusterProps.getBackup()
backup
- Backup settings.this
public DatabaseClusterProps.Builder cloudWatchLogsRetention(RetentionDays cloudWatchLogsRetention)
DatabaseClusterProps.getCloudWatchLogsRetention()
cloudWatchLogsRetention
- 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
.this
public DatabaseClusterProps.Builder cloudWatchLogsRetentionRole(IRole cloudWatchLogsRetentionRole)
DatabaseClusterProps.getCloudWatchLogsRetentionRole()
cloudWatchLogsRetentionRole
- The IAM role for the Lambda function associated with the custom resource that sets the retention policy.this
public DatabaseClusterProps.Builder dbClusterName(java.lang.String dbClusterName)
DatabaseClusterProps.getDbClusterName()
dbClusterName
- An optional identifier for the cluster.this
public DatabaseClusterProps.Builder deletionProtection(java.lang.Boolean deletionProtection)
DatabaseClusterProps.getDeletionProtection()
deletionProtection
- Specifies whether this cluster can be deleted.
If deletionProtection is
enabled, the cluster cannot be deleted unless it is modified and
deletionProtection is disabled. deletionProtection protects clusters from
being accidentally deleted.this
public DatabaseClusterProps.Builder engineVersion(java.lang.String engineVersion)
DatabaseClusterProps.getEngineVersion()
engineVersion
- What version of the database to start.this
public DatabaseClusterProps.Builder exportAuditLogsToCloudWatch(java.lang.Boolean exportAuditLogsToCloudWatch)
DatabaseClusterProps.getExportAuditLogsToCloudWatch()
exportAuditLogsToCloudWatch
- Whether the audit logs should be exported to CloudWatch.
Note that you also have to configure the audit log export in the Cluster's Parameter Group.this
public DatabaseClusterProps.Builder exportProfilerLogsToCloudWatch(java.lang.Boolean exportProfilerLogsToCloudWatch)
DatabaseClusterProps.getExportProfilerLogsToCloudWatch()
exportProfilerLogsToCloudWatch
- Whether the profiler logs should be exported to CloudWatch.
Note that you also have to configure the profiler log export in the Cluster's Parameter Group.this
public DatabaseClusterProps.Builder instanceIdentifierBase(java.lang.String instanceIdentifierBase)
DatabaseClusterProps.getInstanceIdentifierBase()
instanceIdentifierBase
- Base identifier for instances.
Every replica is named by appending the replica number to this string, 1-based.this
public DatabaseClusterProps.Builder instances(java.lang.Number instances)
DatabaseClusterProps.getInstances()
instances
- Number of DocDB compute instances.this
public DatabaseClusterProps.Builder kmsKey(IKey kmsKey)
DatabaseClusterProps.getKmsKey()
kmsKey
- The KMS key for storage encryption.this
public DatabaseClusterProps.Builder parameterGroup(IClusterParameterGroup parameterGroup)
DatabaseClusterProps.getParameterGroup()
parameterGroup
- The DB parameter group to associate with the instance.this
public DatabaseClusterProps.Builder port(java.lang.Number port)
DatabaseClusterProps.getPort()
port
- The port the DocumentDB cluster will listen on.this
public DatabaseClusterProps.Builder preferredMaintenanceWindow(java.lang.String preferredMaintenanceWindow)
DatabaseClusterProps.getPreferredMaintenanceWindow()
preferredMaintenanceWindow
- A weekly time range in which maintenance should preferably execute.
Must be at least 30 minutes long.
Example: 'tue:04:17-tue:04:47'
this
public DatabaseClusterProps.Builder removalPolicy(RemovalPolicy removalPolicy)
DatabaseClusterProps.getRemovalPolicy()
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
removal policy also applies to the implicit security group created for the
cluster if one is not supplied as a parameter.this
public DatabaseClusterProps.Builder securityGroup(ISecurityGroup securityGroup)
DatabaseClusterProps.getSecurityGroup()
securityGroup
- Security group.this
public DatabaseClusterProps.Builder storageEncrypted(java.lang.Boolean storageEncrypted)
DatabaseClusterProps.getStorageEncrypted()
storageEncrypted
- Whether to enable storage encryption.this
public DatabaseClusterProps.Builder vpcSubnets(SubnetSelection vpcSubnets)
DatabaseClusterProps.getVpcSubnets()
vpcSubnets
- Where to place the instances within the VPC.this
public DatabaseClusterProps build()
DatabaseClusterProps
java.lang.NullPointerException
- if any required attribute was not provided