aws-sdk-s3 1.128.0 → 1.199.1

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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +450 -1
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  6. data/lib/aws-sdk-s3/bucket.rb +720 -128
  7. data/lib/aws-sdk-s3/bucket_acl.rb +18 -17
  8. data/lib/aws-sdk-s3/bucket_cors.rb +22 -21
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +23 -18
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +76 -19
  11. data/lib/aws-sdk-s3/bucket_logging.rb +21 -14
  12. data/lib/aws-sdk-s3/bucket_notification.rb +6 -6
  13. data/lib/aws-sdk-s3/bucket_policy.rb +65 -20
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +15 -15
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +19 -19
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +41 -41
  18. data/lib/aws-sdk-s3/bucket_website.rb +19 -19
  19. data/lib/aws-sdk-s3/client.rb +9352 -3264
  20. data/lib/aws-sdk-s3/client_api.rb +697 -164
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
  22. data/lib/aws-sdk-s3/customizations/errors.rb +16 -3
  23. data/lib/aws-sdk-s3/customizations/object.rb +112 -56
  24. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  25. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  26. data/lib/aws-sdk-s3/customizations.rb +26 -31
  27. data/lib/aws-sdk-s3/encryption/client.rb +2 -2
  28. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
  29. data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
  30. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
  31. data/lib/aws-sdk-s3/endpoint_parameters.rb +54 -15
  32. data/lib/aws-sdk-s3/endpoint_provider.rb +439 -456
  33. data/lib/aws-sdk-s3/endpoints.rb +629 -1261
  34. data/lib/aws-sdk-s3/errors.rb +58 -0
  35. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  36. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  37. data/lib/aws-sdk-s3/file_downloader.rb +156 -69
  38. data/lib/aws-sdk-s3/file_uploader.rb +4 -6
  39. data/lib/aws-sdk-s3/legacy_signer.rb +2 -1
  40. data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
  41. data/lib/aws-sdk-s3/multipart_file_uploader.rb +56 -69
  42. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +84 -91
  43. data/lib/aws-sdk-s3/multipart_upload.rb +179 -26
  44. data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
  45. data/lib/aws-sdk-s3/multipart_upload_part.rb +201 -60
  46. data/lib/aws-sdk-s3/object.rb +2007 -281
  47. data/lib/aws-sdk-s3/object_acl.rb +43 -23
  48. data/lib/aws-sdk-s3/object_copier.rb +1 -1
  49. data/lib/aws-sdk-s3/object_multipart_copier.rb +44 -25
  50. data/lib/aws-sdk-s3/object_summary.rb +1735 -232
  51. data/lib/aws-sdk-s3/object_version.rb +394 -52
  52. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  53. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  54. data/lib/aws-sdk-s3/plugins/endpoints.rb +32 -208
  55. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
  56. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
  57. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  58. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -70
  59. data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
  60. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +5 -7
  61. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
  62. data/lib/aws-sdk-s3/presigned_post.rb +52 -43
  63. data/lib/aws-sdk-s3/presigner.rb +9 -7
  64. data/lib/aws-sdk-s3/resource.rb +127 -22
  65. data/lib/aws-sdk-s3/transfer_manager.rb +252 -0
  66. data/lib/aws-sdk-s3/types.rb +8068 -1887
  67. data/lib/aws-sdk-s3.rb +35 -31
  68. data/sig/bucket.rbs +231 -0
  69. data/sig/bucket_acl.rbs +78 -0
  70. data/sig/bucket_cors.rbs +69 -0
  71. data/sig/bucket_lifecycle.rbs +88 -0
  72. data/sig/bucket_lifecycle_configuration.rbs +115 -0
  73. data/sig/bucket_logging.rbs +76 -0
  74. data/sig/bucket_notification.rbs +114 -0
  75. data/sig/bucket_policy.rbs +59 -0
  76. data/sig/bucket_request_payment.rbs +54 -0
  77. data/sig/bucket_tagging.rbs +65 -0
  78. data/sig/bucket_versioning.rbs +77 -0
  79. data/sig/bucket_website.rbs +93 -0
  80. data/sig/client.rbs +2584 -0
  81. data/sig/customizations/bucket.rbs +19 -0
  82. data/sig/customizations/object.rbs +38 -0
  83. data/sig/customizations/object_summary.rbs +35 -0
  84. data/sig/errors.rbs +44 -0
  85. data/sig/multipart_upload.rbs +120 -0
  86. data/sig/multipart_upload_part.rbs +109 -0
  87. data/sig/object.rbs +462 -0
  88. data/sig/object_acl.rbs +86 -0
  89. data/sig/object_summary.rbs +345 -0
  90. data/sig/object_version.rbs +143 -0
  91. data/sig/resource.rbs +141 -0
  92. data/sig/types.rbs +2866 -0
  93. data/sig/waiters.rbs +95 -0
  94. metadata +44 -12
  95. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
