AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Creates a new cluster with the specified parameters.
To create a cluster in Virtual Private Cloud (VPC), you must provide a cluster subnet group name. The cluster subnet group identifies the subnets of your VPC that Amazon Redshift uses when creating the cluster. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Cluster Management Guide.
For .NET Core this operation is only available in asynchronous form. Please refer to CreateClusterAsync.
Namespace: Amazon.Redshift
Assembly: AWSSDK.Redshift.dll
Version: 3.x.y.z
public virtual CreateClusterResponse CreateCluster( CreateClusterRequest request )
Container for the necessary parameters to execute the CreateCluster service method.
Exception | Condition |
---|---|
ClusterAlreadyExistsException | The account already has a cluster with the given identifier. |
ClusterParameterGroupNotFoundException | The parameter group name does not refer to an existing parameter group. |
ClusterQuotaExceededException | The request would exceed the allowed number of cluster instances for this account. For information about increasing your quota, go to Limits in Amazon Redshift in the Amazon Redshift Cluster Management Guide. |
ClusterSecurityGroupNotFoundException | The cluster security group name does not refer to an existing cluster security group. |
ClusterSubnetGroupNotFoundException | The cluster subnet group name does not refer to an existing cluster subnet group. |
DependentServiceRequestThrottlingException | The request cannot be completed because a dependent service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request. |
HsmClientCertificateNotFoundException | There is no Amazon Redshift HSM client certificate with the specified identifier. |
HsmConfigurationNotFoundException | There is no Amazon Redshift HSM configuration with the specified identifier. |
InsufficientClusterCapacityException | The number of nodes specified exceeds the allotted capacity of the cluster. |
InvalidClusterSubnetGroupStateException | The cluster subnet group cannot be deleted because it is in use. |
InvalidClusterTrackException | The provided cluster track name is not valid. |
InvalidElasticIpException | The Elastic IP (EIP) is invalid or cannot be found. |
InvalidRetentionPeriodException | The retention period specified is either in the past or is not a valid value. The value must be either -1 or an integer between 1 and 3,653. |
InvalidSubnetException | The requested subnet is not valid, or not all of the subnets are in the same VPC. |
InvalidTagException | The tag is invalid. |
InvalidVPCNetworkStateException | The cluster subnet group does not cover all Availability Zones. |
Ipv6CidrBlockNotFoundException | There are no subnets in your VPC with associated IPv6 CIDR blocks. To use dual-stack mode, associate an IPv6 CIDR block with each subnet in your VPC. |
LimitExceededException | The encryption key has exceeded its grant limit in Amazon Web Services KMS. |
NumberOfNodesPerClusterLimitExceededException | The operation would exceed the number of nodes allowed for a cluster. |
NumberOfNodesQuotaExceededException | The operation would exceed the number of nodes allotted to the account. For information about increasing your quota, go to Limits in Amazon Redshift in the Amazon Redshift Cluster Management Guide. |
RedshiftIdcApplicationNotExistsException | The application you attempted to find doesn't exist. |
SnapshotScheduleNotFoundException | We could not find the specified snapshot schedule. |
TagLimitExceededException | You have exceeded the number of tags allowed. |
UnauthorizedOperationException | Your account is not authorized to perform the requested operation. |
UnsupportedOperationException | The requested operation isn't supported. |
This example creates a cluster with the minimal set of parameters. By default, the output is in JSON format.
var client = new AmazonRedshiftClient(); var response = client.CreateCluster(new CreateClusterRequest { ClusterIdentifier = "mycluster", MasterUserPassword = "TopSecret1", MasterUsername = "adminuser ", NodeType = "dw.hs1.xlarge" });
.NET Framework:
Supported in: 4.5, 4.0, 3.5