Class: Aws::Plugins::SQSQueueUrls::Handler Private

Inherits:
Seahorse::Client::Handler show all
Defined in:
lib/aws-sdk-core/plugins/sqs_queue_urls.rb

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.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Handler

#handler

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Handler

#initialize, #inspect

Constructor Details

This class inherits a constructor from Seahorse::Client::Handler

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.



8
9
10
11
12
13
14
# 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) ⇒ 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.



16
17
18
# 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) ⇒ 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.



20
21
22
23
24
25
26
# 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
  end
end