:doc:`MultipartyApproval <../../mpa>` / Paginator / ListSessions

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



.. py:class:: MultipartyApproval.Paginator.ListSessions

  ::

    
    paginator = client.get_paginator('list_sessions')

  
  

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

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

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mpa-2022-07-26/ListSessions>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          ApprovalTeamArn='string',
          Filters=[
              {
                  'FieldName': 'ActionName'|'ApprovalTeamName'|'VotingTime'|'Vote'|'SessionStatus'|'InitiationTime',
                  'Operator': 'EQ'|'NE'|'GT'|'LT'|'GTE'|'LTE'|'CONTAINS'|'NOT_CONTAINS'|'BETWEEN',
                  'Value': 'string'
              },
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type ApprovalTeamArn: string
    :param ApprovalTeamArn: **[REQUIRED]** 

      Amazon Resource Name (ARN) for the approval team.

      

    
    :type Filters: list
    :param Filters: 

      An array of ``Filter`` objects. Contains the filter to apply when listing sessions.

      

    
      - *(dict) --* 

        Contains the filter to apply to requests. You can specify up to 10 filters for a request.

        

      
        - **FieldName** *(string) --* 

          Name of the filter to use.

           

          .. note::

            

            **Supported filters**

             

            The supported filters for  ListSessions are: ``ActionName``, ``SessionStatus``, and ``InitationTime``.

            

          

        
        - **Operator** *(string) --* 

          Operator to use for filtering.

           

          
          * ``EQ``: Equal to the specified value
           
          * ``NE``: Not equal to the specified value
           
          * ``GT``: Greater than the specified value
           
          * ``LT``: Less than the specified value
           
          * ``GTE``: Greater than or equal to the specified value
           
          * ``LTE``: Less than or equal to the specified value
           
          * ``CONTAINS``: Contains the specified value
           
          * ``NOT_CONTAINS``: Does not contain the specified value
           
          * ``BETWEEN``: Between two values, inclusive of the specified values.
          

           

          .. note::

            

            **Supported operators for each filter**:

             

            
            * ``ActionName``: ``EQ`` | ``NE`` | ``CONTAINS`` | ``NOT_CONTAINS``
             
            * ``SessionStatus``: ``EQ`` | ``NE``
             
            * ``InitiationTime``: ``GT`` | ``LT`` | ``GTE`` | ``LTE`` | ``BETWEEN``
            

            

          

        
        - **Value** *(string) --* 

          Value to use for filtering. For the ``BETWEEN`` operator, specify values in the format ``a AND b`` ( ``AND`` is case-insensitive).

          

        
      
  
    :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': [
                {
                    'SessionArn': 'string',
                    'ApprovalTeamName': 'string',
                    'ApprovalTeamArn': 'string',
                    'InitiationTime': datetime(2015, 1, 1),
                    'ExpirationTime': datetime(2015, 1, 1),
                    'CompletionTime': datetime(2015, 1, 1),
                    'Description': 'string',
                    'ActionName': 'string',
                    'ProtectedResourceArn': 'string',
                    'RequesterServicePrincipal': 'string',
                    'RequesterPrincipalArn': 'string',
                    'RequesterRegion': 'string',
                    'RequesterAccountId': 'string',
                    'Status': 'PENDING'|'CANCELLED'|'APPROVED'|'FAILED'|'CREATING',
                    'StatusCode': 'REJECTED'|'EXPIRED'|'CONFIGURATION_CHANGED',
                    'StatusMessage': 'string',
                    'ActionCompletionStrategy': 'AUTO_COMPLETION_UPON_APPROVAL',
                    'AdditionalSecurityRequirements': [
                        'APPROVER_VERIFICATION_REQUIRED',
                    ]
                },
            ]
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **Sessions** *(list) --* 

          An array of ``ListSessionsResponseSession`` objects. Contains details for the sessions.

          
          

          - *(dict) --* 

            Contains details for an approval session. For more information, see `Session <https://docs.aws.amazon.com/mpa/latest/userguide/mpa-health.html>`__ in the *Multi-party approval User Guide*

            
            

            - **SessionArn** *(string) --* 

              Amazon Resource Name (ARN) for the session.

              
            

            - **ApprovalTeamName** *(string) --* 

              Name of the approval team.

              
            

            - **ApprovalTeamArn** *(string) --* 

              Amazon Resource Name (ARN) for the approval team.

              
            

            - **InitiationTime** *(datetime) --* 

              Timestamp when the session was initiated.

              
            

            - **ExpirationTime** *(datetime) --* 

              Timestamp when the session was expire.

              
            

            - **CompletionTime** *(datetime) --* 

              Timestamp when the session was completed.

              
            

            - **Description** *(string) --* 

              Description for the team.

              
            

            - **ActionName** *(string) --* 

              Name of the protected operation.

              
            

            - **ProtectedResourceArn** *(string) --* 

              Amazon Resource Name (ARN) for the protected operation.

              
            

            - **RequesterServicePrincipal** *(string) --* 

              `Service principal <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services>`__ for the service associated with the protected operation.

              
            

            - **RequesterPrincipalArn** *(string) --* 

              `IAM principal <https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-request>`__ that made the operation request.

              
            

            - **RequesterRegion** *(string) --* 

              Amazon Web Services Region where the operation request originated.

              
            

            - **RequesterAccountId** *(string) --* 

              ID for the account that made the operation request.

              
            

            - **Status** *(string) --* 

              Status for the protected operation. For example, if the operation is ``PENDING``.

              
            

            - **StatusCode** *(string) --* 

              Status code of the session.

              
            

            - **StatusMessage** *(string) --* 

              Message describing the status for session.

              
            

            - **ActionCompletionStrategy** *(string) --* 

              Strategy for executing the protected operation. ``AUTO_COMPLETION_UPON_APPROVAL`` means the operation is executed automatically using the requester's permissions, if approved.

              
            

            - **AdditionalSecurityRequirements** *(list) --* 

              A list of ``AdditionalSecurityRequirement`` applied to the session.

              
              

              - *(string) --* 

                Additional security requirements applied to a session or invitation

                 

                
                * ``APPROVER_VERIFICATION_REQUIRED``: Approvers will be required to perform an MFA challenge to vote
                

                
          
        
      
    