Class: Aws::Plugins::RegionalEndpoint

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

Constant Summary collapse

MISSING_REGION =

raised when region is not configured

'missing required configuration option :region'

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Plugin

#add_handlers, #add_options, after_initialize, #before_initialize, before_initialize, option

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Instance Method Details

#after_initialize(client) ⇒ Object


26
27
28
29
30
31
32
# File 'aws-sdk-core/lib/aws-sdk-core/plugins/regional_endpoint.rb', line 26

def after_initialize(client)
  if client.config.region.nil? or client.config.region == ''
    msg = "missing region; use :region option or "
    msg << "export region name to ENV['AWS_REGION']"
    raise Errors::MissingRegionError, msg
  end
end