Class: Aws::STS::Plugins::STSRegionalEndpoints

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

Class Method Summary collapse

Methods inherited from Seahorse::Client::Plugin

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Class Method Details

.resolve_sts_regional_endpoints(cfg) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
# File 'gems/aws-sdk-core/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb', line 22

def self.resolve_sts_regional_endpoints(cfg)
  env_mode = ENV['AWS_STS_REGIONAL_ENDPOINTS']
  env_mode = nil if env_mode == ''
  cfg_mode = Aws.shared_config.sts_regional_endpoints(
    profile: cfg.profile)
  default_mode_value =
    if cfg.respond_to?(:defaults_mode_config_resolver)
      cfg.defaults_mode_config_resolver.resolve(:sts_regional_endpoints)
    end
  env_mode || cfg_mode || default_mode_value || 'regional'
end