Skip to content
v2.274.0

Experimental

@aws-cdk/aws-redshift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ClusterProps Struct ​

Properties for a new database cluster.

Example ​

ts
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as iam from 'aws-cdk-lib/aws-iam';
declare const vpc: ec2.Vpc;

const defaultRole = new iam.Role(this, 'DefaultRole', {
  assumedBy: new iam.ServicePrincipal('redshift.amazonaws.com'),
},
);

new Cluster(this, 'Redshift', {
    masterUser: {
      masterUsername: 'admin',
    },
    vpc,
    roles: [defaultRole],
    defaultRole: defaultRole,
});

Properties ​

availabilityZoneRelocationoptionalbooleanavailability_zone_relocationoptionalboolavailabilityZoneRelocationoptionalBooleanAvailabilityZoneRelocationoptionalboolAvailabilityZoneRelocationoptional*bool= false#
Whether to enable relocation for an Amazon Redshift cluster between Availability Zones after the cluster is created.
classicResizingoptionalbooleanclassic_resizingoptionalboolclassicResizingoptionalBooleanClassicResizingoptionalboolClassicResizingoptional*bool#
If this flag is set, the cluster resizing type will be set to classic.

Default: Elastic resize type

notes

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.

clusterNameoptionalstringcluster_nameoptionalstrclusterNameoptionalStringClusterNameoptionalstringClusterNameoptional*string#
An optional identifier for the cluster.

Default: A name is automatically generated.

clusterTypeoptionalClusterTypecluster_typeoptionalClusterTypeclusterTypeoptionalClusterTypeClusterTypeoptionalClusterTypeClusterTypeoptionalClusterType= `ClusterType.MULTI_NODE`#
Settings for the individual instances that are launched.
defaultDatabaseNameoptionalstringdefault_database_nameoptionalstrdefaultDatabaseNameoptionalStringDefaultDatabaseNameoptionalstringDefaultDatabaseNameoptional*string= default_db#
Name of a database which is automatically created inside the cluster.
defaultRoleoptionalIRoledefault_roleoptionalIRoledefaultRoleoptionalIRoleDefaultRoleoptionalIRoleDefaultRoleoptionalIRole#
A single AWS Identity and Access Management (IAM) role to be used as the default role for the cluster.

Default: No default role is specified for the cluster.

The default role must be included in the roles list.

elasticIpoptionalstringelastic_ipoptionalstrelasticIpoptionalStringElasticIpoptionalstringElasticIpoptional*string#
The Elastic IP (EIP) address for the cluster.

Default: No Elastic IP

encryptedoptionalbooleanencryptedoptionalboolencryptedoptionalBooleanEncryptedoptionalboolEncryptedoptional*bool= true#
Whether to enable encryption of data at rest in the cluster.
encryptionKeyoptionalIKeyRefencryption_keyoptionalIKeyRefencryptionKeyoptionalIKeyRefEncryptionKeyoptionalIKeyRefEncryptionKeyoptionalIKeyRef#
The KMS key to use for encryption of data at rest.

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

enhancedVpcRoutingoptionalbooleanenhanced_vpc_routingoptionalboolenhancedVpcRoutingoptionalBooleanEnhancedVpcRoutingoptionalboolEnhancedVpcRoutingoptional*bool= false#
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).
loggingoptionalClusterLoggingloggingoptionalClusterLoggingloggingoptionalClusterLoggingLoggingoptionalClusterLoggingLoggingoptionalClusterLogging#
Logging configuration for the cluster.

Default: no logging

maintenanceTrackNameoptionalMaintenanceTrackNamemaintenance_track_nameoptionalMaintenanceTrackNamemaintenanceTrackNameoptionalMaintenanceTrackNameMaintenanceTrackNameoptionalMaintenanceTrackNameMaintenanceTrackNameoptionalMaintenanceTrackName#
The maintenance track name for the cluster.

