Athena / Client / get_session_status

get_session_status#

Athena.Client.get_session_status(**kwargs)#

Gets the current status of a session.

See also: AWS API Documentation

Request Syntax

response = client.get_session_status(
    SessionId='string'
)
Parameters:

SessionId (string) –

[REQUIRED]

The session ID.

Return type:

dict

Returns:

Response Syntax

{
    'SessionId': 'string',
    'Status': {
        'StartDateTime': datetime(2015, 1, 1),
        'LastModifiedDateTime': datetime(2015, 1, 1),
        'EndDateTime': datetime(2015, 1, 1),
        'IdleSinceDateTime': datetime(2015, 1, 1),
        'State': 'CREATING'|'CREATED'|'IDLE'|'BUSY'|'TERMINATING'|'TERMINATED'|'DEGRADED'|'FAILED',
        'StateChangeReason': 'string'
    }
}

Response Structure

  • (dict) –

    • SessionId (string) –

      The session ID.

    • Status (dict) –

      Contains information about the status of the session.

      • StartDateTime (datetime) –

        The date and time that the session started.

      • LastModifiedDateTime (datetime) –

        The most recent date and time that the session was modified.

      • EndDateTime (datetime) –

        The date and time that the session ended.

      • IdleSinceDateTime (datetime) –

        The date and time starting at which the session became idle. Can be empty if the session is not currently idle.

      • State (string) –

        The state of the session. A description of each state follows.

        CREATING - The session is being started, including acquiring resources.

        CREATED - The session has been started.

        IDLE - The session is able to accept a calculation.

        BUSY - The session is processing another task and is unable to accept a calculation.

        TERMINATING - The session is in the process of shutting down.

        TERMINATED - The session and its resources are no longer running.

        DEGRADED - The session has no healthy coordinators.

        FAILED - Due to a failure, the session and its resources are no longer running.

      • StateChangeReason (string) –

        The reason for the session state change (for example, canceled because the session was terminated).

Exceptions