Class: Aws::Plugins::EndpointDiscovery
- Inherits:
-
Seahorse::Client::Plugin
- Object
- Seahorse::Client::Plugin
- Aws::Plugins::EndpointDiscovery
- Defined in:
- lib/aws-sdk-core/plugins/endpoint_discovery.rb
Overview
Enables Endpoint Discovery per service when supported
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, 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
150 151 152 153 154 |
# File 'lib/aws-sdk-core/plugins/endpoint_discovery.rb', line 150 def self.resolve_endpoint_discovery(cfg) env = ENV['AWS_ENABLE_ENDPOINT_DISCOVERY'] shared_cfg = Aws.shared_config.endpoint_discovery(profile: cfg.profile) self.str_2_bool(env) || self.str_2_bool(shared_cfg) end |
.str_2_bool(str) ⇒ Object
156 157 158 159 160 161 162 163 |
# File 'lib/aws-sdk-core/plugins/endpoint_discovery.rb', line 156 def self.str_2_bool(str) case str.to_s when "true" then true when "false" then false else nil end end |
Instance Method Details
#add_handlers(handlers, config) ⇒ Object
47 48 49 |
# File 'lib/aws-sdk-core/plugins/endpoint_discovery.rb', line 47 def add_handlers(handlers, config) handlers.add(Handler, priority: 90) if config.regional_endpoint end |