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.



10
11
12
13
14
15
16
# File 'lib/aws-sdk-sqs/plugins/queue_urls.rb', line 10

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.



18
19
20
# File 'lib/aws-sdk-sqs/plugins/queue_urls.rb', line 18

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



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

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