class Aws::Plugins::SQSQueueUrls::Handler
Public Instance Methods
call(context)
click to toggle source
# File lib/aws-sdk-core/plugins/sqs_queue_urls.rb, line 8 def call(context) if url = context.params[:queue_url] update_region(context, url) update_endpoint(context, url) end @handler.call(context) end
update_endpoint(context, url)
click to toggle source
# File lib/aws-sdk-core/plugins/sqs_queue_urls.rb, line 16 def update_endpoint(context, url) context.http_request.endpoint = url end
update_region(context, url)
click to toggle source
# File lib/aws-sdk-core/plugins/sqs_queue_urls.rb, line 20 def update_region(context, url) if region = url.to_s.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