aws-sdk-s3 1.119.2 → 1.122.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 +20 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +19 -16
- data/lib/aws-sdk-s3/client.rb +1571 -1329
- data/lib/aws-sdk-s3/endpoint_provider.rb +141 -141
- data/lib/aws-sdk-s3/object.rb +45 -40
- data/lib/aws-sdk-s3/object_summary.rb +37 -31
- data/lib/aws-sdk-s3/object_version.rb +6 -4
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +13 -11
- data/lib/aws-sdk-s3/types.rb +403 -263
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +2 -2
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]
|
@@ -611,7 +608,7 @@ module Aws::S3
|
|
611
608
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
612
609
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
613
610
|
# 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
|
611
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
615
612
|
# website_redirect_location: "WebsiteRedirectLocation",
|
616
613
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
617
614
|
# sse_customer_key: "SSECustomerKey",
|
@@ -740,7 +737,7 @@ module Aws::S3
|
|
740
737
|
# or replaced with tag-set provided in the request.
|
741
738
|
# @option options [String] :server_side_encryption
|
742
739
|
# The server-side encryption algorithm used when storing this object in
|
743
|
-
# Amazon S3 (for example, AES256, aws:kms).
|
740
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
744
741
|
# @option options [String] :storage_class
|
745
742
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
746
743
|
# created objects. The STANDARD storage class provides high durability
|
@@ -755,7 +752,10 @@ module Aws::S3
|
|
755
752
|
# @option options [String] :website_redirect_location
|
756
753
|
# If the bucket is configured as a website, redirects requests for this
|
757
754
|
# 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.
|
755
|
+
# Amazon S3 stores the value of this header in the object metadata. This
|
756
|
+
# value is unique to each object and is not copied when using the
|
757
|
+
# `x-amz-metadata-directive` header. Instead, you may opt to provide
|
758
|
+
# this header in combination with the directive.
|
759
759
|
# @option options [String] :sse_customer_algorithm
|
760
760
|
# Specifies the algorithm to use to when encrypting the object (for
|
761
761
|
# example, AES256).
|
@@ -927,7 +927,7 @@ module Aws::S3
|
|
927
927
|
# @option options [String] :range
|
928
928
|
# Downloads the specified range bytes of an object. For more information
|
929
929
|
# about the HTTP Range header, see
|
930
|
-
# [https://www.
|
930
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
931
931
|
#
|
932
932
|
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
933
933
|
# `GET` request.
|
@@ -936,7 +936,7 @@ module Aws::S3
|
|
936
936
|
#
|
937
937
|
#
|
938
938
|
#
|
939
|
-
# [1]: https://www.
|
939
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
|
940
940
|
# @option options [String] :response_cache_control
|
941
941
|
# Sets the `Cache-Control` header of the response.
|
942
942
|
# @option options [String] :response_content_disposition
|
@@ -1013,7 +1013,7 @@ module Aws::S3
|
|
1013
1013
|
# "MetadataKey" => "MetadataValue",
|
1014
1014
|
# },
|
1015
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
|
1016
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
1017
1017
|
# website_redirect_location: "WebsiteRedirectLocation",
|
1018
1018
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
1019
1019
|
# sse_customer_key: "SSECustomerKey",
|
@@ -1069,7 +1069,7 @@ module Aws::S3
|
|
1069
1069
|
# A map of metadata to store with the object in S3.
|
1070
1070
|
# @option options [String] :server_side_encryption
|
1071
1071
|
# The server-side encryption algorithm used when storing this object in
|
1072
|
-
# Amazon S3 (for example, AES256, aws:kms).
|
1072
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
1073
1073
|
# @option options [String] :storage_class
|
1074
1074
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
1075
1075
|
# created objects. The STANDARD storage class provides high durability
|
@@ -1099,13 +1099,13 @@ module Aws::S3
|
|
1099
1099
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
1100
1100
|
# ensure that the encryption key was transmitted without error.
|
1101
1101
|
# @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*.
|
1102
|
+
# Specifies the ID of the symmetric encryption customer managed key to
|
1103
|
+
# use for object encryption. All GET and PUT requests for an object
|
1104
|
+
# protected by Amazon Web Services KMS will fail if not made via SSL or
|
1105
|
+
# using SigV4. For information about configuring using any of the
|
1106
|
+
# officially supported Amazon Web Services SDKs and Amazon Web Services
|
1107
|
+
# CLI, see [Specifying the Signature Version in Request
|
1108
|
+
# Authentication][1] in the *Amazon S3 User Guide*.
|
1109
1109
|
#
|
1110
1110
|
#
|
1111
1111
|
#
|
@@ -1196,7 +1196,7 @@ module Aws::S3
|
|
1196
1196
|
# "MetadataKey" => "MetadataValue",
|
1197
1197
|
# },
|
1198
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
|
1199
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
1200
1200
|
# website_redirect_location: "WebsiteRedirectLocation",
|
1201
1201
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
1202
1202
|
# sse_customer_key: "SSECustomerKey",
|
@@ -1234,30 +1234,30 @@ module Aws::S3
|
|
1234
1234
|
# @option options [String] :content_disposition
|
1235
1235
|
# Specifies presentational information for the object. For more
|
1236
1236
|
# information, see
|
1237
|
-
# [
|
1237
|
+
# [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
|
1238
1238
|
#
|
1239
1239
|
#
|
1240
1240
|
#
|
1241
|
-
# [1]:
|
1241
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
|
1242
1242
|
# @option options [String] :content_encoding
|
1243
1243
|
# Specifies what content encodings have been applied to the object and
|
1244
1244
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
1245
1245
|
# referenced by the Content-Type header field. For more information, see
|
1246
|
-
# [
|
1246
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
|
1247
1247
|
#
|
1248
1248
|
#
|
1249
1249
|
#
|
1250
|
-
# [1]:
|
1250
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
|
1251
1251
|
# @option options [String] :content_language
|
1252
1252
|
# The language the content is in.
|
1253
1253
|
# @option options [Integer] :content_length
|
1254
1254
|
# Size of the body in bytes. This parameter is useful when the size of
|
1255
1255
|
# the body cannot be determined automatically. For more information, see
|
1256
|
-
# [
|
1256
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
|
1257
1257
|
#
|
1258
1258
|
#
|
1259
1259
|
#
|
1260
|
-
# [1]:
|
1260
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
1261
1261
|
# @option options [String] :content_md5
|
1262
1262
|
# The base64-encoded 128-bit MD5 digest of the message (without the
|
1263
1263
|
# headers) according to RFC 1864. This header can be used as a message
|
@@ -1273,11 +1273,11 @@ module Aws::S3
|
|
1273
1273
|
# @option options [String] :content_type
|
1274
1274
|
# A standard MIME type describing the format of the contents. For more
|
1275
1275
|
# information, see
|
1276
|
-
# [
|
1276
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
|
1277
1277
|
#
|
1278
1278
|
#
|
1279
1279
|
#
|
1280
|
-
# [1]:
|
1280
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
|
1281
1281
|
# @option options [String] :checksum_algorithm
|
1282
1282
|
# Indicates the algorithm used to create the checksum for the object
|
1283
1283
|
# when using the SDK. This header will not provide any additional
|
@@ -1336,11 +1336,11 @@ module Aws::S3
|
|
1336
1336
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
1337
1337
|
# The date and time at which the object is no longer cacheable. For more
|
1338
1338
|
# information, see
|
1339
|
-
# [
|
1339
|
+
# [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
|
1340
1340
|
#
|
1341
1341
|
#
|
1342
1342
|
#
|
1343
|
-
# [1]:
|
1343
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
1344
1344
|
# @option options [String] :grant_full_control
|
1345
1345
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
1346
1346
|
# object.
|
@@ -1362,7 +1362,7 @@ module Aws::S3
|
|
1362
1362
|
# A map of metadata to store with the object in S3.
|
1363
1363
|
# @option options [String] :server_side_encryption
|
1364
1364
|
# The server-side encryption algorithm used when storing this object in
|
1365
|
-
# Amazon S3 (for example, AES256, aws:kms).
|
1365
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
1366
1366
|
# @option options [String] :storage_class
|
1367
1367
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
1368
1368
|
# created objects. The STANDARD storage class provides high durability
|
@@ -1413,9 +1413,9 @@ module Aws::S3
|
|
1413
1413
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
1414
1414
|
# ensure that the encryption key was transmitted without error.
|
1415
1415
|
# @option options [String] :ssekms_key_id
|
1416
|
-
# If `x-amz-server-side-encryption`
|
1417
|
-
#
|
1418
|
-
#
|
1416
|
+
# If `x-amz-server-side-encryption` has a valid value of `aws:kms`, this
|
1417
|
+
# header specifies the ID of the Amazon Web Services Key Management
|
1418
|
+
# Service (Amazon Web Services KMS) symmetric encryption customer
|
1419
1419
|
# managed key that was used for the object. If you specify
|
1420
1420
|
# `x-amz-server-side-encryption:aws:kms`, but do not provide`
|
1421
1421
|
# x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
@@ -1425,7 +1425,10 @@ module Aws::S3
|
|
1425
1425
|
# @option options [String] :ssekms_encryption_context
|
1426
1426
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
1427
1427
|
# object encryption. The value of this header is a base64-encoded UTF-8
|
1428
|
-
# string holding JSON with the encryption context key-value pairs.
|
1428
|
+
# string holding JSON with the encryption context key-value pairs. This
|
1429
|
+
# value is stored as object metadata and automatically gets passed on to
|
1430
|
+
# Amazon Web Services KMS for future `GetObject` or `CopyObject`
|
1431
|
+
# operations on this object.
|
1429
1432
|
# @option options [Boolean] :bucket_key_enabled
|
1430
1433
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
1431
1434
|
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
@@ -1554,7 +1557,7 @@ module Aws::S3
|
|
1554
1557
|
# value: "MetadataValue",
|
1555
1558
|
# },
|
1556
1559
|
# ],
|
1557
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
1560
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
1558
1561
|
# },
|
1559
1562
|
# },
|
1560
1563
|
# },
|
@@ -1637,8 +1640,10 @@ module Aws::S3
|
|
1637
1640
|
# Return the object only if it has not been modified since the specified
|
1638
1641
|
# time; otherwise, return a 412 (precondition failed) error.
|
1639
1642
|
# @option options [String] :range
|
1640
|
-
#
|
1641
|
-
#
|
1643
|
+
# HeadObject returns only the metadata for an object. If the Range is
|
1644
|
+
# satisfiable, only the `ContentLength` is affected in the response. If
|
1645
|
+
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
1646
|
+
# Satisfiable` error.
|
1642
1647
|
# @option options [String] :version_id
|
1643
1648
|
# VersionId used to reference a specific version of the object.
|
1644
1649
|
# @option options [String] :sse_customer_algorithm
|
@@ -305,7 +305,7 @@ module Aws::S3
|
|
305
305
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
306
306
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
307
307
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
308
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
308
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
309
309
|
# website_redirect_location: "WebsiteRedirectLocation",
|
310
310
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
311
311
|
# sse_customer_key: "SSECustomerKey",
|
@@ -434,7 +434,7 @@ module Aws::S3
|
|
434
434
|
# or replaced with tag-set provided in the request.
|
435
435
|
# @option options [String] :server_side_encryption
|
436
436
|
# The server-side encryption algorithm used when storing this object in
|
437
|
-
# Amazon S3 (for example, AES256, aws:kms).
|
437
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
438
438
|
# @option options [String] :storage_class
|
439
439
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
440
440
|
# created objects. The STANDARD storage class provides high durability
|
@@ -449,7 +449,10 @@ module Aws::S3
|
|
449
449
|
# @option options [String] :website_redirect_location
|
450
450
|
# If the bucket is configured as a website, redirects requests for this
|
451
451
|
# object to another object in the same bucket or to an external URL.
|
452
|
-
# Amazon S3 stores the value of this header in the object metadata.
|
452
|
+
# Amazon S3 stores the value of this header in the object metadata. This
|
453
|
+
# value is unique to each object and is not copied when using the
|
454
|
+
# `x-amz-metadata-directive` header. Instead, you may opt to provide
|
455
|
+
# this header in combination with the directive.
|
453
456
|
# @option options [String] :sse_customer_algorithm
|
454
457
|
# Specifies the algorithm to use to when encrypting the object (for
|
455
458
|
# example, AES256).
|
@@ -621,7 +624,7 @@ module Aws::S3
|
|
621
624
|
# @option options [String] :range
|
622
625
|
# Downloads the specified range bytes of an object. For more information
|
623
626
|
# about the HTTP Range header, see
|
624
|
-
# [https://www.
|
627
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
625
628
|
#
|
626
629
|
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
627
630
|
# `GET` request.
|
@@ -630,7 +633,7 @@ module Aws::S3
|
|
630
633
|
#
|
631
634
|
#
|
632
635
|
#
|
633
|
-
# [1]: https://www.
|
636
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
|
634
637
|
# @option options [String] :response_cache_control
|
635
638
|
# Sets the `Cache-Control` header of the response.
|
636
639
|
# @option options [String] :response_content_disposition
|
@@ -707,7 +710,7 @@ module Aws::S3
|
|
707
710
|
# "MetadataKey" => "MetadataValue",
|
708
711
|
# },
|
709
712
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
710
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
713
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
711
714
|
# website_redirect_location: "WebsiteRedirectLocation",
|
712
715
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
713
716
|
# sse_customer_key: "SSECustomerKey",
|
@@ -763,7 +766,7 @@ module Aws::S3
|
|
763
766
|
# A map of metadata to store with the object in S3.
|
764
767
|
# @option options [String] :server_side_encryption
|
765
768
|
# The server-side encryption algorithm used when storing this object in
|
766
|
-
# Amazon S3 (for example, AES256, aws:kms).
|
769
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
767
770
|
# @option options [String] :storage_class
|
768
771
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
769
772
|
# created objects. The STANDARD storage class provides high durability
|
@@ -793,13 +796,13 @@ module Aws::S3
|
|
793
796
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
794
797
|
# ensure that the encryption key was transmitted without error.
|
795
798
|
# @option options [String] :ssekms_key_id
|
796
|
-
# Specifies the ID of the symmetric customer managed key to
|
797
|
-
# object encryption. All GET and PUT requests for an object
|
798
|
-
# Amazon Web Services KMS will fail if not made via SSL or
|
799
|
-
# For information about configuring using any of the
|
800
|
-
# supported Amazon Web Services SDKs and Amazon Web Services
|
801
|
-
# [Specifying the Signature Version in Request
|
802
|
-
# *Amazon S3 User Guide*.
|
799
|
+
# Specifies the ID of the symmetric encryption customer managed key to
|
800
|
+
# use for object encryption. All GET and PUT requests for an object
|
801
|
+
# protected by Amazon Web Services KMS will fail if not made via SSL or
|
802
|
+
# using SigV4. For information about configuring using any of the
|
803
|
+
# officially supported Amazon Web Services SDKs and Amazon Web Services
|
804
|
+
# CLI, see [Specifying the Signature Version in Request
|
805
|
+
# Authentication][1] in the *Amazon S3 User Guide*.
|
803
806
|
#
|
804
807
|
#
|
805
808
|
#
|
@@ -890,7 +893,7 @@ module Aws::S3
|
|
890
893
|
# "MetadataKey" => "MetadataValue",
|
891
894
|
# },
|
892
895
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
893
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
896
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
894
897
|
# website_redirect_location: "WebsiteRedirectLocation",
|
895
898
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
896
899
|
# sse_customer_key: "SSECustomerKey",
|
@@ -928,30 +931,30 @@ module Aws::S3
|
|
928
931
|
# @option options [String] :content_disposition
|
929
932
|
# Specifies presentational information for the object. For more
|
930
933
|
# information, see
|
931
|
-
# [
|
934
|
+
# [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
|
932
935
|
#
|
933
936
|
#
|
934
937
|
#
|
935
|
-
# [1]:
|
938
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
|
936
939
|
# @option options [String] :content_encoding
|
937
940
|
# Specifies what content encodings have been applied to the object and
|
938
941
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
939
942
|
# referenced by the Content-Type header field. For more information, see
|
940
|
-
# [
|
943
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
|
941
944
|
#
|
942
945
|
#
|
943
946
|
#
|
944
|
-
# [1]:
|
947
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
|
945
948
|
# @option options [String] :content_language
|
946
949
|
# The language the content is in.
|
947
950
|
# @option options [Integer] :content_length
|
948
951
|
# Size of the body in bytes. This parameter is useful when the size of
|
949
952
|
# the body cannot be determined automatically. For more information, see
|
950
|
-
# [
|
953
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
|
951
954
|
#
|
952
955
|
#
|
953
956
|
#
|
954
|
-
# [1]:
|
957
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
955
958
|
# @option options [String] :content_md5
|
956
959
|
# The base64-encoded 128-bit MD5 digest of the message (without the
|
957
960
|
# headers) according to RFC 1864. This header can be used as a message
|
@@ -967,11 +970,11 @@ module Aws::S3
|
|
967
970
|
# @option options [String] :content_type
|
968
971
|
# A standard MIME type describing the format of the contents. For more
|
969
972
|
# information, see
|
970
|
-
# [
|
973
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
|
971
974
|
#
|
972
975
|
#
|
973
976
|
#
|
974
|
-
# [1]:
|
977
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
|
975
978
|
# @option options [String] :checksum_algorithm
|
976
979
|
# Indicates the algorithm used to create the checksum for the object
|
977
980
|
# when using the SDK. This header will not provide any additional
|
@@ -1030,11 +1033,11 @@ module Aws::S3
|
|
1030
1033
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
1031
1034
|
# The date and time at which the object is no longer cacheable. For more
|
1032
1035
|
# information, see
|
1033
|
-
# [
|
1036
|
+
# [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
|
1034
1037
|
#
|
1035
1038
|
#
|
1036
1039
|
#
|
1037
|
-
# [1]:
|
1040
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
1038
1041
|
# @option options [String] :grant_full_control
|
1039
1042
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
1040
1043
|
# object.
|
@@ -1056,7 +1059,7 @@ module Aws::S3
|
|
1056
1059
|
# A map of metadata to store with the object in S3.
|
1057
1060
|
# @option options [String] :server_side_encryption
|
1058
1061
|
# The server-side encryption algorithm used when storing this object in
|
1059
|
-
# Amazon S3 (for example, AES256, aws:kms).
|
1062
|
+
# Amazon S3 (for example, AES256, `aws:kms`).
|
1060
1063
|
# @option options [String] :storage_class
|
1061
1064
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
1062
1065
|
# created objects. The STANDARD storage class provides high durability
|
@@ -1107,9 +1110,9 @@ module Aws::S3
|
|
1107
1110
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
1108
1111
|
# ensure that the encryption key was transmitted without error.
|
1109
1112
|
# @option options [String] :ssekms_key_id
|
1110
|
-
# If `x-amz-server-side-encryption`
|
1111
|
-
#
|
1112
|
-
#
|
1113
|
+
# If `x-amz-server-side-encryption` has a valid value of `aws:kms`, this
|
1114
|
+
# header specifies the ID of the Amazon Web Services Key Management
|
1115
|
+
# Service (Amazon Web Services KMS) symmetric encryption customer
|
1113
1116
|
# managed key that was used for the object. If you specify
|
1114
1117
|
# `x-amz-server-side-encryption:aws:kms`, but do not provide`
|
1115
1118
|
# x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
@@ -1119,7 +1122,10 @@ module Aws::S3
|
|
1119
1122
|
# @option options [String] :ssekms_encryption_context
|
1120
1123
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
1121
1124
|
# object encryption. The value of this header is a base64-encoded UTF-8
|
1122
|
-
# string holding JSON with the encryption context key-value pairs.
|
1125
|
+
# string holding JSON with the encryption context key-value pairs. This
|
1126
|
+
# value is stored as object metadata and automatically gets passed on to
|
1127
|
+
# Amazon Web Services KMS for future `GetObject` or `CopyObject`
|
1128
|
+
# operations on this object.
|
1123
1129
|
# @option options [Boolean] :bucket_key_enabled
|
1124
1130
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
1125
1131
|
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
@@ -1248,7 +1254,7 @@ module Aws::S3
|
|
1248
1254
|
# value: "MetadataValue",
|
1249
1255
|
# },
|
1250
1256
|
# ],
|
1251
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
1257
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
1252
1258
|
# },
|
1253
1259
|
# },
|
1254
1260
|
# },
|
@@ -315,7 +315,7 @@ module Aws::S3
|
|
315
315
|
# @option options [String] :range
|
316
316
|
# Downloads the specified range bytes of an object. For more information
|
317
317
|
# about the HTTP Range header, see
|
318
|
-
# [https://www.
|
318
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
319
319
|
#
|
320
320
|
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
321
321
|
# `GET` request.
|
@@ -324,7 +324,7 @@ module Aws::S3
|
|
324
324
|
#
|
325
325
|
#
|
326
326
|
#
|
327
|
-
# [1]: https://www.
|
327
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
|
328
328
|
# @option options [String] :response_cache_control
|
329
329
|
# Sets the `Cache-Control` header of the response.
|
330
330
|
# @option options [String] :response_content_disposition
|
@@ -412,8 +412,10 @@ module Aws::S3
|
|
412
412
|
# Return the object only if it has not been modified since the specified
|
413
413
|
# time; otherwise, return a 412 (precondition failed) error.
|
414
414
|
# @option options [String] :range
|
415
|
-
#
|
416
|
-
#
|
415
|
+
# HeadObject returns only the metadata for an object. If the Range is
|
416
|
+
# satisfiable, only the `ContentLength` is affected in the response. If
|
417
|
+
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
418
|
+
# Satisfiable` error.
|
417
419
|
# @option options [String] :sse_customer_algorithm
|
418
420
|
# Specifies the algorithm to use to when encrypting the object (for
|
419
421
|
# example, AES256).
|
@@ -52,7 +52,9 @@ module Aws
|
|
52
52
|
|
53
53
|
def check_for_cached_region(context, bucket)
|
54
54
|
cached_region = S3::BUCKET_REGIONS[bucket]
|
55
|
-
if cached_region &&
|
55
|
+
if cached_region &&
|
56
|
+
cached_region != context.config.region &&
|
57
|
+
!S3Signer.custom_endpoint?(context)
|
56
58
|
context.http_request.endpoint.host = S3Signer.new_hostname(
|
57
59
|
context, cached_region
|
58
60
|
)
|
@@ -77,7 +79,7 @@ module Aws
|
|
77
79
|
def handle_region_errors(response)
|
78
80
|
if wrong_sigv4_region?(response) &&
|
79
81
|
!fips_region?(response) &&
|
80
|
-
!custom_endpoint?(response) &&
|
82
|
+
!S3Signer.custom_endpoint?(response.context) &&
|
81
83
|
!expired_credentials?(response)
|
82
84
|
get_region_and_retry(response.context)
|
83
85
|
else
|
@@ -106,15 +108,6 @@ module Aws
|
|
106
108
|
resp.context.http_response.body_contents.match(/<Code>ExpiredToken<\/Code>/)
|
107
109
|
end
|
108
110
|
|
109
|
-
def custom_endpoint?(resp)
|
110
|
-
region = resp.context.config.region
|
111
|
-
partition = Aws::Endpoints::Matchers.aws_partition(region)
|
112
|
-
endpoint = resp.context.http_request.endpoint
|
113
|
-
|
114
|
-
!endpoint.hostname.include?(partition['dnsSuffix']) &&
|
115
|
-
!endpoint.hostname.include?(partition['dualStackDnsSuffix'])
|
116
|
-
end
|
117
|
-
|
118
111
|
def wrong_sigv4_region?(resp)
|
119
112
|
resp.context.http_response.status_code == 400 &&
|
120
113
|
(resp.context.http_response.headers['x-amz-bucket-region'] ||
|
@@ -168,6 +161,15 @@ module Aws
|
|
168
161
|
context.config.endpoint_provider.resolve_endpoint(endpoint_params)
|
169
162
|
URI(endpoint.url).host
|
170
163
|
end
|
164
|
+
|
165
|
+
def custom_endpoint?(context)
|
166
|
+
region = context.config.region
|
167
|
+
partition = Aws::Endpoints::Matchers.aws_partition(region)
|
168
|
+
endpoint = context.http_request.endpoint
|
169
|
+
|
170
|
+
!endpoint.hostname.include?(partition['dnsSuffix']) &&
|
171
|
+
!endpoint.hostname.include?(partition['dualStackDnsSuffix'])
|
172
|
+
end
|
171
173
|
end
|
172
174
|
end
|
173
175
|
end
|