@@ -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
@@ -93,7 +105,7 @@ module Aws::S3
93
105
  data[:is_latest]
94
106
  end
95
107
 
96
- # Date and time the object was last modified.
108
+ # Date and time when the object was last modified.
97
109
  # @return [Time]
98
110
  def last_modified
99
111
  data[:last_modified]
@@ -243,7 +255,7 @@ module Aws::S3
243
255
  :retry
244
256
  end
245
257
  end
246
- Aws::Plugins::UserAgent.feature('resource') do
258
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
247
259
  Aws::Waiters::Waiter.new(options).wait({})
248
260
  end
249
261
  end
@@ -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
@@ -264,13 +279,23 @@ module Aws::S3
264
279
  # space, and the value that is displayed on your authentication device.
265
280
  # Required to permanently delete a versioned object if versioning is
266
281
  # configured with MFA delete enabled.
282
+ #
283
+ # <note markdown="1"> This functionality is not supported for directory buckets.
284
+ #
285
+ # </note>
267
286
  # @option options [String] :request_payer
268
287
  # Confirms that the requester knows that they will be charged for the
269
288
  # request. Bucket owners need not specify this parameter in their
270
- # requests. For information about downloading objects from Requester
289
+ # requests. If either the source or destination S3 bucket has Requester
290
+ # Pays enabled, the requester will pay for corresponding charges to copy
291
+ # the object. For information about downloading objects from Requester
271
292
  # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
272
293
  # in the *Amazon S3 User Guide*.
273
294
  #
295
+ # <note markdown="1"> This functionality is not supported for directory buckets.
296
+ #
297
+ # </note>
298
+ #
274
299
  #
275
300
  #
276
301
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
@@ -278,10 +303,54 @@ module Aws::S3
278
303
  # Indicates whether S3 Object Lock should bypass Governance-mode
279
304
  # restrictions to process this operation. To use this header, you must
280
305
  # have the `s3:BypassGovernanceRetention` permission.
306
+ #
307
+ # <note markdown="1"> This functionality is not supported for directory buckets.
308
+ #
309
+ # </note>
281
310
  # @option options [String] :expected_bucket_owner
282
- # The account ID of the expected bucket owner. If the bucket is owned by
283
- # a different account, the request fails with the HTTP status code `403
284
- # Forbidden` (access denied).
311
+ # The account ID of the expected bucket owner. If the account ID that
312
+ # you provide does not match the actual owner of the bucket, the request
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.
285
354
  # @return [Types::DeleteObjectOutput]
286
355
  def delete(options = {})
287
356
  options = options.merge(
@@ -289,7 +358,7 @@ module Aws::S3
289
358
  key: @object_key,
290
359
  version_id: @id
291
360
  )
292
- resp = Aws::Plugins::UserAgent.feature('resource') do
361
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
293
362
  @client.delete_object(options)
294
363
  end
295
364
  resp.data
@@ -320,18 +389,64 @@ module Aws::S3
320
389
  # @param [Hash] options ({})
321
390
  # @option options [String] :if_match
322
391
  # Return the object only if its entity tag (ETag) is the same as the one
323
- # specified; otherwise, return a 412 (precondition failed) error.
392
+ # specified in this header; otherwise, return a `412 Precondition
393
+ # Failed` error.
394
+ #
395
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
396
+ # present in the request as follows: `If-Match` condition evaluates to
397
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
398
+ # then, S3 returns `200 OK` and the data requested.
399
+ #
400
+ # For more information about conditional requests, see [RFC 7232][1].
401
+ #
402
+ #
403
+ #
404
+ # [1]: https://tools.ietf.org/html/rfc7232
324
405
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
325
406
  # Return the object only if it has been modified since the specified
