aws-sdk-s3 1.164.0 → 1.182.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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +102 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +112 -43
  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 +60 -3
  9. data/lib/aws-sdk-s3/bucket_logging.rb +2 -2
  10. data/lib/aws-sdk-s3/bucket_policy.rb +10 -9
  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 +2144 -1325
  16. data/lib/aws-sdk-s3/client_api.rb +175 -3
  17. data/lib/aws-sdk-s3/customizations/object.rb +6 -0
  18. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  19. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  20. data/lib/aws-sdk-s3/customizations.rb +24 -38
  21. data/lib/aws-sdk-s3/endpoint_parameters.rb +13 -18
  22. data/lib/aws-sdk-s3/endpoint_provider.rb +272 -253
  23. data/lib/aws-sdk-s3/endpoints.rb +445 -1403
  24. data/lib/aws-sdk-s3/errors.rb +47 -0
  25. data/lib/aws-sdk-s3/file_downloader.rb +4 -21
  26. data/lib/aws-sdk-s3/multipart_file_uploader.rb +31 -13
  27. data/lib/aws-sdk-s3/multipart_upload.rb +84 -6
  28. data/lib/aws-sdk-s3/multipart_upload_part.rb +52 -36
  29. data/lib/aws-sdk-s3/object.rb +254 -113
  30. data/lib/aws-sdk-s3/object_acl.rb +4 -4
  31. data/lib/aws-sdk-s3/object_summary.rb +199 -82
  32. data/lib/aws-sdk-s3/object_version.rb +67 -17
  33. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  34. data/lib/aws-sdk-s3/plugins/endpoints.rb +1 -204
  35. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +11 -20
  36. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +3 -3
  37. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -71
  38. data/lib/aws-sdk-s3/presigner.rb +5 -5
  39. data/lib/aws-sdk-s3/resource.rb +35 -10
  40. data/lib/aws-sdk-s3/types.rb +1921 -856
  41. data/lib/aws-sdk-s3.rb +35 -31
  42. data/sig/bucket.rbs +15 -6
  43. data/sig/bucket_acl.rbs +1 -1
  44. data/sig/bucket_cors.rbs +1 -1
  45. data/sig/bucket_lifecycle.rbs +1 -1
  46. data/sig/bucket_lifecycle_configuration.rbs +8 -4
  47. data/sig/bucket_logging.rbs +1 -1
  48. data/sig/bucket_policy.rbs +1 -1
  49. data/sig/bucket_request_payment.rbs +1 -1
  50. data/sig/bucket_tagging.rbs +1 -1
  51. data/sig/bucket_versioning.rbs +3 -3
  52. data/sig/bucket_website.rbs +1 -1
  53. data/sig/client.rbs +115 -40
  54. data/sig/errors.rbs +8 -0
  55. data/sig/multipart_upload.rbs +11 -2
  56. data/sig/multipart_upload_part.rbs +5 -1
  57. data/sig/object.rbs +22 -6
  58. data/sig/object_acl.rbs +1 -1
  59. data/sig/object_summary.rbs +17 -7
  60. data/sig/object_version.rbs +9 -3
  61. data/sig/resource.rbs +7 -3
  62. data/sig/types.rbs +163 -36
  63. metadata +6 -5
  64. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
@@ -66,7 +66,9 @@ module Aws::S3
66
66
  # providing object expiration information. The value of the `rule-id` is
67
67
  # URL-encoded.
68
68
  #
69
- # <note markdown="1"> This functionality is not supported for directory buckets.
69
+ # <note markdown="1"> Object expiration information is not returned in directory buckets and
70
+ # this header returns the value "`NotImplemented`" in all responses
71
+ # for directory buckets.
70
72
  #
71
73
  # </note>
72
74
  #
@@ -132,14 +134,14 @@ module Aws::S3
132
134
  data[:content_length]
133
135
  end
134
136
 
