Class: Aws::Plugins::EndpointDiscovery Private

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

Defined Under Namespace

Classes: Handler

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Plugin

#add_options, #after_initialize, after_initialize, after_initialize_hooks, before_initialize, #before_initialize, before_initialize_hooks, handlers, literal, option, options

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response, #handler_for, #new_handler

Class Method Details

.resolve_endpoint_discovery(cfg) ⇒ 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.



162
163
164
165
166
167
168
# File 'lib/aws-sdk-core/plugins/endpoint_discovery.rb', line 162

def self.resolve_endpoint_discovery(cfg)
  env = ENV['AWS_ENABLE_ENDPOINT_DISCOVERY']
  default = cfg.api.require_endpoint_discovery
  shared_cfg = Aws.shared_config.endpoint_discovery_enabled(profile: cfg.profile)
  resolved = Aws::Util.str_2_bool(env) || Aws::Util.str_2_bool(shared_cfg)
  env.nil? && shared_cfg.nil? ? default : !!resolved
end

Instance Method Details

#add_handlers(handlers, config) ⇒ 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.



60
61
62
# File 'lib/aws-sdk-core/plugins/endpoint_discovery.rb', line 60

def add_handlers(handlers, config)
  handlers.add(Handler, priority: 90) if config.regional_endpoint
end