326
- # time; otherwise, return a 304 (not modified) error.
407
+ # time; otherwise, return a `304 Not Modified` error.
408
+ #
409
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
410
+ # present in the request as follows:` If-None-Match` condition evaluates
411
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
412
+ # then, S3 returns `304 Not Modified` status code.
413
+ #
414
+ # For more information about conditional requests, see [RFC 7232][1].
415
+ #
416
+ #
417
+ #
418
+ # [1]: https://tools.ietf.org/html/rfc7232
327
419
  # @option options [String] :if_none_match
328
420
  # Return the object only if its entity tag (ETag) is different from the
329
- # one specified; otherwise, return a 304 (not modified) error.
421
+ # one specified in this header; otherwise, return a `304 Not Modified`
422
+ # error.
423
+ #
424
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
425
+ # present in the request as follows:` If-None-Match` condition evaluates
426
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
427
+ # then, S3 returns `304 Not Modified` HTTP status code.
428
+ #
429
+ # For more information about conditional requests, see [RFC 7232][1].
430
+ #
431
+ #
432
+ #
433
+ # [1]: https://tools.ietf.org/html/rfc7232
330
434
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
331
435
  # Return the object only if it has not been modified since the specified
332
- # time; otherwise, return a 412 (precondition failed) error.
436
+ # time; otherwise, return a `412 Precondition Failed` error.
437
+ #
438
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
439
+ # present in the request as follows: `If-Match` condition evaluates to
440
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
441
+ # then, S3 returns `200 OK` and the data requested.
442
+ #
443
+ # For more information about conditional requests, see [RFC 7232][1].
444
+ #
445
+ #
446
+ #
447
+ # [1]: https://tools.ietf.org/html/rfc7232
333
448
  # @option options [String] :range
334
- # Downloads the specified range bytes of an object. For more information
449
+ # Downloads the specified byte range of an object. For more information
335
450
  # about the HTTP Range header, see
336
451
  # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
337
452
  #
@@ -346,7 +461,7 @@ module Aws::S3
346
461
  # @option options [String] :response_cache_control
347
462
  # Sets the `Cache-Control` header of the response.
348
463
  # @option options [String] :response_content_disposition
349
- # Sets the `Content-Disposition` header of the response
464
+ # Sets the `Content-Disposition` header of the response.
350
465
  # @option options [String] :response_content_encoding
351
466
  # Sets the `Content-Encoding` header of the response.
352
467
  # @option options [String] :response_content_language
@@ -356,25 +471,99 @@ module Aws::S3
356
471
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
357
472
  # Sets the `Expires` header of the response.
358
473
  # @option options [String] :sse_customer_algorithm
359
- # Specifies the algorithm to use to when decrypting the object (for
360
- # example, AES256).
474
+ # Specifies the algorithm to use when decrypting the object (for
475
+ # example, `AES256`).
476
+ #
477
+ # If you encrypt an object by using server-side encryption with
478
+ # customer-provided encryption keys (SSE-C) when you store the object in
479
+ # Amazon S3, then when you GET the object, you must use the following
480
+ # headers:
481
+ #
482
+ # * `x-amz-server-side-encryption-customer-algorithm`
483
+ #
484
+ # * `x-amz-server-side-encryption-customer-key`
485
+ #
486
+ # * `x-amz-server-side-encryption-customer-key-MD5`
487
+ #
488
+ # For more information about SSE-C, see [Server-Side Encryption (Using
489
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
490
+ #
491
+ # <note markdown="1"> This functionality is not supported for directory buckets.
492
+ #
493
+ # </note>
494
+ #
495
+ #
496
+ #
497
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
361
498
  # @option options [String] :sse_customer_key
362
- # Specifies the customer-provided encryption key for Amazon S3 used to
363
- # encrypt the data. This value is used to decrypt the object when
364
- # recovering it and must match the one used when storing the data. The
365
- # key must be appropriate for use with the algorithm specified in the
499
+ # Specifies the customer-provided encryption key that you originally
500
+ # provided for Amazon S3 to encrypt the data before storing it. This
501
+ # value is used to decrypt the object when recovering it and must match
502
+ # the one used when storing the data. The key must be appropriate for
503
+ # use with the algorithm specified in the
366
504
  # `x-amz-server-side-encryption-customer-algorithm` header.
