Class ClusterProps.Builder
java.lang.Object
software.amazon.awscdk.services.redshift.alpha.ClusterProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ClusterProps>
- Enclosing interface:
ClusterProps
@Stability(Experimental)
public static final class ClusterProps.Builder
extends Object
implements software.amazon.jsii.Builder<ClusterProps>
A builder for
ClusterProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.classicResizing
(Boolean classicResizing) Sets the value ofClusterProps.getClassicResizing()
clusterName
(String clusterName) Sets the value ofClusterProps.getClusterName()
clusterType
(ClusterType clusterType) Sets the value ofClusterProps.getClusterType()
defaultDatabaseName
(String defaultDatabaseName) Sets the value ofClusterProps.getDefaultDatabaseName()
defaultRole
(IRole defaultRole) Sets the value ofClusterProps.getDefaultRole()
Sets the value ofClusterProps.getElasticIp()
Sets the value ofClusterProps.getEncrypted()
encryptionKey
(IKey encryptionKey) Sets the value ofClusterProps.getEncryptionKey()
enhancedVpcRouting
(Boolean enhancedVpcRouting) Sets the value ofClusterProps.getEnhancedVpcRouting()
loggingProperties
(LoggingProperties loggingProperties) Sets the value ofClusterProps.getLoggingProperties()
masterUser
(Login masterUser) Sets the value ofClusterProps.getMasterUser()
Sets the value ofClusterProps.getMultiAz()
Sets the value ofClusterProps.getNodeType()
numberOfNodes
(Number numberOfNodes) Sets the value ofClusterProps.getNumberOfNodes()
parameterGroup
(IClusterParameterGroup parameterGroup) Sets the value ofClusterProps.getParameterGroup()
Sets the value ofClusterProps.getPort()
preferredMaintenanceWindow
(String preferredMaintenanceWindow) Sets the value ofClusterProps.getPreferredMaintenanceWindow()
publiclyAccessible
(Boolean publiclyAccessible) Sets the value ofClusterProps.getPubliclyAccessible()
rebootForParameterChanges
(Boolean rebootForParameterChanges) Sets the value ofClusterProps.getRebootForParameterChanges()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofClusterProps.getRemovalPolicy()
Sets the value ofClusterProps.getRoles()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofClusterProps.getSecurityGroups()
subnetGroup
(IClusterSubnetGroup subnetGroup) Sets the value ofClusterProps.getSubnetGroup()
Sets the value ofClusterProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofClusterProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
masterUser
Sets the value ofClusterProps.getMasterUser()
- Parameters:
masterUser
- Username and password for the administrative user. This parameter is required.- Returns:
this
-
vpc
Sets the value ofClusterProps.getVpc()
- Parameters:
vpc
- The VPC to place the cluster in. This parameter is required.- Returns:
this
-
classicResizing
Sets the value ofClusterProps.getClassicResizing()
- Parameters:
classicResizing
- If this flag is set, the cluster resizing type will be set to classic. When resizing a cluster, classic resizing will always provision a new cluster and transfer the data there.Classic resize takes more time to complete, but it can be useful in cases where the change in node count or the node type to migrate to doesn't fall within the bounds for elastic resize.
- Returns:
this
-
clusterName
Sets the value ofClusterProps.getClusterName()
- Parameters:
clusterName
- An optional identifier for the cluster.- Returns:
this
-
clusterType
Sets the value ofClusterProps.getClusterType()
- Parameters:
clusterType
- Settings for the individual instances that are launched.- Returns:
this
-
defaultDatabaseName
@Stability(Experimental) public ClusterProps.Builder defaultDatabaseName(String defaultDatabaseName) Sets the value ofClusterProps.getDefaultDatabaseName()
- Parameters:
defaultDatabaseName
- Name of a database which is automatically created inside the cluster.- Returns:
this
-
defaultRole
Sets the value ofClusterProps.getDefaultRole()
- Parameters:
defaultRole
- A single AWS Identity and Access Management (IAM) role to be used as the default role for the cluster. The default role must be included in the roles list.- Returns:
this
-
elasticIp
Sets the value ofClusterProps.getElasticIp()
- Parameters:
elasticIp
- The Elastic IP (EIP) address for the cluster.- Returns:
this
-
encrypted
Sets the value ofClusterProps.getEncrypted()
- Parameters:
encrypted
- Whether to enable encryption of data at rest in the cluster.- Returns:
this
-
encryptionKey
Sets the value ofClusterProps.getEncryptionKey()
- Parameters:
encryptionKey
- The KMS key to use for encryption of data at rest.- Returns:
this
-
enhancedVpcRouting
Sets the value ofClusterProps.getEnhancedVpcRouting()
- Parameters:
enhancedVpcRouting
- If this flag is set, Amazon Redshift forces all COPY and UNLOAD traffic between your cluster and your data repositories through your virtual private cloud (VPC).- Returns:
this
-
loggingProperties
@Stability(Experimental) public ClusterProps.Builder loggingProperties(LoggingProperties loggingProperties) Sets the value ofClusterProps.getLoggingProperties()
- Parameters:
loggingProperties
- Bucket details for log files to be sent to, including prefix.- Returns:
this
-
multiAz
Sets the value ofClusterProps.getMultiAz()
- Parameters:
multiAz
- Indicating whether Amazon Redshift should deploy the cluster in two Availability Zones.- Returns:
this
-
nodeType
Sets the value ofClusterProps.getNodeType()
- Parameters:
nodeType
- The node type to be provisioned for the cluster.- Returns:
this
-
numberOfNodes
Sets the value ofClusterProps.getNumberOfNodes()
- Parameters:
numberOfNodes
- Number of compute nodes in the cluster. Only specify this property for multi-node clusters. Value must be at least 2 and no more than 100.- Returns:
this
-
parameterGroup
@Stability(Experimental) public ClusterProps.Builder parameterGroup(IClusterParameterGroup parameterGroup) Sets the value ofClusterProps.getParameterGroup()
- Parameters:
parameterGroup
- Additional parameters to pass to the database engine https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html.- Returns:
this
-
port
Sets the value ofClusterProps.getPort()
- Parameters:
port
- What port to listen on.- Returns:
this
-
preferredMaintenanceWindow
@Stability(Experimental) public ClusterProps.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow) Sets the value ofClusterProps.getPreferredMaintenanceWindow()
- Parameters:
preferredMaintenanceWindow
- A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). Example: 'Sun:23:45-Mon:00:15'- Returns:
this
-
publiclyAccessible
Sets the value ofClusterProps.getPubliclyAccessible()
- Parameters:
publiclyAccessible
- Whether to make cluster publicly accessible.- Returns:
this
-
rebootForParameterChanges
@Stability(Experimental) public ClusterProps.Builder rebootForParameterChanges(Boolean rebootForParameterChanges) Sets the value ofClusterProps.getRebootForParameterChanges()
- Parameters:
rebootForParameterChanges
- If this flag is set, the cluster will be rebooted when changes to the cluster's parameter group that require a restart to apply.- Returns:
this
-
removalPolicy
Sets the value ofClusterProps.getRemovalPolicy()
- Parameters:
removalPolicy
- The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.- Returns:
this
-
roles
Sets the value ofClusterProps.getRoles()
- Parameters:
roles
- A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services. The maximum number of roles to attach to a cluster is subject to a quota.- Returns:
this
-
securityGroups
@Stability(Experimental) public ClusterProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofClusterProps.getSecurityGroups()
- Parameters:
securityGroups
- Security group.- Returns:
this
-
subnetGroup
Sets the value ofClusterProps.getSubnetGroup()
- Parameters:
subnetGroup
- A cluster subnet group to use with this cluster.- Returns:
this
-
vpcSubnets
Sets the value ofClusterProps.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<ClusterProps>
- Returns:
- a new instance of
ClusterProps
- Throws:
NullPointerException
- if any required attribute was not provided
-