Sha256: deb30754d1923c86ff403fd05742e7f19999f3f2cfa7e1a60f040c5d9472e610

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

module Fog
  module AWS
    class SQS
      class Real

        require 'rackspace-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

1 entries across 1 versions & 1 rubygems

Version Path
rackspace-fog-1.4.2 lib/rackspace-fog/aws/requests/sqs/list_queues.rb