WorkSpacesWeb / Paginator / ListSessions

ListSessions#

class WorkSpacesWeb.Paginator.ListSessions#
paginator = client.get_paginator('list_sessions')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from WorkSpacesWeb.Client.list_sessions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    portalId='string',
    sessionId='string',
    sortBy='StartTimeAscending'|'StartTimeDescending',
    status='Active'|'Terminated',
    username='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • 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.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    • 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.

    • NextToken (string) –

      A token to resume pagination.