Class Cluster.Builder

java.lang.Object
software.amazon.awscdk.services.redshift.alpha.Cluster.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Cluster>
Enclosing class:
Cluster

@Stability(Experimental) public static final class Cluster.Builder extends Object implements software.amazon.jsii.Builder<Cluster>
(experimental) A fluent builder for Cluster.
  • Method Details

    • create

      @Stability(Experimental) public static Cluster.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Cluster.Builder.
    • masterUser

      @Stability(Experimental) public Cluster.Builder masterUser(Login masterUser)
      (experimental) Username and password for the administrative user.

      Parameters:
      masterUser - Username and password for the administrative user. This parameter is required.
      Returns:
      this
    • vpc

      @Stability(Experimental) public Cluster.Builder vpc(IVpc vpc)
      (experimental) The VPC to place the cluster in.

      Parameters:
      vpc - The VPC to place the cluster in. This parameter is required.
      Returns:
      this
    • classicResizing

      @Stability(Experimental) public Cluster.Builder classicResizing(Boolean classicResizing)
      (experimental) 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.

      Default: - Elastic resize type

      Parameters:
      classicResizing - If this flag is set, the cluster resizing type will be set to classic. This parameter is required.
      Returns:
      this
      See Also:
    • clusterName

      @Stability(Experimental) public Cluster.Builder clusterName(String clusterName)
      (experimental) An optional identifier for the cluster.

      Default: - A name is automatically generated.

      Parameters:
      clusterName - An optional identifier for the cluster. This parameter is required.
      Returns:
      this
    • clusterType

      @Stability(Experimental) public Cluster.Builder clusterType(ClusterType clusterType)
      (experimental) Settings for the individual instances that are launched.

      Default: `ClusterType.MULTI_NODE`

      Parameters:
      clusterType - Settings for the individual instances that are launched. This parameter is required.
      Returns:
      this
    • defaultDatabaseName

      @Stability(Experimental) public Cluster.Builder defaultDatabaseName(String defaultDatabaseName)
      (experimental) Name of a database which is automatically created inside the cluster.

      Default: - default_db

      Parameters:
      defaultDatabaseName - Name of a database which is automatically created inside the cluster. This parameter is required.
      Returns:
      this
    • defaultRole

      @Stability(Experimental) public Cluster.Builder defaultRole(IRole defaultRole)
      (experimental) 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.

      Default: - No default role is specified for the cluster.

      Parameters:
      defaultRole - A single AWS Identity and Access Management (IAM) role to be used as the default role for the cluster. This parameter is required.
      Returns:
      this
    • elasticIp

      @Stability(Experimental) public Cluster.Builder elasticIp(String elasticIp)
      (experimental) The Elastic IP (EIP) address for the cluster.

      Default: - No Elastic IP

      Parameters:
      elasticIp - The Elastic IP (EIP) address for the cluster. This parameter is required.
      Returns:
      this
      See Also:
    • encrypted

      @Stability(Experimental) public Cluster.Builder encrypted(Boolean encrypted)
      (experimental) Whether to enable encryption of data at rest in the cluster.

      Default: true

      Parameters:
      encrypted - Whether to enable encryption of data at rest in the cluster. This parameter is required.
      Returns:
      this
    • encryptionKey

      @Stability(Experimental) public Cluster.Builder encryptionKey(IKey encryptionKey)
      (experimental) The KMS key to use for encryption of data at rest.

      Default: - AWS-managed key, if encryption at rest is enabled

      Parameters:
      encryptionKey - The KMS key to use for encryption of data at rest. This parameter is required.
      Returns:
      this
    • enhancedVpcRouting

      @Stability(Experimental) public Cluster.Builder enhancedVpcRouting(Boolean enhancedVpcRouting)
      (experimental) 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).

      Default: - false

      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). This parameter is required.
      Returns:
      this
      See Also:
    • loggingProperties

      @Stability(Experimental) public Cluster.Builder loggingProperties(LoggingProperties loggingProperties)
      (experimental) Bucket details for log files to be sent to, including prefix.

      Default: - No logging bucket is used

      Parameters:
      loggingProperties - Bucket details for log files to be sent to, including prefix. This parameter is required.
      Returns:
      this
    • multiAz

      @Stability(Experimental) public Cluster.Builder multiAz(Boolean multiAz)
      (experimental) Indicating whether Amazon Redshift should deploy the cluster in two Availability Zones.

      Default: - false

      Parameters:
      multiAz - Indicating whether Amazon Redshift should deploy the cluster in two Availability Zones. This parameter is required.
      Returns:
      this
    • nodeType

      @Stability(Experimental) public Cluster.Builder nodeType(NodeType nodeType)
      (experimental) The node type to be provisioned for the cluster.

      Default: `NodeType.DC2_LARGE`

      Parameters:
      nodeType - The node type to be provisioned for the cluster. This parameter is required.
      Returns:
      this
    • numberOfNodes

      @Stability(Experimental) public Cluster.Builder numberOfNodes(Number numberOfNodes)
      (experimental) 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.

      Default: - 2 if `clusterType` is ClusterType.MULTI_NODE, undefined otherwise

      Parameters:
      numberOfNodes - Number of compute nodes in the cluster. Only specify this property for multi-node clusters. This parameter is required.
      Returns:
      this
    • parameterGroup

      @Stability(Experimental) public Cluster.Builder parameterGroup(IClusterParameterGroup parameterGroup)
      (experimental) Additional parameters to pass to the database engine https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html.

      Default: - No parameter group.

      Parameters:
      parameterGroup - Additional parameters to pass to the database engine https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html. This parameter is required.
      Returns:
      this
    • port

      @Stability(Experimental) public Cluster.Builder port(Number port)
      (experimental) What port to listen on.

      Default: - The default for the engine is used.

      Parameters:
      port - What port to listen on. This parameter is required.
      Returns:
      this
    • preferredMaintenanceWindow

      @Stability(Experimental) public Cluster.Builder preferredMaintenanceWindow(String preferredMaintenanceWindow)
      (experimental) 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'

      Default: - 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.

      Parameters:
      preferredMaintenanceWindow - A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). This parameter is required.
      Returns:
      this
      See Also:
    • publiclyAccessible

      @Stability(Experimental) public Cluster.Builder publiclyAccessible(Boolean publiclyAccessible)
      (experimental) Whether to make cluster publicly accessible.

      Default: false

      Parameters:
      publiclyAccessible - Whether to make cluster publicly accessible. This parameter is required.
      Returns:
      this
    • rebootForParameterChanges

      @Stability(Experimental) public Cluster.Builder rebootForParameterChanges(Boolean rebootForParameterChanges)
      (experimental) If this flag is set, the cluster will be rebooted when changes to the cluster's parameter group that require a restart to apply.

      Default: false

      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. This parameter is required.
      Returns:
      this
    • removalPolicy

      @Stability(Experimental) public Cluster.Builder removalPolicy(RemovalPolicy removalPolicy)
      (experimental) The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.

      Default: RemovalPolicy.RETAIN

      Parameters:
      removalPolicy - The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update. This parameter is required.
      Returns:
      this
    • roles

      @Stability(Experimental) public Cluster.Builder roles(List<? extends IRole> roles)
      (experimental) 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.

      Default: - No role is attached to the cluster.

      Parameters:
      roles - A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services. This parameter is required.
      Returns:
      this
    • securityGroups

      @Stability(Experimental) public Cluster.Builder securityGroups(List<? extends ISecurityGroup> securityGroups)
      (experimental) Security group.

      Default: - a new security group is created.

      Parameters:
      securityGroups - Security group. This parameter is required.
      Returns:
      this
    • subnetGroup

      @Stability(Experimental) public Cluster.Builder subnetGroup(IClusterSubnetGroup subnetGroup)
      (experimental) A cluster subnet group to use with this cluster.

      Default: - a new subnet group will be created.

      Parameters:
      subnetGroup - A cluster subnet group to use with this cluster. This parameter is required.
      Returns:
      this
    • vpcSubnets

      @Stability(Experimental) public Cluster.Builder vpcSubnets(SubnetSelection vpcSubnets)
      (experimental) Where to place the instances within the VPC.

      Default: - private subnets

      Parameters:
      vpcSubnets - Where to place the instances within the VPC. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public Cluster build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Cluster>
      Returns:
      a newly built instance of Cluster.