:doc:`DAX <../../dax>` / Client / create_subnet_group

*******************
create_subnet_group
*******************



.. py:method:: DAX.Client.create_subnet_group(**kwargs)

  

  Creates a new subnet group.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/CreateSubnetGroup>`_  


  **Request Syntax**
  ::

    response = client.create_subnet_group(
        SubnetGroupName='string',
        Description='string',
        SubnetIds=[
            'string',
        ]
    )
    
  :type SubnetGroupName: string
  :param SubnetGroupName: **[REQUIRED]** 

    A name for the subnet group. This value is stored as a lowercase string.

    

  
  :type Description: string
  :param Description: 

    A description for the subnet group

    

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

    A list of VPC subnet IDs for the subnet group.

    

  
    - *(string) --* 

    

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

    
    ::

      {
          'SubnetGroup': {
              'SubnetGroupName': 'string',
              'Description': 'string',
              'VpcId': 'string',
              'Subnets': [
                  {
                      'SubnetIdentifier': 'string',
                      'SubnetAvailabilityZone': 'string',
                      'SupportedNetworkTypes': [
                          'ipv4'|'ipv6'|'dual_stack',
                      ]
                  },
              ],
              'SupportedNetworkTypes': [
                  'ipv4'|'ipv6'|'dual_stack',
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **SubnetGroup** *(dict) --* 

        Represents the output of a *CreateSubnetGroup* operation.

        
        

        - **SubnetGroupName** *(string) --* 

          The name of the subnet group.

          
        

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

          The description of the subnet group.

          
        

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

          The Amazon Virtual Private Cloud identifier (VPC ID) of the subnet group.

          
        

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

          A list of subnets associated with the subnet group.

          
          

          - *(dict) --* 

            Represents the subnet associated with a DAX cluster. This parameter refers to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with DAX.

            
            

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

              The system-assigned identifier for the subnet.

              
            

            - **SubnetAvailabilityZone** *(string) --* 

              The Availability Zone (AZ) for the subnet.

              
            

            - **SupportedNetworkTypes** *(list) --* 

              The network types supported by this subnet. Returns an array of strings that can include ``ipv4``, ``ipv6``, or both, indicating whether the subnet supports IPv4 only, IPv6 only, or dual-stack deployments.

              
              

              - *(string) --* 
          
        
      
        

        - **SupportedNetworkTypes** *(list) --* 

          The network types supported by this subnet. Returns an array of strings that can include ``ipv4``, ``ipv6``, or both, indicating whether the subnet group supports IPv4 only, IPv6 only, or dual-stack deployments.

          
          

          - *(string) --* 
      
    
  
  **Exceptions**
  
  *   :py:class:`DAX.Client.exceptions.SubnetGroupAlreadyExistsFault`

  
  *   :py:class:`DAX.Client.exceptions.SubnetGroupQuotaExceededFault`

  
  *   :py:class:`DAX.Client.exceptions.SubnetQuotaExceededFault`

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

  
  *   :py:class:`DAX.Client.exceptions.ServiceLinkedRoleNotFoundFault`

  
  *   :py:class:`DAX.Client.exceptions.SubnetNotAllowedFault`

  