aws-sdk-s3 1.147.0 → 1.156.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +68 -2
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +241 -0
- data/lib/aws-sdk-s3/bucket.rb +12 -12
- data/lib/aws-sdk-s3/bucket_acl.rb +3 -3
- data/lib/aws-sdk-s3/bucket_cors.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +4 -4
- data/lib/aws-sdk-s3/bucket_logging.rb +3 -3
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +4 -4
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +4 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +5 -5
- data/lib/aws-sdk-s3/bucket_website.rb +4 -4
- data/lib/aws-sdk-s3/client.rb +214 -143
- data/lib/aws-sdk-s3/client_api.rb +11 -2
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
- data/lib/aws-sdk-s3/customizations/object.rb +5 -5
- data/lib/aws-sdk-s3/customizations.rb +4 -1
- data/lib/aws-sdk-s3/encryption/client.rb +2 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/endpoint_parameters.rb +8 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
- data/lib/aws-sdk-s3/endpoints.rb +100 -1
- data/lib/aws-sdk-s3/express_credentials_provider.rb +27 -4
- data/lib/aws-sdk-s3/file_downloader.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_upload.rb +4 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +3 -3
- data/lib/aws-sdk-s3/object.rb +30 -12
- data/lib/aws-sdk-s3/object_acl.rb +3 -3
- data/lib/aws-sdk-s3/object_copier.rb +1 -1
- data/lib/aws-sdk-s3/object_multipart_copier.rb +10 -8
- data/lib/aws-sdk-s3/object_summary.rb +10 -10
- data/lib/aws-sdk-s3/object_version.rb +23 -5
- data/lib/aws-sdk-s3/plugins/access_grants.rb +114 -0
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +8 -2
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/presigner.rb +1 -0
- data/lib/aws-sdk-s3/resource.rb +2 -2
- data/lib/aws-sdk-s3/types.rb +48 -17
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/client.rbs +21 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/object.rbs +6 -0
- data/sig/object_version.rbs +6 -0
- data/sig/resource.rbs +3 -0
- data/sig/types.rbs +6 -0
- data/sig/waiters.rbs +12 -0
- metadata +12 -7
- data/lib/aws-sdk-s3/express_credentials_cache.rb +0 -30
@@ -75,7 +75,7 @@ module Aws::S3
|
|
75
75
|
#
|
76
76
|
# @return [self]
|
77
77
|
def load
|
78
|
-
resp = Aws::Plugins::UserAgent.
|
78
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
79
79
|
@client.get_bucket_notification_configuration(bucket: @bucket_name)
|
80
80
|
end
|
81
81
|
@data = resp.data
|
@@ -192,7 +192,7 @@ module Aws::S3
|
|
192
192
|
:retry
|
193
193
|
end
|
194
194
|
end
|
195
|
-
Aws::Plugins::UserAgent.
|
195
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
196
196
|
Aws::Waiters::Waiter.new(options).wait({})
|
197
197
|
end
|
198
198
|
end
|
@@ -275,7 +275,7 @@ module Aws::S3
|
|
275
275
|
# @return [EmptyStructure]
|
276
276
|
def put(options = {})
|
277
277
|
options = options.merge(bucket: @bucket_name)
|
278
|
-
resp = Aws::Plugins::UserAgent.
|
278
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
279
279
|
@client.put_bucket_notification_configuration(options)
|
280
280
|
end
|
281
281
|
resp.data
|
@@ -54,7 +54,7 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp = Aws::Plugins::UserAgent.
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
58
|
@client.get_bucket_policy(bucket: @bucket_name)
|
59
59
|
end
|
60
60
|
@data = resp.data
|
@@ -171,7 +171,7 @@ module Aws::S3
|
|
171
171
|
:retry
|
172
172
|
end
|
173
173
|
end
|
174
|
-
Aws::Plugins::UserAgent.
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
175
175
|
Aws::Waiters::Waiter.new(options).wait({})
|
176
176
|
end
|
177
177
|
end
|
@@ -197,7 +197,7 @@ module Aws::S3
|
|
197
197
|
# @return [EmptyStructure]
|
198
198
|
def delete(options = {})
|
199
199
|
options = options.merge(bucket: @bucket_name)
|
200
|
-
resp = Aws::Plugins::UserAgent.
|
200
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
201
201
|
@client.delete_bucket_policy(options)
|
202
202
|
end
|
203
203
|
resp.data
|
@@ -284,7 +284,7 @@ module Aws::S3
|
|
284
284
|
# @return [EmptyStructure]
|
285
285
|
def put(options = {})
|
286
286
|
options = options.merge(bucket: @bucket_name)
|
287
|
-
resp = Aws::Plugins::UserAgent.
|
287
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
288
288
|
@client.put_bucket_policy(options)
|
289
289
|
end
|
290
290
|
resp.data
|
@@ -15,7 +15,7 @@ module Aws
|
|
15
15
|
# Registers a block as a callback. This listener is called when a
|
16
16
|
# new bucket/region pair is added to the cache.
|
17
17
|
#
|
18
|
-
# S3
|
18
|
+
# Aws::S3.bucket_region_cache.bucket_added do |bucket_name, region_name|
|
19
19
|
# # ...
|
20
20
|
# end
|
21
21
|
#
|
@@ -59,6 +59,14 @@ module Aws
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
# @param [String] key
|
63
|
+
# @return [Boolean]
|
64
|
+
def key?(key)
|
65
|
+
@mutex.synchronize do
|
66
|
+
@regions.key?(key)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
62
70
|
# @api private
|
63
71
|
def clear
|
64
72
|
@mutex.synchronize { @regions = {} }
|
@@ -73,9 +81,5 @@ module Aws
|
|
73
81
|
alias to_h to_hash
|
74
82
|
|
75
83
|
end
|
76
|
-
|
77
|
-
# @api private
|
78
|
-
BUCKET_REGIONS = BucketRegionCache.new
|
79
|
-
|
80
84
|
end
|
81
85
|
end
|
@@ -54,7 +54,7 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp = Aws::Plugins::UserAgent.
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
58
|
@client.get_bucket_request_payment(bucket: @bucket_name)
|
59
59
|
end
|
60
60
|
@data = resp.data
|
@@ -171,7 +171,7 @@ module Aws::S3
|
|
171
171
|
:retry
|
172
172
|
end
|
173
173
|
end
|
174
|
-
Aws::Plugins::UserAgent.
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
175
175
|
Aws::Waiters::Waiter.new(options).wait({})
|
176
176
|
end
|
177
177
|
end
|
@@ -225,7 +225,7 @@ module Aws::S3
|
|
225
225
|
# @return [EmptyStructure]
|
226
226
|
def put(options = {})
|
227
227
|
options = options.merge(bucket: @bucket_name)
|
228
|
-
resp = Aws::Plugins::UserAgent.
|
228
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
229
229
|
@client.put_bucket_request_payment(options)
|
230
230
|
end
|
231
231
|
resp.data
|
@@ -54,7 +54,7 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp = Aws::Plugins::UserAgent.
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
58
|
@client.get_bucket_tagging(bucket: @bucket_name)
|
59
59
|
end
|
60
60
|
@data = resp.data
|
@@ -171,7 +171,7 @@ module Aws::S3
|
|
171
171
|
:retry
|
172
172
|
end
|
173
173
|
end
|
174
|
-
Aws::Plugins::UserAgent.
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
175
175
|
Aws::Waiters::Waiter.new(options).wait({})
|
176
176
|
end
|
177
177
|
end
|
@@ -191,7 +191,7 @@ module Aws::S3
|
|
191
191
|
# @return [EmptyStructure]
|
192
192
|
def delete(options = {})
|
193
193
|
options = options.merge(bucket: @bucket_name)
|
194
|
-
resp = Aws::Plugins::UserAgent.
|
194
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
195
195
|
@client.delete_bucket_tagging(options)
|
196
196
|
end
|
197
197
|
resp.data
|
@@ -249,7 +249,7 @@ module Aws::S3
|
|
249
249
|
# @return [EmptyStructure]
|
250
250
|
def put(options = {})
|
251
251
|
options = options.merge(bucket: @bucket_name)
|
252
|
-
resp = Aws::Plugins::UserAgent.
|
252
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
253
253
|
@client.put_bucket_tagging(options)
|
254
254
|
end
|
255
255
|
resp.data
|
@@ -63,7 +63,7 @@ module Aws::S3
|
|
63
63
|
#
|
64
64
|
# @return [self]
|
65
65
|
def load
|
66
|
-
resp = Aws::Plugins::UserAgent.
|
66
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
67
67
|
@client.get_bucket_versioning(bucket: @bucket_name)
|
68
68
|
end
|
69
69
|
@data = resp.data
|
@@ -180,7 +180,7 @@ module Aws::S3
|
|
180
180
|
:retry
|
181
181
|
end
|
182
182
|
end
|
183
|
-
Aws::Plugins::UserAgent.
|
183
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
184
184
|
Aws::Waiters::Waiter.new(options).wait({})
|
185
185
|
end
|
186
186
|
end
|
@@ -239,7 +239,7 @@ module Aws::S3
|
|
239
239
|
status: "Enabled"
|
240
240
|
}
|
241
241
|
)
|
242
|
-
resp = Aws::Plugins::UserAgent.
|
242
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
243
243
|
@client.put_bucket_versioning(options)
|
244
244
|
end
|
245
245
|
resp.data
|
@@ -298,7 +298,7 @@ module Aws::S3
|
|
298
298
|
# @return [EmptyStructure]
|
299
299
|
def put(options = {})
|
300
300
|
options = options.merge(bucket: @bucket_name)
|
301
|
-
resp = Aws::Plugins::UserAgent.
|
301
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
302
302
|
@client.put_bucket_versioning(options)
|
303
303
|
end
|
304
304
|
resp.data
|
@@ -356,7 +356,7 @@ module Aws::S3
|
|
356
356
|
status: "Suspended"
|
357
357
|
}
|
358
358
|
)
|
359
|
-
resp = Aws::Plugins::UserAgent.
|
359
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
360
360
|
@client.put_bucket_versioning(options)
|
361
361
|
end
|
362
362
|
resp.data
|
@@ -76,7 +76,7 @@ module Aws::S3
|
|
76
76
|
#
|
77
77
|
# @return [self]
|
78
78
|
def load
|
79
|
-
resp = Aws::Plugins::UserAgent.
|
79
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
80
80
|
@client.get_bucket_website(bucket: @bucket_name)
|
81
81
|
end
|
82
82
|
@data = resp.data
|
@@ -193,7 +193,7 @@ module Aws::S3
|
|
193
193
|
:retry
|
194
194
|
end
|
195
195
|
end
|
196
|
-
Aws::Plugins::UserAgent.
|
196
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
197
197
|
Aws::Waiters::Waiter.new(options).wait({})
|
198
198
|
end
|
199
199
|
end
|
@@ -213,7 +213,7 @@ module Aws::S3
|
|
213
213
|
# @return [EmptyStructure]
|
214
214
|
def delete(options = {})
|
215
215
|
options = options.merge(bucket: @bucket_name)
|
216
|
-
resp = Aws::Plugins::UserAgent.
|
216
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
217
217
|
@client.delete_bucket_website(options)
|
218
218
|
end
|
219
219
|
resp.data
|
@@ -290,7 +290,7 @@ module Aws::S3
|
|
290
290
|
# @return [EmptyStructure]
|
291
291
|
def put(options = {})
|
292
292
|
options = options.merge(bucket: @bucket_name)
|
293
|
-
resp = Aws::Plugins::UserAgent.
|
293
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
294
294
|
@client.put_bucket_website(options)
|
295
295
|
end
|
296
296
|
resp.data
|