:doc:`NetworkManager <../../networkmanager>` / Client / create_connection

*****************
create_connection
*****************



.. py:method:: NetworkManager.Client.create_connection(**kwargs)

  

  Creates a connection between two devices. The devices can be a physical or virtual appliance that connects to a third-party appliance in a VPC, or a physical appliance that connects to another physical appliance in an on-premises network.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/networkmanager-2019-07-05/CreateConnection>`_  


  **Request Syntax**
  ::

    response = client.create_connection(
        GlobalNetworkId='string',
        DeviceId='string',
        ConnectedDeviceId='string',
        LinkId='string',
        ConnectedLinkId='string',
        Description='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type GlobalNetworkId: string
  :param GlobalNetworkId: **[REQUIRED]** 

    The ID of the global network.

    

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

    The ID of the first device in the connection.

    

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

    The ID of the second device in the connection.

    

  
  :type LinkId: string
  :param LinkId: 

    The ID of the link for the first device.

    

  
  :type ConnectedLinkId: string
  :param ConnectedLinkId: 

    The ID of the link for the second device.

    

  
  :type Description: string
  :param Description: 

    A description of the connection.

     

    Length Constraints: Maximum length of 256 characters.

    

  
  :type Tags: list
  :param Tags: 

    The tags to apply to the resource during creation.

    

  
    - *(dict) --* 

      Describes a tag.

      

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

        The tag key.

         

        Constraints: Maximum length of 128 characters.

        

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

        The tag value.

         

        Constraints: Maximum length of 256 characters.

        

      
    

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

    
    ::

      {
          'Connection': {
              'ConnectionId': 'string',
              'ConnectionArn': 'string',
              'GlobalNetworkId': 'string',
              'DeviceId': 'string',
              'ConnectedDeviceId': 'string',
              'LinkId': 'string',
              'ConnectedLinkId': 'string',
              'Description': 'string',
              'CreatedAt': datetime(2015, 1, 1),
              'State': 'PENDING'|'AVAILABLE'|'DELETING'|'UPDATING',
              'Tags': [
                  {
                      'Key': 'string',
                      'Value': 'string'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Connection** *(dict) --* 

        Information about the connection.

        
        

        - **ConnectionId** *(string) --* 

          The ID of the connection.

          
        

        - **ConnectionArn** *(string) --* 

          The Amazon Resource Name (ARN) of the connection.

          
        

        - **GlobalNetworkId** *(string) --* 

          The ID of the global network.

          
        

        - **DeviceId** *(string) --* 

          The ID of the first device in the connection.

          
        

        - **ConnectedDeviceId** *(string) --* 

          The ID of the second device in the connection.

          
        

        - **LinkId** *(string) --* 

          The ID of the link for the first device in the connection.

          
        

        - **ConnectedLinkId** *(string) --* 

          The ID of the link for the second device in the connection.

          
        

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

          The description of the connection.

          
        

        - **CreatedAt** *(datetime) --* 

          The date and time that the connection was created.

          
        

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

          The state of the connection.

          
        

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

          The tags for the connection.

          
          

          - *(dict) --* 

            Describes a tag.

            
            

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

              The tag key.

               

              Constraints: Maximum length of 128 characters.

              
            

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

              The tag value.

               

              Constraints: Maximum length of 256 characters.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`NetworkManager.Client.exceptions.ValidationException`

  
  *   :py:class:`NetworkManager.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`NetworkManager.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`NetworkManager.Client.exceptions.ConflictException`

  
  *   :py:class:`NetworkManager.Client.exceptions.ThrottlingException`

  
  *   :py:class:`NetworkManager.Client.exceptions.InternalServerException`

  