:doc:`WorkSpaces <../../workspaces>` / Client / list_account_links

******************
list_account_links
******************



.. py:method:: WorkSpaces.Client.list_account_links(**kwargs)

  

  Lists all account links.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ListAccountLinks>`_  


  **Request Syntax**
  ::

    response = client.list_account_links(
        LinkStatusFilter=[
            'LINKED'|'LINKING_FAILED'|'LINK_NOT_FOUND'|'PENDING_ACCEPTANCE_BY_TARGET_ACCOUNT'|'REJECTED',
        ],
        NextToken='string',
        MaxResults=123
    )
    
  :type LinkStatusFilter: list
  :param LinkStatusFilter: 

    Filters the account based on their link status.

    

  
    - *(string) --* 

    

  :type NextToken: string
  :param NextToken: 

    The token to use to retrieve the next page of results. This value is null when there are no more results to return.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of accounts to return.

    

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

    
    ::

      {
          'AccountLinks': [
              {
                  'AccountLinkId': 'string',
                  'AccountLinkStatus': 'LINKED'|'LINKING_FAILED'|'LINK_NOT_FOUND'|'PENDING_ACCEPTANCE_BY_TARGET_ACCOUNT'|'REJECTED',
                  'SourceAccountId': 'string',
                  'TargetAccountId': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **AccountLinks** *(list) --* 

        Information about the account links.

        
        

        - *(dict) --* 

          Information about about the account link.

          
          

          - **AccountLinkId** *(string) --* 

            The identifier of the account link.

            
          

          - **AccountLinkStatus** *(string) --* 

            The status of the account link.

            
          

          - **SourceAccountId** *(string) --* 

            The identifier of the source account.

            
          

          - **TargetAccountId** *(string) --* 

            The identifier of the target account.

            
      
    
      

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

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

        
  
  **Exceptions**
  
  *   :py:class:`WorkSpaces.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.ValidationException`

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

  