java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.redshift.alpha.Cluster
All Implemented Interfaces:
IResource, IConnectable, ICluster, ISecretAttachmentTarget, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.102.0 (build e354887)", date="2024-08-29T22:54:28.011Z") @Stability(Experimental) public class Cluster extends Resource implements ICluster
(experimental) Create a Redshift cluster a given number of nodes.

Example:

 import software.amazon.awscdk.services.ec2.*;
 import software.amazon.awscdk.*;
 Vpc vpc;
 Cluster cluster = Cluster.Builder.create(this, "Cluster")
         .masterUser(Login.builder()
                 .masterUsername("admin")
                 .masterPassword(SecretValue.unsafePlainText("tooshort"))
                 .build())
         .vpc(vpc)
         .build();
 cluster.addToParameterGroup("enable_user_activity_logging", "true");
 
  • Constructor Details

    • Cluster

      protected Cluster(software.amazon.jsii.JsiiObjectRef objRef)
    • Cluster

      protected Cluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Cluster

      @Stability(Experimental) public Cluster(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ClusterProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromClusterAttributes

      @Stability(Experimental) @NotNull public static ICluster fromClusterAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ClusterAttributes attrs)
      (experimental) Import an existing DatabaseCluster from properties.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • addDefaultIamRole

      @Stability(Experimental) public void addDefaultIamRole(@NotNull IRole defaultIamRole)
      (experimental) Adds default IAM role to cluster.

      The default IAM role must be already associated to the cluster to be added as the default role.

      Parameters:
      defaultIamRole - the IAM role to be set as the default role. This parameter is required.
    • addIamRole

      @Stability(Experimental) public void addIamRole(@NotNull IRole role)
      (experimental) Adds a role to the cluster.

      Parameters:
      role - the role to add. This parameter is required.
    • addRotationMultiUser

      @Stability(Experimental) @NotNull public SecretRotation addRotationMultiUser(@NotNull String id, @NotNull RotationMultiUserOptions options)
      (experimental) Adds the multi user rotation to this cluster.

      Parameters:
      id - This parameter is required.
      options - This parameter is required.
    • addRotationSingleUser

      @Stability(Experimental) @NotNull public SecretRotation addRotationSingleUser(@Nullable Duration automaticallyAfter)
      (experimental) Adds the single user rotation of the master password to this cluster.

      Parameters:
      automaticallyAfter - Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation.
    • addRotationSingleUser

      @Stability(Experimental) @NotNull public SecretRotation addRotationSingleUser()
      (experimental) Adds the single user rotation of the master password to this cluster.
    • addToParameterGroup

      @Stability(Experimental) public void addToParameterGroup(@NotNull String name, @NotNull String value)
      (experimental) Adds a parameter to the Clusters' parameter group.

      Parameters:
      name - the parameter name. This parameter is required.
      value - the parameter name. This parameter is required.
    • asSecretAttachmentTarget

      @Stability(Experimental) @NotNull public SecretAttachmentTargetProps asSecretAttachmentTarget()
      (experimental) Renders the secret attachment target specifications.
      Specified by:
      asSecretAttachmentTarget in interface ISecretAttachmentTarget
    • enableRebootForParameterChanges

      @Stability(Experimental) public void enableRebootForParameterChanges()
      (experimental) Enables automatic cluster rebooting when changes to the cluster's parameter group require a restart to apply.
    • getClusterEndpoint

      @Stability(Experimental) @NotNull public Endpoint getClusterEndpoint()
      (experimental) The endpoint to use for read/write operations.
      Specified by:
      getClusterEndpoint in interface ICluster
    • getClusterName

      @Stability(Experimental) @NotNull public String getClusterName()
      (experimental) Identifier of the cluster.
      Specified by:
      getClusterName in interface ICluster
    • getConnections

      @Stability(Experimental) @NotNull public Connections getConnections()
      (experimental) Access to the network connections.
      Specified by:
      getConnections in interface IConnectable
    • getSecret

      @Stability(Experimental) @Nullable public ISecret getSecret()
      (experimental) The secret attached to this cluster.
    • getParameterGroup

      @Stability(Experimental) @Nullable protected IClusterParameterGroup getParameterGroup()
      (experimental) The cluster's parameter group.
    • setParameterGroup

      @Stability(Experimental) protected void setParameterGroup(@Nullable IClusterParameterGroup value)
      (experimental) The cluster's parameter group.