505
+ #
506
+ # If you encrypt an object by using server-side encryption with
507
+ # customer-provided encryption keys (SSE-C) when you store the object in
508
+ # Amazon S3, then when you GET the object, you must use the following
509
+ # headers:
510
+ #
511
+ # * `x-amz-server-side-encryption-customer-algorithm`
512
+ #
513
+ # * `x-amz-server-side-encryption-customer-key`
514
+ #
515
+ # * `x-amz-server-side-encryption-customer-key-MD5`
516
+ #
517
+ # For more information about SSE-C, see [Server-Side Encryption (Using
518
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
519
+ #
520
+ # <note markdown="1"> This functionality is not supported for directory buckets.
521
+ #
522
+ # </note>
523
+ #
524
+ #
525
+ #
526
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
367
527
  # @option options [String] :sse_customer_key_md5
368
- # Specifies the 128-bit MD5 digest of the encryption key according to
369
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
370
- # ensure that the encryption key was transmitted without error.
528
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
529
+ # key according to RFC 1321. Amazon S3 uses this header for a message
530
+ # integrity check to ensure that the encryption key was transmitted
531
+ # without error.
532
+ #
533
+ # If you encrypt an object by using server-side encryption with
534
+ # customer-provided encryption keys (SSE-C) when you store the object in
535
+ # Amazon S3, then when you GET the object, you must use the following
536
+ # headers:
537
+ #
538
+ # * `x-amz-server-side-encryption-customer-algorithm`
539
+ #
540
+ # * `x-amz-server-side-encryption-customer-key`
541
+ #
542
+ # * `x-amz-server-side-encryption-customer-key-MD5`
543
+ #
544
+ # For more information about SSE-C, see [Server-Side Encryption (Using
545
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
546
+ #
547
+ # <note markdown="1"> This functionality is not supported for directory buckets.
548
+ #
549
+ # </note>
550
+ #
551
+ #
552
+ #
553
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
371
554
  # @option options [String] :request_payer
372
555
  # Confirms that the requester knows that they will be charged for the
373
556
  # request. Bucket owners need not specify this parameter in their
374
- # requests. For information about downloading objects from Requester
557
+ # requests. If either the source or destination S3 bucket has Requester
558
+ # Pays enabled, the requester will pay for corresponding charges to copy
559
+ # the object. For information about downloading objects from Requester
375
560
  # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
376
561
  # in the *Amazon S3 User Guide*.
377
562
  #
563
+ # <note markdown="1"> This functionality is not supported for directory buckets.
564
+ #
565
+ # </note>
566
+ #
378
567
  #
379
568
  #
380
569
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
@@ -384,9 +573,9 @@ module Aws::S3
384
573
  # for the part specified. Useful for downloading just a part of an
385
574
  # object.
386
575
  # @option options [String] :expected_bucket_owner
387
- # The account ID of the expected bucket owner. If the bucket is owned by
388
- # a different account, the request fails with the HTTP status code `403
389
- # Forbidden` (access denied).
576
+ # The account ID of the expected bucket owner. If the account ID that
577
+ # you provide does not match the actual owner of the bucket, the request
578
+ # fails with the HTTP status code `403 Forbidden` (access denied).
390
579
  # @option options [String] :checksum_mode
391
580
  # To retrieve the checksum, this mode must be enabled.
392
581
  # @return [Types::GetObjectOutput]
@@ -396,7 +585,7 @@ module Aws::S3
396
585
  key: @object_key,
397
586
  version_id: @id
398
587
  )
399
- resp = Aws::Plugins::UserAgent.feature('resource') do
588
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
400
589
  @client.get_object(options, &block)
401
590
  end
402
591
  resp.data
@@ -410,6 +599,12 @@ module Aws::S3
410
599
  # if_none_match: "IfNoneMatch",
411
600
  # if_unmodified_since: Time.now,
412
601
  # range: "Range",
602
+ # response_cache_control: "ResponseCacheControl",
603
+ # response_content_disposition: "ResponseContentDisposition",
604
+ # response_content_encoding: "ResponseContentEncoding",
605
+ # response_content_language: "ResponseContentLanguage",
606
+ # response_content_type: "ResponseContentType",
607
+ # response_expires: Time.now,
413
608
  # sse_customer_algorithm: "SSECustomerAlgorithm",
