Class DatabaseClusterProps.Builder
java.lang.Object
software.amazon.awscdk.services.neptune.alpha.DatabaseClusterProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DatabaseClusterProps>
- Enclosing interface:
DatabaseClusterProps
@Stability(Experimental)
public static final class DatabaseClusterProps.Builder
extends Object
implements software.amazon.jsii.Builder<DatabaseClusterProps>
A builder for
DatabaseClusterProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassociatedRoles
(List<? extends IRole> associatedRoles) Sets the value ofDatabaseClusterProps.getAssociatedRoles()
autoMinorVersionUpgrade
(Boolean autoMinorVersionUpgrade) Sets the value ofDatabaseClusterProps.getAutoMinorVersionUpgrade()
backupRetention
(Duration backupRetention) Sets the value ofDatabaseClusterProps.getBackupRetention()
build()
Builds the configured instance.cloudwatchLogsExports
(List<? extends LogType> cloudwatchLogsExports) Sets the value ofDatabaseClusterProps.getCloudwatchLogsExports()
cloudwatchLogsRetention
(RetentionDays cloudwatchLogsRetention) Sets the value ofDatabaseClusterProps.getCloudwatchLogsRetention()
cloudwatchLogsRetentionRole
(IRole cloudwatchLogsRetentionRole) Sets the value ofDatabaseClusterProps.getCloudwatchLogsRetentionRole()
clusterParameterGroup
(IClusterParameterGroup clusterParameterGroup) Sets the value ofDatabaseClusterProps.getClusterParameterGroup()
copyTagsToSnapshot
(Boolean copyTagsToSnapshot) Sets the value ofDatabaseClusterProps.getCopyTagsToSnapshot()
dbClusterName
(String dbClusterName) Sets the value ofDatabaseClusterProps.getDbClusterName()
deletionProtection
(Boolean deletionProtection) Sets the value ofDatabaseClusterProps.getDeletionProtection()
engineVersion
(EngineVersion engineVersion) Sets the value ofDatabaseClusterProps.getEngineVersion()
iamAuthentication
(Boolean iamAuthentication) Sets the value ofDatabaseClusterProps.getIamAuthentication()
instanceIdentifierBase
(String instanceIdentifierBase) Sets the value ofDatabaseClusterProps.getInstanceIdentifierBase()
Sets the value ofDatabaseClusterProps.getInstances()
instanceType
(InstanceType instanceType) Sets the value ofDatabaseClusterProps.getInstanceType()
Sets the value ofDatabaseClusterProps.getKmsKey()
parameterGroup
(IParameterGroup parameterGroup) Sets the value ofDatabaseClusterProps.getParameterGroup()
Sets the value ofDatabaseClusterProps.getPort()
preferredBackupWindow
(String preferredBackupWindow) Sets the value ofDatabaseClusterProps.getPreferredBackupWindow()
preferredMaintenanceWindow
(String preferredMaintenanceWindow) Sets the value ofDatabaseClusterProps.getPreferredMaintenanceWindow()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofDatabaseClusterProps.getRemovalPolicy()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofDatabaseClusterProps.getSecurityGroups()
serverlessScalingConfiguration
(ServerlessScalingConfiguration serverlessScalingConfiguration) Sets the value ofDatabaseClusterProps.getServerlessScalingConfiguration()
storageEncrypted
(Boolean storageEncrypted) Sets the value ofDatabaseClusterProps.getStorageEncrypted()
subnetGroup
(ISubnetGroup subnetGroup) Sets the value ofDatabaseClusterProps.getSubnetGroup()
Sets the value ofDatabaseClusterProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofDatabaseClusterProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceType
@Stability(Experimental) public DatabaseClusterProps.Builder instanceType(InstanceType instanceType) Sets the value ofDatabaseClusterProps.getInstanceType()
- Parameters:
instanceType
- What type of instance to start for the replicas. This parameter is required.- Returns:
this
-
vpc
Sets the value ofDatabaseClusterProps.getVpc()
- Parameters:
vpc
- What subnets to run the Neptune instances in. This parameter is required. Must be at least 2 subnets in two different AZs.- Returns:
this
-
associatedRoles
@Stability(Experimental) public DatabaseClusterProps.Builder associatedRoles(List<? extends IRole> associatedRoles) Sets the value ofDatabaseClusterProps.getAssociatedRoles()
- Parameters:
associatedRoles
- A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services.- Returns:
this
-
autoMinorVersionUpgrade
@Stability(Experimental) public DatabaseClusterProps.Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) Sets the value ofDatabaseClusterProps.getAutoMinorVersionUpgrade()
- Parameters:
autoMinorVersionUpgrade
- If set to true, Neptune will automatically update the engine of the entire cluster to the latest minor version after a stabilization window of 2 to 3 weeks.- Returns:
this
-
backupRetention
@Stability(Experimental) public DatabaseClusterProps.Builder backupRetention(Duration backupRetention) Sets the value ofDatabaseClusterProps.getBackupRetention()
- Parameters:
backupRetention
- How many days to retain the backup.- Returns:
this
-
cloudwatchLogsExports
@Stability(Experimental) public DatabaseClusterProps.Builder cloudwatchLogsExports(List<? extends LogType> cloudwatchLogsExports) Sets the value ofDatabaseClusterProps.getCloudwatchLogsExports()
- Parameters:
cloudwatchLogsExports
- The list of log types that need to be enabled for exporting to CloudWatch Logs.- Returns:
this
-
cloudwatchLogsRetention
@Stability(Experimental) public DatabaseClusterProps.Builder cloudwatchLogsRetention(RetentionDays cloudwatchLogsRetention) Sets the value ofDatabaseClusterProps.getCloudwatchLogsRetention()
- Parameters:
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 toInfinity
.- Returns:
this
-
cloudwatchLogsRetentionRole
@Stability(Experimental) public DatabaseClusterProps.Builder cloudwatchLogsRetentionRole(IRole cloudwatchLogsRetentionRole) Sets the value ofDatabaseClusterProps.getCloudwatchLogsRetentionRole()
- Parameters:
cloudwatchLogsRetentionRole
- The IAM role for the Lambda function associated with the custom resource that sets the retention policy.- Returns:
this
-
clusterParameterGroup
@Stability(Experimental) public DatabaseClusterProps.Builder clusterParameterGroup(IClusterParameterGroup clusterParameterGroup) Sets the value ofDatabaseClusterProps.getClusterParameterGroup()
- Parameters:
clusterParameterGroup
- Additional parameters to pass to the database engine.- Returns:
this
-
copyTagsToSnapshot
@Stability(Experimental) public DatabaseClusterProps.Builder copyTagsToSnapshot(Boolean copyTagsToSnapshot) Sets the value ofDatabaseClusterProps.getCopyTagsToSnapshot()
- Parameters:
copyTagsToSnapshot
- Whether to copy tags to the snapshot when a snapshot is created.- Returns:
this
-
dbClusterName
Sets the value ofDatabaseClusterProps.getDbClusterName()
- Parameters:
dbClusterName
- An optional identifier for the cluster.- Returns:
this
-
deletionProtection
@Stability(Experimental) public DatabaseClusterProps.Builder deletionProtection(Boolean deletionProtection) Sets the value ofDatabaseClusterProps.getDeletionProtection()
- Parameters:
deletionProtection
- Indicates whether the DB cluster should have deletion protection enabled.- Returns:
this
-
engineVersion
@Stability(Experimental) public DatabaseClusterProps.Builder engineVersion(EngineVersion engineVersion) Sets the value ofDatabaseClusterProps.getEngineVersion()
- Parameters:
engineVersion
- What version of the database to start.- Returns:
this
-
iamAuthentication
@Stability(Experimental) public DatabaseClusterProps.Builder iamAuthentication(Boolean iamAuthentication) Sets the value ofDatabaseClusterProps.getIamAuthentication()
- Parameters:
iamAuthentication
- Map AWS Identity and Access Management (IAM) accounts to database accounts.- Returns:
this
-
instanceIdentifierBase
@Stability(Experimental) public DatabaseClusterProps.Builder instanceIdentifierBase(String instanceIdentifierBase) Sets the value ofDatabaseClusterProps.getInstanceIdentifierBase()
- Parameters:
instanceIdentifierBase
- Base identifier for instances. Every replica is named by appending the replica number to this string, 1-based.- Returns:
this
-
instances
Sets the value ofDatabaseClusterProps.getInstances()
- Parameters:
instances
- Number of Neptune compute instances.- Returns:
this
-
kmsKey
Sets the value ofDatabaseClusterProps.getKmsKey()
- Parameters:
kmsKey
- The KMS key for storage encryption.- Returns:
this
-
parameterGroup
@Stability(Experimental) public DatabaseClusterProps.Builder parameterGroup(IParameterGroup parameterGroup) Sets the value ofDatabaseClusterProps.getParameterGroup()
- Parameters:
parameterGroup
- The DB parameter group to associate with the instance.- Returns:
this
-
port
Sets the value ofDatabaseClusterProps.getPort()
- Parameters:
port
- The port number on which the DB instances in the DB cluster accept connections.- Returns:
this
-
preferredBackupWindow
@Stability(Experimental) public DatabaseClusterProps.Builder preferredBackupWindow(String preferredBackupWindow) Sets the value ofDatabaseClusterProps.getPreferredBackupWindow()
- Parameters:
preferredBackupWindow
- A daily time range in 24-hours UTC format in which backups preferably execute. Must be at least 30 minutes long.Example: '01:00-02:00'
- Returns:
this
-
preferredMaintenanceWindow
@Stability(Experimental) public DatabaseClusterProps.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow) Sets the value ofDatabaseClusterProps.getPreferredMaintenanceWindow()
- Parameters:
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'
- Returns:
this
-
removalPolicy
@Stability(Experimental) public DatabaseClusterProps.Builder removalPolicy(RemovalPolicy removalPolicy) Sets the value ofDatabaseClusterProps.getRemovalPolicy()
- Parameters:
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.- Returns:
this
-
securityGroups
@Stability(Experimental) public DatabaseClusterProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofDatabaseClusterProps.getSecurityGroups()
- Parameters:
securityGroups
- Security group.- Returns:
this
-
serverlessScalingConfiguration
@Stability(Experimental) public DatabaseClusterProps.Builder serverlessScalingConfiguration(ServerlessScalingConfiguration serverlessScalingConfiguration) Sets the value ofDatabaseClusterProps.getServerlessScalingConfiguration()
- Parameters:
serverlessScalingConfiguration
- Specify minimum and maximum NCUs capacity for a serverless cluster. See https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-capacity-scaling.html- Returns:
this
-
storageEncrypted
@Stability(Experimental) public DatabaseClusterProps.Builder storageEncrypted(Boolean storageEncrypted) Sets the value ofDatabaseClusterProps.getStorageEncrypted()
- Parameters:
storageEncrypted
- Whether to enable storage encryption.- Returns:
this
-
subnetGroup
Sets the value ofDatabaseClusterProps.getSubnetGroup()
- Parameters:
subnetGroup
- Existing subnet group for the cluster.- Returns:
this
-
vpcSubnets
Sets the value ofDatabaseClusterProps.getVpcSubnets()
- Parameters:
vpcSubnets
- Where to place the instances within the VPC.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DatabaseClusterProps>
- Returns:
- a new instance of
DatabaseClusterProps
- Throws:
NullPointerException
- if any required attribute was not provided
-