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

*****************
terminate_session
*****************



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

  

  Permanently ends a session and closes the data connection between the Session Manager client and SSM Agent on the managed node. A terminated session can't be resumed.

  

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


  **Request Syntax**
  ::

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

    The ID of the session to terminate.

    

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

    
    ::

      {
          'SessionId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The ID of the session that has been terminated.

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

  