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

*********************
get_link_associations
*********************



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

  

  Gets the link associations for a device or a link. Either the device ID or the link ID must be specified.

  

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


  **Request Syntax**
  ::

    response = client.get_link_associations(
        GlobalNetworkId='string',
        DeviceId='string',
        LinkId='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type GlobalNetworkId: string
  :param GlobalNetworkId: **[REQUIRED]** 

    The ID of the global network.

    

  
  :type DeviceId: string
  :param DeviceId: 

    The ID of the device.

    

  
  :type LinkId: string
  :param LinkId: 

    The ID of the link.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return.

    

  
  :type NextToken: string
  :param NextToken: 

    The token for the next page of results.

    

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

    
    ::

      {
          'LinkAssociations': [
              {
                  'GlobalNetworkId': 'string',
                  'DeviceId': 'string',
                  'LinkId': 'string',
                  'LinkAssociationState': 'PENDING'|'AVAILABLE'|'DELETING'|'DELETED'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **LinkAssociations** *(list) --* 

        The link associations.

        
        

        - *(dict) --* 

          Describes the association between a device and a link.

          
          

          - **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.

            
      
    
      

      - **NextToken** *(string) --* 

        The token for the next page of results.

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

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

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

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

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

  