135
- # The base64-encoded, 32-bit CRC32 checksum of the object. This will
136
- # only be present if it was uploaded with the object. When you use an
137
- # API operation on an object that was uploaded using multipart uploads,
138
- # this value may not be a direct checksum value of the full object.
139
- # Instead, it's a calculation based on the checksum values of each
140
- # individual part. For more information about how checksums are
141
- # calculated with multipart uploads, see [ Checking object integrity][1]
142
- # in the *Amazon S3 User Guide*.
137
+ # The Base64 encoded, 32-bit `CRC32 checksum` of the object. This
138
+ # checksum is only be present if the checksum was uploaded with the
139
+ # object. When you use an API operation on an object that was uploaded
140
+ # using multipart uploads, this value may not be a direct checksum value
141
+ # of the full object. Instead, it's a calculation based on the checksum
142
+ # values of each individual part. For more information about how
143
+ # checksums are calculated with multipart uploads, see [ Checking object
144
+ # integrity][1] in the *Amazon S3 User Guide*.
143
145
  #
144
146
  #
145
147
  #
@@ -149,14 +151,14 @@ module Aws::S3
149
151
  data[:checksum_crc32]
150
152
  end
151
153
 
152
- # The base64-encoded, 32-bit CRC32C checksum of the object. This will
153
- # only be present if it was uploaded with the object. When you use an
154
- # API operation on an object that was uploaded using multipart uploads,
155
- # this value may not be a direct checksum value of the full object.
156
- # Instead, it's a calculation based on the checksum values of each
157
- # individual part. For more information about how checksums are
158
- # calculated with multipart uploads, see [ Checking object integrity][1]
159
- # in the *Amazon S3 User Guide*.
154
+ # The Base64 encoded, 32-bit `CRC32C` checksum of the object. This
155
+ # checksum is only present if the checksum was uploaded with the object.
156
+ # When you use an API operation on an object that was uploaded using
157
+ # multipart uploads, this value may not be a direct checksum value of
158
+ # the full object. Instead, it's a calculation based on the checksum
159
+ # values of each individual part. For more information about how
160
+ # checksums are calculated with multipart uploads, see [ Checking object
161
+ # integrity][1] in the *Amazon S3 User Guide*.
160
162
  #
161
163
  #
162
164
  #
@@ -166,14 +168,26 @@ module Aws::S3
166
168
  data[:checksum_crc32c]
167
169
  end
168
170
 
169
- # The base64-encoded, 160-bit SHA-1 digest of the object. This will only
170
- # be present if it was uploaded with the object. When you use the API
171
- # operation on an object that was uploaded using multipart uploads, this
172
- # value may not be a direct checksum value of the full object. Instead,
173
- # it's a calculation based on the checksum values of each individual
174
- # part. For more information about how checksums are calculated with
175
- # multipart uploads, see [ Checking object integrity][1] in the *Amazon
176
- # S3 User Guide*.
171
+ # The Base64 encoded, 64-bit `CRC64NVME` checksum of the object. For
172
+ # more information, see [Checking object integrity in the Amazon S3 User
173
+ # Guide][1].
174
+ #
175
+ #
176
+ #
177
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
178
+ # @return [String]
179
+ def checksum_crc64nvme
180
+ data[:checksum_crc64nvme]
181
+ end
182
+
183
+ # The Base64 encoded, 160-bit `SHA1` digest of the object. This will
184
+ # only be present if the object was uploaded with the object. When you
185
+ # use the API operation on an object that was uploaded using multipart
186
+ # uploads, this value may not be a direct checksum value of the full
187
+ # object. Instead, it's a calculation based on the checksum values of
188
+ # each individual part. For more information about how checksums are
189
+ # calculated with multipart uploads, see [ Checking object integrity][1]
190
+ # in the *Amazon S3 User Guide*.
177
191
  #
178
192
  #
179
193
  #
@@ -183,12 +197,12 @@ module Aws::S3
183
197
  data[:checksum_sha1]
184
198
  end
185
199
 
