aws-sdk-s3 1.92.0 → 1.114.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +167 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/arn/access_point_arn.rb +12 -9
  5. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
  6. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +12 -9
  7. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +8 -9
  8. data/lib/aws-sdk-s3/bucket.rb +134 -36
  9. data/lib/aws-sdk-s3/bucket_acl.rb +25 -6
  10. data/lib/aws-sdk-s3/bucket_cors.rb +23 -6
  11. data/lib/aws-sdk-s3/bucket_lifecycle.rb +27 -8
  12. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +28 -6
  13. data/lib/aws-sdk-s3/bucket_logging.rb +22 -6
  14. data/lib/aws-sdk-s3/bucket_notification.rb +19 -7
  15. data/lib/aws-sdk-s3/bucket_policy.rb +23 -6
  16. data/lib/aws-sdk-s3/bucket_request_payment.rb +21 -4
  17. data/lib/aws-sdk-s3/bucket_tagging.rb +23 -6
  18. data/lib/aws-sdk-s3/bucket_versioning.rb +63 -12
  19. data/lib/aws-sdk-s3/bucket_website.rb +23 -6
  20. data/lib/aws-sdk-s3/client.rb +2902 -1449
  21. data/lib/aws-sdk-s3/client_api.rb +390 -21
  22. data/lib/aws-sdk-s3/customizations/object.rb +107 -15
  23. data/lib/aws-sdk-s3/encryption/client.rb +1 -1
  24. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
  25. data/lib/aws-sdk-s3/encryptionV2/client.rb +1 -1
  26. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +0 -4
  27. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +0 -4
  28. data/lib/aws-sdk-s3/file_downloader.rb +7 -2
  29. data/lib/aws-sdk-s3/file_uploader.rb +8 -3
  30. data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -7
  31. data/lib/aws-sdk-s3/multipart_upload.rb +129 -15
  32. data/lib/aws-sdk-s3/multipart_upload_part.rb +136 -16
  33. data/lib/aws-sdk-s3/object.rb +369 -108
  34. data/lib/aws-sdk-s3/object_acl.rb +28 -9
  35. data/lib/aws-sdk-s3/object_summary.rb +221 -93
  36. data/lib/aws-sdk-s3/object_version.rb +70 -43
  37. data/lib/aws-sdk-s3/plugins/accelerate.rb +7 -1
  38. data/lib/aws-sdk-s3/plugins/arn.rb +72 -30
  39. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +1 -1
  40. data/lib/aws-sdk-s3/plugins/dualstack.rb +25 -31
  41. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +1 -1
  42. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -0
  43. data/lib/aws-sdk-s3/plugins/md5s.rb +5 -3
  44. data/lib/aws-sdk-s3/plugins/s3_signer.rb +35 -6
  45. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  46. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  47. data/lib/aws-sdk-s3/presigned_post.rb +38 -19
  48. data/lib/aws-sdk-s3/presigner.rb +18 -3
  49. data/lib/aws-sdk-s3/resource.rb +22 -2
  50. data/lib/aws-sdk-s3/types.rb +3041 -1015
  51. data/lib/aws-sdk-s3.rb +1 -1
  52. metadata +12 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d13f63eb47c682e1fc6f5e88e3da2183232c9b7a2914df446d2bf012ec788081
4
- data.tar.gz: d264012bd441b374fd2447efd6125a7bc1644711f03c7580135b9ce76bdf7c86
3
+ metadata.gz: dc4ed3965895fd8f673f79e9c405d272cd281f2fee60e6f78a791a0743c981fe
4
+ data.tar.gz: 2328ddf1594b50e642acfb659edc07fe02f35ad383948363699333e63e3b57ca
5
5
  SHA512:
