:doc:`MQ <../../mq>` / Client / list_users

**********
list_users
**********



.. py:method:: MQ.Client.list_users(**kwargs)

  

  Returns a list of all ActiveMQ users.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListUsers>`_  


  **Request Syntax**
  ::

    response = client.list_users(
        BrokerId='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type BrokerId: string
  :param BrokerId: **[REQUIRED]** 

    The unique ID that Amazon MQ generates for the broker.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.

    

  
  :type NextToken: string
  :param NextToken: 

    The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.

    

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

    
    ::

      {
          'BrokerId': 'string',
          'MaxResults': 123,
          'NextToken': 'string',
          'Users': [
              {
                  'PendingChange': 'CREATE'|'UPDATE'|'DELETE',
                  'Username': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 

      HTTP Status Code 200: OK.

      
      

      - **BrokerId** *(string) --* 

        Required. The unique ID that Amazon MQ generates for the broker.

        
      

      - **MaxResults** *(integer) --* 

        Required. The maximum number of ActiveMQ users that can be returned per page (20 by default). This value must be an integer from 5 to 100.

        
      

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

        The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.

        
      

      - **Users** *(list) --* 

        Required. The list of all ActiveMQ usernames for the specified broker. Does not apply to RabbitMQ brokers.

        
        

        - *(dict) --* 

          Returns a list of all broker users. Does not apply to RabbitMQ brokers.

          
          

          - **PendingChange** *(string) --* 

            The type of change pending for the broker user.

            
          

          - **Username** *(string) --* 

            Required. The username of the broker user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`MQ.Client.exceptions.NotFoundException`

  
  *   :py:class:`MQ.Client.exceptions.BadRequestException`

  
  *   :py:class:`MQ.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`MQ.Client.exceptions.ForbiddenException`

  