Class CfnDBClusterProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDBClusterProps>
- Enclosing interface:
CfnDBClusterProps
CfnDBClusterProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassociatedRoles
(List<? extends Object> associatedRoles) Sets the value ofCfnDBClusterProps.getAssociatedRoles()
associatedRoles
(IResolvable associatedRoles) Sets the value ofCfnDBClusterProps.getAssociatedRoles()
availabilityZones
(List<String> availabilityZones) Sets the value ofCfnDBClusterProps.getAvailabilityZones()
backupRetentionPeriod
(Number backupRetentionPeriod) Sets the value ofCfnDBClusterProps.getBackupRetentionPeriod()
build()
Builds the configured instance.copyTagsToSnapshot
(Boolean copyTagsToSnapshot) Sets the value ofCfnDBClusterProps.getCopyTagsToSnapshot()
copyTagsToSnapshot
(IResolvable copyTagsToSnapshot) Sets the value ofCfnDBClusterProps.getCopyTagsToSnapshot()
dbClusterIdentifier
(String dbClusterIdentifier) Sets the value ofCfnDBClusterProps.getDbClusterIdentifier()
dbClusterParameterGroupName
(String dbClusterParameterGroupName) Sets the value ofCfnDBClusterProps.getDbClusterParameterGroupName()
dbInstanceParameterGroupName
(String dbInstanceParameterGroupName) Sets the value ofCfnDBClusterProps.getDbInstanceParameterGroupName()
Sets the value ofCfnDBClusterProps.getDbPort()
dbSubnetGroupName
(String dbSubnetGroupName) Sets the value ofCfnDBClusterProps.getDbSubnetGroupName()
deletionProtection
(Boolean deletionProtection) Sets the value ofCfnDBClusterProps.getDeletionProtection()
deletionProtection
(IResolvable deletionProtection) Sets the value ofCfnDBClusterProps.getDeletionProtection()
enableCloudwatchLogsExports
(List<String> enableCloudwatchLogsExports) Sets the value ofCfnDBClusterProps.getEnableCloudwatchLogsExports()
engineVersion
(String engineVersion) Sets the value ofCfnDBClusterProps.getEngineVersion()
iamAuthEnabled
(Boolean iamAuthEnabled) Sets the value ofCfnDBClusterProps.getIamAuthEnabled()
iamAuthEnabled
(IResolvable iamAuthEnabled) Sets the value ofCfnDBClusterProps.getIamAuthEnabled()
Sets the value ofCfnDBClusterProps.getKmsKeyId()
preferredBackupWindow
(String preferredBackupWindow) Sets the value ofCfnDBClusterProps.getPreferredBackupWindow()
preferredMaintenanceWindow
(String preferredMaintenanceWindow) Sets the value ofCfnDBClusterProps.getPreferredMaintenanceWindow()
restoreToTime
(String restoreToTime) Sets the value ofCfnDBClusterProps.getRestoreToTime()
restoreType
(String restoreType) Sets the value ofCfnDBClusterProps.getRestoreType()
serverlessScalingConfiguration
(IResolvable serverlessScalingConfiguration) Sets the value ofCfnDBClusterProps.getServerlessScalingConfiguration()
serverlessScalingConfiguration
(CfnDBCluster.ServerlessScalingConfigurationProperty serverlessScalingConfiguration) Sets the value ofCfnDBClusterProps.getServerlessScalingConfiguration()
snapshotIdentifier
(String snapshotIdentifier) Sets the value ofCfnDBClusterProps.getSnapshotIdentifier()
sourceDbClusterIdentifier
(String sourceDbClusterIdentifier) Sets the value ofCfnDBClusterProps.getSourceDbClusterIdentifier()
storageEncrypted
(Boolean storageEncrypted) Sets the value ofCfnDBClusterProps.getStorageEncrypted()
storageEncrypted
(IResolvable storageEncrypted) Sets the value ofCfnDBClusterProps.getStorageEncrypted()
Sets the value ofCfnDBClusterProps.getTags()
useLatestRestorableTime
(Boolean useLatestRestorableTime) Sets the value ofCfnDBClusterProps.getUseLatestRestorableTime()
useLatestRestorableTime
(IResolvable useLatestRestorableTime) Sets the value ofCfnDBClusterProps.getUseLatestRestorableTime()
vpcSecurityGroupIds
(List<String> vpcSecurityGroupIds) Sets the value ofCfnDBClusterProps.getVpcSecurityGroupIds()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
associatedRoles
Sets the value ofCfnDBClusterProps.getAssociatedRoles()
- Parameters:
associatedRoles
- Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf.- Returns:
this
-
associatedRoles
@Stability(Stable) public CfnDBClusterProps.Builder associatedRoles(List<? extends Object> associatedRoles) Sets the value ofCfnDBClusterProps.getAssociatedRoles()
- Parameters:
associatedRoles
- Provides a list of the Amazon Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon services on your behalf.- Returns:
this
-
availabilityZones
@Stability(Stable) public CfnDBClusterProps.Builder availabilityZones(List<String> availabilityZones) Sets the value ofCfnDBClusterProps.getAvailabilityZones()
- Parameters:
availabilityZones
- Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.- Returns:
this
-
backupRetentionPeriod
@Stability(Stable) public CfnDBClusterProps.Builder backupRetentionPeriod(Number backupRetentionPeriod) Sets the value ofCfnDBClusterProps.getBackupRetentionPeriod()
- Parameters:
backupRetentionPeriod
- Specifies the number of days for which automatic DB snapshots are retained. An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.- Returns:
this
-
copyTagsToSnapshot
Sets the value ofCfnDBClusterProps.getCopyTagsToSnapshot()
- Parameters:
copyTagsToSnapshot
- If set totrue
, tags are copied to any snapshot of the DB cluster that is created..- Returns:
this
-
copyTagsToSnapshot
@Stability(Stable) public CfnDBClusterProps.Builder copyTagsToSnapshot(IResolvable copyTagsToSnapshot) Sets the value ofCfnDBClusterProps.getCopyTagsToSnapshot()
- Parameters:
copyTagsToSnapshot
- If set totrue
, tags are copied to any snapshot of the DB cluster that is created..- Returns:
this
-
dbClusterIdentifier
Sets the value ofCfnDBClusterProps.getDbClusterIdentifier()
- Parameters:
dbClusterIdentifier
- Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.- Returns:
this
-
dbClusterParameterGroupName
@Stability(Stable) public CfnDBClusterProps.Builder dbClusterParameterGroupName(String dbClusterParameterGroupName) Sets the value ofCfnDBClusterProps.getDbClusterParameterGroupName()
- Parameters:
dbClusterParameterGroupName
- Provides the name of the DB cluster parameter group. An update may require some interruption. See ModifyDBInstance in the Amazon Neptune User Guide for more information.- Returns:
this
-
dbInstanceParameterGroupName
@Stability(Stable) public CfnDBClusterProps.Builder dbInstanceParameterGroupName(String dbInstanceParameterGroupName) Sets the value ofCfnDBClusterProps.getDbInstanceParameterGroupName()
- Parameters:
dbInstanceParameterGroupName
- The name of the DB parameter group to apply to all instances of the DB cluster. Used only in case of a major engine version upgrade requestNote that when you apply a parameter group using
DBInstanceParameterGroupName
, parameter changes are applied immediately, not during the next maintenance window.Constraints - The DB parameter group must be in the same DB parameter group family as the target DB cluster version.
- The
DBInstanceParameterGroupName
parameter is only valid for major engine version upgrades.
- The
- Returns:
this
-
dbPort
Sets the value ofCfnDBClusterProps.getDbPort()
- Parameters:
dbPort
- The port number on which the DB instances in the DB cluster accept connections. If not specified, the default port used is8182
.The
Port
property will soon be deprecated. Please update existing templates to use the newDBPort
property that has the same functionality.- Returns:
this
-
dbSubnetGroupName
Sets the value ofCfnDBClusterProps.getDbSubnetGroupName()
- Parameters:
dbSubnetGroupName
- Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.- Returns:
this
-
deletionProtection
Sets the value ofCfnDBClusterProps.getDeletionProtection()
- Parameters:
deletionProtection
- Indicates whether or not the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled.- Returns:
this
-
deletionProtection
@Stability(Stable) public CfnDBClusterProps.Builder deletionProtection(IResolvable deletionProtection) Sets the value ofCfnDBClusterProps.getDeletionProtection()
- Parameters:
deletionProtection
- Indicates whether or not the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled.- Returns:
this
-
enableCloudwatchLogsExports
@Stability(Stable) public CfnDBClusterProps.Builder enableCloudwatchLogsExports(List<String> enableCloudwatchLogsExports) Sets the value ofCfnDBClusterProps.getEnableCloudwatchLogsExports()
- Parameters:
enableCloudwatchLogsExports
- Specifies a list of log types that are enabled for export to CloudWatch Logs.- Returns:
this
-
engineVersion
Sets the value ofCfnDBClusterProps.getEngineVersion()
- Parameters:
engineVersion
- Indicates the database engine version.- Returns:
this
-
iamAuthEnabled
Sets the value ofCfnDBClusterProps.getIamAuthEnabled()
- Parameters:
iamAuthEnabled
- True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.- Returns:
this
-
iamAuthEnabled
Sets the value ofCfnDBClusterProps.getIamAuthEnabled()
- Parameters:
iamAuthEnabled
- True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.- Returns:
this
-
kmsKeyId
Sets the value ofCfnDBClusterProps.getKmsKeyId()
- Parameters:
kmsKeyId
- The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the database instances in the DB cluster, such asarn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
. If you enable theStorageEncrypted
property but don't specify this property, the default KMS key is used. If you specify this property, you must set theStorageEncrypted
property totrue
.- Returns:
this
-
preferredBackupWindow
@Stability(Stable) public CfnDBClusterProps.Builder preferredBackupWindow(String preferredBackupWindow) Sets the value ofCfnDBClusterProps.getPreferredBackupWindow()
- Parameters:
preferredBackupWindow
- Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by theBackupRetentionPeriod
. An update may require some interruption.- Returns:
this
-
preferredMaintenanceWindow
@Stability(Stable) public CfnDBClusterProps.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow) Sets the value ofCfnDBClusterProps.getPreferredMaintenanceWindow()
- Parameters:
preferredMaintenanceWindow
- Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).- Returns:
this
-
restoreToTime
Sets the value ofCfnDBClusterProps.getRestoreToTime()
- Parameters:
restoreToTime
- Creates a new DB cluster from a DB snapshot or DB cluster snapshot. If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
- Returns:
this
-
restoreType
Sets the value ofCfnDBClusterProps.getRestoreType()
- Parameters:
restoreType
- Creates a new DB cluster from a DB snapshot or DB cluster snapshot. If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
- Returns:
this
-
serverlessScalingConfiguration
@Stability(Stable) public CfnDBClusterProps.Builder serverlessScalingConfiguration(IResolvable serverlessScalingConfiguration) Sets the value ofCfnDBClusterProps.getServerlessScalingConfiguration()
- Parameters:
serverlessScalingConfiguration
- Contains the scaling configuration of an Neptune Serverless DB cluster.- Returns:
this
-
serverlessScalingConfiguration
@Stability(Stable) public CfnDBClusterProps.Builder serverlessScalingConfiguration(CfnDBCluster.ServerlessScalingConfigurationProperty serverlessScalingConfiguration) Sets the value ofCfnDBClusterProps.getServerlessScalingConfiguration()
- Parameters:
serverlessScalingConfiguration
- Contains the scaling configuration of an Neptune Serverless DB cluster.- Returns:
this
-
snapshotIdentifier
Sets the value ofCfnDBClusterProps.getSnapshotIdentifier()
- Parameters:
snapshotIdentifier
- Specifies the identifier for a DB cluster snapshot. Must match the identifier of an existing snapshot. After you restore a DB cluster using aSnapshotIdentifier
, you must specify the sameSnapshotIdentifier
for any future updates to the DB cluster. When you specify this property for an update, the DB cluster is not restored from the snapshot again, and the data in the database is not changed.However, if you don't specify the
SnapshotIdentifier
, an empty DB cluster is created, and the original DB cluster is deleted. If you specify a property that is different from the previous snapshot restore property, the DB cluster is restored from the snapshot specified by theSnapshotIdentifier
, and the original DB cluster is deleted.- Returns:
this
-
sourceDbClusterIdentifier
@Stability(Stable) public CfnDBClusterProps.Builder sourceDbClusterIdentifier(String sourceDbClusterIdentifier) Sets the value ofCfnDBClusterProps.getSourceDbClusterIdentifier()
- Parameters:
sourceDbClusterIdentifier
- Creates a new DB cluster from a DB snapshot or DB cluster snapshot. If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
- Returns:
this
-
storageEncrypted
Sets the value ofCfnDBClusterProps.getStorageEncrypted()
- Parameters:
storageEncrypted
- Indicates whether the DB cluster is encrypted. If you specify theKmsKeyId
property, then you must enable encryption and set this property totrue
.If you enable the
StorageEncrypted
property but don't specify theKmsKeyId
property, then the default KMS key is used. If you specify theKmsKeyId
property, then that KMS key is used to encrypt the database instances in the DB cluster.If you specify the
SourceDBClusterIdentifier
property, and don't specify this property or disable it, the value is inherited from the source DB cluster. If the source DB cluster is encrypted, theKmsKeyId
property from the source cluster is used.If you specify the
DBSnapshotIdentifier
and don't specify this property or disable it, the value is inherited from the snapshot and the specifiedKmsKeyId
property from the snapshot is used.- Returns:
this
-
storageEncrypted
Sets the value ofCfnDBClusterProps.getStorageEncrypted()
- Parameters:
storageEncrypted
- Indicates whether the DB cluster is encrypted. If you specify theKmsKeyId
property, then you must enable encryption and set this property totrue
.If you enable the
StorageEncrypted
property but don't specify theKmsKeyId
property, then the default KMS key is used. If you specify theKmsKeyId
property, then that KMS key is used to encrypt the database instances in the DB cluster.If you specify the
SourceDBClusterIdentifier
property, and don't specify this property or disable it, the value is inherited from the source DB cluster. If the source DB cluster is encrypted, theKmsKeyId
property from the source cluster is used.If you specify the
DBSnapshotIdentifier
and don't specify this property or disable it, the value is inherited from the snapshot and the specifiedKmsKeyId
property from the snapshot is used.- Returns:
this
-
tags
Sets the value ofCfnDBClusterProps.getTags()
- Parameters:
tags
- The tags assigned to this cluster.- Returns:
this
-
useLatestRestorableTime
@Stability(Stable) public CfnDBClusterProps.Builder useLatestRestorableTime(Boolean useLatestRestorableTime) Sets the value ofCfnDBClusterProps.getUseLatestRestorableTime()
- Parameters:
useLatestRestorableTime
- Creates a new DB cluster from a DB snapshot or DB cluster snapshot. If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
- Returns:
this
-
useLatestRestorableTime
@Stability(Stable) public CfnDBClusterProps.Builder useLatestRestorableTime(IResolvable useLatestRestorableTime) Sets the value ofCfnDBClusterProps.getUseLatestRestorableTime()
- Parameters:
useLatestRestorableTime
- Creates a new DB cluster from a DB snapshot or DB cluster snapshot. If a DB snapshot is specified, the target DB cluster is created from the source DB snapshot with a default configuration and default security group.If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point with the same configuration as the original source DB cluster, except that the new DB cluster is created with the default security group.
- Returns:
this
-
vpcSecurityGroupIds
@Stability(Stable) public CfnDBClusterProps.Builder vpcSecurityGroupIds(List<String> vpcSecurityGroupIds) Sets the value ofCfnDBClusterProps.getVpcSecurityGroupIds()
- Parameters:
vpcSecurityGroupIds
- Provides a list of VPC security groups that the DB cluster belongs to.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnDBClusterProps>
- Returns:
- a new instance of
CfnDBClusterProps
- Throws:
NullPointerException
- if any required attribute was not provided
-