WorkSpacesWeb / Client / list_sessions

list_sessions#

WorkSpacesWeb.Client.list_sessions(**kwargs)#

Lists information for multiple secure browser sessions from a specific portal.

See also: AWS API Documentation

Request Syntax

response = client.list_sessions(
    maxResults=123,
    nextToken='string',
    portalId='string',
    sessionId='string',
    sortBy='StartTimeAscending'|'StartTimeDescending',
    status='Active'|'Terminated',
    username='string'
)
Parameters:
  • maxResults (integer) – The maximum number of results to be included in the next page.

  • nextToken (string) – The pagination token used to retrieve the next page of results for this operation.

  • portalId (string) –

    [REQUIRED]

    The ID of the web portal for the sessions.

  • sessionId (string) – The ID of the session.

  • sortBy (string) – The method in which the returned sessions should be sorted.

  • status (string) – The status of the session.

  • username (string) – The username of the session.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'sessions': [
        {
            'endTime': datetime(2015, 1, 1),
            'portalArn': 'string',
            'sessionId': 'string',
            'startTime': datetime(2015, 1, 1),
            'status': 'Active'|'Terminated',
            'username': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • nextToken (string) –

      The pagination token used to retrieve the next page of results for this operation.

    • sessions (list) –

      The sessions in a list.

      • (dict) –

        Summary information about a secure browser session.

        • endTime (datetime) –

          The end time of the session.

        • portalArn (string) –

          The ARN of the web portal.

        • sessionId (string) –

          The ID of the session.

        • startTime (datetime) –

          The start time of the session.

        • status (string) –

          The status of the session.

        • username (string) –

          The username of the session.

Exceptions