Class ClusterProps.Builder
java.lang.Object
software.amazon.awscdk.services.redshift.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.clusterName(String clusterName) Sets the value ofClusterProps.getClusterName()clusterType(ClusterType clusterType) Sets the value ofClusterProps.getClusterType()defaultDatabaseName(String defaultDatabaseName) Sets the value ofClusterProps.getDefaultDatabaseName()Sets the value ofClusterProps.getEncrypted()encryptionKey(IKey encryptionKey) Sets the value ofClusterProps.getEncryptionKey()loggingBucket(IBucket loggingBucket) Sets the value ofClusterProps.getLoggingBucket()loggingKeyPrefix(String loggingKeyPrefix) Sets the value ofClusterProps.getLoggingKeyPrefix()masterUser(Login masterUser) Sets the value ofClusterProps.getMasterUser()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()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
-
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
-
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
-
loggingBucket
Sets the value ofClusterProps.getLoggingBucket()- Parameters:
loggingBucket- Bucket to send logs to. Logging information includes queries and connection attempts, for the specified Amazon Redshift cluster.- Returns:
this
-
loggingKeyPrefix
Sets the value ofClusterProps.getLoggingKeyPrefix()- Parameters:
loggingKeyPrefix- Prefix used for logging.- 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
-
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. Specify a maximum of 10 roles.- 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:
buildin interfacesoftware.amazon.jsii.Builder<ClusterProps>- Returns:
- a new instance of
ClusterProps - Throws:
NullPointerException- if any required attribute was not provided
-