ClusterProps

class aws_cdk.aws_redshift_alpha.ClusterProps(*, master_user, vpc, classic_resizing=None, cluster_name=None, cluster_type=None, default_database_name=None, default_role=None, elastic_ip=None, encrypted=None, encryption_key=None, enhanced_vpc_routing=None, logging_properties=None, node_type=None, number_of_nodes=None, parameter_group=None, port=None, preferred_maintenance_window=None, publicly_accessible=None, reboot_for_parameter_changes=None, removal_policy=None, roles=None, security_groups=None, subnet_group=None, vpc_subnets=None)

Bases: object

(experimental) Properties for a new database cluster.

Parameters:
  • master_user (Union[Login, Dict[str, Any]]) – (experimental) Username and password for the administrative user.

  • vpc (IVpc) – (experimental) The VPC to place the cluster in.

  • classic_resizing (Optional[bool]) – (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

  • cluster_name (Optional[str]) – (experimental) An optional identifier for the cluster. Default: - A name is automatically generated.

  • cluster_type (Optional[ClusterType]) – (experimental) Settings for the individual instances that are launched. Default: ClusterType.MULTI_NODE

  • default_database_name (Optional[str]) – (experimental) Name of a database which is automatically created inside the cluster. Default: - default_db

  • default_role (Optional[IRole]) – (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.

  • elastic_ip (Optional[str]) – (experimental) The Elastic IP (EIP) address for the cluster. Default: - No Elastic IP

  • encrypted (Optional[bool]) – (experimental) Whether to enable encryption of data at rest in the cluster. Default: true

  • encryption_key (Optional[IKey]) – (experimental) The KMS key to use for encryption of data at rest. Default: - AWS-managed key, if encryption at rest is enabled

  • enhanced_vpc_routing (Optional[bool]) – (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

  • logging_properties (Union[LoggingProperties, Dict[str, Any], None]) – (experimental) Bucket details for log files to be sent to, including prefix. Default: - No logging bucket is used

  • node_type (Optional[NodeType]) – (experimental) The node type to be provisioned for the cluster. Default: NodeType.DC2_LARGE

  • number_of_nodes (Union[int, float, None]) – (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

  • parameter_group (Optional[IClusterParameterGroup]) – (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.

  • port (Union[int, float, None]) – (experimental) What port to listen on. Default: - The default for the engine is used.

  • preferred_maintenance_window (Optional[str]) – (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.

  • publicly_accessible (Optional[bool]) – (experimental) Whether to make cluster publicly accessible. Default: false

  • reboot_for_parameter_changes (Optional[bool]) – (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

  • removal_policy (Optional[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

  • roles (Optional[Sequence[IRole]]) – (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.

  • security_groups (Optional[Sequence[ISecurityGroup]]) – (experimental) Security group. Default: - a new security group is created.

  • subnet_group (Optional[IClusterSubnetGroup]) – (experimental) A cluster subnet group to use with this cluster. Default: - a new subnet group will be created.

  • vpc_subnets (Union[SubnetSelection, Dict[str, Any], None]) – (experimental) Where to place the instances within the VPC. Default: - private subnets

Stability:

experimental

ExampleMetadata:

infused

Example:

import aws_cdk.aws_ec2 as ec2
import aws_cdk as cdk
# vpc: ec2.Vpc


cluster = Cluster(self, "Cluster",
    master_user=Login(
        master_username="admin",
        master_password=cdk.SecretValue.unsafe_plain_text("tooshort")
    ),
    vpc=vpc
)

cluster.add_to_parameter_group("enable_user_activity_logging", "true")

Attributes

classic_resizing

(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

See:

https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#elastic-resize

Stability:

experimental

cluster_name

(experimental) An optional identifier for the cluster.

Default:
  • A name is automatically generated.

Stability:

experimental

cluster_type

(experimental) Settings for the individual instances that are launched.

Default:

ClusterType.MULTI_NODE

Stability:

experimental

default_database_name

(experimental) Name of a database which is automatically created inside the cluster.

Default:
  • default_db

Stability:

experimental

default_role

(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.

Stability:

experimental

elastic_ip

(experimental) The Elastic IP (EIP) address for the cluster.

Default:
  • No Elastic IP

See:

https://docs.aws.amazon.com/redshift/latest/mgmt/managing-clusters-vpc.html

Stability:

experimental

encrypted

(experimental) Whether to enable encryption of data at rest in the cluster.

Default:

true

Stability:

experimental

encryption_key

(experimental) The KMS key to use for encryption of data at rest.

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

Stability:

experimental

enhanced_vpc_routing

(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

See:

https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html

Stability:

experimental

logging_properties

(experimental) Bucket details for log files to be sent to, including prefix.

Default:
  • No logging bucket is used

Stability:

experimental

master_user

(experimental) Username and password for the administrative user.

Stability:

experimental

node_type

(experimental) The node type to be provisioned for the cluster.

Default:

NodeType.DC2_LARGE

Stability:

experimental

number_of_nodes

(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

Stability:

experimental

parameter_group

//docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html.

Default:
  • No parameter group.

Stability:

experimental

Type:

(experimental) Additional parameters to pass to the database engine https

port

(experimental) What port to listen on.

Default:
  • The default for the engine is used.

Stability:

experimental

preferred_maintenance_window

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.

See:

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance

Stability:

experimental

Type:

(experimental) A preferred maintenance window day/time range. Should be specified as a range ddd

Type:

hh24

publicly_accessible

(experimental) Whether to make cluster publicly accessible.

Default:

false

Stability:

experimental

reboot_for_parameter_changes

(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

Stability:

experimental

removal_policy

(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

Stability:

experimental

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.

Stability:

experimental

security_groups

(experimental) Security group.

Default:
  • a new security group is created.

Stability:

experimental

subnet_group

(experimental) A cluster subnet group to use with this cluster.

Default:
  • a new subnet group will be created.

Stability:

experimental

vpc

(experimental) The VPC to place the cluster in.

Stability:

experimental

vpc_subnets

(experimental) Where to place the instances within the VPC.

Default:
  • private subnets

Stability:

experimental