:doc:`MailManager <../../mailmanager>` / Client / list_relays

***********
list_relays
***********



.. py:method:: MailManager.Client.list_relays(**kwargs)

  

  Lists all the existing relay resources.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mailmanager-2023-10-17/ListRelays>`_  


  **Request Syntax**
  ::

    response = client.list_relays(
        PageSize=123,
        NextToken='string'
    )
    
  :type PageSize: integer
  :param PageSize: 

    The number of relays to be returned in one request.

    

  
  :type NextToken: string
  :param NextToken: 

    If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.

    

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

    
    ::

      {
          'Relays': [
              {
                  'RelayId': 'string',
                  'RelayName': 'string',
                  'LastModifiedTimestamp': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Relays** *(list) --* 

        The list of returned relays.

        
        

        - *(dict) --* 

          The relay resource that can be used as a rule to relay receiving emails to the destination relay server.

          
          

          - **RelayId** *(string) --* 

            The unique relay identifier.

            
          

          - **RelayName** *(string) --* 

            The unique relay name.

            
          

          - **LastModifiedTimestamp** *(datetime) --* 

            The timestamp of when the relay was last modified.

            
      
    
      

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

        If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.

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

  