aws-sdk-s3 1.169.0 → 1.189.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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +118 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +79 -33
  5. data/lib/aws-sdk-s3/bucket_acl.rb +6 -5
  6. data/lib/aws-sdk-s3/bucket_cors.rb +6 -5
  7. data/lib/aws-sdk-s3/bucket_lifecycle.rb +7 -2
  8. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +22 -2
  9. data/lib/aws-sdk-s3/bucket_logging.rb +2 -2
  10. data/lib/aws-sdk-s3/bucket_policy.rb +6 -5
  11. data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
  12. data/lib/aws-sdk-s3/bucket_tagging.rb +3 -3
  13. data/lib/aws-sdk-s3/bucket_versioning.rb +9 -9
  14. data/lib/aws-sdk-s3/bucket_website.rb +3 -3
  15. data/lib/aws-sdk-s3/client.rb +2529 -1652
  16. data/lib/aws-sdk-s3/client_api.rb +325 -160
  17. data/lib/aws-sdk-s3/endpoint_provider.rb +400 -276
  18. data/lib/aws-sdk-s3/endpoints.rb +42 -0
  19. data/lib/aws-sdk-s3/errors.rb +44 -0
  20. data/lib/aws-sdk-s3/file_downloader.rb +14 -31
  21. data/lib/aws-sdk-s3/multipart_file_uploader.rb +31 -13
  22. data/lib/aws-sdk-s3/multipart_upload.rb +83 -6
  23. data/lib/aws-sdk-s3/multipart_upload_part.rb +50 -34
  24. data/lib/aws-sdk-s3/object.rb +242 -114
  25. data/lib/aws-sdk-s3/object_acl.rb +11 -5
  26. data/lib/aws-sdk-s3/object_summary.rb +180 -82
  27. data/lib/aws-sdk-s3/object_version.rb +60 -13
  28. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  29. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +11 -20
  30. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +3 -3
  31. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -71
  32. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +5 -7
  33. data/lib/aws-sdk-s3/presigner.rb +5 -5
  34. data/lib/aws-sdk-s3/resource.rb +10 -9
  35. data/lib/aws-sdk-s3/types.rb +2300 -1050
  36. data/lib/aws-sdk-s3.rb +1 -1
  37. data/sig/bucket.rbs +12 -6
  38. data/sig/bucket_acl.rbs +1 -1
  39. data/sig/bucket_cors.rbs +1 -1
  40. data/sig/bucket_lifecycle.rbs +1 -1
  41. data/sig/bucket_lifecycle_configuration.rbs +1 -1
  42. data/sig/bucket_logging.rbs +1 -1
  43. data/sig/bucket_policy.rbs +1 -1
  44. data/sig/bucket_request_payment.rbs +1 -1
  45. data/sig/bucket_tagging.rbs +1 -1
  46. data/sig/bucket_versioning.rbs +3 -3
  47. data/sig/bucket_website.rbs +1 -1
  48. data/sig/client.rbs +104 -37
  49. data/sig/errors.rbs +8 -0
  50. data/sig/multipart_upload.rbs +11 -2
  51. data/sig/multipart_upload_part.rbs +5 -1
  52. data/sig/object.rbs +22 -6
  53. data/sig/object_acl.rbs +1 -1
  54. data/sig/object_summary.rbs +17 -7
  55. data/sig/object_version.rbs +9 -3
  56. data/sig/resource.rbs +5 -3
  57. data/sig/types.rbs +153 -36
  58. metadata +7 -10
  59. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
@@ -55,11 +55,17 @@ module Aws::S3
55
55
  end
56
56
 
57
57
  # If present, indicates that the requester was successfully charged for
58
- # the request.
58
+ # the request. For more information, see [Using Requester Pays buckets
59
+ # for storage transfers and usage][1] in the *Amazon Simple Storage
60
+ # Service user guide*.
59
61
  #
60
62
  # <note markdown="1"> This functionality is not supported for directory buckets.
61
63
  #
62
64
  # </note>
65
+ #
66
+ #
67
+ #
68
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html
63
69
  # @return [String]
64
70
  def request_charged
