Class: Aws::S3::Plugins::IADRegionalEndpoint
- Inherits:
-
Seahorse::Client::Plugin
- Object
- Seahorse::Client::Plugin
- Aws::S3::Plugins::IADRegionalEndpoint
- Defined in:
- gems/aws-sdk-s3/lib/aws-sdk-s3/plugins/iad_regional_endpoint.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_iad_regional_endpoint(cfg) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb', line 21 def self.resolve_iad_regional_endpoint(cfg) default_mode_value = if cfg.respond_to?(:defaults_mode_config_resolver) cfg.defaults_mode_config_resolver.resolve(:s3_us_east_1_regional_endpoint) end mode = ENV['AWS_S3_US_EAST_1_REGIONAL_ENDPOINT'] || Aws.shared_config.s3_us_east_1_regional_endpoint(profile: cfg.profile) || default_mode_value || 'legacy' mode = mode.downcase unless %w(legacy regional).include?(mode) raise ArgumentError, "expected :s3_us_east_1_regional_endpoint or"\ " ENV['AWS_S3_US_EAST_1_REGIONAL_ENDPOINT'] to be `legacy` or"\ " `regional`." end mode end |