aws-sdk-s3 1.114.0 → 1.125.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 +94 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +51 -28
- data/lib/aws-sdk-s3/bucket_acl.rb +9 -3
- data/lib/aws-sdk-s3/bucket_cors.rb +12 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -4
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -4
- data/lib/aws-sdk-s3/bucket_logging.rb +9 -3
- data/lib/aws-sdk-s3/bucket_notification.rb +9 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +12 -4
- data/lib/aws-sdk-s3/bucket_request_payment.rb +9 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +12 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +15 -5
- data/lib/aws-sdk-s3/bucket_website.rb +12 -4
- data/lib/aws-sdk-s3/client.rb +1721 -1457
- data/lib/aws-sdk-s3/client_api.rb +189 -189
- data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
- data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
- data/lib/aws-sdk-s3/customizations/object.rb +32 -19
- 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/encryption/client.rb +6 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
- data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
- 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 +2150 -0
- data/lib/aws-sdk-s3/file_downloader.rb +28 -24
- data/lib/aws-sdk-s3/file_uploader.rb +8 -6
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +41 -13
- data/lib/aws-sdk-s3/multipart_upload.rb +12 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +10 -4
- data/lib/aws-sdk-s3/object.rb +86 -57
- data/lib/aws-sdk-s3/object_acl.rb +9 -3
- data/lib/aws-sdk-s3/object_copier.rb +7 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +11 -5
- data/lib/aws-sdk-s3/object_summary.rb +72 -46
- data/lib/aws-sdk-s3/object_version.rb +21 -9
- data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -50
- data/lib/aws-sdk-s3/plugins/arn.rb +0 -184
- 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 -49
- 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 +0 -29
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +32 -126
- data/lib/aws-sdk-s3/presigned_post.rb +9 -16
- data/lib/aws-sdk-s3/presigner.rb +20 -33
- data/lib/aws-sdk-s3/resource.rb +7 -3
- data/lib/aws-sdk-s3/types.rb +406 -3903
- data/lib/aws-sdk-s3.rb +5 -1
- metadata +10 -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 -68
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -74
- data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -239,11 +239,8 @@ module Aws::S3
|
|
239
239
|
data[:website_redirect_location]
|
240
240
|
end
|
241
241
|
|
242
|
-
#
|
243
|
-
# Amazon
|
244
|
-
# the response includes this header with the value of the server-side
|
245
|
-
# encryption algorithm used when storing this object in Amazon S3 (for
|
246
|
-
# example, AES256, aws:kms).
|
242
|
+
# The server-side encryption algorithm used when storing this object in
|
243
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
247
244
|
# @return [String]
|
248
245
|
def server_side_encryption
|
249
246
|
data[:server_side_encryption]
|
@@ -273,8 +270,8 @@ module Aws::S3
|
|
273
270
|
end
|
274
271
|
|
275
272
|
# If present, specifies the ID of the Amazon Web Services Key Management
|
276
|
-
# Service (Amazon Web Services KMS) symmetric customer
|
277
|
-
# was used for the object.
|
273
|
+
# Service (Amazon Web Services KMS) symmetric encryption customer
|
274
|
+
# managed key that was used for the object.
|
278
275
|
# @return [String]
|
279
276
|
def ssekms_key_id
|
280
277
|
data[:ssekms_key_id]
|
@@ -410,10 +407,12 @@ module Aws::S3
|
|
410
407
|
#
|
411
408
|
# @return [self]
|
412
409
|
def load
|
413
|
-
resp =
|
410
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
411
|
+
@client.head_object(
|
414
412
|
bucket: @bucket_name,
|
415
413
|
key: @key
|
416
414
|
)
|
415
|
+
end
|
417
416
|
@data = resp.data
|
418
417
|
self
|
419
418
|
end
|
@@ -458,8 +457,10 @@ module Aws::S3
|
|
458
457
|
options, params = separate_params_and_options(options)
|
459
458
|
waiter = Waiters::ObjectExists.new(options)
|
460
459
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
461
|
-
|
460
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
461
|
+
waiter.wait(params.merge(bucket: @bucket_name,
|
462
462
|
key: @key))
|
463
|
+
end
|
463
464
|
Object.new({
|
464
465
|
bucket_name: @bucket_name,
|
465
466
|
key: @key,
|
@@ -477,8 +478,10 @@ module Aws::S3
|
|
477
478
|
options, params = separate_params_and_options(options)
|
478
479
|
waiter = Waiters::ObjectNotExists.new(options)
|
479
480
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
480
|
-
|
481
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
482
|
+
waiter.wait(params.merge(bucket: @bucket_name,
|
481
483
|
key: @key))
|
484
|
+
end
|
482
485
|
Object.new({
|
483
486
|
bucket_name: @bucket_name,
|
484
487
|
key: @key,
|
@@ -580,7 +583,9 @@ module Aws::S3
|
|
580
583
|
:retry
|
581
584
|
end
|
582
585
|
end
|
583
|
-
Aws::
|
586
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
587
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
588
|
+
end
|
584
589
|
end
|
585
590
|
|
586
591
|
# @!group Actions
|
@@ -610,8 +615,8 @@ module Aws::S3
|
|
610
615
|
# },
|
611
616
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
612
617
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
613
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
614
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
618
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
619
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
615
620
|
# website_redirect_location: "WebsiteRedirectLocation",
|
616
621
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
617
622
|
# sse_customer_key: "SSECustomerKey",
|
@@ -658,7 +663,7 @@ module Aws::S3
|
|
658
663
|
# @option options [required, String] :copy_source
|
659
664
|
# Specifies the source object for the copy operation. You specify the
|
660
665
|
# value in one of two formats, depending on whether you want to access
|
661
|
-
# the source object through an [access point][1]
|
666
|
+
# the source object through an [access point][1]:
|
662
667
|
#
|
663
668
|
# * For objects not accessed through an access point, specify the name
|
664
669
|
# of the source bucket and the key of the source object, separated by
|
@@ -740,7 +745,7 @@ module Aws::S3
|
|
740
745
|
# or replaced with tag-set provided in the request.
|
741
746
|
# @option options [String] :server_side_encryption
|
742
747
|
# The server-side encryption algorithm used when storing this object in
|
743
|
-
# Amazon S3 (for example, AES256, aws:kms).
|
748
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
744
749
|
# @option options [String] :storage_class
|
745
750
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
746
751
|
# created objects. The STANDARD storage class provides high durability
|
@@ -755,7 +760,10 @@ module Aws::S3
|
|
755
760
|
# @option options [String] :website_redirect_location
|
756
761
|
# If the bucket is configured as a website, redirects requests for this
|
757
762
|
# object to another object in the same bucket or to an external URL.
|
758
|
-
# Amazon S3 stores the value of this header in the object metadata.
|
763
|
+
# Amazon S3 stores the value of this header in the object metadata. This
|
764
|
+
# value is unique to each object and is not copied when using the
|
765
|
+
# `x-amz-metadata-directive` header. Instead, you may opt to provide
|
766
|
+
# this header in combination with the directive.
|
759
767
|
# @option options [String] :sse_customer_algorithm
|
760
768
|
# Specifies the algorithm to use to when encrypting the object (for
|
761
769
|
# example, AES256).
|
@@ -839,7 +847,9 @@ module Aws::S3
|
|
839
847
|
bucket: @bucket_name,
|
840
848
|
key: @key
|
841
849
|
)
|
842
|
-
resp =
|
850
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
851
|
+
@client.copy_object(options)
|
852
|
+
end
|
843
853
|
resp.data
|
844
854
|
end
|
845
855
|
|
@@ -884,7 +894,9 @@ module Aws::S3
|
|
884
894
|
bucket: @bucket_name,
|
885
895
|
key: @key
|
886
896
|
)
|
887
|
-
resp =
|
897
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
898
|
+
@client.delete_object(options)
|
899
|
+
end
|
888
900
|
resp.data
|
889
901
|
end
|
890
902
|
|
@@ -927,7 +939,7 @@ module Aws::S3
|
|
927
939
|
# @option options [String] :range
|
928
940
|
# Downloads the specified range bytes of an object. For more information
|
929
941
|
# about the HTTP Range header, see
|
930
|
-
# [https://www.
|
942
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
931
943
|
#
|
932
944
|
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
933
945
|
# `GET` request.
|
@@ -936,7 +948,7 @@ module Aws::S3
|
|
936
948
|
#
|
937
949
|
#
|
938
950
|
#
|
939
|
-
# [1]: https://www.
|
951
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
|
940
952
|
# @option options [String] :response_cache_control
|
941
953
|
# Sets the `Cache-Control` header of the response.
|
942
954
|
# @option options [String] :response_content_disposition
|
@@ -991,7 +1003,9 @@ module Aws::S3
|
|
991
1003
|
bucket: @bucket_name,
|
992
1004
|
key: @key
|
993
1005
|
)
|
994
|
-
resp =
|
1006
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1007
|
+
@client.get_object(options, &block)
|
1008
|
+
end
|
995
1009
|
resp.data
|
996
1010
|
end
|
997
1011
|
|
@@ -1012,8 +1026,8 @@ module Aws::S3
|
|
1012
1026
|
# metadata: {
|
1013
1027
|
# "MetadataKey" => "MetadataValue",
|
1014
1028
|
# },
|
1015
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
1016
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
1029
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
1030
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
1017
1031
|
# website_redirect_location: "WebsiteRedirectLocation",
|
1018
1032
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
1019
1033
|
# sse_customer_key: "SSECustomerKey",
|
@@ -1069,7 +1083,7 @@ module Aws::S3
|
|
1069
1083
|
# A map of metadata to store with the object in S3.
|
1070
1084
|
# @option options [String] :server_side_encryption
|
1071
1085
|
# The server-side encryption algorithm used when storing this object in
|
1072
|
-
# Amazon S3 (for example, AES256, aws:kms).
|
1086
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
1073
1087
|
# @option options [String] :storage_class
|
1074
1088
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
1075
1089
|
# created objects. The STANDARD storage class provides high durability
|
@@ -1099,13 +1113,13 @@ module Aws::S3
|
|
1099
1113
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
1100
1114
|
# ensure that the encryption key was transmitted without error.
|
1101
1115
|
# @option options [String] :ssekms_key_id
|
1102
|
-
# Specifies the ID of the symmetric customer managed key to
|
1103
|
-
# object encryption. All GET and PUT requests for an object
|
1104
|
-
# Amazon Web Services KMS will fail if not made via SSL or
|
1105
|
-
# For information about configuring using any of the
|
1106
|
-
# supported Amazon Web Services SDKs and Amazon Web Services
|
1107
|
-
# [Specifying the Signature Version in Request
|
1108
|
-
# *Amazon S3 User Guide*.
|
1116
|
+
# Specifies the ID of the symmetric encryption customer managed key to
|
1117
|
+
# use for object encryption. All GET and PUT requests for an object
|
1118
|
+
# protected by Amazon Web Services KMS will fail if not made via SSL or
|
1119
|
+
# using SigV4. For information about configuring using any of the
|
1120
|
+
# officially supported Amazon Web Services SDKs and Amazon Web Services
|
1121
|
+
# CLI, see [Specifying the Signature Version in Request
|
1122
|
+
# Authentication][1] in the *Amazon S3 User Guide*.
|
1109
1123
|
#
|
1110
1124
|
#
|
1111
1125
|
#
|
@@ -1161,7 +1175,9 @@ module Aws::S3
|
|
1161
1175
|
bucket: @bucket_name,
|
1162
1176
|
key: @key
|
1163
1177
|
)
|
1164
|
-
resp =
|
1178
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1179
|
+
@client.create_multipart_upload(options)
|
1180
|
+
end
|
1165
1181
|
MultipartUpload.new(
|
1166
1182
|
bucket_name: @bucket_name,
|
1167
1183
|
object_key: @key,
|
@@ -1195,8 +1211,8 @@ module Aws::S3
|
|
1195
1211
|
# metadata: {
|
1196
1212
|
# "MetadataKey" => "MetadataValue",
|
1197
1213
|
# },
|
1198
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
1199
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
1214
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
1215
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
1200
1216
|
# website_redirect_location: "WebsiteRedirectLocation",
|
1201
1217
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
1202
1218
|
# sse_customer_key: "SSECustomerKey",
|
@@ -1234,30 +1250,30 @@ module Aws::S3
|
|
1234
1250
|
# @option options [String] :content_disposition
|
1235
1251
|
# Specifies presentational information for the object. For more
|
1236
1252
|
# information, see
|
1237
|
-
# [
|
1253
|
+
# [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
|
1238
1254
|
#
|
1239
1255
|
#
|
1240
1256
|
#
|
1241
|
-
# [1]:
|
1257
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
|
1242
1258
|
# @option options [String] :content_encoding
|
1243
1259
|
# Specifies what content encodings have been applied to the object and
|
1244
1260
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
1245
1261
|
# referenced by the Content-Type header field. For more information, see
|
1246
|
-
# [
|
1262
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
|
1247
1263
|
#
|
1248
1264
|
#
|
1249
1265
|
#
|
1250
|
-
# [1]:
|
1266
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
|
1251
1267
|
# @option options [String] :content_language
|
1252
1268
|
# The language the content is in.
|
1253
1269
|
# @option options [Integer] :content_length
|
1254
1270
|
# Size of the body in bytes. This parameter is useful when the size of
|
1255
1271
|
# the body cannot be determined automatically. For more information, see
|
1256
|
-
# [
|
1272
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
|
1257
1273
|
#
|
1258
1274
|
#
|
1259
1275
|
#
|
1260
|
-
# [1]:
|
1276
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
1261
1277
|
# @option options [String] :content_md5
|
1262
1278
|
# The base64-encoded 128-bit MD5 digest of the message (without the
|
1263
1279
|
# headers) according to RFC 1864. This header can be used as a message
|
@@ -1273,11 +1289,11 @@ module Aws::S3
|
|
1273
1289
|
# @option options [String] :content_type
|
1274
1290
|
# A standard MIME type describing the format of the contents. For more
|
1275
1291
|
# information, see
|
1276
|
-
# [
|
1292
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
|
1277
1293
|
#
|
1278
1294
|
#
|
1279
1295
|
#
|
1280
|
-
# [1]:
|
1296
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
|
1281
1297
|
# @option options [String] :checksum_algorithm
|
1282
1298
|
# Indicates the algorithm used to create the checksum for the object
|
1283
1299
|
# when using the SDK. This header will not provide any additional
|
@@ -1336,11 +1352,11 @@ module Aws::S3
|
|
1336
1352
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
1337
1353
|
# The date and time at which the object is no longer cacheable. For more
|
1338
1354
|
# information, see
|
1339
|
-
# [
|
1355
|
+
# [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
|
1340
1356
|
#
|
1341
1357
|
#
|
1342
1358
|
#
|
1343
|
-
# [1]:
|
1359
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
1344
1360
|
# @option options [String] :grant_full_control
|
1345
1361
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
1346
1362
|
# object.
|
@@ -1362,7 +1378,7 @@ module Aws::S3
|
|
1362
1378
|
# A map of metadata to store with the object in S3.
|
1363
1379
|
# @option options [String] :server_side_encryption
|
1364
1380
|
# The server-side encryption algorithm used when storing this object in
|
1365
|
-
# Amazon S3 (for example, AES256, aws:kms).
|
1381
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
1366
1382
|
# @option options [String] :storage_class
|
1367
1383
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
1368
1384
|
# created objects. The STANDARD storage class provides high durability
|
@@ -1413,9 +1429,9 @@ module Aws::S3
|
|
1413
1429
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
1414
1430
|
# ensure that the encryption key was transmitted without error.
|
1415
1431
|
# @option options [String] :ssekms_key_id
|
1416
|
-
# If `x-amz-server-side-encryption`
|
1417
|
-
#
|
1418
|
-
#
|
1432
|
+
# If `x-amz-server-side-encryption` has a valid value of `aws:kms`, this
|
1433
|
+
# header specifies the ID of the Amazon Web Services Key Management
|
1434
|
+
# Service (Amazon Web Services KMS) symmetric encryption customer
|
1419
1435
|
# managed key that was used for the object. If you specify
|
1420
1436
|
# `x-amz-server-side-encryption:aws:kms`, but do not provide`
|
1421
1437
|
# x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
@@ -1425,7 +1441,10 @@ module Aws::S3
|
|
1425
1441
|
# @option options [String] :ssekms_encryption_context
|
1426
1442
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
1427
1443
|
# object encryption. The value of this header is a base64-encoded UTF-8
|
1428
|
-
# string holding JSON with the encryption context key-value pairs.
|
1444
|
+
# string holding JSON with the encryption context key-value pairs. This
|
1445
|
+
# value is stored as object metadata and automatically gets passed on to
|
1446
|
+
# Amazon Web Services KMS for future `GetObject` or `CopyObject`
|
1447
|
+
# operations on this object.
|
1429
1448
|
# @option options [Boolean] :bucket_key_enabled
|
1430
1449
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
1431
1450
|
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
@@ -1469,7 +1488,9 @@ module Aws::S3
|
|
1469
1488
|
bucket: @bucket_name,
|
1470
1489
|
key: @key
|
1471
1490
|
)
|
1472
|
-
resp =
|
1491
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1492
|
+
@client.put_object(options)
|
1493
|
+
end
|
1473
1494
|
resp.data
|
1474
1495
|
end
|
1475
1496
|
|
@@ -1523,7 +1544,7 @@ module Aws::S3
|
|
1523
1544
|
# bucket_name: "BucketName", # required
|
1524
1545
|
# prefix: "LocationPrefix", # required
|
1525
1546
|
# encryption: {
|
1526
|
-
# encryption_type: "AES256", # required, accepts AES256, aws:kms
|
1547
|
+
# encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
|
1527
1548
|
# kms_key_id: "SSEKMSKeyId",
|
1528
1549
|
# kms_context: "KMSContext",
|
1529
1550
|
# },
|
@@ -1554,7 +1575,7 @@ module Aws::S3
|
|
1554
1575
|
# value: "MetadataValue",
|
1555
1576
|
# },
|
1556
1577
|
# ],
|
1557
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
1578
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
1558
1579
|
# },
|
1559
1580
|
# },
|
1560
1581
|
# },
|
@@ -1602,7 +1623,9 @@ module Aws::S3
|
|
1602
1623
|
bucket: @bucket_name,
|
1603
1624
|
key: @key
|
1604
1625
|
)
|
1605
|
-
resp =
|
1626
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1627
|
+
@client.restore_object(options)
|
1628
|
+
end
|
1606
1629
|
resp.data
|
1607
1630
|
end
|
1608
1631
|
|
@@ -1637,8 +1660,10 @@ module Aws::S3
|
|
1637
1660
|
# Return the object only if it has not been modified since the specified
|
1638
1661
|
# time; otherwise, return a 412 (precondition failed) error.
|
1639
1662
|
# @option options [String] :range
|
1640
|
-
#
|
1641
|
-
#
|
1663
|
+
# HeadObject returns only the metadata for an object. If the Range is
|
1664
|
+
# satisfiable, only the `ContentLength` is affected in the response. If
|
1665
|
+
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
1666
|
+
# Satisfiable` error.
|
1642
1667
|
# @option options [String] :version_id
|
1643
1668
|
# VersionId used to reference a specific version of the object.
|
1644
1669
|
# @option options [String] :sse_customer_algorithm
|
@@ -1686,7 +1711,9 @@ module Aws::S3
|
|
1686
1711
|
bucket: @bucket_name,
|
1687
1712
|
key: @key
|
1688
1713
|
)
|
1689
|
-
resp =
|
1714
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1715
|
+
@client.head_object(options)
|
1716
|
+
end
|
1690
1717
|
resp.data
|
1691
1718
|
end
|
1692
1719
|
|
@@ -1859,7 +1886,9 @@ module Aws::S3
|
|
1859
1886
|
key: item.key
|
1860
1887
|
}
|
1861
1888
|
end
|
1862
|
-
|
1889
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
1890
|
+
batch[0].client.delete_objects(params)
|
1891
|
+
end
|
1863
1892
|
end
|
1864
1893
|
nil
|
1865
1894
|
end
|
@@ -75,10 +75,12 @@ module Aws::S3
|
|
75
75
|
#
|
76
76
|
# @return [self]
|
77
77
|
def load
|
78
|
-
resp =
|
78
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
79
|
+
@client.get_object_acl(
|
79
80
|
bucket: @bucket_name,
|
80
81
|
key: @object_key
|
81
82
|
)
|
83
|
+
end
|
82
84
|
@data = resp.data
|
83
85
|
self
|
84
86
|
end
|
@@ -193,7 +195,9 @@ module Aws::S3
|
|
193
195
|
:retry
|
194
196
|
end
|
195
197
|
end
|
196
|
-
Aws::
|
198
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
199
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
200
|
+
end
|
197
201
|
end
|
198
202
|
|
199
203
|
# @!group Actions
|
@@ -314,7 +318,9 @@ module Aws::S3
|
|
314
318
|
bucket: @bucket_name,
|
315
319
|
key: @object_key
|
316
320
|
)
|
317
|
-
resp =
|
321
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
322
|
+
@client.put_object_acl(options)
|
323
|
+
end
|
318
324
|
resp.data
|
319
325
|
end
|
320
326
|
|
@@ -28,11 +28,13 @@ module Aws
|
|
28
28
|
options[:bucket] = target_bucket
|
29
29
|
options[:key] = target_key
|
30
30
|
options[:copy_source] = copy_source(source)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
Aws::Plugins::UserAgent.feature('s3-transfer') do
|
32
|
+
if options.delete(:multipart_copy)
|
33
|
+
apply_source_client(source, options)
|
34
|
+
ObjectMultipartCopier.new(@options).copy(options)
|
35
|
+
else
|
36
|
+
@object.client.copy_object(options)
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|
@@ -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)
|