65
71
  data[:request_charged]
@@ -229,7 +235,7 @@ module Aws::S3
229
235
  # },
230
236
  # },
231
237
  # content_md5: "ContentMD5",
232
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
238
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
233
239
  # grant_full_control: "GrantFullControl",
234
240
  # grant_read: "GrantRead",
235
241
  # grant_read_acp: "GrantReadACP",
@@ -251,9 +257,9 @@ module Aws::S3
251
257
  # Contains the elements that set the ACL permissions for an object per
252
258
  # grantee.
253
259
  # @option options [String] :content_md5
254
- # The base64-encoded 128-bit MD5 digest of the data. This header must be
255
- # used as a message integrity check to verify that the request body was
256
- # not corrupted in transit. For more information, go to [RFC
260
+ # The Base64 encoded 128-bit `MD5` digest of the data. This header must
261
+ # be used as a message integrity check to verify that the request body
262
+ # was not corrupted in transit. For more information, go to [RFC
257
263
  # 1864.&gt;][1]
258
264
  #
259
265
  # For requests made using the Amazon Web Services Command Line Interface
@@ -84,6 +84,18 @@ module Aws::S3
84
84
  data[:checksum_algorithm]
85
85
  end
86
86
 
87
+ # The checksum type that is used to calculate the object’s checksum
88
+ # value. For more information, see [Checking object integrity][1] in the
89
+ # *Amazon S3 User Guide*.
90
+ #
91
+ #
92
+ #
93
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
94
+ # @return [String]
95
+ def checksum_type
96
+ data[:checksum_type]
97
+ end
98
+
87
99
  # Size in bytes of the object
88
100
  # @return [Integer]
89
101
  def size
@@ -92,8 +104,10 @@ module Aws::S3
92
104
 
93
105
  # The class of storage used to store the object.
94
106
  #
95
- # <note markdown="1"> **Directory buckets** - Only the S3 Express One Zone storage class is
96
- # supported by directory buckets to store objects.
107
+ # <note markdown="1"> **Directory buckets** - Directory buckets only support
108
+ # `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
109
+ # Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent Access
110
+ # storage class) in Dedicated Local Zones.
97
111
  #
98
112
  # </note>
99
113
  # @return [String]
@@ -118,9 +132,10 @@ module Aws::S3
118
132
  # archived objects, see [ Working with archived objects][1] in the
119
133
  # *Amazon S3 User Guide*.
120
134
  #
121
- # <note markdown="1"> This functionality is not supported for directory buckets. Only the S3
122
- # Express One Zone storage class is supported by directory buckets to
123
- # store objects.
135
+ # <note markdown="1"> This functionality is not supported for directory buckets. Directory
136
+ # buckets only support `EXPRESS_ONEZONE` (the S3 Express One Zone
137
+ # storage class) in Availability Zones and `ONEZONE_IA` (the S3 One
138
+ # Zone-Infrequent Access storage class) in Dedicated Local Zones.
124
139
  #
125
140
  # </note>
126
141
  #
@@ -324,7 +339,7 @@ module Aws::S3
324
339
  # object_summary.copy_from({
325
340
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
326
341
  # cache_control: "CacheControl",
327
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
342
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
328
343
  # content_disposition: "ContentDisposition",
329
344
  # content_encoding: "ContentEncoding",
330
345
  # content_language: "ContentLanguage",
@@ -749,10 +764,12 @@ module Aws::S3
749
764
  # availability. Depending on performance needs, you can specify a
750
765
  # different Storage Class.
751
766
  #
752
- # <note markdown="1"> * <b>Directory buckets </b> - For directory buckets, only the S3
753
- # Express One Zone storage class is supported to store newly created
754
- # objects. Unsupported storage class values won't write a destination
755
- # object and will respond with the HTTP status code `400 Bad Request`.
767
+ # <note markdown="1"> * <b>Directory buckets </b> - Directory buckets only support
768
+ # `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
769
+ # Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent
770
+ # Access storage class) in Dedicated Local Zones. Unsupported storage
771
+ # class values won't write a destination object and will respond with
772
+ # the HTTP status code `400 Bad Request`.
756
773
  #