186
- # The base64-encoded, 256-bit SHA-256 digest of the object. This will
187
- # only be present if it was uploaded with the object. When you use an
188
- # API operation on an object that was uploaded using multipart uploads,
189
- # this value may not be a direct checksum value of the full object.
190
- # Instead, it's a calculation based on the checksum values of each
191
- # individual part. For more information about how checksums are
200
+ # The Base64 encoded, 256-bit `SHA256` digest of the object. This will
201
+ # only be present if the object was uploaded with the object. When you
202
+ # use an API operation on an object that was uploaded using multipart
203
+ # uploads, this value may not be a direct checksum value of the full
204
+ # object. Instead, it's a calculation based on the checksum values of
205
+ # each individual part. For more information about how checksums are
192
206
  # calculated with multipart uploads, see [ Checking object integrity][1]
193
207
  # in the *Amazon S3 User Guide*.
194
208
  #
@@ -200,6 +214,21 @@ module Aws::S3
200
214
  data[:checksum_sha256]
201
215
  end
202
216
 
217
+ # The checksum type, which determines how part-level checksums are
218
+ # combined to create an object-level checksum for multipart objects. You
219
+ # can use this header response to verify that the checksum type that is
220
+ # received is the same checksum type that was specified in
221
+ # `CreateMultipartUpload` request. For more information, see [Checking
222
+ # object integrity in the Amazon S3 User Guide][1].
223
+ #
224
+ #
225
+ #
226
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
227
+ # @return [String]
228
+ def checksum_type
229
+ data[:checksum_type]
230
+ end
231
+
203
232
  # An entity tag (ETag) is an opaque identifier assigned by a web server
204
233
  # to a specific version of a resource found at a URL.
205
234
  # @return [String]
@@ -263,6 +292,13 @@ module Aws::S3
263
292
  data[:content_type]
264
293
  end
265
294
 
295
+ # The portion of the object returned in the response for a `GET`
296
+ # request.
297
+ # @return [String]
298
+ def content_range
299
+ data[:content_range]
300
+ end
301
+
266
302
  # The date and time at which the object is no longer cacheable.
267
303
  # @return [Time]
268
304
  def expires
@@ -674,7 +710,7 @@ module Aws::S3
674
710
  # object.copy_from({
675
711
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
676
712
  # cache_control: "CacheControl",
677
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
713
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
678
714
  # content_disposition: "ContentDisposition",
679
715
  # content_encoding: "ContentEncoding",
680
716
  # content_language: "ContentLanguage",
@@ -1073,17 +1109,17 @@ module Aws::S3
1073
1109
  # * To encrypt new object copies to a directory bucket with SSE-KMS, we
1074
1110
  # recommend you specify SSE-KMS as the directory bucket's default
1075
1111
  # encryption configuration with a KMS key (specifically, a [customer
1076
- # managed key][4]). [Amazon Web Services managed key][5] (`aws/s3`)
1077
- # isn't supported. Your SSE-KMS configuration can only support 1
1078
- # [customer managed key][4] per directory bucket for the lifetime of
1079
- # the bucket. After you specify a customer managed key for SSE-KMS,
1080
- # you can't override the customer managed key for the bucket's
1081
- # SSE-KMS configuration. Then, when you perform a `CopyObject`
1082
- # operation and want to specify server-side encryption settings for
1083
- # new object copies with SSE-KMS in the encryption-related request
1084
- # headers, you must ensure the encryption key is the same customer
1085
- # managed key that you specified for the directory bucket's default
1086
- # encryption configuration.
1112
+ # managed key][4]). The [Amazon Web Services managed key][5]
1113
+ # (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
1114
+ # support 1 [customer managed key][4] per directory bucket for the
1115
+ # lifetime of the bucket. After you specify a customer managed key for
1116
+ # SSE-KMS, you can't override the customer managed key for the
1117
+ # bucket's SSE-KMS configuration. Then, when you perform a
1118
+ # `CopyObject` operation and want to specify server-side encryption
1119
+ # settings for new object copies with SSE-KMS in the
1120
+ # encryption-related request headers, you must ensure the encryption
1121
+ # key is the same customer managed key that you specified for the
1122
+ # directory bucket's default encryption configuration.
1087
1123
  #
1088
1124
  #
1089
1125
  #
@@ -1190,15 +1226,17 @@ module Aws::S3
1190
1226
  # Signature Version in Request Authentication][1] in the *Amazon S3 User
1191
1227
  # Guide*.
1192
1228
  #
1193
- # **Directory buckets** - If you specify `x-amz-server-side-encryption`
1194
- # with `aws:kms`, you must specify the `
1195
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
1196
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
1197
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
1198
- # key ID or key ARN. The key alias format of the KMS key isn't
1199
- # supported. Your SSE-KMS configuration can only support 1 [customer
1200
- # managed key][2] per directory bucket for the lifetime of the bucket.
1201
- # [Amazon Web Services managed key][3] (`aws/s3`) isn't supported.
1229
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
1230
+ # recommended to specify the `x-amz-server-side-encryption` header to
1231
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
1232
+ # header implicitly uses the bucket's default KMS customer managed key
1233
+ # ID. If you want to explicitly set the `
1234
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
1235
+ # bucket's default customer managed key (using key ID or ARN, not
1236
+ # alias). Your SSE-KMS configuration can only support 1 [customer
1237
+ # managed key][2] per directory bucket's lifetime. The [Amazon Web
1238
+ # Services managed key][3] (`aws/s3`) isn't supported. Incorrect key
1239
+ # specification results in an HTTP `400 Bad Request` error.
1202
1240
  #
1203
1241
  #
1204
1242
  #
@@ -1405,6 +1443,9 @@ module Aws::S3
1405
1443
  # request_payer: "requester", # accepts requester
1406
1444
  # bypass_governance_retention: false,
1407
1445
  # expected_bucket_owner: "AccountId",
1446
+ # if_match: "IfMatch",
1447
+ # if_match_last_modified_time: Time.now,
1448
+ # if_match_size: 1,
1408
1449
  # })
1409
1450
  # @param [Hash] options ({})
1410
1451
  # @option options [String] :mfa
@@ -1451,6 +1492,46 @@ module Aws::S3
1451
1492
  # The account ID of the expected bucket owner. If the account ID that
1452
1493
  # you provide does not match the actual owner of the bucket, the request
1453
1494
  # fails with the HTTP status code `403 Forbidden` (access denied).
1495
+ # @option options [String] :if_match
1496
+ # The `If-Match` header field makes the request method conditional on
1497
+ # ETags. If the ETag value does not match, the operation returns a `412
1498
+ # Precondition Failed` error. If the ETag matches or if the object
1499
+ # doesn't exist, the operation will return a `204 Success (No Content)
1500
+ # response`.
1501
+ #
1502
+ # For more information about conditional requests, see [RFC 7232][1].
1503
+ #
1504
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1505
+ #
1506
+ # </note>
1507
+ #
1508
+ #
1509
+ #
1510
+ # [1]: https://tools.ietf.org/html/rfc7232
1511
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
1512
+ # If present, the object is deleted only if its modification times
1513
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
1514
+ # match, the operation returns a `412 Precondition Failed` error. If the
1515
+ # `Timestamp` matches or if the object doesn’t exist, the operation
1516
+ # returns a `204 Success (No Content)` response.
1517
+ #
1518
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1519
+ #
1520
+ # </note>
1521
+ # @option options [Integer] :if_match_size
1522
+ # If present, the object is deleted only if its size matches the
1523
+ # provided size in bytes. If the `Size` value does not match, the
1524
+ # operation returns a `412 Precondition Failed` error. If the `Size`
1525
+ # matches or if the object doesn’t exist, the operation returns a `204
1526
+ # Success (No Content)` response.
1527
+ #
1528
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1529
+ #
1530
+ # </note>
1531
+ #
1532
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
1533
+ # `x-amz-if-match-size` conditional headers in conjunction with
1534
+ # each-other or individually.
1454
1535
  # @return [Types::DeleteObjectOutput]
1455
1536
  def delete(options = {})
