interface ClusterProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Redshift.Alpha.ClusterProps |
Go | github.com/aws/aws-cdk-go/awscdkredshiftalpha/v2#ClusterProps |
Java | software.amazon.awscdk.services.redshift.alpha.ClusterProps |
Python | aws_cdk.aws_redshift_alpha.ClusterProps |
TypeScript (source) | @aws-cdk/aws-redshift-alpha ยป ClusterProps |
Properties for a new database cluster.
Example
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as cdk from 'aws-cdk-lib';
declare const vpc: ec2.Vpc;
const cluster = new Cluster(this, 'Cluster', {
masterUser: {
masterUsername: 'admin',
masterPassword: cdk.SecretValue.unsafePlainText('tooshort'),
},
vpc,
});
cluster.addToParameterGroup('enable_user_activity_logging', 'true');
Properties
Name | Type | Description |
---|---|---|
master | Login | Username and password for the administrative user. |
vpc | IVpc | The VPC to place the cluster in. |
classic | boolean | If this flag is set, the cluster resizing type will be set to classic. |
cluster | string | An optional identifier for the cluster. |
cluster | Cluster | Settings for the individual instances that are launched. |
default | string | Name of a database which is automatically created inside the cluster. |
default | IRole | A single AWS Identity and Access Management (IAM) role to be used as the default role for the cluster. |
elastic | string | The Elastic IP (EIP) address for the cluster. |
encrypted? | boolean | Whether to enable encryption of data at rest in the cluster. |
encryption | IKey | The KMS key to use for encryption of data at rest. |
enhanced | boolean | 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). |
logging | Logging | Bucket details for log files to be sent to, including prefix. |
node | Node | The node type to be provisioned for the cluster. |
number | number | Number of compute nodes in the cluster. Only specify this property for multi-node clusters. |
parameter | ICluster | Additional parameters to pass to the database engine https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html. |
port? | number | What port to listen on. |
preferred | string | A preferred maintenance window day/time range. Should be specified as a range ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). |
publicly | boolean | Whether to make cluster publicly accessible. |
reboot | boolean | If this flag is set, the cluster will be rebooted when changes to the cluster's parameter group that require a restart to apply. |
removal | Removal | The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update. |
roles? | IRole [] | A list of AWS Identity and Access Management (IAM) role that can be used by the cluster to access other AWS services. |
security | ISecurity [] | Security group. |
subnet | ICluster | A cluster subnet group to use with this cluster. |
vpc | Subnet | Where to place the instances within the VPC. |
masterUser
Type:
Login
Username and password for the administrative user.
vpc
Type:
IVpc
The VPC to place the cluster in.
classicResizing?
Type:
boolean
(optional, default: Elastic resize type)
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.
See also: https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#elastic-resize
clusterName?
Type:
string
(optional, default: A name is automatically generated.)
An optional identifier for the cluster.
clusterType?
Type:
Cluster
(optional, default: ClusterType.MULTI_NODE
)
Settings for the individual instances that are launched.
defaultDatabaseName?
Type:
string
(optional, default: default_db)
Name of a database which is automatically created inside the cluster.
defaultRole?
Type:
IRole
(optional, default: No default role is specified for the cluster.)
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.
elasticIp?
Type:
string
(optional, default: No Elastic IP)
The Elastic IP (EIP) address for the cluster.
See also: https://docs.aws.amazon.com/redshift/latest/mgmt/managing-clusters-vpc.html
encrypted?
Type:
boolean
(optional, default: true)
Whether to enable encryption of data at rest in the cluster.
encryptionKey?
Type:
IKey
(optional, default: AWS-managed key, if encryption at rest is enabled)
The KMS key to use for encryption of data at rest.
enhancedVpcRouting?
Type:
boolean
(optional, default: 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).
See also: https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html
loggingProperties?
Type:
Logging
(optional, default: No logging bucket is used)
Bucket details for log files to be sent to, including prefix.
nodeType?
Type:
Node
(optional, default: NodeType.DC2_LARGE
)
The node type to be provisioned for the cluster.
numberOfNodes?
Type:
number
(optional, default: 2 if clusterType
is ClusterType.MULTI_NODE, undefined otherwise)
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.
parameterGroup?
Type:
ICluster
(optional, default: No parameter group.)
Additional parameters to pass to the database engine https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html.
port?
Type:
number
(optional, default: The default for the engine is used.)
What port to listen on.
preferredMaintenanceWindow?
Type:
string
(optional, 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.)
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'
publiclyAccessible?
Type:
boolean
(optional, default: false)
Whether to make cluster publicly accessible.
rebootForParameterChanges?
Type:
boolean
(optional, default: 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.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.RETAIN)
The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.
roles?
Type:
IRole
[]
(optional, default: No role is attached to the cluster.)
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.
securityGroups?
Type:
ISecurity
[]
(optional, default: a new security group is created.)
Security group.
subnetGroup?
Type:
ICluster
(optional, default: a new subnet group will be created.)
A cluster subnet group to use with this cluster.
vpcSubnets?
Type:
Subnet
(optional, default: private subnets)
Where to place the instances within the VPC.