list_notebook_sessions

list_notebook_sessions(**kwargs)

Lists, in descending order, the sessions that have been created in a notebook that are in an active state like CREATING , CREATED , IDLE or BUSY . Newer sessions are listed first; older sessions are listed later.

See also: AWS API Documentation

Request Syntax

response = client.list_notebook_sessions(
    NotebookId='string',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • NotebookId (string) --

    [REQUIRED]

    The ID of the notebook to list sessions for.

  • MaxResults (integer) -- The maximum number of notebook sessions to return.
  • NextToken (string) -- A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
Return type

dict

Returns

Response Syntax

{
    'NotebookSessionsList': [
        {
            'SessionId': 'string',
            'CreationTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NotebookSessionsList (list) --

      A list of the sessions belonging to the notebook.

      • (dict) --

        Contains the notebook session ID and notebook session creation time.

        • SessionId (string) --

          The notebook session ID.

        • CreationTime (datetime) --

          The time when the notebook session was created.

    • NextToken (string) --

      A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

Exceptions

  • Athena.Client.exceptions.InternalServerException
  • Athena.Client.exceptions.InvalidRequestException
  • Athena.Client.exceptions.ResourceNotFoundException