1456
1537
  options = options.merge(
@@ -1707,15 +1788,6 @@ module Aws::S3
1707
1788
  # fails with the HTTP status code `403 Forbidden` (access denied).
1708
1789
  # @option options [String] :checksum_mode
1709
1790
  # To retrieve the checksum, this mode must be enabled.
1710
- #
1711
- # **General purpose buckets** - In addition, if you enable checksum mode
1712
- # and the object is uploaded with a [checksum][1] and encrypted with an
1713
- # Key Management Service (KMS) key, you must have permission to use the
1714
- # `kms:Decrypt` action to retrieve the checksum.
1715
- #
1716
- #
1717
- #
1718
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
1719
1791
  # @return [Types::GetObjectOutput]
1720
1792
  def get(options = {}, &block)
1721
1793
  options = options.merge(
@@ -1760,7 +1832,8 @@ module Aws::S3
1760
1832
  # object_lock_retain_until_date: Time.now,
1761
1833
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
1762
1834
  # expected_bucket_owner: "AccountId",
1763
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1835
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1836
+ # checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
1764
1837
  # })
1765
1838
  # @param [Hash] options ({})
1766
1839
  # @option options [String] :acl
@@ -2175,15 +2248,17 @@ module Aws::S3
2175
2248
  # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
2176
2249
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
2177
2250
  #
2178
- # **Directory buckets** - If you specify `x-amz-server-side-encryption`
2179
- # with `aws:kms`, you must specify the `
2180
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
2181
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
2182
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
2183
- # key ID or key ARN. The key alias format of the KMS key isn't
2184
- # supported. Your SSE-KMS configuration can only support 1 [customer
2185
- # managed key][1] per directory bucket for the lifetime of the bucket.
2186
- # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
2251
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
2252
+ # recommended to specify the `x-amz-server-side-encryption` header to
2253
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
2254
+ # header implicitly uses the bucket's default KMS customer managed key
2255
+ # ID. If you want to explicitly set the `
2256
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
2257
+ # bucket's default customer managed key (using key ID or ARN, not
2258
+ # alias). Your SSE-KMS configuration can only support 1 [customer
2259
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
2260
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
2261
+ # specification results in an HTTP `400 Bad Request` error.
2187
2262
  #
2188
2263
  #
2189
2264
  #
@@ -2191,7 +2266,7 @@ module Aws::S3
2191
2266
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
2192
2267
  # @option options [String] :ssekms_encryption_context
2193
2268
  # Specifies the Amazon Web Services KMS Encryption Context to use for
2194
- # object encryption. The value of this header is a Base64-encoded string
2269
+ # object encryption. The value of this header is a Base64 encoded string
2195
2270
  # of a UTF-8 encoded JSON, which contains the encryption context as
2196
2271
  # key-value pairs.
2197
2272
  #
@@ -2280,6 +2355,14 @@ module Aws::S3
2280
2355
  #
2281
2356
  #
2282
2357
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2358
+ # @option options [String] :checksum_type
2359
+ # Indicates the checksum type that you want Amazon S3 to use to
2360
+ # calculate the object’s checksum value. For more information, see
2361
+ # [Checking object integrity in the Amazon S3 User Guide][1].
2362
+ #
2363
+ #
2364
+ #
2365
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2283
2366
  # @return [MultipartUpload]
2284
2367
  def initiate_multipart_upload(options = {})
2285
2368
  options = options.merge(
@@ -2309,17 +2392,20 @@ module Aws::S3
2309
2392
  # content_length: 1,
2310
2393
  # content_md5: "ContentMD5",
2311
2394
  # content_type: "ContentType",
2312
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
2395
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
2313
2396
  # checksum_crc32: "ChecksumCRC32",
2314
2397
  # checksum_crc32c: "ChecksumCRC32C",
2398
+ # checksum_crc64nvme: "ChecksumCRC64NVME",
2315
2399
  # checksum_sha1: "ChecksumSHA1",
2316
2400
  # checksum_sha256: "ChecksumSHA256",
2317
2401
  # expires: Time.now,
2402
+ # if_match: "IfMatch",
2318
2403
  # if_none_match: "IfNoneMatch",
2319
2404
  # grant_full_control: "GrantFullControl",
2320
2405
  # grant_read: "GrantRead",
2321
2406
  # grant_read_acp: "GrantReadACP",
2322
2407
  # grant_write_acp: "GrantWriteACP",
2408
+ # write_offset_bytes: 1,
2323
2409
  # metadata: {
2324
2410
  # "MetadataKey" => "MetadataValue",
2325
2411
  # },
@@ -2415,7 +2501,7 @@ module Aws::S3
2415
2501
  #
2416
2502
  # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
2417
2503
  # @option options [String] :content_md5
2418
- # The base64-encoded 128-bit MD5 digest of the message (without the
2504
+ # The Base64 encoded 128-bit `MD5` digest of the message (without the
2419
2505
  # headers) according to RFC 1864. This header can be used as a message
2420
2506
  # integrity check to verify that the data is the same data that was
2421
2507
  # originally sent. Although it is optional, we recommend using the
@@ -2423,10 +2509,11 @@ module Aws::S3
2423
2509
  # information about REST request authentication, see [REST
2424
2510
  # Authentication][1].
2425
2511
  #
2426
- # <note markdown="1"> The `Content-MD5` header is required for any request to upload an
2427
- # object with a retention period configured using Amazon S3 Object Lock.
2428
- # For more information about Amazon S3 Object Lock, see [Amazon S3
2429
- # Object Lock Overview][2] in the *Amazon S3 User Guide*.
2512
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2513
+ # for any request to upload an object with a retention period configured
2514
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2515
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2516
+ # Guide*.
2430
2517
  #
2431
2518
  # </note>
2432
2519
  #
@@ -2437,7 +2524,7 @@ module Aws::S3
2437
2524
  #
2438
2525
  #
2439
2526
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
2440
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html
2527
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2441
2528
  # @option options [String] :content_type
2442
2529
  # A standard MIME type describing the format of the contents. For more
2443
2530
  # information, see
@@ -2457,37 +2544,45 @@ module Aws::S3
2457
2544
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
2458
2545
  # the supported algorithm from the following list:
2459
2546
  #
2460
- # * CRC32
2547
+ # * `CRC32`
2548
+ #
2549
+ # * `CRC32C`
2461
2550
  #
2462
- # * CRC32C
2551
+ # * `CRC64NVME`
2463
2552
  #
2464
- # * SHA1
2553
+ # * `SHA1`
2465
2554
  #
2466
- # * SHA256
2555
+ # * `SHA256`
2467
2556
  #
2468
2557
  # For more information, see [Checking object integrity][1] in the
2469
2558
  # *Amazon S3 User Guide*.
2470
2559
  #
2471
2560
  # If the individual checksum value you provide through
2472
2561
  # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2473
- # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
2474
- # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2475
- # that matches the provided value in `x-amz-checksum-algorithm `.
2562
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
2563
+ # request with a `BadDigest` error.
2476
2564
  #
2477
- # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2478
- # is the default checksum algorithm that's used for performance.
2565
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2566
+ # for any request to upload an object with a retention period configured
2567
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2568
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2569
+ # Guide*.
2479
2570
  #
2480
2571
  # </note>
2481
2572
  #
2573
+ # For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2574
+ # is the default checksum algorithm that's used for performance.
2575
+ #
2482
2576
  #
2483
2577
  #
2484
2578
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2579
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2485
2580
  # @option options [String] :checksum_crc32
2486
2581
  # This header can be used as a data integrity check to verify that the
2487
2582
  # data received is the same data that was originally sent. This header
2488
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
2489
- # more information, see [Checking object integrity][1] in the *Amazon S3
2490
- # User Guide*.
2583
+ # specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
2584
+ # For more information, see [Checking object integrity][1] in the
2585
+ # *Amazon S3 User Guide*.
2491
2586
  #
2492
2587
  #
2493
2588
  #
@@ -2495,17 +2590,28 @@ module Aws::S3
2495
2590
  # @option options [String] :checksum_crc32c
2496
2591
  # This header can be used as a data integrity check to verify that the
2497
2592
  # data received is the same data that was originally sent. This header
2498
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
2593
+ # specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
2499
2594
  # For more information, see [Checking object integrity][1] in the
2500
2595
  # *Amazon S3 User Guide*.
2501
2596
  #
2502
2597
  #
2503
2598
  #
2504
2599
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2600
+ # @option options [String] :checksum_crc64nvme
2601
+ # This header can be used as a data integrity check to verify that the
2602
+ # data received is the same data that was originally sent. This header
2603
+ # specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
2604
+ # object. The `CRC64NVME` checksum is always a full object checksum. For
2605
+ # more information, see [Checking object integrity in the Amazon S3 User
2606
+ # Guide][1].
2607
+ #
2608
+ #
2609
+ #
2610
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2505
2611
  # @option options [String] :checksum_sha1
2506
2612
  # This header can be used as a data integrity check to verify that the
2507
2613
  # data received is the same data that was originally sent. This header
2508
- # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
2614
+ # specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
2509
2615
  # more information, see [Checking object integrity][1] in the *Amazon S3
2510
2616
  # User Guide*.
2511
2617
  #
@@ -2515,7 +2621,7 @@ module Aws::S3
2515
2621
  # @option options [String] :checksum_sha256
2516
2622
  # This header can be used as a data integrity check to verify that the
2517
2623
  # data received is the same data that was originally sent. This header
2518
- # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
2624
+ # specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
2519
2625
  # For more information, see [Checking object integrity][1] in the
2520
2626
  # *Amazon S3 User Guide*.
2521
2627
  #
@@ -2530,6 +2636,25 @@ module Aws::S3
2530
2636
  #
2531
2637
  #
2532
2638
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2639
+ # @option options [String] :if_match
2640
+ # Uploads the object only if the ETag (entity tag) value provided during
2641
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
2642
+ # values do not match, the operation returns a `412 Precondition Failed`
2643
+ # error.
2644
+ #
2645
+ # If a conflicting operation occurs during the upload S3 returns a `409
2646
+ # ConditionalRequestConflict` response. On a 409 failure you should
2647
+ # fetch the object's ETag and retry the upload.
2648
+ #
2649
+ # Expects the ETag value as a string.
2650
+ #
2651
+ # For more information about conditional requests, see [RFC 7232][1], or
2652
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2653
+ #
2654
+ #
2655
+ #
2656
+ # [1]: https://tools.ietf.org/html/rfc7232
2657
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
2533
2658
  # @option options [String] :if_none_match
2534
2659
  # Uploads the object only if the object key name does not already exist
2535
2660
  # in the bucket specified. Otherwise, Amazon S3 returns a `412
@@ -2581,6 +2706,16 @@ module Aws::S3
2581
2706
  # * This functionality is not supported for Amazon S3 on Outposts.
2582
2707
  #
2583
2708
  # </note>
2709
+ # @option options [Integer] :write_offset_bytes
2710
+ # Specifies the offset for appending data to existing objects in bytes.
2711
+ # The offset must be equal to the size of the existing object being
2712
+ # appended to. If no object exists, setting this header to 0 will create
2713
+ # a new object.
2714
+ #
2715
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
2716
+ # Express One Zone storage class in directory buckets.
2717
+ #
2718
+ # </note>
2584
2719
  # @option options [Hash<String,String>] :metadata
2585
2720
  # A map of metadata to store with the object in S3.
2586
2721
  # @option options [String] :server_side_encryption
@@ -2733,15 +2868,17 @@ module Aws::S3
2733
2868
  # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
2734
2869
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
2735
2870
  #
2736
- # **Directory buckets** - If you specify `x-amz-server-side-encryption`
2737
- # with `aws:kms`, you must specify the `
2738
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
2739
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
2740
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
2741
- # key ID or key ARN. The key alias format of the KMS key isn't
2742
- # supported. Your SSE-KMS configuration can only support 1 [customer
2743
- # managed key][1] per directory bucket for the lifetime of the bucket.
2744
- # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
2871
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
2872
+ # recommended to specify the `x-amz-server-side-encryption` header to
2873
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
2874
+ # header implicitly uses the bucket's default KMS customer managed key
2875
+ # ID. If you want to explicitly set the `
2876
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
2877
+ # bucket's default customer managed key (using key ID or ARN, not
2878
+ # alias). Your SSE-KMS configuration can only support 1 [customer
2879
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
2880
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
2881
+ # specification results in an HTTP `400 Bad Request` error.
2745
2882
  #
2746
2883
  #
2747
2884
  #
@@ -2750,7 +2887,7 @@ module Aws::S3
2750
2887
  # @option options [String] :ssekms_encryption_context
2751
2888
  # Specifies the Amazon Web Services KMS Encryption Context as an
2752
2889
  # additional encryption context to use for object encryption. The value
2753
- # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
2890
+ # of this header is a Base64 encoded string of a UTF-8 encoded JSON,
2754
2891
  # which contains the encryption context as key-value pairs. This value
2755
2892
  # is stored as object metadata and automatically gets passed on to
2756
2893
  # Amazon Web Services KMS for future `GetObject` operations on this
@@ -2945,7 +3082,7 @@ module Aws::S3
2945
3082
  # },
2946
3083
  # },
2947
3084
  # request_payer: "requester", # accepts requester
2948
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
3085
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
2949
3086
  # expected_bucket_owner: "AccountId",
2950
3087
  # })
2951
3088
  # @param [Hash] options ({})
@@ -3312,7 +3449,7 @@ module Aws::S3
3312
3449
  # request_payer: "requester", # accepts requester
3313
3450
  # bypass_governance_retention: false,
3314
3451
  # expected_bucket_owner: "AccountId",
3315
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
3452
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
3316
3453
  # })
3317
3454
  # @param options ({})
3318
3455
  # @option options [String] :mfa
@@ -3376,22 +3513,23 @@ module Aws::S3
3376
3513
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
3377
3514
  # the supported algorithm from the following list:
3378
3515
  #
3379
- # * CRC32
3516
+ # * `CRC32`
3380
3517
  #
3381
- # * CRC32C
3518
+ # * `CRC32C`
3382
3519
  #
3383
- # * SHA1
3520
+ # * `CRC64NVME`
3384
3521
  #
3385
- # * SHA256
3522
+ # * `SHA1`
3523
+ #
3524
+ # * `SHA256`
3386
3525
  #
3387
3526
  # For more information, see [Checking object integrity][1] in the
3388
3527
  # *Amazon S3 User Guide*.
3389
3528
  #
3390
3529
  # If the individual checksum value you provide through
3391
3530
  # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
3392
- # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
3393
- # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
3394
- # that matches the provided value in `x-amz-checksum-algorithm `.
3531
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
3532
+ # request with a `BadDigest` error.
3395
3533
  #
3396
3534
  # If you provide an individual checksum, Amazon S3 ignores any provided
3397
3535
  # `ChecksumAlgorithm` parameter.
@@ -3423,3 +3561,6 @@ module Aws::S3
3423
3561
  end
3424
3562
  end
3425
3563
  end
3564
+
3565
+ # Load customizations if they exist
3566
+ require 'aws-sdk-s3/customizations/object'
@@ -229,7 +229,7 @@ module Aws::S3
229
229
  # },
230
230
  # },
231
231
  # content_md5: "ContentMD5",
232
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
232
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
233
233
  # grant_full_control: "GrantFullControl",
234
234
  # grant_read: "GrantRead",
235
235
  # grant_read_acp: "GrantReadACP",
@@ -251,9 +251,9 @@ module Aws::S3
251
251
  # Contains the elements that set the ACL permissions for an object per
252
252
  # grantee.
253
253
  # @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
254
+ # The Base64 encoded 128-bit `MD5` digest of the data. This header must
255
+ # be used as a message integrity check to verify that the request body
256
+ # was not corrupted in transit. For more information, go to [RFC
257
257
  # 1864.&gt;][1]
258
258
  #
259
259
  # For requests made using the Amazon Web Services Command Line Interface