:doc:`Kafka <../../kafka>` / Client / create_vpc_connection

*********************
create_vpc_connection
*********************



.. py:method:: Kafka.Client.create_vpc_connection(**kwargs)

  

  Creates a new MSK VPC connection.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/CreateVpcConnection>`_  


  **Request Syntax**
  ::

    response = client.create_vpc_connection(
        TargetClusterArn='string',
        Authentication='string',
        VpcId='string',
        ClientSubnets=[
            'string',
        ],
        SecurityGroups=[
            'string',
        ],
        Tags={
            'string': 'string'
        }
    )
    
  :type TargetClusterArn: string
  :param TargetClusterArn: **[REQUIRED]** 

    The cluster Amazon Resource Name (ARN) for the VPC connection.

    

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

    The authentication type of VPC connection.

    

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

    The VPC ID of VPC connection.

    

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

    The list of client subnets.

    

  
    - *(string) --* 

    

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

    The list of security groups.

    

  
    - *(string) --* 

    

  :type Tags: dict
  :param Tags: 

    A map of tags for the VPC connection.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'VpcConnectionArn': 'string',
          'State': 'CREATING'|'AVAILABLE'|'INACTIVE'|'DEACTIVATING'|'DELETING'|'FAILED'|'REJECTED'|'REJECTING',
          'Authentication': 'string',
          'VpcId': 'string',
          'ClientSubnets': [
              'string',
          ],
          'SecurityGroups': [
              'string',
          ],
          'CreationTime': datetime(2015, 1, 1),
          'Tags': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      200 response

      
      

      - **VpcConnectionArn** *(string) --* 

        The VPC connection ARN.

        
      

      - **State** *(string) --* 

        The State of Vpc Connection.

        
      

      - **Authentication** *(string) --* 

        The authentication type of VPC connection.

        
      

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

        The VPC ID of the VPC connection.

        
      

      - **ClientSubnets** *(list) --* 

        The list of client subnets.

        
        

        - *(string) --* 
    
      

      - **SecurityGroups** *(list) --* 

        The list of security groups.

        
        

        - *(string) --* 
    
      

      - **CreationTime** *(datetime) --* 

        The creation time of VPC connection.

        
      

      - **Tags** *(dict) --* 

        A map of tags for the VPC connection.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
  
  **Exceptions**
  
  *   :py:class:`Kafka.Client.exceptions.BadRequestException`

  
  *   :py:class:`Kafka.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`Kafka.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`Kafka.Client.exceptions.ForbiddenException`

  
  *   :py:class:`Kafka.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`Kafka.Client.exceptions.TooManyRequestsException`

  