757
774
  # * <b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the
758
775
  # `OUTPOSTS` Storage Class.
@@ -840,20 +857,17 @@ module Aws::S3
840
857
  # Signature Version in Request Authentication][1] in the *Amazon S3 User
841
858
  # Guide*.
842
859
  #
843
- # **Directory buckets** - If you specify `x-amz-server-side-encryption`
844
- # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
845
- # header is implicitly assigned the ID of the KMS symmetric encryption
846
- # customer managed key that's configured for your directory bucket's
847
- # default encryption setting. If you want to specify the `
848
- # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
849
- # can only specify it with the ID (Key ID or Key ARN) of the KMS
850
- # customer managed key that's configured for your directory bucket's
851
- # default encryption setting. Otherwise, you get an HTTP `400 Bad
852
- # Request` error. Only use the key ID or key ARN. The key alias format
853
- # of the KMS key isn't supported. Your SSE-KMS configuration can only
854
- # support 1 [customer managed key][2] per directory bucket for the
855
- # lifetime of the bucket. The [Amazon Web Services managed key][3]
856
- # (`aws/s3`) isn't supported.
860
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
861
+ # recommended to specify the `x-amz-server-side-encryption` header to
862
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
863
+ # header implicitly uses the bucket's default KMS customer managed key
864
+ # ID. If you want to explicitly set the `
865
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
866
+ # bucket's default customer managed key (using key ID or ARN, not
867
+ # alias). Your SSE-KMS configuration can only support 1 [customer
868
+ # managed key][2] per directory bucket's lifetime. The [Amazon Web
869
+ # Services managed key][3] (`aws/s3`) isn't supported. Incorrect key
870
+ # specification results in an HTTP `400 Bad Request` error.
857
871
  #
858
872
  #
859
873
  #
@@ -1060,6 +1074,9 @@ module Aws::S3
1060
1074
  # request_payer: "requester", # accepts requester
1061
1075
  # bypass_governance_retention: false,
1062
1076
  # expected_bucket_owner: "AccountId",
1077
+ # if_match: "IfMatch",
1078
+ # if_match_last_modified_time: Time.now,
1079
+ # if_match_size: 1,
1063
1080
  # })
1064
1081
  # @param [Hash] options ({})
1065
1082
  # @option options [String] :mfa
@@ -1106,6 +1123,46 @@ module Aws::S3
1106
1123
  # The account ID of the expected bucket owner. If the account ID that
1107
1124
  # you provide does not match the actual owner of the bucket, the request
1108
1125
  # fails with the HTTP status code `403 Forbidden` (access denied).
1126
+ # @option options [String] :if_match
1127
+ # The `If-Match` header field makes the request method conditional on
1128
+ # ETags. If the ETag value does not match, the operation returns a `412
1129
+ # Precondition Failed` error. If the ETag matches or if the object
1130
+ # doesn't exist, the operation will return a `204 Success (No Content)
1131
+ # response`.
1132
+ #
1133
+ # For more information about conditional requests, see [RFC 7232][1].
1134
+ #
1135
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1136
+ #
1137
+ # </note>
1138
+ #
1139
+ #
1140
+ #
1141
+ # [1]: https://tools.ietf.org/html/rfc7232
1142
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
1143
+ # If present, the object is deleted only if its modification times
1144
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
1145
+ # match, the operation returns a `412 Precondition Failed` error. If the
1146
+ # `Timestamp` matches or if the object doesn’t exist, the operation
1147
+ # returns a `204 Success (No Content)` response.
1148
+ #
1149
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1150
+ #
1151
+ # </note>
1152
+ # @option options [Integer] :if_match_size
1153
+ # If present, the object is deleted only if its size matches the
1154
+ # provided size in bytes. If the `Size` value does not match, the
1155
+ # operation returns a `412 Precondition Failed` error. If the `Size`
1156
+ # matches or if the object doesn’t exist, the operation returns a `204
1157
+ # Success (No Content)` response.
1158
+ #
1159
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1160
+ #
1161
+ # </note>
1162
+ #
1163
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
1164
+ # `x-amz-if-match-size` conditional headers in conjunction with
1165
+ # each-other or individually.
1109
1166
  # @return [Types::DeleteObjectOutput]