414
609
  # sse_customer_key: "SSECustomerKey",
415
610
  # sse_customer_key_md5: "SSECustomerKeyMD5",
@@ -422,40 +617,130 @@ module Aws::S3
422
617
  # @option options [String] :if_match
423
618
  # Return the object only if its entity tag (ETag) is the same as the one
424
619
  # specified; otherwise, return a 412 (precondition failed) error.
620
+ #
621
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
622
+ # present in the request as follows:
623
+ #
624
+ # * `If-Match` condition evaluates to `true`, and;
625
+ #
626
+ # * `If-Unmodified-Since` condition evaluates to `false`;
627
+ #
628
+ # Then Amazon S3 returns `200 OK` and the data requested.
629
+ #
630
+ # For more information about conditional requests, see [RFC 7232][1].
631
+ #
632
+ #
633
+ #
634
+ # [1]: https://tools.ietf.org/html/rfc7232
425
635
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
426
636
  # Return the object only if it has been modified since the specified
427
637
  # time; otherwise, return a 304 (not modified) error.
638
+ #
639
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
640
+ # present in the request as follows:
641
+ #
642
+ # * `If-None-Match` condition evaluates to `false`, and;
643
+ #
644
+ # * `If-Modified-Since` condition evaluates to `true`;
645
+ #
646
+ # Then Amazon S3 returns the `304 Not Modified` response code.
647
+ #
648
+ # For more information about conditional requests, see [RFC 7232][1].
649
+ #
650
+ #
651
+ #
652
+ # [1]: https://tools.ietf.org/html/rfc7232
428
653
  # @option options [String] :if_none_match
429
654
  # Return the object only if its entity tag (ETag) is different from the
430
655
  # one specified; otherwise, return a 304 (not modified) error.
656
+ #
657
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
658
+ # present in the request as follows:
659
+ #
660
+ # * `If-None-Match` condition evaluates to `false`, and;
661
+ #
662
+ # * `If-Modified-Since` condition evaluates to `true`;
663
+ #
664
+ # Then Amazon S3 returns the `304 Not Modified` response code.
665
+ #
666
+ # For more information about conditional requests, see [RFC 7232][1].
667
+ #
668
+ #
669
+ #
670
+ # [1]: https://tools.ietf.org/html/rfc7232
431
671
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
432
672
  # Return the object only if it has not been modified since the specified
433
673
  # time; otherwise, return a 412 (precondition failed) error.
674
+ #
675
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
676
+ # present in the request as follows:
677
+ #
678
+ # * `If-Match` condition evaluates to `true`, and;
679
+ #
680
+ # * `If-Unmodified-Since` condition evaluates to `false`;
681
+ #
682
+ # Then Amazon S3 returns `200 OK` and the data requested.
683
+ #
684
+ # For more information about conditional requests, see [RFC 7232][1].
685
+ #
686
+ #
687
+ #
688
+ # [1]: https://tools.ietf.org/html/rfc7232
434
689
  # @option options [String] :range
435
690
  # HeadObject returns only the metadata for an object. If the Range is
436
691
  # satisfiable, only the `ContentLength` is affected in the response. If
437
692
  # the Range is not satisfiable, S3 returns a `416 - Requested Range Not
438
693
  # Satisfiable` error.
694
+ # @option options [String] :response_cache_control
695
+ # Sets the `Cache-Control` header of the response.
696
+ # @option options [String] :response_content_disposition
697
+ # Sets the `Content-Disposition` header of the response.
698
+ # @option options [String] :response_content_encoding
699
+ # Sets the `Content-Encoding` header of the response.
700
+ # @option options [String] :response_content_language
701
+ # Sets the `Content-Language` header of the response.
702
+ # @option options [String] :response_content_type
703
+ # Sets the `Content-Type` header of the response.
704
+ # @option options [Time,DateTime,Date,Integer,String] :response_expires
705
+ # Sets the `Expires` header of the response.
439
706
  # @option options [String] :sse_customer_algorithm
440
- # Specifies the algorithm to use to when encrypting the object (for
707
+ # Specifies the algorithm to use when encrypting the object (for
441
708
  # example, AES256).
