terminate_session

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

Request Syntax

response = client.terminate_session(
    SessionId='string'
)
Parameters
SessionId (string) --

[REQUIRED]

The ID of the session to terminate.

Return type
dict
Returns
Response Syntax
{
    'SessionId': 'string'
}

Response Structure

  • (dict) --
    • SessionId (string) --

      The ID of the session that has been terminated.

Exceptions

  • SSM.Client.exceptions.InternalServerError