Class: Aws::SQS::Plugins::QueueUrls::Handler Private
- Inherits:
-
Seahorse::Client::Handler
- Object
- Seahorse::Client::Handler
- Aws::SQS::Plugins::QueueUrls::Handler
- Defined in:
- lib/aws-sdk-sqs/plugins/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 Method Summary collapse
- #call(context) ⇒ Object private
- #update_endpoint(context, url) ⇒ Object private
-
#update_region(context, queue_url) ⇒ Object
private
If the region in the queue url is not the configured region, then we will modify the request to have a sigv4 signer for the proper region.
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.
11 12 13 14 15 16 17 |
# File 'lib/aws-sdk-sqs/plugins/queue_urls.rb', line 11 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.
19 20 21 |
# File 'lib/aws-sdk-sqs/plugins/queue_urls.rb', line 19 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 the request to have a sigv4 signer for the proper region.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/aws-sdk-sqs/plugins/queue_urls.rb', line 26 def update_region(context, queue_url) if queue_region = parse_region(queue_url) if queue_region != context.config.region config = context.config.dup config.region = queue_region config.sigv4_region = queue_region config.sigv4_signer = Aws::Plugins::SignatureV4.build_signer(config) context.config = config end end end |