aws-sdk-s3 1.150.0 → 1.169.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 +110 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +12 -3
- data/lib/aws-sdk-s3/bucket.rb +252 -88
- 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 +42 -5
- 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 +8 -8
- 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 +1685 -668
- data/lib/aws-sdk-s3/client_api.rb +49 -4
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- 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 +24 -38
- 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 +21 -18
- data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
- data/lib/aws-sdk-s3/endpoints.rb +416 -1614
- data/lib/aws-sdk-s3/errors.rb +3 -0
- 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 +31 -8
- data/lib/aws-sdk-s3/multipart_upload_part.rb +11 -11
- data/lib/aws-sdk-s3/object.rb +441 -158
- 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_summary.rb +403 -134
- data/lib/aws-sdk-s3/object_version.rb +53 -13
- data/lib/aws-sdk-s3/plugins/access_grants.rb +75 -5
- data/lib/aws-sdk-s3/plugins/endpoints.rb +24 -212
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +7 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3/resource.rb +37 -11
- data/lib/aws-sdk-s3/types.rb +1106 -401
- data/lib/aws-sdk-s3.rb +35 -31
- data/sig/bucket.rbs +4 -0
- data/sig/bucket_lifecycle_configuration.rbs +7 -3
- data/sig/client.rbs +49 -5
- data/sig/multipart_upload.rbs +1 -0
- data/sig/object.rbs +7 -0
- data/sig/object_summary.rbs +1 -0
- data/sig/object_version.rbs +6 -0
- data/sig/resource.rbs +7 -1
- data/sig/types.rbs +36 -2
- data/sig/waiters.rbs +12 -0
- metadata +7 -6
data/lib/aws-sdk-s3/errors.rb
CHANGED
@@ -37,7 +37,7 @@ module Aws
|
|
37
37
|
# objects smaller than the multipart threshold.
|
38
38
|
# @return [void]
|
39
39
|
def upload(source, options = {})
|
40
|
-
Aws::Plugins::UserAgent.
|
40
|
+
Aws::Plugins::UserAgent.metric('S3_TRANSFER') do
|
41
41
|
if File.size(source) >= multipart_threshold
|
42
42
|
MultipartFileUploader.new(@options).upload(source, options)
|
43
43
|
else
|
@@ -46,7 +46,7 @@ module Aws
|
|
46
46
|
# @option options [Integer] :thread_count (THREAD_COUNT)
|
47
47
|
# @return [Seahorse::Client::Response] - the CompleteMultipartUploadResponse
|
48
48
|
def upload(options = {}, &block)
|
49
|
-
Aws::Plugins::UserAgent.
|
49
|
+
Aws::Plugins::UserAgent.metric('S3_TRANSFER') do
|
50
50
|
upload_id = initiate_upload(options)
|
51
51
|
parts = upload_parts(upload_id, options, &block)
|
52
52
|
complete_upload(upload_id, parts, options)
|
@@ -227,7 +227,7 @@ module Aws::S3
|
|
227
227
|
:retry
|
228
228
|
end
|
229
229
|
end
|
230
|
-
Aws::Plugins::UserAgent.
|
230
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
231
231
|
Aws::Waiters::Waiter.new(options).wait({})
|
232
232
|
end
|
233
233
|
end
|
@@ -268,7 +268,7 @@ module Aws::S3
|
|
268
268
|
key: @object_key,
|
269
269
|
upload_id: @id
|
270
270
|
)
|
271
|
-
resp = Aws::Plugins::UserAgent.
|
271
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
272
272
|
@client.abort_multipart_upload(options)
|
273
273
|
end
|
274
274
|
resp.data
|
@@ -295,6 +295,7 @@ module Aws::S3
|
|
295
295
|
# checksum_sha256: "ChecksumSHA256",
|
296
296
|
# request_payer: "requester", # accepts requester
|
297
297
|
# expected_bucket_owner: "AccountId",
|
298
|
+
# if_none_match: "IfNoneMatch",
|
298
299
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
299
300
|
# sse_customer_key: "SSECustomerKey",
|
300
301
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
@@ -305,9 +306,9 @@ module Aws::S3
|
|
305
306
|
# @option options [String] :checksum_crc32
|
306
307
|
# This header can be used as a data integrity check to verify that the
|
307
308
|
# data received is the same data that was originally sent. This header
|
308
|
-
# specifies the base64-encoded, 32-bit
|
309
|
-
# more information, see [Checking object integrity][1] in the
|
310
|
-
# User Guide*.
|
309
|
+
# specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
|
310
|
+
# For more information, see [Checking object integrity][1] in the
|
311
|
+
# *Amazon S3 User Guide*.
|
311
312
|
#
|
312
313
|
#
|
313
314
|
#
|
@@ -315,7 +316,7 @@ module Aws::S3
|
|
315
316
|
# @option options [String] :checksum_crc32c
|
316
317
|
# This header can be used as a data integrity check to verify that the
|
317
318
|
# data received is the same data that was originally sent. This header
|
318
|
-
# specifies the base64-encoded, 32-bit
|
319
|
+
# specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
|
319
320
|
# For more information, see [Checking object integrity][1] in the
|
320
321
|
# *Amazon S3 User Guide*.
|
321
322
|
#
|
@@ -362,6 +363,25 @@ module Aws::S3
|
|
362
363
|
# The account ID of the expected bucket owner. If the account ID that
|
363
364
|
# you provide does not match the actual owner of the bucket, the request
|
364
365
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
366
|
+
# @option options [String] :if_none_match
|
367
|
+
# Uploads the object only if the object key name does not already exist
|
368
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
369
|
+
# Precondition Failed` error.
|
370
|
+
#
|
371
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
372
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
373
|
+
# re-initiate the multipart upload with `CreateMultipartUpload` and
|
374
|
+
# re-upload each part.
|
375
|
+
#
|
376
|
+
# Expects the '*' (asterisk) character.
|
377
|
+
#
|
378
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
379
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
380
|
+
#
|
381
|
+
#
|
382
|
+
#
|
383
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
384
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
365
385
|
# @option options [String] :sse_customer_algorithm
|
366
386
|
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
367
387
|
# This parameter is required only when the object was created using a
|
@@ -409,7 +429,7 @@ module Aws::S3
|
|
409
429
|
key: @object_key,
|
410
430
|
upload_id: @id
|
411
431
|
)
|
412
|
-
Aws::Plugins::UserAgent.
|
432
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
413
433
|
@client.complete_multipart_upload(options)
|
414
434
|
end
|
415
435
|
Object.new(
|
@@ -519,7 +539,7 @@ module Aws::S3
|
|
519
539
|
key: @object_key,
|
520
540
|
upload_id: @id
|
521
541
|
)
|
522
|
-
resp = Aws::Plugins::UserAgent.
|
542
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
523
543
|
@client.list_parts(options)
|
524
544
|
end
|
525
545
|
resp.each_page do |page|
|
@@ -589,3 +609,6 @@ module Aws::S3
|
|
589
609
|
class Collection < Aws::Resources::Collection; end
|
590
610
|
end
|
591
611
|
end
|
612
|
+
|
613
|
+
# Load customizations if they exist
|
614
|
+
require 'aws-sdk-s3/customizations/multipart_upload'
|
@@ -78,9 +78,9 @@ module Aws::S3
|
|
78
78
|
|
79
79
|
# This header can be used as a data integrity check to verify that the
|
80
80
|
# data received is the same data that was originally sent. This header
|
81
|
-
# specifies the base64-encoded, 32-bit
|
82
|
-
# more information, see [Checking object integrity][1] in the
|
83
|
-
# User Guide*.
|
81
|
+
# specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
|
82
|
+
# For more information, see [Checking object integrity][1] in the
|
83
|
+
# *Amazon S3 User Guide*.
|
84
84
|
#
|
85
85
|
#
|
86
86
|
#
|
@@ -90,7 +90,7 @@ module Aws::S3
|
|
90
90
|
data[:checksum_crc32]
|
91
91
|
end
|
92
92
|
|
93
|
-
# The base64-encoded, 32-bit
|
93
|
+
# The base64-encoded, 32-bit CRC-32C checksum of the object. This will
|
94
94
|
# only be present if it was uploaded with the object. When you use an
|
95
95
|
# API operation on an object that was uploaded using multipart uploads,
|
96
96
|
# this value may not be a direct checksum value of the full object.
|
@@ -262,7 +262,7 @@ module Aws::S3
|
|
262
262
|
:retry
|
263
263
|
end
|
264
264
|
end
|
265
|
-
Aws::Plugins::UserAgent.
|
265
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
266
266
|
Aws::Waiters::Waiter.new(options).wait({})
|
267
267
|
end
|
268
268
|
end
|
@@ -500,7 +500,7 @@ module Aws::S3
|
|
500
500
|
upload_id: @multipart_upload_id,
|
501
501
|
part_number: @part_number
|
502
502
|
)
|
503
|
-
resp = Aws::Plugins::UserAgent.
|
503
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
504
504
|
@client.upload_part_copy(options)
|
505
505
|
end
|
506
506
|
resp.data
|
@@ -558,9 +558,9 @@ module Aws::S3
|
|
558
558
|
# @option options [String] :checksum_crc32
|
559
559
|
# This header can be used as a data integrity check to verify that the
|
560
560
|
# data received is the same data that was originally sent. This header
|
561
|
-
# specifies the base64-encoded, 32-bit
|
562
|
-
# more information, see [Checking object integrity][1] in the
|
563
|
-
# User Guide*.
|
561
|
+
# specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
|
562
|
+
# For more information, see [Checking object integrity][1] in the
|
563
|
+
# *Amazon S3 User Guide*.
|
564
564
|
#
|
565
565
|
#
|
566
566
|
#
|
@@ -568,7 +568,7 @@ module Aws::S3
|
|
568
568
|
# @option options [String] :checksum_crc32c
|
569
569
|
# This header can be used as a data integrity check to verify that the
|
570
570
|
# data received is the same data that was originally sent. This header
|
571
|
-
# specifies the base64-encoded, 32-bit
|
571
|
+
# specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
|
572
572
|
# For more information, see [Checking object integrity][1] in the
|
573
573
|
# *Amazon S3 User Guide*.
|
574
574
|
#
|
@@ -650,7 +650,7 @@ module Aws::S3
|
|
650
650
|
upload_id: @multipart_upload_id,
|
651
651
|
part_number: @part_number
|
652
652
|
)
|
653
|
-
resp = Aws::Plugins::UserAgent.
|
653
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
654
654
|
@client.upload_part(options)
|
655
655
|
end
|
656
656
|
resp.data
|