Class: Aws::Plugins::ApiKey::OptionHandler Private

Inherits:
Seahorse::Client::Handler show all
Defined in:
lib/aws-sdk-core/plugins/api_key.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.


24
25
26
27
28
29
30
31
32
33
34
# File 'lib/aws-sdk-core/plugins/api_key.rb', line 24

def call(context)
  if context.operation.require_apikey
    if context.params.is_a?(Hash) && context.params[:api_key]
      api_key = context.params.delete(:api_key)
    end
    api_key = context.config.api_key if api_key.nil?
    context[:api_key] = api_key
  end

  @handler.call(context)
end