709
+ #
710
+ # <note markdown="1"> This functionality is not supported for directory buckets.
711
+ #
712
+ # </note>
442
713
  # @option options [String] :sse_customer_key
443
714
  # Specifies the customer-provided encryption key for Amazon S3 to use in
444
715
  # encrypting data. This value is used to store the object and then it is
445
716
  # discarded; Amazon S3 does not store the encryption key. The key must
446
717
  # be appropriate for use with the algorithm specified in the
447
718
  # `x-amz-server-side-encryption-customer-algorithm` header.
719
+ #
720
+ # <note markdown="1"> This functionality is not supported for directory buckets.
721
+ #
722
+ # </note>
448
723
  # @option options [String] :sse_customer_key_md5
449
724
  # Specifies the 128-bit MD5 digest of the encryption key according to
450
725
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
451
726
  # ensure that the encryption key was transmitted without error.
727
+ #
728
+ # <note markdown="1"> This functionality is not supported for directory buckets.
729
+ #
730
+ # </note>
452
731
  # @option options [String] :request_payer
453
732
  # Confirms that the requester knows that they will be charged for the
454
733
  # request. Bucket owners need not specify this parameter in their
455
- # requests. For information about downloading objects from Requester
734
+ # requests. If either the source or destination S3 bucket has Requester
735
+ # Pays enabled, the requester will pay for corresponding charges to copy
736
+ # the object. For information about downloading objects from Requester
456
737
  # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
457
738
  # in the *Amazon S3 User Guide*.
458
739
  #
740
+ # <note markdown="1"> This functionality is not supported for directory buckets.
741
+ #
742
+ # </note>
743
+ #
459
744
  #
460
745
  #
461
746
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
@@ -465,16 +750,26 @@ module Aws::S3
465
750
  # for the part specified. Useful querying about the size of the part and
466
751
  # the number of parts in this object.
467
752
  # @option options [String] :expected_bucket_owner
468
- # The account ID of the expected bucket owner. If the bucket is owned by
469
- # a different account, the request fails with the HTTP status code `403
470
- # Forbidden` (access denied).
753
+ # The account ID of the expected bucket owner. If the account ID that
754
+ # you provide does not match the actual owner of the bucket, the request
755
+ # fails with the HTTP status code `403 Forbidden` (access denied).
471
756
  # @option options [String] :checksum_mode
472
757
  # To retrieve the checksum, this parameter must be enabled.
473
758
  #
474
- # In addition, if you enable `ChecksumMode` and the object is encrypted
475
- # with Amazon Web Services Key Management Service (Amazon Web Services
476
- # KMS), you must have permission to use the `kms:Decrypt` action for the
477
- # request to succeed.
759
+ # **General purpose buckets** - If you enable checksum mode and the
760
+ # object is uploaded with a [checksum][1] and encrypted with an Key
761
+ # Management Service (KMS) key, you must have permission to use the
762
+ # `kms:Decrypt` action to retrieve the checksum.
763
+ #
764
+ # **Directory buckets** - If you enable `ChecksumMode` and the object is
765
+ # encrypted with Amazon Web Services Key Management Service (Amazon Web
766
+ # Services KMS), you must also have the `kms:GenerateDataKey` and
767
+ # `kms:Decrypt` permissions in IAM identity-based policies and KMS key
768
+ # policies for the KMS key to retrieve the checksum of the object.
769
+ #
770
+ #
771
+ #
772
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
478
773
  # @return [Types::HeadObjectOutput]
479
774
  def head(options = {})
480
775
  options = options.merge(
@@ -482,7 +777,7 @@ module Aws::S3
482
777
  key: @object_key,
483
778
  version_id: @id
484
779
  )
485
- resp = Aws::Plugins::UserAgent.feature('resource') do
780
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
486
781
  @client.head_object(options)
487
782
  end
488
783
  resp.data
@@ -556,7 +851,7 @@ module Aws::S3
556
851
  # request_payer: "requester", # accepts requester
557
852
  # bypass_governance_retention: false,
558
853
  # expected_bucket_owner: "AccountId",
559
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
854
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
560
855
  # })
561
856
  # @param options ({})
562
857
  # @option options [String] :mfa
@@ -564,13 +859,36 @@ module Aws::S3
564
859
  # space, and the value that is displayed on your authentication device.
565
860
  # Required to permanently delete a versioned object if versioning is
