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

**************
associate_link
**************



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

  

  Associates a link to a device. A device can be associated to multiple links and a link can be associated to multiple devices. The device and link must be in the same global network and the same site.

  

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


  **Request Syntax**
  ::

    response = client.associate_link(
        GlobalNetworkId='string',
        DeviceId='string',
        LinkId='string'
    )
    
  :type GlobalNetworkId: string
  :param GlobalNetworkId: **[REQUIRED]** 

    The ID of the global network.

    

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

    The ID of the device.

    

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

    The ID of the link.

    

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

    
    ::

      {
          'LinkAssociation': {
              'GlobalNetworkId': 'string',
              'DeviceId': 'string',
              'LinkId': 'string',
              'LinkAssociationState': 'PENDING'|'AVAILABLE'|'DELETING'|'DELETED'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **LinkAssociation** *(dict) --* 

        The link association.

        
        

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

          The ID of the global network.

          
        

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

          The device ID for the link association.

          
        

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

          The ID of the link.

          
        

        - **LinkAssociationState** *(string) --* 

          The state of the association.

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

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

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

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

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

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

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

  