1110
1167
  def delete(options = {})
1111
1168
  options = options.merge(
@@ -1362,15 +1419,6 @@ module Aws::S3
1362
1419
  # fails with the HTTP status code `403 Forbidden` (access denied).
1363
1420
  # @option options [String] :checksum_mode
1364
1421
  # To retrieve the checksum, this mode must be enabled.
1365
- #
1366
- # **General purpose buckets** - In addition, if you enable checksum mode
1367
- # and the object is uploaded with a [checksum][1] and encrypted with an
1368
- # Key Management Service (KMS) key, you must have permission to use the
1369
- # `kms:Decrypt` action to retrieve the checksum.
1370
- #
1371
- #
1372
- #
1373
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
1374
1422
  # @return [Types::GetObjectOutput]
1375
1423
  def get(options = {}, &block)
1376
1424
  options = options.merge(
@@ -1415,7 +1463,8 @@ module Aws::S3
1415
1463
  # object_lock_retain_until_date: Time.now,
1416
1464
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
1417
1465
  # expected_bucket_owner: "AccountId",
1418
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1466
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1467
+ # checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
1419
1468
  # })
1420
1469
  # @param [Hash] options ({})
1421
1470
  # @option options [String] :acl
@@ -1772,8 +1821,9 @@ module Aws::S3
1772
1821
  # a different Storage Class. For more information, see [Storage
1773
1822
  # Classes][1] in the *Amazon S3 User Guide*.
1774
1823
  #
1775
- # <note markdown="1"> * For directory buckets, only the S3 Express One Zone storage class is
1776
- # supported to store newly created objects.
1824
+ # <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
1825
+ # Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
1826
+ # One Zone-Infrequent Access storage class) in Dedicated Local Zones.
1777
1827
  #
1778
1828
  # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
1779
1829
  #
@@ -1830,20 +1880,17 @@ module Aws::S3
1830
1880
  # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1831
1881
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
1832
1882
  #
1833
- # **Directory buckets** - If you specify `x-amz-server-side-encryption`
1834
- # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
1835
- # header is implicitly assigned the ID of the KMS symmetric encryption
1836
- # customer managed key that's configured for your directory bucket's
1837
- # default encryption setting. If you want to specify the `
1838
- # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
1839
- # can only specify it with the ID (Key ID or Key ARN) of the KMS
1840
- # customer managed key that's configured for your directory bucket's
1841
- # default encryption setting. Otherwise, you get an HTTP `400 Bad
1842
- # Request` error. Only use the key ID or key ARN. The key alias format
1843
- # of the KMS key isn't supported. Your SSE-KMS configuration can only
1844
- # support 1 [customer managed key][1] per directory bucket for the
1845
- # lifetime of the bucket. The [Amazon Web Services managed key][2]
1846
- # (`aws/s3`) isn't supported.
1883
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
1884
+ # recommended to specify the `x-amz-server-side-encryption` header to
1885
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
1886
+ # header implicitly uses the bucket's default KMS customer managed key
1887
+ # ID. If you want to explicitly set the `
1888
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
1889
+ # bucket's default customer managed key (using key ID or ARN, not
1890
+ # alias). Your SSE-KMS configuration can only support 1 [customer
1891
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
1892
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
1893
+ # specification results in an HTTP `400 Bad Request` error.
1847
1894
  #
1848
1895
  #
1849
1896
  #
@@ -1851,7 +1898,7 @@ module Aws::S3
1851
1898
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
1852
1899
  # @option options [String] :ssekms_encryption_context
1853
1900
  # Specifies the Amazon Web Services KMS Encryption Context to use for
1854
- # object encryption. The value of this header is a Base64-encoded string
1901
+ # object encryption. The value of this header is a Base64 encoded string
1855
1902
  # of a UTF-8 encoded JSON, which contains the encryption context as
1856
1903
  # key-value pairs.
1857
1904
  #
@@ -1940,6 +1987,14 @@ module Aws::S3
1940
1987
  #
1941
1988
  #
1942
1989
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1990
+ # @option options [String] :checksum_type
1991
+ # Indicates the checksum type that you want Amazon S3 to use to
1992
+ # calculate the object’s checksum value. For more information, see
1993
+ # [Checking object integrity in the Amazon S3 User Guide][1].
1994
+ #
1995
+ #
1996
+ #
1997
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1943
1998
  # @return [MultipartUpload]
1944
1999
  def initiate_multipart_upload(options = {})
1945
2000
  options = options.merge(
@@ -1969,17 +2024,20 @@ module Aws::S3
1969
2024
  # content_length: 1,
1970
2025
  # content_md5: "ContentMD5",
1971
2026
  # content_type: "ContentType",
1972
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
2027
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1973
2028
  # checksum_crc32: "ChecksumCRC32",
1974
2029
  # checksum_crc32c: "ChecksumCRC32C",
2030
+ # checksum_crc64nvme: "ChecksumCRC64NVME",
1975
2031
  # checksum_sha1: "ChecksumSHA1",
1976
2032
  # checksum_sha256: "ChecksumSHA256",
1977
2033
  # expires: Time.now,
2034
+ # if_match: "IfMatch",
1978
2035
  # if_none_match: "IfNoneMatch",
1979
2036
  # grant_full_control: "GrantFullControl",
1980
2037
  # grant_read: "GrantRead",
1981
2038
  # grant_read_acp: "GrantReadACP",
1982
2039
  # grant_write_acp: "GrantWriteACP",
2040
+ # write_offset_bytes: 1,
1983
2041
  # metadata: {
1984
2042
  # "MetadataKey" => "MetadataValue",
1985
2043
  # },
@@ -2075,7 +2133,7 @@ module Aws::S3
2075
2133
  #
2076
2134
  # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
2077
2135
  # @option options [String] :content_md5
2078
- # The base64-encoded 128-bit MD5 digest of the message (without the
2136
+ # The Base64 encoded 128-bit `MD5` digest of the message (without the
2079
2137
  # headers) according to RFC 1864. This header can be used as a message
2080
2138
  # integrity check to verify that the data is the same data that was
2081
2139
  # originally sent. Although it is optional, we recommend using the
@@ -2122,6 +2180,8 @@ module Aws::S3
2122
2180
  #
2123
2181
  # * `CRC32C`
2124
2182
  #
2183
+ # * `CRC64NVME`
2184
+ #
2125
2185
  # * `SHA1`
2126
2186
  #
2127
2187
  # * `SHA256`
@@ -2131,9 +2191,8 @@ module Aws::S3
2131
2191
  #
2132
2192
  # If the individual checksum value you provide through
2133
2193
  # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2134
- # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
2135
- # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2136
- # that matches the provided value in `x-amz-checksum-algorithm `.
2194
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
2195
+ # request with a `BadDigest` error.
2137
2196
  #
2138
2197
  # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2139
2198
  # for any request to upload an object with a retention period configured
@@ -2153,7 +2212,7 @@ module Aws::S3
2153
2212
  # @option options [String] :checksum_crc32
2154
2213
  # This header can be used as a data integrity check to verify that the
2155
2214
  # data received is the same data that was originally sent. This header
2156
- # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
2215
+ # specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
2157
2216
  # For more information, see [Checking object integrity][1] in the
2158
2217
  # *Amazon S3 User Guide*.
2159
2218
  #
@@ -2163,17 +2222,28 @@ module Aws::S3
2163
2222
  # @option options [String] :checksum_crc32c
2164
2223
  # This header can be used as a data integrity check to verify that the
2165
2224
  # data received is the same data that was originally sent. This header
2166
- # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
2225
+ # specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
2167
2226
  # For more information, see [Checking object integrity][1] in the
2168
2227
  # *Amazon S3 User Guide*.
2169
2228
  #
2170
2229
  #
2171
2230
  #
2172
2231
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2232
+ # @option options [String] :checksum_crc64nvme
2233
+ # This header can be used as a data integrity check to verify that the
2234
+ # data received is the same data that was originally sent. This header
2235
+ # specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
2236
+ # object. The `CRC64NVME` checksum is always a full object checksum. For
2237
+ # more information, see [Checking object integrity in the Amazon S3 User
2238
+ # Guide][1].
2239
+ #
2240
+ #
2241
+ #
2242
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2173
2243
  # @option options [String] :checksum_sha1
2174
2244
  # This header can be used as a data integrity check to verify that the
2175
2245
  # data received is the same data that was originally sent. This header
2176
- # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
2246
+ # specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
2177
2247
  # more information, see [Checking object integrity][1] in the *Amazon S3
2178
2248
  # User Guide*.
2179
2249
  #
@@ -2183,7 +2253,7 @@ module Aws::S3
2183
2253
  # @option options [String] :checksum_sha256
2184
2254
  # This header can be used as a data integrity check to verify that the
2185
2255
  # data received is the same data that was originally sent. This header
2186
- # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
2256
+ # specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
2187
2257
  # For more information, see [Checking object integrity][1] in the
2188
2258
  # *Amazon S3 User Guide*.
2189
2259
  #
@@ -2198,6 +2268,25 @@ module Aws::S3
2198
2268
  #
2199
2269
  #
2200
2270
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2271
+ # @option options [String] :if_match
2272
+ # Uploads the object only if the ETag (entity tag) value provided during
2273
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
2274
+ # values do not match, the operation returns a `412 Precondition Failed`
2275
+ # error.
2276
+ #
2277
+ # If a conflicting operation occurs during the upload S3 returns a `409
2278
+ # ConditionalRequestConflict` response. On a 409 failure you should
2279
+ # fetch the object's ETag and retry the upload.
2280
+ #
2281
+ # Expects the ETag value as a string.
2282
+ #
2283
+ # For more information about conditional requests, see [RFC 7232][1], or
2284
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2285
+ #
2286
+ #
2287
+ #
2288
+ # [1]: https://tools.ietf.org/html/rfc7232
2289
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
2201
2290
  # @option options [String] :if_none_match
2202
2291
  # Uploads the object only if the object key name does not already exist
2203
2292
  # in the bucket specified. Otherwise, Amazon S3 returns a `412
@@ -2249,6 +2338,16 @@ module Aws::S3
2249
2338
  # * This functionality is not supported for Amazon S3 on Outposts.
2250
2339
  #
2251
2340
  # </note>
2341
+ # @option options [Integer] :write_offset_bytes
2342
+ # Specifies the offset for appending data to existing objects in bytes.
2343
+ # The offset must be equal to the size of the existing object being
2344
+ # appended to. If no object exists, setting this header to 0 will create
2345
+ # a new object.
2346
+ #
2347
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
2348
+ # Express One Zone storage class in directory buckets.
2349
+ #
2350
+ # </note>
2252
2351
  # @option options [Hash<String,String>] :metadata
2253
2352
  # A map of metadata to store with the object in S3.
2254
2353
  # @option options [String] :server_side_encryption
@@ -2322,8 +2421,9 @@ module Aws::S3
2322
2421
  # a different Storage Class. For more information, see [Storage
2323
2422
  # Classes][1] in the *Amazon S3 User Guide*.
2324
2423
  #
2325
- # <note markdown="1"> * For directory buckets, only the S3 Express One Zone storage class is
2326
- # supported to store newly created objects.
2424
+ # <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
2425
+ # Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
2426
+ # One Zone-Infrequent Access storage class) in Dedicated Local Zones.
2327
2427
  #
2328
2428
  # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
2329
2429
  #
@@ -2401,20 +2501,17 @@ module Aws::S3
2401
2501
  # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
2402
2502
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
2403
2503
  #
2404
- # **Directory buckets** - If you specify `x-amz-server-side-encryption`
2405
- # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
2406
- # header is implicitly assigned the ID of the KMS symmetric encryption
2407
- # customer managed key that's configured for your directory bucket's
2408
- # default encryption setting. If you want to specify the `
2409
- # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
2410
- # can only specify it with the ID (Key ID or Key ARN) of the KMS
2411
- # customer managed key that's configured for your directory bucket's
2412
- # default encryption setting. Otherwise, you get an HTTP `400 Bad
2413
- # Request` error. Only use the key ID or key ARN. The key alias format
2414
- # of the KMS key isn't supported. Your SSE-KMS configuration can only
2415
- # support 1 [customer managed key][1] per directory bucket for the
2416
- # lifetime of the bucket. The [Amazon Web Services managed key][2]
2417
- # (`aws/s3`) isn't supported.
2504
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
2505
+ # recommended to specify the `x-amz-server-side-encryption` header to
2506
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
2507
+ # header implicitly uses the bucket's default KMS customer managed key
2508
+ # ID. If you want to explicitly set the `
2509
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
2510
+ # bucket's default customer managed key (using key ID or ARN, not
2511
+ # alias). Your SSE-KMS configuration can only support 1 [customer
2512
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
2513
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
2514
+ # specification results in an HTTP `400 Bad Request` error.
2418
2515
  #
2419
2516
  #
2420
2517
  #
@@ -2423,7 +2520,7 @@ module Aws::S3
2423
2520
  # @option options [String] :ssekms_encryption_context
2424
2521
  # Specifies the Amazon Web Services KMS Encryption Context as an
2425
2522
  # additional encryption context to use for object encryption. The value
2426
- # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
2523
+ # of this header is a Base64 encoded string of a UTF-8 encoded JSON,
2427
2524
  # which contains the encryption context as key-value pairs. This value
2428
2525
  # is stored as object metadata and automatically gets passed on to
2429
2526
  # Amazon Web Services KMS for future `GetObject` operations on this
@@ -2618,7 +2715,7 @@ module Aws::S3
2618
2715
  # },
2619
2716
  # },
2620
2717
  # request_payer: "requester", # accepts requester
2621
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
2718
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
2622
2719
  # expected_bucket_owner: "AccountId",
2623
2720
  # })
2624
2721
  # @param [Hash] options ({})
@@ -2795,7 +2892,7 @@ module Aws::S3
2795
2892
  # request_payer: "requester", # accepts requester
2796
2893
  # bypass_governance_retention: false,
2797
2894
  # expected_bucket_owner: "AccountId",
2798
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
2895
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
2799
2896
  # })
2800
2897
  # @param options ({})
2801
2898
  # @option options [String] :mfa
@@ -2863,6 +2960,8 @@ module Aws::S3
2863
2960
  #
2864
2961
  # * `CRC32C`
2865
2962
  #
2963
+ # * `CRC64NVME`
2964
+ #
2866
2965
  # * `SHA1`
2867
2966
  #
2868
2967
  # * `SHA256`
@@ -2872,9 +2971,8 @@ module Aws::S3
2872
2971
  #
2873
2972
  # If the individual checksum value you provide through
2874
2973
  # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2875
- # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
2876
- # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2877
- # that matches the provided value in `x-amz-checksum-algorithm `.
2974
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
2975
+ # request with a `BadDigest` error.
2878
2976
  #
2879
2977
  # If you provide an individual checksum, Amazon S3 ignores any provided
2880
2978
  # `ChecksumAlgorithm` parameter.
@@ -62,6 +62,18 @@ module Aws::S3
62
62
  data[:checksum_algorithm]
63
63
  end
64
64
 
65
+ # The checksum type that is used to calculate the object’s checksum
66
+ # value. For more information, see [Checking object integrity][1] in the
67
+ # *Amazon S3 User Guide*.
68
+ #
69
+ #
70
+ #
71
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
72
+ # @return [String]
73
+ def checksum_type
74
+ data[:checksum_type]
75
+ end
76
+
65
77
  # Size in bytes of the object.
66
78
  # @return [Integer]
67
79
  def size
@@ -257,6 +269,9 @@ module Aws::S3
257
269
  # request_payer: "requester", # accepts requester
258
270
  # bypass_governance_retention: false,
259
271
  # expected_bucket_owner: "AccountId",
272
+ # if_match: "IfMatch",
273
+ # if_match_last_modified_time: Time.now,
274
+ # if_match_size: 1,
260
275
  # })
261
276
  # @param [Hash] options ({})
262
277
  # @option options [String] :mfa
@@ -296,6 +311,46 @@ module Aws::S3
296
311
  # The account ID of the expected bucket owner. If the account ID that
297
312
  # you provide does not match the actual owner of the bucket, the request
298
313
  # fails with the HTTP status code `403 Forbidden` (access denied).
314
+ # @option options [String] :if_match
315
+ # The `If-Match` header field makes the request method conditional on
316
+ # ETags. If the ETag value does not match, the operation returns a `412
317
+ # Precondition Failed` error. If the ETag matches or if the object
318
+ # doesn't exist, the operation will return a `204 Success (No Content)
319
+ # response`.
320
+ #
321
+ # For more information about conditional requests, see [RFC 7232][1].
322
+ #
323
+ # <note markdown="1"> This functionality is only supported for directory buckets.
324
+ #
325
+ # </note>
326
+ #
327
+ #
328
+ #
329
+ # [1]: https://tools.ietf.org/html/rfc7232
330
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
331
+ # If present, the object is deleted only if its modification times
332
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
333
+ # match, the operation returns a `412 Precondition Failed` error. If the
334
+ # `Timestamp` matches or if the object doesn’t exist, the operation
335
+ # returns a `204 Success (No Content)` response.
336
+ #
337
+ # <note markdown="1"> This functionality is only supported for directory buckets.
338
+ #
339
+ # </note>
340
+ # @option options [Integer] :if_match_size
341
+ # If present, the object is deleted only if its size matches the
342
+ # provided size in bytes. If the `Size` value does not match, the
343
+ # operation returns a `412 Precondition Failed` error. If the `Size`
344
+ # matches or if the object doesn’t exist, the operation returns a `204
345
+ # Success (No Content)` response.
346
+ #
347
+ # <note markdown="1"> This functionality is only supported for directory buckets.
348
+ #
349
+ # </note>
350
+ #
351
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
352
+ # `x-amz-if-match-size` conditional headers in conjunction with
353
+ # each-other or individually.
299
354
  # @return [Types::DeleteObjectOutput]
300
355
  def delete(options = {})
301
356
  options = options.merge(
@@ -523,15 +578,6 @@ module Aws::S3
523
578
  # fails with the HTTP status code `403 Forbidden` (access denied).
524
579
  # @option options [String] :checksum_mode
525
580
  # To retrieve the checksum, this mode must be enabled.
526
- #
527
- # **General purpose buckets** - In addition, if you enable checksum mode
528
- # and the object is uploaded with a [checksum][1] and encrypted with an
529
- # Key Management Service (KMS) key, you must have permission to use the
530
- # `kms:Decrypt` action to retrieve the checksum.
531
- #
532
- #
533
- #
534
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
535
581
  # @return [Types::GetObjectOutput]
536
582
  def get(options = {}, &block)
537
583
  options = options.merge(
@@ -805,7 +851,7 @@ module Aws::S3
805
851
  # request_payer: "requester", # accepts requester
806
852
  # bypass_governance_retention: false,
807
853
  # expected_bucket_owner: "AccountId",
808
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
854
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
809
855
  # })
810
856
  # @param options ({})
811
857
  # @option options [String] :mfa
@@ -873,6 +919,8 @@ module Aws::S3
873
919
  #
874
920
  # * `CRC32C`
875
921
  #
922
+ # * `CRC64NVME`
923
+ #
876
924
  # * `SHA1`
877
925
  #
878
926
  # * `SHA256`
@@ -882,9 +930,8 @@ module Aws::S3
882
930
  #
883
931
  # If the individual checksum value you provide through
884
932
  # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
885
- # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
886
- # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
887
- # that matches the provided value in `x-amz-checksum-algorithm `.
933
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
934
+ # request with a `BadDigest` error.
888
935
  #
889
936
  # If you provide an individual checksum, Amazon S3 ignores any provided
890
937
  # `ChecksumAlgorithm` parameter.