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

*************
list_policies
*************



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

  

  Lists your policies.

   

  Requires permission to access the `ListPolicies <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/ListPolicies>`_  


  **Request Syntax**
  ::

    response = client.list_policies(
        marker='string',
        pageSize=123,
        ascendingOrder=True|False
    )
    
  :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**

    
    ::

      {
          'policies': [
              {
                  'policyName': 'string',
                  'policyArn': 'string'
              },
          ],
          'nextMarker': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The output from the ListPolicies operation.

      
      

      - **policies** *(list) --* 

        The descriptions of the policies.

        
        

        - *(dict) --* 

          Describes an IoT policy.

          
          

          - **policyName** *(string) --* 

            The policy name.

            
          

          - **policyArn** *(string) --* 

            The policy ARN.

            
      
    
      

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

        The marker for 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`

  