public static final class CfnDBClusterProps.Builder
extends java.lang.Object
CfnDBClusterProps
Constructor and Description |
---|
Builder() |
public CfnDBClusterProps.Builder availabilityZones(java.util.List<java.lang.String> availabilityZones)
CfnDBClusterProps.getAvailabilityZones()
availabilityZones
- A list of Amazon EC2 Availability Zones that instances in the cluster can be created in.this
public CfnDBClusterProps.Builder backupRetentionPeriod(java.lang.Number backupRetentionPeriod)
CfnDBClusterProps.getBackupRetentionPeriod()
backupRetentionPeriod
- The number of days for which automated backups are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
this
public CfnDBClusterProps.Builder copyTagsToSnapshot(java.lang.Boolean copyTagsToSnapshot)
CfnDBClusterProps.getCopyTagsToSnapshot()
copyTagsToSnapshot
- `AWS::DocDB::DBCluster.CopyTagsToSnapshot`.this
public CfnDBClusterProps.Builder copyTagsToSnapshot(IResolvable copyTagsToSnapshot)
CfnDBClusterProps.getCopyTagsToSnapshot()
copyTagsToSnapshot
- `AWS::DocDB::DBCluster.CopyTagsToSnapshot`.this
public CfnDBClusterProps.Builder dbClusterIdentifier(java.lang.String dbClusterIdentifier)
CfnDBClusterProps.getDbClusterIdentifier()
dbClusterIdentifier
- The cluster identifier. This parameter is stored as a lowercase string.
Constraints:
Example: my-cluster
this
public CfnDBClusterProps.Builder dbClusterParameterGroupName(java.lang.String dbClusterParameterGroupName)
CfnDBClusterProps.getDbClusterParameterGroupName()
dbClusterParameterGroupName
- The name of the cluster parameter group to associate with this cluster.this
public CfnDBClusterProps.Builder dbSubnetGroupName(java.lang.String dbSubnetGroupName)
CfnDBClusterProps.getDbSubnetGroupName()
dbSubnetGroupName
- A subnet group to associate with this cluster.
Constraints: Must match the name of an existing DBSubnetGroup
. Must not be default.
Example: mySubnetgroup
this
public CfnDBClusterProps.Builder deletionProtection(java.lang.Boolean deletionProtection)
CfnDBClusterProps.getDeletionProtection()
deletionProtection
- Protects clusters from being accidentally deleted.
If enabled, the cluster cannot be deleted unless it is modified and DeletionProtection
is disabled.this
public CfnDBClusterProps.Builder deletionProtection(IResolvable deletionProtection)
CfnDBClusterProps.getDeletionProtection()
deletionProtection
- Protects clusters from being accidentally deleted.
If enabled, the cluster cannot be deleted unless it is modified and DeletionProtection
is disabled.this
public CfnDBClusterProps.Builder enableCloudwatchLogsExports(java.util.List<java.lang.String> enableCloudwatchLogsExports)
CfnDBClusterProps.getEnableCloudwatchLogsExports()
enableCloudwatchLogsExports
- The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs.
You can enable audit logs or profiler logs. For more information, see Auditing Amazon DocumentDB Events and Profiling Amazon DocumentDB Operations .this
public CfnDBClusterProps.Builder engineVersion(java.lang.String engineVersion)
CfnDBClusterProps.getEngineVersion()
engineVersion
- The version number of the database engine to use.
The --engine-version
will default to the latest major engine version. For production workloads, we recommend explicitly declaring this parameter with the intended major engine version.this
public CfnDBClusterProps.Builder kmsKeyId(java.lang.String kmsKeyId)
CfnDBClusterProps.getKmsKeyId()
kmsKeyId
- The AWS KMS key identifier for an encrypted cluster.
The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS KMS encryption key. If you are creating a cluster using the same AWS account that owns the AWS KMS encryption key that is used to encrypt the new cluster, you can use the AWS KMS key alias instead of the ARN for the AWS KMS encryption key.
If an encryption key is not specified in KmsKeyId
:
StorageEncrypted
parameter is true
, Amazon DocumentDB uses your default encryption key.AWS KMS creates the default encryption key for your AWS account . Your AWS account has a different default encryption key for each AWS Regions .
this
public CfnDBClusterProps.Builder masterUsername(java.lang.String masterUsername)
CfnDBClusterProps.getMasterUsername()
masterUsername
- The name of the master user for the cluster.
Constraints:
this
public CfnDBClusterProps.Builder masterUserPassword(java.lang.String masterUserPassword)
CfnDBClusterProps.getMasterUserPassword()
masterUserPassword
- The password for the master database user.
This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@).
Constraints: Must contain from 8 to 100 characters.
this
public CfnDBClusterProps.Builder port(java.lang.Number port)
CfnDBClusterProps.getPort()
port
- Specifies the port that the database engine is listening on.this
public CfnDBClusterProps.Builder preferredBackupWindow(java.lang.String preferredBackupWindow)
CfnDBClusterProps.getPreferredBackupWindow()
preferredBackupWindow
- The daily time range during which automated backups are created if automated backups are enabled using the `BackupRetentionPeriod` parameter.
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region .
Constraints:
hh24:mi-hh24:mi
.this
public CfnDBClusterProps.Builder preferredMaintenanceWindow(java.lang.String preferredMaintenanceWindow)
CfnDBClusterProps.getPreferredMaintenanceWindow()
preferredMaintenanceWindow
- The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ddd:hh24:mi-ddd:hh24:mi
The default is 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.
Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
this
public CfnDBClusterProps.Builder restoreToTime(java.lang.String restoreToTime)
CfnDBClusterProps.getRestoreToTime()
restoreToTime
- The date and time to restore the cluster to.
Valid values: A time in Universal Coordinated Time (UTC) format.
Constraints:
UseLatestRestorableTime
parameter is not provided.UseLatestRestorableTime
parameter is true
.RestoreType
parameter is copy-on-write
.
Example: 2015-03-07T23:45:00Z
this
public CfnDBClusterProps.Builder restoreType(java.lang.String restoreType)
CfnDBClusterProps.getRestoreType()
restoreType
- The type of restore to be performed. You can specify one of the following values:.
full-copy
- The new DB cluster is restored as a full copy of the source DB cluster.copy-on-write
- The new DB cluster is restored as a clone of the source DB cluster.
Constraints: You can't specify copy-on-write
if the engine version of the source DB cluster is earlier than 1.11.
If you don't specify a RestoreType
value, then the new DB cluster is restored as a full copy of the source DB cluster.
this
public CfnDBClusterProps.Builder snapshotIdentifier(java.lang.String snapshotIdentifier)
CfnDBClusterProps.getSnapshotIdentifier()
snapshotIdentifier
- The identifier for the snapshot or cluster snapshot to restore from.
You can use either the name or the Amazon Resource Name (ARN) to specify a cluster snapshot. However, you can use only the ARN to specify a snapshot.
Constraints:
this
public CfnDBClusterProps.Builder sourceDbClusterIdentifier(java.lang.String sourceDbClusterIdentifier)
CfnDBClusterProps.getSourceDbClusterIdentifier()
sourceDbClusterIdentifier
- The identifier of the source cluster from which to restore.
Constraints:
DBCluster
.this
public CfnDBClusterProps.Builder storageEncrypted(java.lang.Boolean storageEncrypted)
CfnDBClusterProps.getStorageEncrypted()
storageEncrypted
- Specifies whether the cluster is encrypted.this
public CfnDBClusterProps.Builder storageEncrypted(IResolvable storageEncrypted)
CfnDBClusterProps.getStorageEncrypted()
storageEncrypted
- Specifies whether the cluster is encrypted.this
public CfnDBClusterProps.Builder tags(java.util.List<? extends CfnTag> tags)
CfnDBClusterProps.getTags()
tags
- The tags to be assigned to the cluster.this
public CfnDBClusterProps.Builder useLatestRestorableTime(java.lang.Boolean useLatestRestorableTime)
CfnDBClusterProps.getUseLatestRestorableTime()
useLatestRestorableTime
- A value that is set to `true` to restore the cluster to the latest restorable backup time, and `false` otherwise.
Default: false
Constraints: Cannot be specified if the RestoreToTime
parameter is provided.
this
public CfnDBClusterProps.Builder useLatestRestorableTime(IResolvable useLatestRestorableTime)
CfnDBClusterProps.getUseLatestRestorableTime()
useLatestRestorableTime
- A value that is set to `true` to restore the cluster to the latest restorable backup time, and `false` otherwise.
Default: false
Constraints: Cannot be specified if the RestoreToTime
parameter is provided.
this
public CfnDBClusterProps.Builder vpcSecurityGroupIds(java.util.List<java.lang.String> vpcSecurityGroupIds)
CfnDBClusterProps.getVpcSecurityGroupIds()
vpcSecurityGroupIds
- A list of EC2 VPC security groups to associate with this cluster.this
public CfnDBClusterProps build()
CfnDBClusterProps
java.lang.NullPointerException
- if any required attribute was not provided