566
861
  # configured with MFA delete enabled.
862
+ #
863
+ # When performing the `DeleteObjects` operation on an MFA delete enabled
864
+ # bucket, which attempts to delete the specified versioned objects, you
865
+ # must include an MFA token. If you don't provide an MFA token, the
866
+ # entire request will fail, even if there are non-versioned objects that
867
+ # you are trying to delete. If you provide an invalid token, whether
868
+ # there are versioned object keys in the request or not, the entire
869
+ # Multi-Object Delete request will fail. For information about MFA
870
+ # Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
871
+ #
872
+ # <note markdown="1"> This functionality is not supported for directory buckets.
873
+ #
874
+ # </note>
875
+ #
876
+ #
877
+ #
878
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
567
879
  # @option options [String] :request_payer
568
880
  # Confirms that the requester knows that they will be charged for the
569
881
  # request. Bucket owners need not specify this parameter in their
570
- # requests. For information about downloading objects from Requester
882
+ # requests. If either the source or destination S3 bucket has Requester
883
+ # Pays enabled, the requester will pay for corresponding charges to copy
884
+ # the object. For information about downloading objects from Requester
571
885
  # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
572
886
  # in the *Amazon S3 User Guide*.
573
887
  #
888
+ # <note markdown="1"> This functionality is not supported for directory buckets.
889
+ #
890
+ # </note>
891
+ #
574
892
  #
575
893
  #
576
894
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
@@ -578,25 +896,46 @@ module Aws::S3
578
896
  # Specifies whether you want to delete this object even if it has a
579
897
  # Governance-type Object Lock in place. To use this header, you must
580
898
  # have the `s3:BypassGovernanceRetention` permission.
899
+ #
900
+ # <note markdown="1"> This functionality is not supported for directory buckets.
901
+ #
902
+ # </note>
581
903
  # @option options [String] :expected_bucket_owner
582
- # The account ID of the expected bucket owner. If the bucket is owned by
583
- # a different account, the request fails with the HTTP status code `403
584
- # Forbidden` (access denied).
904
+ # The account ID of the expected bucket owner. If the account ID that
905
+ # you provide does not match the actual owner of the bucket, the request
906
+ # fails with the HTTP status code `403 Forbidden` (access denied).
585
907
  # @option options [String] :checksum_algorithm
586
908
  # Indicates the algorithm used to create the checksum for the object
587
- # when using the SDK. This header will not provide any additional
588
- # functionality if not using the SDK. When sending this header, there
589
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
590
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
591
- # `400 Bad Request`. For more information, see [Checking object
592
- # integrity][1] in the *Amazon S3 User Guide*.
909
+ # when you use the SDK. This header will not provide any additional
910
+ # functionality if you don't use the SDK. When you send this header,
911
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
912
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
913
+ # with the HTTP status code `400 Bad Request`.
914
+ #
915
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
916
+ # the supported algorithm from the following list:
917
+ #
918
+ # * `CRC32`
919
+ #
920
+ # * `CRC32C`
921
+ #
922
+ # * `CRC64NVME`
923
+ #
924
+ # * `SHA1`
925
+ #
926
+ # * `SHA256`
927
+ #
928
+ # For more information, see [Checking object integrity][1] in the
929
+ # *Amazon S3 User Guide*.
930
+ #
931
+ # If the individual checksum value you provide through
932
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
933
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
934
+ # request with a `BadDigest` error.
593
935
  #
594
936
  # If you provide an individual checksum, Amazon S3 ignores any provided
595
937
  # `ChecksumAlgorithm` parameter.
596
938
  #
597
- # This checksum algorithm must be the same for all parts and it match
598
- # the checksum value supplied in the `CreateMultipartUpload` request.
599
- #
600
939
  #
601
940
  #
602
941
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -613,7 +952,7 @@ module Aws::S3
613
952
  version_id: item.id
614
953
  }
615
954
  end
616
- Aws::Plugins::UserAgent.feature('resource') do
955
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
617
956
  batch[0].client.delete_objects(params)
618
957
  end
619
958
  end
@@ -625,3 +964,6 @@ module Aws::S3
625
964
  end
626
965
  end
627
966
  end
967
+
968
+ # Load customizations if they exist
969
+ require 'aws-sdk-s3/customizations/object_version'