aws-sdk-s3 1.136.0 → 1.176.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +250 -1
- 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 +250 -0
- data/lib/aws-sdk-s3/bucket.rb +671 -139
- data/lib/aws-sdk-s3/bucket_acl.rb +12 -12
- data/lib/aws-sdk-s3/bucket_cors.rb +16 -16
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +21 -16
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +74 -17
- data/lib/aws-sdk-s3/bucket_logging.rb +19 -12
- data/lib/aws-sdk-s3/bucket_notification.rb +6 -6
- data/lib/aws-sdk-s3/bucket_policy.rb +62 -18
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +12 -12
- data/lib/aws-sdk-s3/bucket_tagging.rb +16 -16
- data/lib/aws-sdk-s3/bucket_versioning.rb +32 -32
- data/lib/aws-sdk-s3/bucket_website.rb +16 -16
- data/lib/aws-sdk-s3/client.rb +7597 -2823
- data/lib/aws-sdk-s3/client_api.rb +288 -22
- 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 +11 -5
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations.rb +25 -31
- 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 +53 -18
- data/lib/aws-sdk-s3/endpoint_provider.rb +125 -6
- data/lib/aws-sdk-s3/endpoints.rb +545 -1261
- data/lib/aws-sdk-s3/errors.rb +47 -0
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
- data/lib/aws-sdk-s3/file_downloader.rb +1 -2
- data/lib/aws-sdk-s3/file_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +4 -4
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +6 -5
- data/lib/aws-sdk-s3/multipart_upload.rb +139 -36
- data/lib/aws-sdk-s3/multipart_upload_part.rb +175 -54
- data/lib/aws-sdk-s3/object.rb +1923 -313
- data/lib/aws-sdk-s3/object_acl.rb +34 -22
- 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 +1690 -250
- data/lib/aws-sdk-s3/object_version.rb +397 -67
- data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
- data/lib/aws-sdk-s3/plugins/endpoints.rb +32 -208
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +2 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/presigner.rb +5 -2
- data/lib/aws-sdk-s3/resource.rb +121 -22
- data/lib/aws-sdk-s3/types.rb +5960 -1526
- data/lib/aws-sdk-s3.rb +35 -31
- data/sig/bucket.rbs +221 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +115 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2450 -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/errors.rbs +42 -0
- data/sig/multipart_upload.rbs +113 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +448 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +340 -0
- data/sig/object_version.rbs +140 -0
- data/sig/resource.rbs +132 -0
- data/sig/types.rbs +2682 -0
- data/sig/waiters.rbs +95 -0
- metadata +44 -11
@@ -56,6 +56,10 @@ module Aws::S3
|
|
56
56
|
|
57
57
|
# If present, indicates that the requester was successfully charged for
|
58
58
|
# the request.
|
59
|
+
#
|
60
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
61
|
+
#
|
62
|
+
# </note>
|
59
63
|
# @return [String]
|
60
64
|
def request_charged
|
61
65
|
data[:request_charged]
|
@@ -75,7 +79,7 @@ module Aws::S3
|
|
75
79
|
#
|
76
80
|
# @return [self]
|
77
81
|
def load
|
78
|
-
resp = Aws::Plugins::UserAgent.
|
82
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
79
83
|
@client.get_object_acl(
|
80
84
|
bucket: @bucket_name,
|
81
85
|
key: @object_key
|
@@ -195,7 +199,7 @@ module Aws::S3
|
|
195
199
|
:retry
|
196
200
|
end
|
197
201
|
end
|
198
|
-
Aws::Plugins::UserAgent.
|
202
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
199
203
|
Aws::Waiters::Waiter.new(options).wait({})
|
200
204
|
end
|
201
205
|
end
|
@@ -261,12 +265,12 @@ module Aws::S3
|
|
261
265
|
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
262
266
|
# @option options [String] :checksum_algorithm
|
263
267
|
# Indicates the algorithm used to create the checksum for the object
|
264
|
-
# when
|
265
|
-
# functionality if
|
266
|
-
# must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
267
|
-
# sent. Otherwise, Amazon S3 fails the request with the HTTP
|
268
|
-
# `400 Bad Request`. For more information, see [Checking
|
269
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
268
|
+
# when you use the SDK. This header will not provide any additional
|
269
|
+
# functionality if you don't use the SDK. When you send this header,
|
270
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
271
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
272
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
273
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
270
274
|
#
|
271
275
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
272
276
|
# `ChecksumAlgorithm` parameter.
|
@@ -278,15 +282,15 @@ module Aws::S3
|
|
278
282
|
# Allows grantee the read, write, read ACP, and write ACP permissions on
|
279
283
|
# the bucket.
|
280
284
|
#
|
281
|
-
# This
|
285
|
+
# This functionality is not supported for Amazon S3 on Outposts.
|
282
286
|
# @option options [String] :grant_read
|
283
287
|
# Allows grantee to list the objects in the bucket.
|
284
288
|
#
|
285
|
-
# This
|
289
|
+
# This functionality is not supported for Amazon S3 on Outposts.
|
286
290
|
# @option options [String] :grant_read_acp
|
287
291
|
# Allows grantee to read the bucket ACL.
|
288
292
|
#
|
289
|
-
# This
|
293
|
+
# This functionality is not supported for Amazon S3 on Outposts.
|
290
294
|
# @option options [String] :grant_write
|
291
295
|
# Allows grantee to create new objects in the bucket.
|
292
296
|
#
|
@@ -295,32 +299,40 @@ module Aws::S3
|
|
295
299
|
# @option options [String] :grant_write_acp
|
296
300
|
# Allows grantee to write the ACL for the applicable bucket.
|
297
301
|
#
|
298
|
-
# This
|
302
|
+
# This functionality is not supported for Amazon S3 on Outposts.
|
299
303
|
# @option options [String] :request_payer
|
300
304
|
# Confirms that the requester knows that they will be charged for the
|
301
305
|
# request. Bucket owners need not specify this parameter in their
|
302
|
-
# requests. If either the source or destination
|
303
|
-
#
|
304
|
-
#
|
305
|
-
#
|
306
|
-
#
|
306
|
+
# requests. If either the source or destination S3 bucket has Requester
|
307
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
308
|
+
# the object. For information about downloading objects from Requester
|
309
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
310
|
+
# in the *Amazon S3 User Guide*.
|
311
|
+
#
|
312
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
313
|
+
#
|
314
|
+
# </note>
|
307
315
|
#
|
308
316
|
#
|
309
317
|
#
|
310
318
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
311
319
|
# @option options [String] :version_id
|
312
|
-
#
|
320
|
+
# Version ID used to reference a specific version of the object.
|
321
|
+
#
|
322
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
323
|
+
#
|
324
|
+
# </note>
|
313
325
|
# @option options [String] :expected_bucket_owner
|
314
|
-
# The account ID of the expected bucket owner. If the
|
315
|
-
#
|
316
|
-
# Forbidden` (access denied).
|
326
|
+
# The account ID of the expected bucket owner. If the account ID that
|
327
|
+
# you provide does not match the actual owner of the bucket, the request
|
328
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
317
329
|
# @return [Types::PutObjectAclOutput]
|
318
330
|
def put(options = {})
|
319
331
|
options = options.merge(
|
320
332
|
bucket: @bucket_name,
|
321
333
|
key: @object_key
|
322
334
|
)
|
323
|
-
resp = Aws::Plugins::UserAgent.
|
335
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
324
336
|
@client.put_object_acl(options)
|
325
337
|
end
|
326
338
|
resp.data
|
@@ -28,7 +28,7 @@ module Aws
|
|
28
28
|
options[:bucket] = target_bucket
|
29
29
|
options[:key] = target_key
|
30
30
|
options[:copy_source] = copy_source(source)
|
31
|
-
Aws::Plugins::UserAgent.
|
31
|
+
Aws::Plugins::UserAgent.metric('S3_TRANSFER') do
|
32
32
|
if options.delete(:multipart_copy)
|
33
33
|
apply_source_client(source, options)
|
34
34
|
ObjectMultipartCopier.new(@options).copy(options)
|
@@ -138,9 +138,7 @@ module Aws
|
|
138
138
|
end
|
139
139
|
|
140
140
|
def source_metadata(options)
|
141
|
-
if options[:content_length]
|
142
|
-
return { content_length: options.delete(:content_length) }
|
143
|
-
end
|
141
|
+
return options.slice(:content_length) if options[:content_length]
|
144
142
|
|
145
143
|
client = options[:copy_source_client] || @client
|
146
144
|
|
@@ -150,11 +148,15 @@ module Aws
|
|
150
148
|
bucket, key = options[:copy_source].match(/([^\/]+?)\/(.+)/)[1,2]
|
151
149
|
end
|
152
150
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
151
|
+
head_opts = { bucket: bucket, key: CGI.unescape(key) }.tap { |opts|
|
152
|
+
opts[:version_id] = version_id if version_id
|
153
|
+
opts[:part_number] = options[:part_number] if options[:part_number]
|
154
|
+
}
|
155
|
+
|
156
|
+
client.head_object(head_opts).to_h.tap { |head|
|
157
|
+
head.delete(:server_side_encryption)
|
158
|
+
head.delete(:ssekms_key_id)
|
159
|
+
}
|
158
160
|
end
|
159
161
|
|
160
162
|
def default_part_size(source_size)
|