def attached_policies(options = {})
      batches = Enumerator.new do |y|
        options = options.merge(role_name: @name)
        resp = @client.list_attached_role_policies(options)
        resp.each_page do |page|
          batch = []
          page.data.attached_policies.each do |a|
            batch << Policy.new(
              arn: a.policy_arn,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      Policy::Collection.new(batches)
    end
def attached_policies(options = {})
      batches = Enumerator.new do |y|
        options = options.merge(role_name: @name)
        resp = @client.list_attached_role_policies(options)
        resp.each_page do |page|
          batch = []
          page.data.attached_policies.each do |a|
            batch << Policy.new(
              arn: a.policy_arn,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      Policy::Collection.new(batches)
    end
@example Request syntax with placeholder values

   attached_policies = role.attached_policies({
     path_prefix: "policyPathType",
   })
 @param [Hash] options ({})
 @option options [String] :path_prefix
   The path prefix for filtering the results. This parameter is optional.
   If it is not included, it defaults to a slash (/), listing all
   policies.

   This parameter allows (through its [regex pattern][1]) a string of
   characters consisting of either a forward slash (/) by itself or a
   string that must begin and end with forward slashes. In addition, it
   can contain any ASCII character from the ! (\\u0021) through the DEL
   character (\\u007F), including most punctuation characters, digits,
   and upper and lowercased letters.



   [1]: http://wikipedia.org/wiki/regex
 @return [Policy::Collection]