aws-sdk-s3 1.103.0 → 1.120.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 +4 -4
- data/CHANGELOG.md +139 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +134 -34
- data/lib/aws-sdk-s3/bucket_acl.rb +18 -2
- data/lib/aws-sdk-s3/bucket_cors.rb +20 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +24 -6
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +28 -6
- data/lib/aws-sdk-s3/bucket_logging.rb +18 -2
- data/lib/aws-sdk-s3/bucket_notification.rb +17 -5
- data/lib/aws-sdk-s3/bucket_policy.rb +20 -4
- data/lib/aws-sdk-s3/bucket_request_payment.rb +18 -2
- data/lib/aws-sdk-s3/bucket_tagging.rb +20 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +54 -6
- data/lib/aws-sdk-s3/bucket_website.rb +20 -4
- data/lib/aws-sdk-s3/client.rb +2574 -1199
- data/lib/aws-sdk-s3/client_api.rb +574 -208
- data/lib/aws-sdk-s3/customizations/bucket.rb +20 -46
- data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
- data/lib/aws-sdk-s3/customizations/object.rb +80 -4
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +2 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +142 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +733 -0
- data/lib/aws-sdk-s3/endpoints.rb +2149 -0
- data/lib/aws-sdk-s3/file_downloader.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +5 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -7
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +36 -10
- data/lib/aws-sdk-s3/multipart_upload.rb +126 -12
- data/lib/aws-sdk-s3/multipart_upload_part.rb +133 -14
- data/lib/aws-sdk-s3/object.rb +289 -112
- data/lib/aws-sdk-s3/object_acl.rb +20 -4
- data/lib/aws-sdk-s3/object_multipart_copier.rb +11 -5
- data/lib/aws-sdk-s3/object_summary.rb +204 -74
- data/lib/aws-sdk-s3/object_version.rb +68 -40
- data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -44
- data/lib/aws-sdk-s3/plugins/arn.rb +0 -197
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
- data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -55
- data/lib/aws-sdk-s3/plugins/endpoints.rb +262 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
- data/lib/aws-sdk-s3/plugins/md5s.rb +5 -3
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +33 -109
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
- data/lib/aws-sdk-s3/presigned_post.rb +47 -35
- data/lib/aws-sdk-s3/presigner.rb +20 -33
- data/lib/aws-sdk-s3/resource.rb +19 -1
- data/lib/aws-sdk-s3/types.rb +2519 -4175
- data/lib/aws-sdk-s3.rb +5 -1
- metadata +11 -9
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -73
- data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -221,6 +221,7 @@ module Aws::S3
|
|
221
221
|
# },
|
222
222
|
# },
|
223
223
|
# content_md5: "ContentMD5",
|
224
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
224
225
|
# grant_full_control: "GrantFullControl",
|
225
226
|
# grant_read: "GrantRead",
|
226
227
|
# grant_read_acp: "GrantReadACP",
|
@@ -254,6 +255,21 @@ module Aws::S3
|
|
254
255
|
#
|
255
256
|
#
|
256
257
|
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
258
|
+
# @option options [String] :checksum_algorithm
|
259
|
+
# Indicates the algorithm used to create the checksum for the object
|
260
|
+
# when using the SDK. This header will not provide any additional
|
261
|
+
# functionality if not using the SDK. When sending this header, there
|
262
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
263
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
264
|
+
# `400 Bad Request`. For more information, see [Checking object
|
265
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
266
|
+
#
|
267
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
268
|
+
# `ChecksumAlgorithm` parameter.
|
269
|
+
#
|
270
|
+
#
|
271
|
+
#
|
272
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
257
273
|
# @option options [String] :grant_full_control
|
258
274
|
# Allows grantee the read, write, read ACP, and write ACP permissions on
|
259
275
|
# the bucket.
|
@@ -279,8 +295,8 @@ module Aws::S3
|
|
279
295
|
# @option options [String] :request_payer
|
280
296
|
# Confirms that the requester knows that they will be charged for the
|
281
297
|
# request. Bucket owners need not specify this parameter in their
|
282
|
-
# requests. For information about downloading objects from
|
283
|
-
#
|
298
|
+
# requests. For information about downloading objects from Requester
|
299
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
284
300
|
# in the *Amazon S3 User Guide*.
|
285
301
|
#
|
286
302
|
#
|
@@ -290,8 +306,8 @@ module Aws::S3
|
|
290
306
|
# VersionId used to reference a specific version of the object.
|
291
307
|
# @option options [String] :expected_bucket_owner
|
292
308
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
293
|
-
# a different account, the request
|
294
|
-
#
|
309
|
+
# a different account, the request fails with the HTTP status code `403
|
310
|
+
# Forbidden` (access denied).
|
295
311
|
# @return [Types::PutObjectAclOutput]
|
296
312
|
def put(options = {})
|
297
313
|
options = options.merge(
|
@@ -24,6 +24,9 @@ module Aws
|
|
24
24
|
@thread_count = options.delete(:thread_count) || 10
|
25
25
|
@min_part_size = options.delete(:min_part_size) || (FIVE_MB * 10)
|
26
26
|
@client = options[:client] || Client.new
|
27
|
+
if options[:checksum_algorithm]
|
28
|
+
raise ArgumentError, 'Multipart Copy does not support setting :checksum_algorithm'
|
29
|
+
end
|
27
30
|
end
|
28
31
|
|
29
32
|
# @return [Client]
|
@@ -31,8 +34,9 @@ module Aws
|
|
31
34
|
|
32
35
|
# @option (see S3::Client#copy_object)
|
33
36
|
def copy(options = {})
|
34
|
-
|
35
|
-
|
37
|
+
metadata = source_metadata(options)
|
38
|
+
size = metadata[:content_length]
|
39
|
+
options[:upload_id] = initiate_upload(metadata.merge(options))
|
36
40
|
begin
|
37
41
|
parts = copy_parts(size, default_part_size(size), options)
|
38
42
|
complete_upload(parts, options)
|
@@ -118,8 +122,10 @@ module Aws
|
|
118
122
|
end
|
119
123
|
end
|
120
124
|
|
121
|
-
def
|
122
|
-
|
125
|
+
def source_metadata(options)
|
126
|
+
if options[:content_length]
|
127
|
+
return { content_length: options.delete(:content_length) }
|
128
|
+
end
|
123
129
|
|
124
130
|
client = options[:copy_source_client] || @client
|
125
131
|
|
@@ -132,7 +138,7 @@ module Aws
|
|
132
138
|
key = CGI.unescape(key)
|
133
139
|
opts = { bucket: bucket, key: key }
|
134
140
|
opts[:version_id] = version_id if version_id
|
135
|
-
client.head_object(opts).
|
141
|
+
client.head_object(opts).to_h
|
136
142
|
end
|
137
143
|
|
138
144
|
def default_part_size(source_size)
|