:doc:`Redshift <../../redshift>` / Client / create_cluster_subnet_group

***************************
create_cluster_subnet_group
***************************



.. py:method:: Redshift.Client.create_cluster_subnet_group(**kwargs)

  

  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 <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-cluster-subnet-groups.html>`__ in the *Amazon Redshift Cluster Management Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterSubnetGroup>`_  


  **Request Syntax**
  ::

    response = client.create_cluster_subnet_group(
        ClusterSubnetGroupName='string',
        Description='string',
        SubnetIds=[
            'string',
        ],
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type ClusterSubnetGroupName: string
  :param ClusterSubnetGroupName: **[REQUIRED]** 

    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 Amazon Web Services account.
    

     

    Example: ``examplesubnetgroup``

    

  
  :type Description: string
  :param Description: **[REQUIRED]** 

    A description for the subnet group.

    

  
  :type SubnetIds: list
  :param SubnetIds: **[REQUIRED]** 

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

    

  
    - *(string) --* 

    

  :type Tags: list
  :param Tags: 

    A list of tag instances.

    

  
    - *(dict) --* 

      A tag consisting of a name/value pair for a resource.

      

    
      - **Key** *(string) --* 

        The key, or name, for the resource tag.

        

      
      - **Value** *(string) --* 

        The value for the resource tag.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ClusterSubnetGroup': {
              'ClusterSubnetGroupName': 'string',
              'Description': 'string',
              'VpcId': 'string',
              'SubnetGroupStatus': 'string',
              'Subnets': [
                  {
                      'SubnetIdentifier': 'string',
                      'SubnetAvailabilityZone': {
                          'Name': 'string',
                          'SupportedPlatforms': [
                              {
                                  'Name': 'string'
                              },
                          ]
                      },
                      'SubnetStatus': 'string'
                  },
              ],
              'Tags': [
                  {
                      'Key': 'string',
                      'Value': 'string'
                  },
              ],
              'SupportedClusterIpAddressTypes': [
                  'string',
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ClusterSubnetGroup** *(dict) --* 

        Describes a subnet group.

        
        

        - **ClusterSubnetGroupName** *(string) --* 

          The name of the cluster subnet group.

          
        

        - **Description** *(string) --* 

          The description of the cluster subnet group.

          
        

        - **VpcId** *(string) --* 

          The VPC ID of the cluster subnet group.

          
        

        - **SubnetGroupStatus** *(string) --* 

          The status of the cluster subnet group. Possible values are ``Complete``, ``Incomplete`` and ``Invalid``.

          
        

        - **Subnets** *(list) --* 

          A list of the VPC  Subnet elements.

          
          

          - *(dict) --* 

            Describes a subnet.

            
            

            - **SubnetIdentifier** *(string) --* 

              The identifier of the subnet.

              
            

            - **SubnetAvailabilityZone** *(dict) --* 
              

              - **Name** *(string) --* 

                The name of the availability zone.

                
              

              - **SupportedPlatforms** *(list) --* 
                

                - *(dict) --* 

                  A list of supported platforms for orderable clusters.

                  
                  

                  - **Name** *(string) --* 
              
            
          
            

            - **SubnetStatus** *(string) --* 

              The status of the subnet.

              
        
      
        

        - **Tags** *(list) --* 

          The list of tags for the cluster subnet group.

          
          

          - *(dict) --* 

            A tag consisting of a name/value pair for a resource.

            
            

            - **Key** *(string) --* 

              The key, or name, for the resource tag.

              
            

            - **Value** *(string) --* 

              The value for the resource tag.

              
        
      
        

        - **SupportedClusterIpAddressTypes** *(list) --* 

          The IP address types supported by this cluster subnet group. Possible values are ``ipv4`` and ``dualstack``.

          
          

          - *(string) --* 
      
    
  
  **Exceptions**
  
  *   :py:class:`Redshift.Client.exceptions.ClusterSubnetGroupAlreadyExistsFault`

  
  *   :py:class:`Redshift.Client.exceptions.ClusterSubnetGroupQuotaExceededFault`

  
  *   :py:class:`Redshift.Client.exceptions.ClusterSubnetQuotaExceededFault`

  
  *   :py:class:`Redshift.Client.exceptions.InvalidSubnet`

  
  *   :py:class:`Redshift.Client.exceptions.UnauthorizedOperation`

  
  *   :py:class:`Redshift.Client.exceptions.TagLimitExceededFault`

  
  *   :py:class:`Redshift.Client.exceptions.InvalidTagFault`

  
  *   :py:class:`Redshift.Client.exceptions.DependentServiceRequestThrottlingFault`

  