Menu
Amazon Redshift
API Reference (API Version 2012-12-01)

CreateClusterSubnetGroup

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.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ClusterSubnetGroupName

The name for the subnet group. Amazon Redshift stores the value as a lowercase string.

Constraints:

  • Must contain no more than 255 alphanumeric characters or hyphens.

  • Must not be "Default".

  • Must be unique for all subnet groups that are created by your AWS account.

Example: examplesubnetgroup

Type: String

Required: Yes

Description

A description for the subnet group.

Type: String

Required: Yes

SubnetIds.SubnetIdentifier.N

An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single request.

Type: Array of strings

Required: Yes

Tags.Tag.N

A list of tag instances.

Type: Array of Tag objects

Required: No

Response Elements

The following element is returned by the service.

ClusterSubnetGroup

Describes a subnet group.

Type: ClusterSubnetGroup object

Errors

For information about the errors that are common to all actions, see Common Errors.

ClusterSubnetGroupAlreadyExists

A ClusterSubnetGroupName is already used by an existing cluster subnet group.

HTTP Status Code: 400

ClusterSubnetGroupQuotaExceeded

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.

HTTP Status Code: 400

ClusterSubnetQuotaExceededFault

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.

HTTP Status Code: 400

DependentServiceRequestThrottlingFault

The request cannot be completed because a dependent service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.

HTTP Status Code: 400

InvalidSubnet

The requested subnet is not valid, or not all of the subnets are in the same VPC.

HTTP Status Code: 400

InvalidTagFault

The tag is invalid.

HTTP Status Code: 400

TagLimitExceededFault

The request exceeds the limit of 10 tags for the resource.

HTTP Status Code: 400

UnauthorizedOperation

Your account is not authorized to perform the requested operation.

HTTP Status Code: 400

Example

Sample Request

https://redshift.us-east-1.amazonaws.com/
   ?Action=CreateClusterSubnetGroup
   &ClusterSubnetGroupName=mysubnetgroup1
   &Description=My subnet group 1
   &SubnetIds.member.1=subnet-756a591f
   &SubnetIds.member.1=subnet-716a591b
   &Version=2012-12-01
   &x-amz-algorithm=AWS4-HMAC-SHA256
   &x-amz-credential=AKIAIOSFODNN7EXAMPLE/20130129/us-east-1/redshift/aws4_request
   &x-amz-date=20130129T192820Z
   &x-amz-signedheaders=content-type;host;x-amz-date

Sample Response

<CreateClusterSubnetGroupResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/">
  <CreateClusterSubnetGroupResult>
    <ClusterSubnetGroup>
      <VpcId>vpc-796a5913</VpcId>
      <Description>My subnet group 1</Description>
      <ClusterSubnetGroupName>mysubnetgroup1</ClusterSubnetGroupName>
      <SubnetGroupStatus>Complete</SubnetGroupStatus>
      <Subnets>
        <Subnet>
          <SubnetStatus>Active</SubnetStatus>
          <SubnetIdentifier>subnet-756a591f</SubnetIdentifier>
          <SubnetAvailabilityZone>
            <Name>us-east-1c</Name>
          </SubnetAvailabilityZone>
        </Subnet>
      </Subnets>
    </ClusterSubnetGroup>
  </CreateClusterSubnetGroupResult>
  <ResponseMetadata>
    <RequestId>0a60660f-6a4a-11e2-aad2-71d00c36728e</RequestId>
  </ResponseMetadata>
</CreateClusterSubnetGroupResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: