Class Cluster.Builder

java.lang.Object
software.amazon.awscdk.services.redshift.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
    • 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:

      invalid @link
      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
    • 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
    • loggingBucket

      @Stability(Experimental) public Cluster.Builder loggingBucket(IBucket loggingBucket)
      (experimental) Bucket to send logs to.

      Logging information includes queries and connection attempts, for the specified Amazon Redshift cluster.

      Default: - No Logs

      Parameters:
      loggingBucket - Bucket to send logs to. This parameter is required.
      Returns:
      this
    • loggingKeyPrefix

      @Stability(Experimental) public Cluster.Builder loggingKeyPrefix(String loggingKeyPrefix)
      (experimental) Prefix used for logging.

      Default: - no prefix

      Parameters:
      loggingKeyPrefix - Prefix used for logging. 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:

      invalid @link
      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
    • 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.

      Specify a maximum of 10 roles.

      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.