:doc:`IoT <../../iot>` / Client / list_principal_things

*********************
list_principal_things
*********************



.. py:method:: IoT.Client.list_principal_things(**kwargs)

  

  Lists the things associated with the specified principal. A principal can be X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or federated identities.

   

  Requires permission to access the `ListPrincipalThings <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/ListPrincipalThings>`_  


  **Request Syntax**
  ::

    response = client.list_principal_things(
        nextToken='string',
        maxResults=123,
        principal='string'
    )
    
  :type nextToken: string
  :param nextToken: 

    To retrieve the next set of results, the ``nextToken`` value from a previous response; otherwise **null** to receive the first set of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return in this operation.

    

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

    The principal.

    

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

    
    ::

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

    

    - *(dict) --* 

      The output from the ListPrincipalThings operation.

      
      

      - **things** *(list) --* 

        The things.

        
        

        - *(string) --* 
    
      

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

        The token to use to get the next set of results, or **null** if there are no additional results.

        
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

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

  
  *   :py:class:`IoT.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`IoT.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`IoT.Client.exceptions.InternalFailureException`

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

  