:doc:`PartnerCentralChannelAPI <../../partnercentral-channel>` / Client / list_relationships

******************
list_relationships
******************



.. py:method:: PartnerCentralChannelAPI.Client.list_relationships(**kwargs)

  

  Lists partner relationships based on specified criteria.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/partnercentral-channel-2024-03-18/ListRelationships>`_  


  **Request Syntax**
  ::

    response = client.list_relationships(
        catalog='string',
        maxResults=123,
        associatedAccountIds=[
            'string',
        ],
        associationTypes=[
            'DOWNSTREAM_SELLER'|'END_CUSTOMER'|'INTERNAL',
        ],
        displayNames=[
            'string',
        ],
        programManagementAccountIdentifiers=[
            'string',
        ],
        sort={
            'sortOrder': 'Ascending'|'Descending',
            'sortBy': 'UpdatedAt'
        },
        nextToken='string'
    )
    
  :type catalog: string
  :param catalog: **[REQUIRED]** 

    The catalog identifier to filter relationships.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return in a single call.

    

  
  :type associatedAccountIds: list
  :param associatedAccountIds: 

    Filter by associated AWS account IDs.

    

  
    - *(string) --* 

    

  :type associationTypes: list
  :param associationTypes: 

    Filter by association types.

    

  
    - *(string) --* 

    

  :type displayNames: list
  :param displayNames: 

    Filter by display names.

    

  
    - *(string) --* 

    

  :type programManagementAccountIdentifiers: list
  :param programManagementAccountIdentifiers: 

    Filter by program management account identifiers.

    

  
    - *(string) --* 

    

  :type sort: dict
  :param sort: 

    Sorting options for the results.

    

  
    - **sortOrder** *(string) --* **[REQUIRED]** 

      The sort order (ascending or descending).

      

    
    - **sortBy** *(string) --* **[REQUIRED]** 

      The field to sort by.

      

    
  
  :type nextToken: string
  :param nextToken: 

    Token for retrieving the next page of results.

    

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

    
    ::

      {
          'items': [
              {
                  'arn': 'string',
                  'id': 'string',
                  'revision': 'string',
                  'catalog': 'string',
                  'associationType': 'DOWNSTREAM_SELLER'|'END_CUSTOMER'|'INTERNAL',
                  'programManagementAccountId': 'string',
                  'associatedAccountId': 'string',
                  'displayName': 'string',
                  'sector': 'COMMERCIAL'|'GOVERNMENT'|'GOVERNMENT_EXCEPTION',
                  'createdAt': datetime(2015, 1, 1),
                  'updatedAt': datetime(2015, 1, 1),
                  'startDate': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **items** *(list) --* 

        List of relationships matching the criteria.

        
        

        - *(dict) --* 

          Summary information about a partner relationship.

          
          

          - **arn** *(string) --* 

            The Amazon Resource Name (ARN) of the relationship.

            
          

          - **id** *(string) --* 

            The unique identifier of the relationship.

            
          

          - **revision** *(string) --* 

            The current revision number of the relationship.

            
          

          - **catalog** *(string) --* 

            The catalog identifier associated with the relationship.

            
          

          - **associationType** *(string) --* 

            The type of association for the relationship.

            
          

          - **programManagementAccountId** *(string) --* 

            The identifier of the program management account.

            
          

          - **associatedAccountId** *(string) --* 

            The AWS account ID associated in this relationship.

            
          

          - **displayName** *(string) --* 

            The display name of the relationship.

            
          

          - **sector** *(string) --* 

            The business sector for the relationship.

            
          

          - **createdAt** *(datetime) --* 

            The timestamp when the relationship was created.

            
          

          - **updatedAt** *(datetime) --* 

            The timestamp when the relationship was last updated.

            
          

          - **startDate** *(datetime) --* 

            The start date of the relationship.

            
      
    
      

      - **nextToken** *(string) --* 

        Token for retrieving the next page of results, if available.

        
  
  **Exceptions**
  
  *   :py:class:`PartnerCentralChannelAPI.Client.exceptions.ResourceNotFoundException`

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

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

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

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

  