EMR / Client / terminate_session

terminate_session

EMR.Client.terminate_session(**kwargs)

Terminates an active session. After you call this operation, the session enters the TERMINATING state and then transitions to TERMINATED.

See also: AWS API Documentation

Request Syntax

response = client.terminate_session(
    ClusterId='string',
    SessionId='string'
)
Parameters:
  • ClusterId (string) –

    [REQUIRED]

    The ID of the cluster that the session belongs to.

  • SessionId (string) –

    [REQUIRED]

    The ID of the session to terminate.

Return type:

dict

Returns:

Response Syntax

{
    'ClusterId': 'string',
    'SessionId': 'string',
    'State': 'SUBMITTED'|'STARTING'|'STARTED'|'IDLE'|'BUSY'|'TERMINATING'|'TERMINATED'|'FAILED'
}

Response Structure

  • (dict) –

    Output of the TerminateSession operation.

    • ClusterId (string) –

      The ID of the cluster that the session belonged to.

    • SessionId (string) –

      The ID of the terminated session.

    • State (string) –

      The state of the session after the terminate request has been accepted.

Exceptions