:doc:`SSM <../../ssm>` / Client / resume_session

**************
resume_session
**************



.. py:method:: SSM.Client.resume_session(**kwargs)

  

  Reconnects a session to a managed node after it has been disconnected. Connections can be resumed for disconnected sessions, but not terminated sessions.

   

  .. note::

    

    This command is primarily for use by client machines to automatically reconnect during intermittent network issues. It isn't intended for any other use.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ResumeSession>`_  


  **Request Syntax**
  ::

    response = client.resume_session(
        SessionId='string'
    )
    
  :type SessionId: string
  :param SessionId: **[REQUIRED]** 

    The ID of the disconnected session to resume.

    

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

    
    ::

      {
          'SessionId': 'string',
          'TokenValue': 'string',
          'StreamUrl': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **SessionId** *(string) --* 

        The ID of the session.

        
      

      - **TokenValue** *(string) --* 

        An encrypted token value containing session and caller information. Used to authenticate the connection to the managed node.

        
      

      - **StreamUrl** *(string) --* 

        A URL back to SSM Agent on the managed node that the Session Manager client uses to send commands and receive output from the managed node. Format: ``wss://ssmmessages.**region**.amazonaws.com/v1/data-channel/**session-id**?stream=(input|output)``.

         

        **region** represents the Region identifier for an Amazon Web Services Region supported by Amazon Web Services Systems Manager, such as ``us-east-2`` for the US East (Ohio) Region. For a list of supported **region** values, see the **Region** column in `Systems Manager service endpoints <https://docs.aws.amazon.com/general/latest/gr/ssm.html#ssm_region>`__ in the *Amazon Web Services General Reference*.

         

        **session-id** represents the ID of a Session Manager session, such as ``1a2b3c4dEXAMPLE``.

        
  
  **Exceptions**
  
  *   :py:class:`SSM.Client.exceptions.DoesNotExistException`

  
  *   :py:class:`SSM.Client.exceptions.InternalServerError`

  