:doc:`WorkSpacesWeb <../../workspaces-web>` / Paginator / ListSessions

************
ListSessions
************



.. py:class:: WorkSpacesWeb.Paginator.ListSessions

  ::

    
    paginator = client.get_paginator('list_sessions')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`WorkSpacesWeb.Client.list_sessions`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-web-2020-07-08/ListSessions>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          portalId='string',
          username='string',
          sessionId='string',
          sortBy='StartTimeAscending'|'StartTimeDescending',
          status='Active'|'Terminated',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type portalId: string
    :param portalId: **[REQUIRED]** 

      The ID of the web portal for the sessions.

      

    
    :type username: string
    :param username: 

      The username of the session.

      

    
    :type sessionId: string
    :param sessionId: 

      The ID of the session.

      

    
    :type sortBy: string
    :param sortBy: 

      The method in which the returned sessions should be sorted.

      

    
    :type status: string
    :param status: 

      The status of the session.

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      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.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax**

      
      ::

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

      

      - *(dict) --* 
        

        - **sessions** *(list) --* 

          The sessions in a list.

          
          

          - *(dict) --* 

            Summary information about a secure browser session.

            
            

            - **portalArn** *(string) --* 

              The ARN of the web portal.

              
            

            - **sessionId** *(string) --* 

              The ID of the session.

              
            

            - **username** *(string) --* 

              The username of the session.

              
            

            - **status** *(string) --* 

              The status of the session.

              
            

            - **startTime** *(datetime) --* 

              The start time of the session.

              
            

            - **endTime** *(datetime) --* 

              The end time of the session.

              
        
      
        

        - **NextToken** *(string) --* 

          A token to resume pagination.

          
    