Class: Aws::SQS::Plugins::QueueUrls::Handler Private

Inherits:
Seahorse::Client::Handler
  • Object
show all
Defined in:
lib/aws-sdk-sqs/plugins/queue_urls.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Extract region from a provided queue_url

Instance Method Summary collapse

Instance Method Details

#call(context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



23
24
25
26
27
28
29
# File 'lib/aws-sdk-sqs/plugins/queue_urls.rb', line 23

def call(context)
  if (queue_url = context.params[:queue_url])
    update_endpoint(context, queue_url)
    update_region(context, queue_url)
  end
  @handler.call(context)
end

#update_endpoint(context, url) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



31
32
33
# File 'lib/aws-sdk-sqs/plugins/queue_urls.rb', line 31

def update_endpoint(context, url)
  context.http_request.endpoint = url
end

#update_region(context, queue_url) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

If the region in the queue url is not the configured region, then we will modify signing to use it



37
38
39
40
41
42
43
44
# File 'lib/aws-sdk-sqs/plugins/queue_urls.rb', line 37

def update_region(context, queue_url)
  return if context.config.disable_queue_url_region_detection

  if (queue_region = parse_region(queue_url)) &&
     queue_region != context.config.region
    context[:auth_scheme]['signingRegion'] = queue_region
  end
end