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 Amazon Redshift subnet group. You must provide a list of one or more subnets in your existing Amazon Virtual Private Cloud (Amazon VPC) when creating Amazon Redshift subnet group.
For information about subnet groups, go to Amazon Redshift Cluster Subnet Groups in the Amazon Redshift Cluster Management Guide.
For .NET Core this operation is only available in asynchronous form. Please refer to CreateClusterSubnetGroupAsync.
Namespace: Amazon.Redshift
Assembly: AWSSDK.Redshift.dll
Version: 3.x.y.z
public virtual CreateClusterSubnetGroupResponse CreateClusterSubnetGroup( CreateClusterSubnetGroupRequest request )
Container for the necessary parameters to execute the CreateClusterSubnetGroup service method.
Exception | Condition |
---|---|
ClusterSubnetGroupAlreadyExistsException | A ClusterSubnetGroupName is already used by an existing cluster subnet group. |
ClusterSubnetGroupQuotaExceededException | The request would result in user exceeding the allowed number of cluster subnet groups. For information about increasing your quota, go to Limits in Amazon Redshift in the Amazon Redshift Cluster Management Guide. |
ClusterSubnetQuotaExceededException | The request would result in user exceeding the allowed number of subnets in a cluster subnet groups. For information about increasing your quota, go to Limits in Amazon Redshift in the Amazon Redshift Cluster Management Guide. |
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. |
InvalidSubnetException | The requested subnet is not valid, or not all of the subnets are in the same VPC. |
InvalidTagException | The tag is invalid. |
TagLimitExceededException | You have exceeded the number of tags allowed. |
UnauthorizedOperationException | Your account is not authorized to perform the requested operation. |
This example creates a new cluster subnet group.
var client = new AmazonRedshiftClient(); var response = client.CreateClusterSubnetGroup(new CreateClusterSubnetGroupRequest { ClusterSubnetGroupName = "mysubnetgroup", Description = "My subnet group", SubnetIds = new List<string> { "subnet-abc12345" } });
.NET Framework:
Supported in: 4.5, 4.0, 3.5