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

**********************
list_policy_principals
**********************



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

  

  Lists the principals associated with the specified policy.

   

  **Note:** This action is deprecated and works as expected for backward compatibility, but we won't add enhancements. Use  ListTargetsForPolicy instead.

   

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

  

  .. danger::

        This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.


  

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


  **Request Syntax**
  ::

    response = client.list_policy_principals(
        policyName='string',
        marker='string',
        pageSize=123,
        ascendingOrder=True|False
    )
    
  :type policyName: string
  :param policyName: **[REQUIRED]** 

    The policy name.

    

  
  :type marker: string
  :param marker: 

    The marker for the next set of results.

    

  
  :type pageSize: integer
  :param pageSize: 

    The result page size.

    

  
  :type ascendingOrder: boolean
  :param ascendingOrder: 

    Specifies the order for results. If true, the results are returned in ascending creation order.

    

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

    
    ::

      {
          'principals': [
              'string',
          ],
          'nextMarker': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The output from the ListPolicyPrincipals operation.

      
      

      - **principals** *(list) --* 

        The descriptions of the principals.

        
        

        - *(string) --* 
    
      

      - **nextMarker** *(string) --* 

        The marker for the next set of results, or null if there are no additional results.

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

  
  *   :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`

  