:doc:`QBusiness <../../qbusiness>` / Client / list_groups

***********
list_groups
***********



.. py:method:: QBusiness.Client.list_groups(**kwargs)

  

  Provides a list of groups that are mapped to users.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/qbusiness-2023-11-27/ListGroups>`_  


  **Request Syntax**
  ::

    response = client.list_groups(
        applicationId='string',
        indexId='string',
        updatedEarlierThan=datetime(2015, 1, 1),
        dataSourceId='string',
        nextToken='string',
        maxResults=123
    )
    
  :type applicationId: string
  :param applicationId: **[REQUIRED]** 

    The identifier of the application for getting a list of groups mapped to users.

    

  
  :type indexId: string
  :param indexId: **[REQUIRED]** 

    The identifier of the index for getting a list of groups mapped to users.

    

  
  :type updatedEarlierThan: datetime
  :param updatedEarlierThan: **[REQUIRED]** 

    The timestamp identifier used for the latest ``PUT`` or ``DELETE`` action for mapping users to their groups.

    

  
  :type dataSourceId: string
  :param dataSourceId: 

    The identifier of the data source for getting a list of groups mapped to users.

    

  
  :type nextToken: string
  :param nextToken: 

    If the previous response was incomplete (because there is more data to retrieve), Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of groups that are mapped to users.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of returned groups that are mapped to users.

    

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

    
    ::

      {
          'nextToken': 'string',
          'items': [
              {
                  'groupName': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **nextToken** *(string) --* 

        If the response is truncated, Amazon Q Business returns this token that you can use in the subsequent request to retrieve the next set of groups that are mapped to users.

        
      

      - **items** *(list) --* 

        Summary information for list of groups that are mapped to users.

        
        

        - *(dict) --* 

          Summary information for groups.

          
          

          - **groupName** *(string) --* 

            The name of the group the summary information is for.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`QBusiness.Client.exceptions.InternalServerException`

  
  *   :py:class:`QBusiness.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`QBusiness.Client.exceptions.ConflictException`

  
  *   :py:class:`QBusiness.Client.exceptions.ThrottlingException`

  
  *   :py:class:`QBusiness.Client.exceptions.ValidationException`

  
  *   :py:class:`QBusiness.Client.exceptions.AccessDeniedException`

  