EMRServerless / Client / terminate_session

terminate_session

EMRServerless.Client.terminate_session(**kwargs)

Terminates the specified session. After you terminate a session, it enters the TERMINATING state and then the TERMINATED state. You can still access the Spark History Server for a terminated session through the GetResourceDashboard operation.

See also: AWS API Documentation

Request Syntax

response = client.terminate_session(
    applicationId='string',
    sessionId='string'
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The ID of the application that the session belongs to.

  • sessionId (string) –

    [REQUIRED]

    The ID of the session to terminate.

Return type:

dict

Returns:

Response Syntax

{
    'applicationId': 'string',
    'sessionId': 'string'
}

Response Structure

  • (dict) –

    • applicationId (string) –

      The output contains the application ID on which the session was terminated.

    • sessionId (string) –

      The output contains the ID of the terminated session.

Exceptions

  • EMRServerless.Client.exceptions.ValidationException

  • EMRServerless.Client.exceptions.InternalServerException

  • EMRServerless.Client.exceptions.ResourceNotFoundException