:doc:`CloudWatchObservabilityAccessManager <../../oam>` / Client / list_links

**********
list_links
**********



.. py:method:: CloudWatchObservabilityAccessManager.Client.list_links(**kwargs)

  

  Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.

   

  To find a list of links for one monitoring account sink, use `ListAttachedLinks <https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListAttachedLinks.html>`__ from within the monitoring account.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/ListLinks>`_  


  **Request Syntax**
  ::

    response = client.list_links(
        MaxResults=123,
        NextToken='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    Limits the number of returned links to the specified number.

    

  
  :type NextToken: string
  :param NextToken: 

    The token for the next set of items to return. You received this token from a previous call.

    

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

    
    ::

      {
          'Items': [
              {
                  'Arn': 'string',
                  'Id': 'string',
                  'Label': 'string',
                  'ResourceTypes': [
                      'string',
                  ],
                  'SinkArn': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Items** *(list) --* 

        An array of structures that contain the information about the returned links.

        
        

        - *(dict) --* 

          A structure that contains information about one of this source account's links to a monitoring account.

          
          

          - **Arn** *(string) --* 

            The ARN of the link.

            
          

          - **Id** *(string) --* 

            The random ID string that Amazon Web Services generated as part of the link ARN.

            
          

          - **Label** *(string) --* 

            The label that was assigned to this link at creation, with the variables resolved to their actual values.

            
          

          - **ResourceTypes** *(list) --* 

            The resource types supported by this link.

            
            

            - *(string) --* 
        
          

          - **SinkArn** *(string) --* 

            The ARN of the sink that this link is attached to.

            
      
    
      

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

        The token to use when requesting the next set of links.

        
  
  **Exceptions**
  
  *   :py:class:`CloudWatchObservabilityAccessManager.Client.exceptions.InternalServiceFault`

  
  *   :py:class:`CloudWatchObservabilityAccessManager.Client.exceptions.InvalidParameterException`

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

  