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

*********
get_relay
*********



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

  

  Fetch the relay resource and it's attributes.

  

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


  **Request Syntax**
  ::

    response = client.get_relay(
        RelayId='string'
    )
    
  :type RelayId: string
  :param RelayId: **[REQUIRED]** 

    A unique relay identifier.

    

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

    
    ::

      {
          'RelayId': 'string',
          'RelayArn': 'string',
          'RelayName': 'string',
          'ServerName': 'string',
          'ServerPort': 123,
          'Authentication': {
              'SecretArn': 'string',
              'NoAuthentication': {}
          },
          'CreatedTimestamp': datetime(2015, 1, 1),
          'LastModifiedTimestamp': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The unique relay identifier.

        
      

      - **RelayArn** *(string) --* 

        The Amazon Resource Name (ARN) of the relay.

        
      

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

        The unique name of the relay.

        
      

      - **ServerName** *(string) --* 

        The destination relay server address.

        
      

      - **ServerPort** *(integer) --* 

        The destination relay server port.

        
      

      - **Authentication** *(dict) --* 

        The authentication attribute—contains the secret ARN where the customer relay server credentials are stored.

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``SecretArn``, ``NoAuthentication``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


      
        

        - **SecretArn** *(string) --* 

          The ARN of the secret created in secrets manager where the relay server's SMTP credentials are stored.

          
        

        - **NoAuthentication** *(dict) --* 

          Keep an empty structure if the relay destination server does not require SMTP credential authentication.

          
      
    
      

      - **CreatedTimestamp** *(datetime) --* 

        The timestamp of when the relay was created.

        
      

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

        The timestamp of when relay was last updated.

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

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

  