aws-sdk-s3 1.53.0 → 1.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 472d63ee0f1295b056583a9cfd20ec585919238a
4
- data.tar.gz: aed88e9a3d50ecedbedd0a59bee1dba169fc6ed5
3
+ metadata.gz: 405e7f5e7a8427ca6cc93230e12617a824d6e5bb
4
+ data.tar.gz: c126a861f72e68802c44ec099d2116668d044a89
5
5
  SHA512:
6
- metadata.gz: aa70fa374b7c9f497eda4d46ce5bd159f5c94b77e6979b961b2298f6614690b4ac9e32be1012099b2dfaa8ac7de065bcfc50692b236564fc7ffc3010859fb87a
7
- data.tar.gz: b0ec5e0afc5b3d2f222b06f4906ad3d8ad3c7b5c5d740090c1b1375a102083e574d77209b933ef47b531636afe4a08793336f44db9e61655bdb0307fa62d2d38
6
+ metadata.gz: c5de3b39b07f4aebdcbcd5303960c35d5df0cb4c317b5e45a818c0e45db47bac37bb970750508ce8fcb796fcf0206b651dc46c864ac8bf419ae00538cfdf8977
7
+ data.tar.gz: 3606c43636bb1ca8f629fe35481d080f44ba353610afe8de2bed1094b42f11cccd7f4c417a653f4e537cdff7193025831b02257dad4a039b4f8f7dac9d025f29
@@ -63,6 +63,6 @@ require_relative 'aws-sdk-s3/event_streams'
63
63
  # @service
64
64
  module Aws::S3
65
65
 
66
- GEM_VERSION = '1.53.0'
66
+ GEM_VERSION = '1.54.0'
67
67
 
68
68
  end
@@ -25,6 +25,7 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
25
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
26
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
27
  require 'aws-sdk-core/plugins/protocols/rest_xml.rb'
28
+ require 'aws-sdk-s3/plugins/iad_regional_endpoint.rb'
28
29
  require 'aws-sdk-s3/plugins/accelerate.rb'
29
30
  require 'aws-sdk-s3/plugins/dualstack.rb'
30
31
  require 'aws-sdk-s3/plugins/bucket_dns.rb'
@@ -72,6 +73,7 @@ module Aws::S3
72
73
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
73
74
  add_plugin(Aws::Plugins::TransferEncoding)
74
75
  add_plugin(Aws::Plugins::Protocols::RestXml)
76
+ add_plugin(Aws::S3::Plugins::IADRegionalEndpoint)
75
77
  add_plugin(Aws::S3::Plugins::Accelerate)
76
78
  add_plugin(Aws::S3::Plugins::Dualstack)
77
79
  add_plugin(Aws::S3::Plugins::BucketDns)
@@ -244,6 +246,10 @@ module Aws::S3
244
246
  # @option options [Integer] :retry_max_delay (0)
245
247
  # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
246
248
  #
249
+ # @option options [String] :s3_us_east_1_regional_endpoint ("legacy")
250
+ # Passing in `regional` to enable regional endpoint for S3's `us-east-1`
251
+ # region. Defaults to `legacy` mode using global endpoint.
252
+ #
247
253
  # @option options [String] :secret_access_key
248
254
  #
249
255
  # @option options [String] :session_token
@@ -7110,7 +7116,7 @@ module Aws::S3
7110
7116
  params: params,
7111
7117
  config: config)
7112
7118
  context[:gem_name] = 'aws-sdk-s3'
7113
- context[:gem_version] = '1.53.0'
7119
+ context[:gem_version] = '1.54.0'
7114
7120
  Seahorse::Client::Request.new(handlers, context)
7115
7121
  end
7116
7122
 
@@ -114,6 +114,10 @@ module Aws
114
114
  url.path += '/' unless url.path[-1] == '/'
115
115
  url.path += Seahorse::Util.uri_escape(name)
116
116
  end
117
+ if (client.config.region == 'us-east-1') &&
118
+ (client.config.s3_us_east_1_regional_endpoint == 'legacy')
119
+ url.host = Plugins::IADRegionalEndpoint.legacy_host(url.host)
120
+ end
117
121
  url.to_s
118
122
  end
119
123
 
@@ -0,0 +1,59 @@
1
+ module Aws
2
+ module S3
3
+ module Plugins
4
+
5
+ class IADRegionalEndpoint < Seahorse::Client::Plugin
6
+
7
+ option(:s3_us_east_1_regional_endpoint,
8
+ default: 'legacy',
9
+ doc_type: String,
10
+ docstring: <<-DOCS) do |cfg|
11
+ Passing in `regional` to enable regional endpoint for S3's `us-east-1`
12
+ region. Defaults to `legacy` mode using global endpoint.
13
+ DOCS
14
+ resolve_iad_regional_endpoint(cfg)
15
+ end
16
+
17
+ def add_handlers(handlers, config)
18
+ if config.region == 'us-east-1'
19
+ handlers.add(Handler)
20
+ end
21
+ end
22
+
23
+ # @api private
24
+ class Handler < Seahorse::Client::Handler
25
+
26
+ def call(context)
27
+ # keep legacy global endpoint pattern by default
28
+ if context.config.s3_us_east_1_regional_endpoint == 'legacy'
29
+ context.http_request.endpoint.host = IADRegionalEndpoint.legacy_host(
30
+ context.http_request.endpoint.host)
31
+ end
32
+ @handler.call(context)
33
+ end
34
+
35
+ end
36
+
37
+ def self.legacy_host(host)
38
+ host.sub(".us-east-1", '')
39
+ end
40
+
41
+ private
42
+
43
+ def self.resolve_iad_regional_endpoint(cfg)
44
+ mode = ENV['AWS_S3_US_EAST_1_REGIONAL_ENDPOINT'] ||
45
+ Aws.shared_config.s3_us_east_1_regional_endpoint(profile: cfg.profile) ||
46
+ 'legacy'
47
+ unless %w(legacy regional).include?(mode)
48
+ raise ArgumentError, "expected :s3_us_east_1_regional_endpoint or"\
49
+ " ENV['AWS_S3_US_EAST_1_REGIONAL_ENDPOINT'] to be `legacy` or"\
50
+ " `regional`."
51
+ end
52
+ mode
53
+ end
54
+
55
+ end
56
+
57
+ end
58
+ end
59
+ end
@@ -585,6 +585,10 @@ module Aws
585
585
  else
586
586
  url.path = '/' + @bucket_name
587
587
  end
588
+ if @bucket_region == 'us-east-1'
589
+ # keep legacy behavior by default
590
+ url.host = Plugins::IADRegionalEndpoint.legacy_host(url.host)
591
+ end
588
592
  url.to_s
589
593
  end
590
594
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.53.0
4
+ version: 1.54.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-31 00:00:00.000000000 Z
11
+ date: 2019-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: '3'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 3.71.0
50
+ version: 3.77.0
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +57,7 @@ dependencies:
57
57
  version: '3'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 3.71.0
60
+ version: 3.77.0
61
61
  description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
62
62
  This gem is part of the AWS SDK for Ruby.
63
63
  email:
@@ -126,6 +126,7 @@ files:
126
126
  - lib/aws-sdk-s3/plugins/expect_100_continue.rb
127
127
  - lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb
128
128
  - lib/aws-sdk-s3/plugins/http_200_errors.rb
129
+ - lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb
129
130
  - lib/aws-sdk-s3/plugins/location_constraint.rb
130
131
  - lib/aws-sdk-s3/plugins/md5s.rb
131
132
  - lib/aws-sdk-s3/plugins/redirects.rb