Class: Aws::Plugins::S3IADRegionalEndpoint
- Inherits:
-
Seahorse::Client::Plugin
- Object
- Seahorse::Client::Plugin
- Aws::Plugins::S3IADRegionalEndpoint
- Defined in:
- lib/aws-sdk-core/plugins/s3_iad_regional_endpoint.rb
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
.legacy_host(host) ⇒ Object
36 37 38 |
# File 'lib/aws-sdk-core/plugins/s3_iad_regional_endpoint.rb', line 36 def self.legacy_host(host) host.sub(".us-east-1", '') end |
.resolve_iad_regional_endpoint(cfg) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/aws-sdk-core/plugins/s3_iad_regional_endpoint.rb', line 42 def self.resolve_iad_regional_endpoint(cfg) mode = ENV['AWS_S3_US_EAST_1_REGIONAL_ENDPOINT'] || Aws.shared_config.s3_us_east_1_regional_endpoint(profile: cfg.profile) || 'legacy' 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 |
Instance Method Details
#add_handlers(handlers, config) ⇒ Object
16 17 18 19 20 |
# File 'lib/aws-sdk-core/plugins/s3_iad_regional_endpoint.rb', line 16 def add_handlers(handlers, config) if config.region == 'us-east-1' handlers.add(Handler) end end |