Sha256: 0bf1c3c7161798306821a55f85f7394cb402428a400745fdf6a0fc418acb8490

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

module Fog
  module AWS
    class SQS
      class Real

        require 'fog/aws/parsers/sqs/list_queues'

        # List queues
        #
        # ==== Parameters
        # * options<~Hash>:
        #   * QueueNamePrefix<~String> - String used to filter results to only those with matching prefixes
        #
        # ==== See Also
        # http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/Query_QueryListQueues.html
        #

        def list_queues(options = {})
          request({
            'Action' => 'ListQueues',
            :parser  => Fog::Parsers::AWS::SQS::ListQueues.new
          }.merge!(options))
        end
      end

      class Mock
        def list_queues(options = {})
          Excon::Response.new.tap do |response|
            response.status = 200

            response.body = {
              'ResponseMetadata' => {
                'RequestId' => Fog::AWS::Mock.request_id
              },
              'QueueUrls' => data[:queues].keys
            }
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-1.22.0 lib/fog/aws/requests/sqs/list_queues.rb
fog-1.21.0 lib/fog/aws/requests/sqs/list_queues.rb