6
- metadata.gz: 6dc046ad7ab6155ca64b8f5b0c322c7d2dd92ebeb3dd785b090d254d32f412af3b0438eac41ad60b69e6156ce6fcec4d87deac033ce0a01ae58131ee5b96ea9a
7
- data.tar.gz: 2fa9031c44cfc32bb80e2d106ee0e2ea7ad0596e31d70970484574a4819731a6a0ebb47289052f90a4198a9f3eaeee8effdada5cc5833dcf9a4a7989248a8285
6
+ metadata.gz: d35e6bd7c43c29a3bb8b31b4094a89608fac6ed9b3b13fd4da5fa37419f573215290346214d1c62747add1f352b43c405afb2c4b7e187ce267def725aa8b2ff1
7
+ data.tar.gz: b02f97001766edc02501290d135234ef99b45b54bf25560384887455a1f4dcec81b235aaa553e25e43cfe60c7cd8ef6a315ba44979b94fd0f6d2c2dc7a348404
data/CHANGELOG.md CHANGED
@@ -1,6 +1,173 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.114.0 (2022-05-03)
5
+ ------------------
6
+
7
+ * Feature - Documentation only update for doc bug fixes for the S3 API docs.
8
+
9
+ 1.113.2 (2022-04-26)
10
+ ------------------
11
+
12
+ * Issue - Fix an issue where `ExpiredToken` errors were retried as if the request was from another region.
13
+
14
+ 1.113.1 (2022-04-25)
15
+ ------------------
16
+
17
+ * Issue - Rewind the underlying file on a streaming retry that is not a truncated body (#2692).
18
+
19
+ 1.113.0 (2022-02-24)
20
+ ------------------
21
+
22
+ * Feature - This release adds support for new integrity checking capabilities in Amazon S3. You can choose from four supported checksum algorithms for data integrity checking on your upload and download requests. In addition, AWS SDK can automatically calculate a checksum as it streams data into S3
23
+
24
+ 1.112.0 (2022-02-03)
25
+ ------------------
26
+
27
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
28
+
29
+ 1.111.3 (2022-01-24)
30
+ ------------------
31
+
32
+ * Issue - Fix starts_with fields on `PresignedPost` (#2636).
33
+
34
+ 1.111.2 (2022-01-20)
35
+ ------------------
36
+
37
+ * Issue - Minor cleanups.
38
+
39
+ 1.111.1 (2022-01-06)
40
+ ------------------
41
+
42
+ * Issue - Don't fail small files in `upload_file` when `:thread_count` is set. (#2628)
43
+
44
+ 1.111.0 (2022-01-04)
45
+ ------------------
46
+
47
+ * Feature - Minor doc-based updates based on feedback bugs received.
48
+
49
+ 1.110.0 (2021-12-21)
50
+ ------------------
51
+
52
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
53
+
54
+ 1.109.0 (2021-11-30)
55
+ ------------------
56
+
57
+ * Feature - Introduce Amazon S3 Glacier Instant Retrieval storage class and a new setting in S3 Object Ownership to disable ACLs for bucket and the objects in it.
58
+
59
+ 1.108.0 (2021-11-29)
60
+ ------------------
61
+
62
+ * Feature - Amazon S3 Event Notifications adds Amazon EventBridge as a destination and supports additional event types. The PutBucketNotificationConfiguration API can now skip validation of Amazon SQS, Amazon SNS and AWS Lambda destinations.
63
+
64
+ 1.107.0 (2021-11-23)
65
+ ------------------
66
+
67
+ * Feature - Introduce two new Filters to S3 Lifecycle configurations - ObjectSizeGreaterThan and ObjectSizeLessThan. Introduce a new way to trigger actions on noncurrent versions by providing the number of newer noncurrent versions along with noncurrent days.
68
+
69
+ 1.106.0 (2021-11-17)
70
+ ------------------
71
+
72
+ * Feature - Add `presigned_request` method to `Aws::S3::Object`.
73
+
74
+ 1.105.1 (2021-11-05)
75
+ ------------------
76
+
77
+ * Issue - Raise error when `use_fips_endpoint` is used with `use_accelerate_endpoint`.
78
+
79
+ 1.105.0 (2021-11-04)
80
+ ------------------
81
+
82
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
83
+
84
+ 1.104.0 (2021-10-18)
85
+ ------------------
86
+
87
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
88
+
89
+ 1.103.0 (2021-09-16)
90
+ ------------------
91
+
92
+ * Feature - Add support for access point arn filtering in S3 CW Request Metrics
93
+
94
+ 1.102.0 (2021-09-02)
95
+ ------------------
96
+
97
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
98
+
99
+ 1.101.0 (2021-09-01)
100
+ ------------------
101
+
102
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
103
+
104
+ 1.100.0 (2021-08-27)
105
+ ------------------
106
+
107
+ * Feature - Documentation updates for Amazon S3.
108
+
109
+ 1.99.0 (2021-08-16)
110
+ ------------------
111
+
112
+ * Feature - Documentation updates for Amazon S3
113
+
114
+ 1.98.0 (2021-07-30)
115
+ ------------------
116
+
117
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
118
+
119
+ 1.97.0 (2021-07-28)
120
+ ------------------
121
+
122
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
123
+
124
+ 1.96.2 (2021-07-20)
125
+ ------------------
126
+
127
+ * Issue - Fix file downloading edge case for 1 byte multipart ranges (#2561).
128
+
129
+ 1.96.1 (2021-06-10)
130
+ ------------------
131
+
132
+ * Issue - fix GetBucketLocation location_constraint XML parsing (#2536)
133
+
134
+ 1.96.0 (2021-06-03)
135
+ ------------------
136
+
137
+ * Feature - S3 Inventory now supports Bucket Key Status
138
+
139
+ 1.95.1 (2021-05-24)
140
+ ------------------
141
+
142
+ * Issue - Raise an error when FIPS is in the ARN's region for Access Point and Object Lambda.
143
+
144
+ 1.95.0 (2021-05-21)
145
+ ------------------
146
+
147
+ * Feature - Documentation updates for Amazon S3
148
+
149
+ 1.94.1 (2021-05-05)
150
+ ------------------
151
+
152
+ * Issue - Expose presigned request status to the request handler stack #2513
153
+
154
+ 1.94.0 (2021-04-27)
155
+ ------------------
156
+
157
+ * Feature - Allow S3 Presigner to sign non http verbs like (upload_part, multipart_upload_abort, etc.) #2511
158
+
159
+ 1.93.1 (2021-04-12)
160
+ ------------------
161
+
162
+ * Issue - Fix FIPS and global endpoint behavior for S3 ARNs.
163
+
164
+ * Issue - Increases `multipart_threshold` default from 15 megabytes to 100 megabytes.
165
+
166
+ 1.93.0 (2021-03-24)
167
+ ------------------
168
+
169
+ * Feature - Documentation updates for Amazon S3
170
+
4
171
  1.92.0 (2021-03-18)
5
172
  ------------------
6
173
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.92.0
1
+ 1.114.0
@@ -9,8 +9,6 @@ module Aws
9
9
  @type, @access_point_name, @extra = @resource.split(/[:,\/]/)
10
10
  end
11
11
 
12
- attr_reader :access_point_name
13
-
14
12
  def support_dualstack?
15
13
  true
16
14
  end
@@ -27,20 +25,25 @@ module Aws
27
25
  if @region.empty? || @account_id.empty?
28
26
  raise ArgumentError,
29
27
  'S3 Access Point ARNs must contain both a region '\
30
- 'and an account id.'
28
+ 'and an account ID.'
29
+ end
30
+
31
+ if @region.include?('-fips') || @region.include?('fips-')
32
+ raise ArgumentError,
33
+ 'S3 Access Point ARNs cannot contain a FIPS region.'
31
34
  end
32
35
 
33
36
  if @type != 'accesspoint'
34
- raise ArgumentError, 'Invalid ARN, resource format is not correct'
37
+ raise ArgumentError, 'Invalid ARN, resource format is not correct.'
35
38
  end
36
39
 
37
40
  if @access_point_name.nil? || @access_point_name.empty?
38
- raise ArgumentError, 'Missing ARN accesspoint name.'
41
+ raise ArgumentError, 'Missing ARN Access Point name.'
39
42
  end
40
43
 
41
44
  if @extra
42
45
  raise ArgumentError,
43
- 'ARN accesspoint resource must be a single value.'
46
+ 'ARN Access Point resource must be a single value.'
44
47
  end
45
48
 
46
49
  unless Seahorse::Util.host_label?(
@@ -52,13 +55,13 @@ module Aws
52
55
  end
53
56
  end
54
57
 
55
- def host_url(region, dualstack = false, custom_endpoint = nil)
58
+ def host_url(region, fips = false, dualstack = false, custom_endpoint = nil)
56
59
  pfx = "#{@access_point_name}-#{@account_id}"
57
60
  if custom_endpoint
58
61
  "#{pfx}.#{custom_endpoint}"
59
62
  else
60
- sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region)
61
- "#{pfx}.s3-accesspoint#{'.dualstack' if dualstack}.#{region}.#{sfx}"
63
+ sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region, 's3')
64
+ "#{pfx}.s3-accesspoint#{'-fips' if fips}#{'.dualstack' if dualstack}.#{region}.#{sfx}"
62
65
  end
63
66
  end
64
67
  end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module S3
5
+ # @api private
6
+ class MultiRegionAccessPointARN < Aws::ARN
7
+ def initialize(options)
8
+ super(options)
9
+ @type, @mrap_alias, @extra = @resource.split(/[:,\/]/)
10
+ end
11
+
12
+ attr_reader :mrap_alias
13
+
14
+ def support_dualstack?
15
+ false
16
+ end
17
+
18
+ def support_fips?
19
+ false
20
+ end
21
+
22
+ def validate_arn!
23
+ unless @service == 's3'
24
+ raise ArgumentError,
25
+ 'Must provide a valid S3 multi-region access point ARN.'
26
+ end
27
+
28
+ if @account_id.empty?
29
+ raise ArgumentError,
30
+ 'S3 multi-region access point ARNs must contain '\
31
+ 'an account id.'
32
+ end
33
+
34
+ unless @region.empty?
35
+ raise ArgumentError,
36
+ 'Multi-region access points must have an empty region.'
37
+ end
38
+
39
+ if @type != 'accesspoint'
40
+ raise ArgumentError, 'Invalid ARN, resource format is not correct'
41
+ end
42
+
43
+ if @mrap_alias.nil? || @mrap_alias.empty?
44
+ raise ArgumentError, 'Missing ARN multi-region access points alias.'
45
+ end
46
+
47
+ unless @mrap_alias.split('.').all? { |s| Seahorse::Util.host_label?(s) }
48
+ raise ArgumentError, "#{@mrap_alias} is not a valid "\
49
+ 'multi region access point alias.'
50
+ end
51
+
52
+ if @extra
53
+ raise ArgumentError,
54
+ 'ARN access point resource must be a single value.'
55
+ end
56
+ end
57
+
58
+ def host_url(_region, _fips = false, _dualstack = false, custom_endpoint = nil)
59
+ if custom_endpoint
60
+ "#{@mrap_alias}.#{custom_endpoint}"
61
+ else
62
+ sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(@partition, 's3')
63
+ "#{@mrap_alias}.accesspoint.s3-global.#{sfx}"
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -9,8 +9,6 @@ module Aws
9
9
  @type, @access_point_name, @extra = @resource.split(/[:,\/]/)
10
10
  end
11
11
 
12
- attr_reader :access_point_name
13
-
14
12
  def support_dualstack?
15
13
  false
16
14
  end
@@ -21,13 +19,18 @@ module Aws
21
19
 
22
20
  def validate_arn!
23
21
  unless @service == 's3-object-lambda'
24
- raise ArgumentError, 'Must provide a valid S3 Object Lambdas ARN.'
22
+ raise ArgumentError, 'Must provide a valid S3 Object Lambda ARN.'
25
23
  end
26
24
 
27
25
  if @region.empty? || @account_id.empty?
28
26
  raise ArgumentError,
29
27
  'S3 Object Lambdas ARNs must contain both a region '\
30
- 'and an account id.'
28
+ 'and an account ID.'
29
+ end
30
+
31
+ if @region.include?('-fips') || @region.include?('fips-')
32
+ raise ArgumentError,
33
+ 'S3 Object Lambda ARNs cannot contain a FIPS region'
31
34
  end
32
35
 
33
36
  if @type != 'accesspoint'
@@ -35,12 +38,12 @@ module Aws
35
38
  end
36
39
 
37
40
  if @access_point_name.nil? || @access_point_name.empty?
38
- raise ArgumentError, 'Missing ARN accesspoint name.'
41
+ raise ArgumentError, 'Missing ARN Access Point name.'
39
42
  end
40
43
 
41
44
  if @extra
42
45
  raise ArgumentError,
43
- 'ARN accesspoint resource must be a single value.'
46
+ 'ARN Access Point resource must be a single value.'
44
47
  end
45
48
 
46
49
  unless Seahorse::Util.host_label?(
@@ -52,13 +55,13 @@ module Aws
52
55
  end
53
56
  end
54
57
 
55
- def host_url(region, _dualstack = false, custom_endpoint = nil)
58
+ def host_url(region, fips = false, _dualstack = false, custom_endpoint = nil)
56
59
  pfx = "#{@access_point_name}-#{@account_id}"
57
60
  if custom_endpoint
58
61
  "#{pfx}.#{custom_endpoint}"
59
62
  else
60
- sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region)
61
- "#{pfx}.s3-object-lambda.#{region}.#{sfx}"
63
+ sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region, 's3')
64
+ "#{pfx}.s3-object-lambda#{'-fips' if fips}.#{region}.#{sfx}"
62
65
  end
63
66
  end
64
67
  end
@@ -10,8 +10,6 @@ module Aws
10
10
  @resource.split(/[:,\/]/)
11
11
  end
12
12
 
13
- attr_reader :outpost_id, :access_point_name
14
-
15
13
  def support_dualstack?
16
14
  false
17
15
  end
@@ -22,13 +20,14 @@ module Aws
22
20
 
23
21
  def validate_arn!
24
22
  unless @service == 's3-outposts'
25
- raise ArgumentError, 'Must provide a valid S3 Outposts ARN.'
23
+ raise ArgumentError, 'Must provide a valid S3 Outpost Access '\
24
+ 'Point ARN.'
26
25
  end
27
26
 
28
27
  if @region.empty? || @account_id.empty?
29
28
  raise ArgumentError,
30
- 'S3 Outpost ARNs must contain both a region '\
31
- 'and an account id.'
29
+ 'S3 Outpost Access Point ARNs must contain both a region '\
30
+ 'and an account ID.'
32
31
  end
33
32
 
34
33
  if @type != 'outpost' && @subtype != 'accesspoint'
@@ -36,16 +35,16 @@ module Aws
36
35
  end
37
36
 
38
37
  if @outpost_id.nil? || @outpost_id.empty?
39
- raise ArgumentError, 'Missing ARN outpost id.'
38
+ raise ArgumentError, 'Missing ARN Outpost ID.'
40
39
  end
41
40
 
42
41
  if @access_point_name.nil? || @access_point_name.empty?
43
- raise ArgumentError, 'Missing ARN accesspoint name.'
42
+ raise ArgumentError, 'Missing ARN Access Point name.'
44
43
  end
45
44
 
46
45
  if @extra
47
46
  raise ArgumentError,
48
- 'ARN accesspoint resource must be a single value.'
47
+ 'ARN Access Point resource must be a single value.'
49
48
  end
50
49
 
51
50
  unless Seahorse::Util.host_label?(
@@ -62,7 +61,7 @@ module Aws
62
61
  end
63
62
 
64
63
  # Outpost ARNs currently do not support dualstack
65
- def host_url(region, _dualstack = false, custom_endpoint = nil)
64
+ def host_url(region, _fips = false, _dualstack = false, custom_endpoint = nil)
66
65
  pfx = "#{@access_point_name}-#{@account_id}.#{@outpost_id}"
67
66
  if custom_endpoint
68
67
  "#{pfx}.#{custom_endpoint}"