code: def list_policies(region=None, key=None, keyid=None, profile=None):
      '''
      List all policies
  
      Returns list of policies
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_iot.list_policies
  
      Example Return:
  
      .. code-block:: yaml
  
          policies:
            - {...}
            - {...}
  
      '''
      try:
          conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
          policies = []
          for ret in __utils__['boto3.paged_call'](conn.list_policies,
                                   marker_flag='nextMarker',
                                   marker_arg='marker'):
              policies.extend(ret['policies'])
          if not bool(policies):
              log.warning('No policies found')
          return {'policies': policies}
      except ClientError as e:
          return {'error': __utils__['boto3.get_error'](e)f list_policies(region=None, key=None, keyid=None, profile=None):
      '''
      List all policies
  
      Returns list of policies
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_iot.list_policies
  
      Example Return:
  
      .. code-block:: yaml
  
          policies:
            - {...}
            - {...}
  
      '''
      try:
          conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
          policies = []
          for ret in __utils__['boto3.paged_call'](conn.list_policies,
                                   marker_flag='nextMarker',
                                   marker_arg='marker'):
              policies.extend(ret['policies'])
          if not bool(policies):
              log.warning('No policies found')
          return {'policies': policies}
      except ClientError as e:
          return {'error': __utils__['boto3.get_error'](e)}
docs: List all policies
  
      Returns list of policies
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_iot.list_policies
  
      Example Return:
  
      .. code-block:: yaml
  
          policies:
            - {...}
            - {...}