:doc:`Neptune <../../neptune>` / Client / create_db_subnet_group

**********************
create_db_subnet_group
**********************



.. py:method:: Neptune.Client.create_db_subnet_group(**kwargs)

  

  Creates a new DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the Amazon Region.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-2014-10-31/CreateDBSubnetGroup>`_  


  **Request Syntax**
  ::

    response = client.create_db_subnet_group(
        DBSubnetGroupName='string',
        DBSubnetGroupDescription='string',
        SubnetIds=[
            'string',
        ],
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type DBSubnetGroupName: string
  :param DBSubnetGroupName: **[REQUIRED]** 

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

     

    Constraints: Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens. Must not be default.

     

    Example: ``mySubnetgroup``

    

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

    The description for the DB subnet group.

    

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

    The EC2 Subnet IDs for the DB subnet group.

    

  
    - *(string) --* 

    

  :type Tags: list
  :param Tags: 

    The tags to be assigned to the new DB subnet group.

    

  
    - *(dict) --* 

      Metadata assigned to an Amazon Neptune resource consisting of a key-value pair.

      

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

        A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with ``aws:`` or ``rds:``. The string can only contain the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

        

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

        A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with ``aws:`` or ``rds:``. The string can only contain the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

        

      
    

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

    
    ::

      {
          'DBSubnetGroup': {
              'DBSubnetGroupName': 'string',
              'DBSubnetGroupDescription': 'string',
              'VpcId': 'string',
              'SubnetGroupStatus': 'string',
              'Subnets': [
                  {
                      'SubnetIdentifier': 'string',
                      'SubnetAvailabilityZone': {
                          'Name': 'string'
                      },
                      'SubnetStatus': 'string'
                  },
              ],
              'DBSubnetGroupArn': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DBSubnetGroup** *(dict) --* 

        Contains the details of an Amazon Neptune DB subnet group.

         

        This data type is used as a response element in the  DescribeDBSubnetGroups action.

        
        

        - **DBSubnetGroupName** *(string) --* 

          The name of the DB subnet group.

          
        

        - **DBSubnetGroupDescription** *(string) --* 

          Provides the description of the DB subnet group.

          
        

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

          Provides the VpcId of the DB subnet group.

          
        

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

          Provides the status of the DB subnet group.

          
        

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

          Contains a list of  Subnet elements.

          
          

          - *(dict) --* 

            Specifies a subnet.

             

            This data type is used as a response element in the  DescribeDBSubnetGroups action.

            
            

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

              Specifies the identifier of the subnet.

              
            

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

              Specifies the EC2 Availability Zone that the subnet is in.

              
              

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

                The name of the availability zone.

                
          
            

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

              Specifies the status of the subnet.

              
        
      
        

        - **DBSubnetGroupArn** *(string) --* 

          The Amazon Resource Name (ARN) for the DB subnet group.

          
    
  
  **Exceptions**
  
  *   :py:class:`Neptune.Client.exceptions.DBSubnetGroupAlreadyExistsFault`

  
  *   :py:class:`Neptune.Client.exceptions.DBSubnetGroupQuotaExceededFault`

  
  *   :py:class:`Neptune.Client.exceptions.DBSubnetQuotaExceededFault`

  
  *   :py:class:`Neptune.Client.exceptions.DBSubnetGroupDoesNotCoverEnoughAZs`

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

  