:doc:`Transfer <../../transfer>` / Client / list_agreements

***************
list_agreements
***************



.. py:method:: Transfer.Client.list_agreements(**kwargs)

  

  Returns a list of the agreements for the server that's identified by the ``ServerId`` that you supply. If you want to limit the results to a certain number, supply a value for the ``MaxResults`` parameter. If you ran the command previously and received a value for ``NextToken``, you can supply that value to continue listing agreements from where you left off.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListAgreements>`_  


  **Request Syntax**
  ::

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

    The maximum number of items to return.

    

  
  :type NextToken: string
  :param NextToken: 

    When you can get additional results from the ``ListAgreements`` call, a ``NextToken`` parameter is returned in the output. You can then pass in a subsequent command to the ``NextToken`` parameter to continue listing additional agreements.

    

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

    The identifier of the server for which you want a list of agreements.

    

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

    
    ::

      {
          'NextToken': 'string',
          'Agreements': [
              {
                  'Arn': 'string',
                  'AgreementId': 'string',
                  'Description': 'string',
                  'Status': 'ACTIVE'|'INACTIVE',
                  'ServerId': 'string',
                  'LocalProfileId': 'string',
                  'PartnerProfileId': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        Returns a token that you can use to call ``ListAgreements`` again and receive additional results, if there are any.

        
      

      - **Agreements** *(list) --* 

        Returns an array, where each item contains the details of an agreement.

        
        

        - *(dict) --* 

          Describes the properties of an agreement.

          
          

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

            The Amazon Resource Name (ARN) of the specified agreement.

            
          

          - **AgreementId** *(string) --* 

            A unique identifier for the agreement. This identifier is returned when you create an agreement.

            
          

          - **Description** *(string) --* 

            The current description for the agreement. You can change it by calling the ``UpdateAgreement`` operation and providing a new description.

            
          

          - **Status** *(string) --* 

            The agreement can be either ``ACTIVE`` or ``INACTIVE``.

            
          

          - **ServerId** *(string) --* 

            The unique identifier for the agreement.

            
          

          - **LocalProfileId** *(string) --* 

            A unique identifier for the AS2 local profile.

            
          

          - **PartnerProfileId** *(string) --* 

            A unique identifier for the partner profile.

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

  
  *   :py:class:`Transfer.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Transfer.Client.exceptions.InternalServiceError`

  
  *   :py:class:`Transfer.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`Transfer.Client.exceptions.InvalidNextTokenException`

  