:doc:`DirectoryServiceData <../../ds-data>` / Paginator / ListGroups

**********
ListGroups
**********



.. py:class:: DirectoryServiceData.Paginator.ListGroups

  ::

    
    paginator = client.get_paginator('list_groups')

  
  

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

    Creates an iterator that will paginate through responses from :py:meth:`DirectoryServiceData.Client.list_groups`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/directory-service-data-2023-05-31/ListGroups>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          DirectoryId='string',
          Realm='string',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type DirectoryId: string
    :param DirectoryId: **[REQUIRED]** 

      The identifier (ID) of the directory that's associated with the group.

      

    
    :type Realm: string
    :param Realm: 

      The domain name associated with the directory.

       

      .. note::

        

        This parameter is optional, so you can return groups outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD groups are returned.

         

        This value 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**

      
      ::

        {
            'DirectoryId': 'string',
            'Groups': [
                {
                    'GroupScope': 'DomainLocal'|'Global'|'Universal'|'BuiltinLocal',
                    'GroupType': 'Distribution'|'Security',
                    'SAMAccountName': 'string',
                    'SID': 'string'
                },
            ],
            'Realm': 'string'
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **DirectoryId** *(string) --* 

          The identifier (ID) of the directory that's associated with the group.

          
        

        - **Groups** *(list) --* 

          The group information that the request returns.

          
          

          - *(dict) --* 

            A structure containing a subset of fields of a group object from a directory.

            
            

            - **GroupScope** *(string) --* 

              The scope of the AD group. For details, see `Active Directory security groups <https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-groups#group-scope>`__.

              
            

            - **GroupType** *(string) --* 

              The AD group type. For details, see `Active Directory security group type <https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-groups#how-active-directory-security-groups-work>`__.

              
            

            - **SAMAccountName** *(string) --* 

              The name of the group.

              
            

            - **SID** *(string) --* 

              The unique security identifier (SID) of the group.

              
        
      
        

        - **Realm** *(string) --* 

          The domain name associated with the group.

          
    