Sha256: 5d2c58bc0ea189d9a82e2f7fcc850786831365080199a99cb9129d7ac0730f94
Contents?: true
Size: 839 Bytes
Versions: 8
Compression:
Stored size: 839 Bytes
Contents
module Aws module Plugins # @api private class SQSQueueUrls < Seahorse::Client::Plugin class Handler < Seahorse::Client::Handler def call(context) if url = context.params[:queue_url] update_endpoint(context, url) update_region(context, url) end @handler.call(context) end def update_endpoint(context, url) context.http_request.endpoint = url end def update_region(context, url) if region = url.split('.')[1] context.config = context.config.dup context.config.region = region context.config.sigv4_region = region else raise ArgumentError, "invalid queue url `#{url}'" end end end handler(Handler) end end end
Version data entries
8 entries across 8 versions & 1 rubygems