Default: undefined - Redshift default is current

masterUserLoginmaster_userLoginmasterUserLoginMasterUserLoginMasterUserLoginrequired#
Username and password for the administrative user.
multiAzoptionalbooleanmulti_azoptionalboolmultiAzoptionalBooleanMultiAzoptionalboolMultiAzoptional*bool= false#
Indicating whether Amazon Redshift should deploy the cluster in two Availability Zones.
nodeTypeoptionalNodeTypenode_typeoptionalNodeTypenodeTypeoptionalNodeTypeNodeTypeoptionalNodeTypeNodeTypeoptionalNodeType= `NodeType.RA3_LARGE`#
The node type to be provisioned for the cluster.
numberOfNodesoptionalnumbernumber_of_nodesoptionalint | floatnumberOfNodesoptionalNumberNumberOfNodesoptionaldoubleNumberOfNodesoptional*float64#
Number of compute nodes in the cluster. Only specify this property for multi-node clusters.

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

Value must be at least 2 and no more than 100.

parameterGroupoptionalIClusterParameterGroupparameter_groupoptionalIClusterParameterGroupparameterGroupoptionalIClusterParameterGroupParameterGroupoptionalIClusterParameterGroupParameterGroupoptionalIClusterParameterGroup#
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.

portoptionalnumberportoptionalint | floatportoptionalNumberPortoptionaldoublePortoptional*float64#
What port to listen on.

Default: The default for the engine is used.

preferredMaintenanceWindowoptionalstringpreferred_maintenance_windowoptionalstrpreferredMaintenanceWindowoptionalStringPreferredMaintenanceWindowoptionalstringPreferredMaintenanceWindowoptional*string#
A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC).

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.

Example: 'Sun:23:45-Mon:00:15'

publiclyAccessibleoptionalbooleanpublicly_accessibleoptionalboolpubliclyAccessibleoptionalBooleanPubliclyAccessibleoptionalboolPubliclyAccessibleoptional*bool= false#
Whether to make cluster publicly accessible.
rebootForParameterChangesoptionalbooleanreboot_for_parameter_changesoptionalboolrebootForParameterChangesoptionalBooleanRebootForParameterChangesoptionalboolRebootForParameterChangesoptional*bool= false#
If this flag is set, the cluster will be rebooted when changes to the cluster's parameter group that require a restart to apply.
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy= RemovalPolicy.RETAIN#
The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.
resourceActionoptionalResourceActionresource_actionoptionalResourceActionresourceActionoptionalResourceActionResourceActionoptionalResourceActionResourceActionoptionalResourceAction#
The Amazon Redshift operation to be performed.

Default: no operation

rolesoptionalIRole[]rolesoptionaltyping.List[IRole]rolesoptionalList<IRole>RolesoptionalIRole[]Rolesoptional*[]IRole#
A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services.

Default: No role is attached to the cluster.

The maximum number of roles to attach to a cluster is subject to a quota.

securityGroupsoptionalISecurityGroup[]security_groupsoptionaltyping.List[ISecurityGroup]securityGroupsoptionalList<ISecurityGroup>SecurityGroupsoptionalISecurityGroup[]SecurityGroupsoptional*[]ISecurityGroup#
Security group.

Default: a new security group is created.

subnetGroupoptionalIClusterSubnetGroupsubnet_groupoptionalIClusterSubnetGroupsubnetGroupoptionalIClusterSubnetGroupSubnetGroupoptionalIClusterSubnetGroupSubnetGroupoptionalIClusterSubnetGroup#
A cluster subnet group to use with this cluster.

Default: a new subnet group will be created.

vpcIVpcvpcIVpcvpcIVpcVpcIVpcVpcIVpcrequired#
The VPC to place the cluster in.
vpcSubnetsoptionalSubnetSelectionvpc_subnetsoptionalSubnetSelectionvpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelection#
Where to place the instances within the VPC.

Default: private subnets