aws-sdk-s3 1.96.2 → 1.132.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +256 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +226 -76
  5. data/lib/aws-sdk-s3/bucket_acl.rb +30 -7
  6. data/lib/aws-sdk-s3/bucket_cors.rb +35 -10
  7. data/lib/aws-sdk-s3/bucket_lifecycle.rb +39 -12
  8. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +40 -10
  9. data/lib/aws-sdk-s3/bucket_logging.rb +30 -7
  10. data/lib/aws-sdk-s3/bucket_notification.rb +28 -10
  11. data/lib/aws-sdk-s3/bucket_policy.rb +35 -10
  12. data/lib/aws-sdk-s3/bucket_request_payment.rb +30 -7
  13. data/lib/aws-sdk-s3/bucket_tagging.rb +35 -10
  14. data/lib/aws-sdk-s3/bucket_versioning.rb +78 -17
  15. data/lib/aws-sdk-s3/bucket_website.rb +35 -10
  16. data/lib/aws-sdk-s3/client.rb +3854 -2120
  17. data/lib/aws-sdk-s3/client_api.rb +601 -208
  18. data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
  19. data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
  20. data/lib/aws-sdk-s3/customizations/object.rb +130 -24
  21. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  22. data/lib/aws-sdk-s3/customizations.rb +2 -0
  23. data/lib/aws-sdk-s3/encryption/client.rb +7 -3
  24. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
  25. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  26. data/lib/aws-sdk-s3/encryptionV2/client.rb +7 -3
  27. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -4
  28. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +0 -4
  29. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  30. data/lib/aws-sdk-s3/endpoint_parameters.rb +146 -0
  31. data/lib/aws-sdk-s3/endpoint_provider.rb +509 -0
  32. data/lib/aws-sdk-s3/endpoints.rb +2150 -0
  33. data/lib/aws-sdk-s3/file_downloader.rb +57 -27
  34. data/lib/aws-sdk-s3/file_uploader.rb +12 -5
  35. data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -7
  36. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +41 -13
  37. data/lib/aws-sdk-s3/multipart_upload.rb +138 -16
  38. data/lib/aws-sdk-s3/multipart_upload_part.rb +144 -18
  39. data/lib/aws-sdk-s3/object.rb +364 -160
  40. data/lib/aws-sdk-s3/object_acl.rb +32 -9
  41. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  42. data/lib/aws-sdk-s3/object_multipart_copier.rb +41 -19
  43. data/lib/aws-sdk-s3/object_summary.rb +291 -123
  44. data/lib/aws-sdk-s3/object_version.rb +99 -46
  45. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -44
  46. data/lib/aws-sdk-s3/plugins/arn.rb +22 -180
  47. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  48. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  49. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -55
  50. data/lib/aws-sdk-s3/plugins/endpoints.rb +262 -0
  51. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  52. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
  53. data/lib/aws-sdk-s3/plugins/md5s.rb +5 -3
  54. data/lib/aws-sdk-s3/plugins/s3_signer.rb +35 -100
  55. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  56. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  57. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  58. data/lib/aws-sdk-s3/presigner.rb +24 -29
  59. data/lib/aws-sdk-s3/resource.rb +25 -3
  60. data/lib/aws-sdk-s3/types.rb +3307 -4625
  61. data/lib/aws-sdk-s3.rb +5 -1
  62. metadata +14 -11
  63. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  64. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  65. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -73
  66. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -55,22 +55,31 @@ module Aws::S3
55
55
  # below:
56
56
  #
57
57
  # * Objects created by the PUT Object, POST Object, or Copy operation,
58
- # or through the AWS Management Console, and are encrypted by SSE-S3
59
- # or plaintext, have ETags that are an MD5 digest of their object
60
- # data.
58
+ # or through the Amazon Web Services Management Console, and are
59
+ # encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest
60
+ # of their object data.
61
61
  #
62
62
  # * Objects created by the PUT Object, POST Object, or Copy operation,
63
- # or through the AWS Management Console, and are encrypted by SSE-C or
64
- # SSE-KMS, have ETags that are not an MD5 digest of their object data.
63
+ # or through the Amazon Web Services Management Console, and are
64
+ # encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest
65
+ # of their object data.
65
66
  #
66
67
  # * If an object is created by either the Multipart Upload or Part Copy
67
68
  # operation, the ETag is not an MD5 digest, regardless of the method
68
- # of encryption.
69
+ # of encryption. If an object is larger than 16 MB, the Amazon Web
70
+ # Services Management Console will upload or copy that object as a
71
+ # Multipart Upload, and therefore the ETag will not be an MD5 digest.
69
72
  # @return [String]
70
73
  def etag
71
74
  data[:etag]
72
75
  end
73
76
 
77
+ # The algorithm that was used to create a checksum of the object.
78
+ # @return [Array<String>]
79
+ def checksum_algorithm
80
+ data[:checksum_algorithm]
81
+ end
82
+
74
83
  # Size in bytes of the object
75
84
  # @return [Integer]
76
85
  def size
@@ -89,6 +98,20 @@ module Aws::S3
89
98
  data[:owner]
90
99
  end
91
100
 
101
+ # Specifies the restoration status of an object. Objects in certain
102
+ # storage classes must be restored before they can be retrieved. For
103
+ # more information about these storage classes and how to work with
104
+ # archived objects, see [ Working with archived objects][1] in the
105
+ # *Amazon S3 User Guide*.
106
+ #
107
+ #
108
+ #
109
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
110
+ # @return [Types::RestoreStatus]
111
+ def restore_status
112
+ data[:restore_status]
113
+ end
114
+
92
115
  # @!endgroup
93
116
 
94
117
  # @return [Client]
@@ -143,8 +166,10 @@ module Aws::S3
143
166
  options, params = separate_params_and_options(options)
144
167
  waiter = Waiters::ObjectExists.new(options)
145
168
  yield_waiter_and_warn(waiter, &block) if block_given?
146
- waiter.wait(params.merge(bucket: @bucket_name,
169
+ Aws::Plugins::UserAgent.feature('resource') do
170
+ waiter.wait(params.merge(bucket: @bucket_name,
147
171
  key: @key))
172
+ end
148
173
  ObjectSummary.new({
149
174
  bucket_name: @bucket_name,
150
175
  key: @key,
@@ -162,8 +187,10 @@ module Aws::S3
162
187
  options, params = separate_params_and_options(options)
163
188
  waiter = Waiters::ObjectNotExists.new(options)
164
189
  yield_waiter_and_warn(waiter, &block) if block_given?
165
- waiter.wait(params.merge(bucket: @bucket_name,
190
+ Aws::Plugins::UserAgent.feature('resource') do
191
+ waiter.wait(params.merge(bucket: @bucket_name,
166
192
  key: @key))
193
+ end
167
194
  ObjectSummary.new({
168
195
  bucket_name: @bucket_name,
169
196
  key: @key,
@@ -265,7 +292,9 @@ module Aws::S3
265
292
  :retry
266
293
  end
267
294
  end
268
- Aws::Waiters::Waiter.new(options).wait({})
295
+ Aws::Plugins::UserAgent.feature('resource') do
296
+ Aws::Waiters::Waiter.new(options).wait({})
297
+ end
269
298
  end
270
299
 
271
300
  # @!group Actions
@@ -275,6 +304,7 @@ module Aws::S3
275
304
  # object_summary.copy_from({
276
305
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
277
306
  # cache_control: "CacheControl",
307
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
278
308
  # content_disposition: "ContentDisposition",
279
309
  # content_encoding: "ContentEncoding",
280
310
  # content_language: "ContentLanguage",
@@ -294,8 +324,8 @@ module Aws::S3
294
324
  # },
295
325
  # metadata_directive: "COPY", # accepts COPY, REPLACE
296
326
  # tagging_directive: "COPY", # accepts COPY, REPLACE
297
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
298
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
327
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
328
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
299
329
  # website_redirect_location: "WebsiteRedirectLocation",
300
330
  # sse_customer_algorithm: "SSECustomerAlgorithm",
301
331
  # sse_customer_key: "SSECustomerKey",
@@ -321,6 +351,14 @@ module Aws::S3
321
351
  # This action is not supported by Amazon S3 on Outposts.
322
352
  # @option options [String] :cache_control
323
353
  # Specifies caching behavior along the request/reply chain.
354
+ # @option options [String] :checksum_algorithm
355
+ # Indicates the algorithm you want Amazon S3 to use to create the
356
+ # checksum for the object. For more information, see [Checking object
357
+ # integrity][1] in the *Amazon S3 User Guide*.
358
+ #
359
+ #
360
+ #
361
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
324
362
  # @option options [String] :content_disposition
325
363
  # Specifies presentational information for the object.
326
364
  # @option options [String] :content_encoding
@@ -334,14 +372,14 @@ module Aws::S3
334
372
  # @option options [required, String] :copy_source
335
373
  # Specifies the source object for the copy operation. You specify the
336
374
  # value in one of two formats, depending on whether you want to access
337
- # the source object through an [access point][1]\:
375
+ # the source object through an [access point][1]:
338
376
  #
339
377
  # * For objects not accessed through an access point, specify the name
340
378
  # of the source bucket and the key of the source object, separated by
341
379
  # a slash (/). For example, to copy the object `reports/january.pdf`
342
380
  # from the bucket `awsexamplebucket`, use
343
- # `awsexamplebucket/reports/january.pdf`. The value must be URL
344
- # encoded.
381
+ # `awsexamplebucket/reports/january.pdf`. The value must be
382
+ # URL-encoded.
345
383
  #
346
384
  # * For objects accessed through access points, specify the Amazon
347
385
  # Resource Name (ARN) of the object as accessed through the access
@@ -354,7 +392,8 @@ module Aws::S3
354
392
  # The value must be URL encoded.
355
393
  #
356
394
  # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
357
- # source and destination buckets are in the same AWS Region.
395
+ # source and destination buckets are in the same Amazon Web Services
396
+ # Region.
358
397
  #
359
398
  # </note>
360
399
  #
@@ -365,7 +404,7 @@ module Aws::S3
365
404
  # outpost `my-outpost` owned by account `123456789012` in Region
366
405
  # `us-west-2`, use the URL encoding of
367
406
  # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
368
- # The value must be URL encoded.
407
+ # The value must be URL-encoded.
369
408
  #
370
409
  # To copy a specific version of an object, append
371
410
  # `?versionId=<version-id>` to the value (for example,
@@ -415,7 +454,7 @@ module Aws::S3
415
454
  # or replaced with tag-set provided in the request.
416
455
  # @option options [String] :server_side_encryption
417
456
  # The server-side encryption algorithm used when storing this object in
418
- # Amazon S3 (for example, AES256, aws:kms).
457
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
419
458
  # @option options [String] :storage_class
420
459
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
421
460
  # created objects. The STANDARD storage class provides high durability
@@ -430,7 +469,10 @@ module Aws::S3
430
469
  # @option options [String] :website_redirect_location
431
470
  # If the bucket is configured as a website, redirects requests for this
432
471
  # object to another object in the same bucket or to an external URL.
433
- # Amazon S3 stores the value of this header in the object metadata.
472
+ # Amazon S3 stores the value of this header in the object metadata. This
473
+ # value is unique to each object and is not copied when using the
474
+ # `x-amz-metadata-directive` header. Instead, you may opt to provide
475
+ # this header in combination with the directive.
434
476
  # @option options [String] :sse_customer_algorithm
435
477
  # Specifies the algorithm to use to when encrypting the object (for
436
478
  # example, AES256).
@@ -445,25 +487,25 @@ module Aws::S3
445
487
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
446
488
  # ensure that the encryption key was transmitted without error.
447
489
  # @option options [String] :ssekms_key_id
448
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
449
- # PUT requests for an object protected by AWS KMS will fail if not made
450
- # via SSL or using SigV4. For information about configuring using any of
451
- # the officially supported AWS SDKs and AWS CLI, see [Specifying the
452
- # Signature Version in Request Authentication][1] in the *Amazon S3 User
453
- # Guide*.
490
+ # Specifies the KMS key ID to use for object encryption. All GET and PUT
491
+ # requests for an object protected by KMS will fail if they're not made
492
+ # via SSL or using SigV4. For information about configuring any of the
493
+ # officially supported Amazon Web Services SDKs and Amazon Web Services
494
+ # CLI, see [Specifying the Signature Version in Request
495
+ # Authentication][1] in the *Amazon S3 User Guide*.
454
496
  #
455
497
  #
456
498
  #
457
499
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
458
500
  # @option options [String] :ssekms_encryption_context
459
- # Specifies the AWS KMS Encryption Context to use for object encryption.
460
- # The value of this header is a base64-encoded UTF-8 string holding JSON
461
- # with the encryption context key-value pairs.
501
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
502
+ # object encryption. The value of this header is a base64-encoded UTF-8
503
+ # string holding JSON with the encryption context key-value pairs.
462
504
  # @option options [Boolean] :bucket_key_enabled
463
505
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
464
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
465
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
466
- # for object encryption with SSE-KMS.
506
+ # encryption with server-side encryption using Key Management Service
507
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
508
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
467
509
  #
468
510
  # Specifying this header with a COPY action doesn’t affect bucket-level
469
511
  # settings for S3 Bucket Key.
@@ -481,8 +523,8 @@ module Aws::S3
481
523
  # @option options [String] :request_payer
482
524
  # Confirms that the requester knows that they will be charged for the
483
525
  # request. Bucket owners need not specify this parameter in their
484
- # requests. For information about downloading objects from requester
485
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
526
+ # requests. For information about downloading objects from Requester
527
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
486
528
  # in the *Amazon S3 User Guide*.
487
529
  #
488
530
  #
@@ -498,22 +540,24 @@ module Aws::S3
498
540
  # The date and time when you want the copied object's Object Lock to
499
541
  # expire.
500
542
  # @option options [String] :object_lock_legal_hold_status
501
- # Specifies whether you want to apply a Legal Hold to the copied object.
543
+ # Specifies whether you want to apply a legal hold to the copied object.
502
544
  # @option options [String] :expected_bucket_owner
503
545
  # The account ID of the expected destination bucket owner. If the
504
- # destination bucket is owned by a different account, the request will
505
- # fail with an HTTP `403 (Access Denied)` error.
546
+ # destination bucket is owned by a different account, the request fails
547
+ # with the HTTP status code `403 Forbidden` (access denied).
506
548
  # @option options [String] :expected_source_bucket_owner
507
549
  # The account ID of the expected source bucket owner. If the source
508
- # bucket is owned by a different account, the request will fail with an
509
- # HTTP `403 (Access Denied)` error.
550
+ # bucket is owned by a different account, the request fails with the
551
+ # HTTP status code `403 Forbidden` (access denied).
510
552
  # @return [Types::CopyObjectOutput]
511
553
  def copy_from(options = {})
512
554
  options = options.merge(
513
555
  bucket: @bucket_name,
514
556
  key: @key
515
557
  )
516
- resp = @client.copy_object(options)
558
+ resp = Aws::Plugins::UserAgent.feature('resource') do
559
+ @client.copy_object(options)
560
+ end
517
561
  resp.data
518
562
  end
519
563
 
@@ -537,8 +581,8 @@ module Aws::S3
537
581
  # @option options [String] :request_payer
538
582
  # Confirms that the requester knows that they will be charged for the
539
583
  # request. Bucket owners need not specify this parameter in their
540
- # requests. For information about downloading objects from requester
541
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
584
+ # requests. For information about downloading objects from Requester
585
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
542
586
  # in the *Amazon S3 User Guide*.
543
587
  #
544
588
  #
@@ -546,18 +590,21 @@ module Aws::S3
546
590
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
547
591
  # @option options [Boolean] :bypass_governance_retention
548
592
  # Indicates whether S3 Object Lock should bypass Governance-mode
549
- # restrictions to process this operation.
593
+ # restrictions to process this operation. To use this header, you must
594
+ # have the `s3:BypassGovernanceRetention` permission.
550
595
  # @option options [String] :expected_bucket_owner
551
596
  # The account ID of the expected bucket owner. If the bucket is owned by
552
- # a different account, the request will fail with an HTTP `403 (Access
553
- # Denied)` error.
597
+ # a different account, the request fails with the HTTP status code `403
598
+ # Forbidden` (access denied).
554
599
  # @return [Types::DeleteObjectOutput]
555
600
  def delete(options = {})
556
601
  options = options.merge(
557
602
  bucket: @bucket_name,
558
603
  key: @key
559
604
  )
560
- resp = @client.delete_object(options)
605
+ resp = Aws::Plugins::UserAgent.feature('resource') do
606
+ @client.delete_object(options)
607
+ end
561
608
  resp.data
562
609
  end
563
610
 
@@ -582,24 +629,25 @@ module Aws::S3
582
629
  # request_payer: "requester", # accepts requester
583
630
  # part_number: 1,
584
631
  # expected_bucket_owner: "AccountId",
632
+ # checksum_mode: "ENABLED", # accepts ENABLED
585
633
  # })
586
634
  # @param [Hash] options ({})
587
635
  # @option options [String] :if_match
588
636
  # Return the object only if its entity tag (ETag) is the same as the one
589
- # specified, otherwise return a 412 (precondition failed).
637
+ # specified; otherwise, return a 412 (precondition failed) error.
590
638
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
591
639
  # Return the object only if it has been modified since the specified
592
- # time, otherwise return a 304 (not modified).
640
+ # time; otherwise, return a 304 (not modified) error.
593
641
  # @option options [String] :if_none_match
594
642
  # Return the object only if its entity tag (ETag) is different from the
595
- # one specified, otherwise return a 304 (not modified).
643
+ # one specified; otherwise, return a 304 (not modified) error.
596
644
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
597
645
  # Return the object only if it has not been modified since the specified
598
- # time, otherwise return a 412 (precondition failed).
646
+ # time; otherwise, return a 412 (precondition failed) error.
599
647
  # @option options [String] :range
600
648
  # Downloads the specified range bytes of an object. For more information
601
649
  # about the HTTP Range header, see
602
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
650
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
603
651
  #
604
652
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
605
653
  # `GET` request.
@@ -608,7 +656,7 @@ module Aws::S3
608
656
  #
609
657
  #
610
658
  #
611
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
659
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
612
660
  # @option options [String] :response_cache_control
613
661
  # Sets the `Cache-Control` header of the response.
614
662
  # @option options [String] :response_content_disposition
@@ -639,8 +687,8 @@ module Aws::S3
639
687
  # @option options [String] :request_payer
640
688
  # Confirms that the requester knows that they will be charged for the
641
689
  # request. Bucket owners need not specify this parameter in their
642
- # requests. For information about downloading objects from requester
643
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
690
+ # requests. For information about downloading objects from Requester
691
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
644
692
  # in the *Amazon S3 User Guide*.
645
693
  #
646
694
  #
@@ -653,15 +701,19 @@ module Aws::S3
653
701
  # object.
654
702
  # @option options [String] :expected_bucket_owner
655
703
  # The account ID of the expected bucket owner. If the bucket is owned by
656
- # a different account, the request will fail with an HTTP `403 (Access
657
- # Denied)` error.
704
+ # a different account, the request fails with the HTTP status code `403
705
+ # Forbidden` (access denied).
706
+ # @option options [String] :checksum_mode
707
+ # To retrieve the checksum, this mode must be enabled.
658
708
  # @return [Types::GetObjectOutput]
659
709
  def get(options = {}, &block)
660
710
  options = options.merge(
661
711
  bucket: @bucket_name,
662
712
  key: @key
663
713
  )
664
- resp = @client.get_object(options, &block)
714
+ resp = Aws::Plugins::UserAgent.feature('resource') do
715
+ @client.get_object(options, &block)
716
+ end
665
717
  resp.data
666
718
  end
667
719
 
@@ -682,8 +734,8 @@ module Aws::S3
682
734
  # metadata: {
683
735
  # "MetadataKey" => "MetadataValue",
684
736
  # },
685
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
686
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
737
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
738
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
687
739
  # website_redirect_location: "WebsiteRedirectLocation",
688
740
  # sse_customer_algorithm: "SSECustomerAlgorithm",
689
741
  # sse_customer_key: "SSECustomerKey",
@@ -697,6 +749,7 @@ module Aws::S3
697
749
  # object_lock_retain_until_date: Time.now,
698
750
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
699
751
  # expected_bucket_owner: "AccountId",
752
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
700
753
  # })
701
754
  # @param [Hash] options ({})
702
755
  # @option options [String] :acl
@@ -738,7 +791,7 @@ module Aws::S3
738
791
  # A map of metadata to store with the object in S3.
739
792
  # @option options [String] :server_side_encryption
740
793
  # The server-side encryption algorithm used when storing this object in
741
- # Amazon S3 (for example, AES256, aws:kms).
794
+ # Amazon S3 (for example, `AES256`, `aws:kms`).
742
795
  # @option options [String] :storage_class
743
796
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
744
797
  # created objects. The STANDARD storage class provides high durability
@@ -768,33 +821,34 @@ module Aws::S3
768
821
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
769
822
  # ensure that the encryption key was transmitted without error.
770
823
  # @option options [String] :ssekms_key_id
771
- # Specifies the ID of the symmetric customer managed AWS KMS CMK to use
772
- # for object encryption. All GET and PUT requests for an object
773
- # protected by AWS KMS will fail if not made via SSL or using SigV4. For
774
- # information about configuring using any of the officially supported
775
- # AWS SDKs and AWS CLI, see [Specifying the Signature Version in Request
776
- # Authentication][1] in the *Amazon S3 User Guide*.
824
+ # Specifies the ID of the symmetric encryption customer managed key to
825
+ # use for object encryption. All GET and PUT requests for an object
826
+ # protected by KMS will fail if they're not made via SSL or using
827
+ # SigV4. For information about configuring any of the officially
828
+ # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
829
+ # [Specifying the Signature Version in Request Authentication][1] in the
830
+ # *Amazon S3 User Guide*.
777
831
  #
778
832
  #
779
833
  #
780
834
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
781
835
  # @option options [String] :ssekms_encryption_context
782
- # Specifies the AWS KMS Encryption Context to use for object encryption.
783
- # The value of this header is a base64-encoded UTF-8 string holding JSON
784
- # with the encryption context key-value pairs.
836
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
837
+ # object encryption. The value of this header is a base64-encoded UTF-8
838
+ # string holding JSON with the encryption context key-value pairs.
785
839
  # @option options [Boolean] :bucket_key_enabled
786
840
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
787
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
788
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
789
- # for object encryption with SSE-KMS.
841
+ # encryption with server-side encryption using Key Management Service
842
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
843
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
790
844
  #
791
845
  # Specifying this header with an object action doesn’t affect
792
846
  # bucket-level settings for S3 Bucket Key.
793
847
  # @option options [String] :request_payer
794
848
  # Confirms that the requester knows that they will be charged for the
795
849
  # request. Bucket owners need not specify this parameter in their
796
- # requests. For information about downloading objects from requester
797
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
850
+ # requests. For information about downloading objects from Requester
851
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
798
852
  # in the *Amazon S3 User Guide*.
799
853
  #
800
854
  #
@@ -809,19 +863,29 @@ module Aws::S3
809
863
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
810
864
  # Specifies the date and time when you want the Object Lock to expire.
811
865
  # @option options [String] :object_lock_legal_hold_status
812
- # Specifies whether you want to apply a Legal Hold to the uploaded
866
+ # Specifies whether you want to apply a legal hold to the uploaded
813
867
  # object.
814
868
  # @option options [String] :expected_bucket_owner
815
869
  # The account ID of the expected bucket owner. If the bucket is owned by
816
- # a different account, the request will fail with an HTTP `403 (Access
817
- # Denied)` error.
870
+ # a different account, the request fails with the HTTP status code `403
871
+ # Forbidden` (access denied).
872
+ # @option options [String] :checksum_algorithm
873
+ # Indicates the algorithm you want Amazon S3 to use to create the
874
+ # checksum for the object. For more information, see [Checking object
875
+ # integrity][1] in the *Amazon S3 User Guide*.
876
+ #
877
+ #
878
+ #
879
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
818
880
  # @return [MultipartUpload]
819
881
  def initiate_multipart_upload(options = {})
820
882
  options = options.merge(
821
883
  bucket: @bucket_name,
822
884
  key: @key
823
885
  )
824
- resp = @client.create_multipart_upload(options)
886
+ resp = Aws::Plugins::UserAgent.feature('resource') do
887
+ @client.create_multipart_upload(options)
888
+ end
825
889
  MultipartUpload.new(
826
890
  bucket_name: @bucket_name,
827
891
  object_key: @key,
@@ -842,6 +906,11 @@ module Aws::S3
842
906
  # content_length: 1,
843
907
  # content_md5: "ContentMD5",
844
908
  # content_type: "ContentType",
909
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
910
+ # checksum_crc32: "ChecksumCRC32",
911
+ # checksum_crc32c: "ChecksumCRC32C",
912
+ # checksum_sha1: "ChecksumSHA1",
913
+ # checksum_sha256: "ChecksumSHA256",
845
914
  # expires: Time.now,
846
915
  # grant_full_control: "GrantFullControl",
847
916
  # grant_read: "GrantRead",
@@ -850,8 +919,8 @@ module Aws::S3
850
919
  # metadata: {
851
920
  # "MetadataKey" => "MetadataValue",
852
921
  # },
853
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
854
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
922
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
923
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
855
924
  # website_redirect_location: "WebsiteRedirectLocation",
856
925
  # sse_customer_algorithm: "SSECustomerAlgorithm",
857
926
  # sse_customer_key: "SSECustomerKey",
@@ -889,30 +958,30 @@ module Aws::S3
889
958
  # @option options [String] :content_disposition
890
959
  # Specifies presentational information for the object. For more
891
960
  # information, see
892
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
961
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
893
962
  #
894
963
  #
895
964
  #
896
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
965
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
897
966
  # @option options [String] :content_encoding
898
967
  # Specifies what content encodings have been applied to the object and
899
968
  # thus what decoding mechanisms must be applied to obtain the media-type
900
969
  # referenced by the Content-Type header field. For more information, see
901
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
970
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
902
971
  #
903
972
  #
904
973
  #
905
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
974
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
906
975
  # @option options [String] :content_language
907
976
  # The language the content is in.
908
977
  # @option options [Integer] :content_length
909
978
  # Size of the body in bytes. This parameter is useful when the size of
910
979
  # the body cannot be determined automatically. For more information, see
911
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
980
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
912
981
  #
913
982
  #
914
983
  #
915
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
984
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
916
985
  # @option options [String] :content_md5
917
986
  # The base64-encoded 128-bit MD5 digest of the message (without the
918
987
  # headers) according to RFC 1864. This header can be used as a message
@@ -928,19 +997,74 @@ module Aws::S3
928
997
  # @option options [String] :content_type
929
998
  # A standard MIME type describing the format of the contents. For more
930
999
  # information, see
931
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
1000
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
1001
+ #
1002
+ #
932
1003
  #
1004
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
1005
+ # @option options [String] :checksum_algorithm
1006
+ # Indicates the algorithm used to create the checksum for the object
1007
+ # when using the SDK. This header will not provide any additional
1008
+ # functionality if not using the SDK. When sending this header, there
1009
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1010
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1011
+ # `400 Bad Request`. For more information, see [Checking object
1012
+ # integrity][1] in the *Amazon S3 User Guide*.
933
1013
  #
1014
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1015
+ # `ChecksumAlgorithm` parameter.
934
1016
  #
935
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
1017
+ #
1018
+ #
1019
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1020
+ # @option options [String] :checksum_crc32
1021
+ # This header can be used as a data integrity check to verify that the
1022
+ # data received is the same data that was originally sent. This header
1023
+ # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
1024
+ # more information, see [Checking object integrity][1] in the *Amazon S3
1025
+ # User Guide*.
1026
+ #
1027
+ #
1028
+ #
1029
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1030
+ # @option options [String] :checksum_crc32c
1031
+ # This header can be used as a data integrity check to verify that the
1032
+ # data received is the same data that was originally sent. This header
1033
+ # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
1034
+ # For more information, see [Checking object integrity][1] in the
1035
+ # *Amazon S3 User Guide*.
1036
+ #
1037
+ #
1038
+ #
1039
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1040
+ # @option options [String] :checksum_sha1
1041
+ # This header can be used as a data integrity check to verify that the
1042
+ # data received is the same data that was originally sent. This header
1043
+ # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
1044
+ # more information, see [Checking object integrity][1] in the *Amazon S3
1045
+ # User Guide*.
1046
+ #
1047
+ #
1048
+ #
1049
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1050
+ # @option options [String] :checksum_sha256
1051
+ # This header can be used as a data integrity check to verify that the
1052
+ # data received is the same data that was originally sent. This header
1053
+ # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
1054
+ # For more information, see [Checking object integrity][1] in the
1055
+ # *Amazon S3 User Guide*.
1056
+ #
1057
+ #
1058
+ #
1059
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
936
1060
  # @option options [Time,DateTime,Date,Integer,String] :expires
937
1061
  # The date and time at which the object is no longer cacheable. For more
938
1062
  # information, see
939
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
1063
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
940
1064
  #
941
1065
  #
942
1066
  #
943
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
1067
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
944
1068
  # @option options [String] :grant_full_control
945
1069
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
946
1070
  # object.
@@ -962,7 +1086,7 @@ module Aws::S3
962
1086
  # A map of metadata to store with the object in S3.
963
1087
  # @option options [String] :server_side_encryption
964
1088
  # The server-side encryption algorithm used when storing this object in
965
- # Amazon S3 (for example, AES256, aws:kms).
1089
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
966
1090
  # @option options [String] :storage_class
967
1091
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
968
1092
  # created objects. The STANDARD storage class provides high durability
@@ -1013,32 +1137,35 @@ module Aws::S3
1013
1137
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1014
1138
  # ensure that the encryption key was transmitted without error.
1015
1139
  # @option options [String] :ssekms_key_id
1016
- # If `x-amz-server-side-encryption` is present and has the value of
1017
- # `aws:kms`, this header specifies the ID of the AWS Key Management
1018
- # Service (AWS KMS) symmetrical customer managed customer master key
1019
- # (CMK) that was used for the object. If you specify
1020
- # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1021
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the AWS
1022
- # managed CMK in AWS to protect the data. If the KMS key does not exist
1023
- # in the same account issuing the command, you must use the full ARN and
1024
- # not just the ID.
1140
+ # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
1141
+ # `aws:kms:dsse`, this header specifies the ID of the Key Management
1142
+ # Service (KMS) symmetric encryption customer managed key that was used
1143
+ # for the object. If you specify `x-amz-server-side-encryption:aws:kms`
1144
+ # or `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
1145
+ # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1146
+ # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
1147
+ # KMS key does not exist in the same account that's issuing the
1148
+ # command, you must use the full ARN and not just the ID.
1025
1149
  # @option options [String] :ssekms_encryption_context
1026
- # Specifies the AWS KMS Encryption Context to use for object encryption.
1027
- # The value of this header is a base64-encoded UTF-8 string holding JSON
1028
- # with the encryption context key-value pairs.
1150
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1151
+ # object encryption. The value of this header is a base64-encoded UTF-8
1152
+ # string holding JSON with the encryption context key-value pairs. This
1153
+ # value is stored as object metadata and automatically gets passed on to
1154
+ # Amazon Web Services KMS for future `GetObject` or `CopyObject`
1155
+ # operations on this object.
1029
1156
  # @option options [Boolean] :bucket_key_enabled
1030
1157
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1031
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
1032
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1033
- # for object encryption with SSE-KMS.
1158
+ # encryption with server-side encryption using Key Management Service
1159
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
1160
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
1034
1161
  #
1035
1162
  # Specifying this header with a PUT action doesn’t affect bucket-level
1036
1163
  # settings for S3 Bucket Key.
1037
1164
  # @option options [String] :request_payer
1038
1165
  # Confirms that the requester knows that they will be charged for the
1039
1166
  # request. Bucket owners need not specify this parameter in their
1040
- # requests. For information about downloading objects from requester
1041
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1167
+ # requests. For information about downloading objects from Requester
1168
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1042
1169
  # in the *Amazon S3 User Guide*.
1043
1170
  #
1044
1171
  #
@@ -1061,15 +1188,17 @@ module Aws::S3
1061
1188
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1062
1189
  # @option options [String] :expected_bucket_owner
1063
1190
  # The account ID of the expected bucket owner. If the bucket is owned by
1064
- # a different account, the request will fail with an HTTP `403 (Access
1065
- # Denied)` error.
1191
+ # a different account, the request fails with the HTTP status code `403
1192
+ # Forbidden` (access denied).
1066
1193
  # @return [Types::PutObjectOutput]
1067
1194
  def put(options = {})
1068
1195
  options = options.merge(
1069
1196
  bucket: @bucket_name,
1070
1197
  key: @key
1071
1198
  )
1072
- resp = @client.put_object(options)
1199
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1200
+ @client.put_object(options)
1201
+ end
1073
1202
  resp.data
1074
1203
  end
1075
1204
 
@@ -1123,7 +1252,7 @@ module Aws::S3
1123
1252
  # bucket_name: "BucketName", # required
1124
1253
  # prefix: "LocationPrefix", # required
1125
1254
  # encryption: {
1126
- # encryption_type: "AES256", # required, accepts AES256, aws:kms
1255
+ # encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
1127
1256
  # kms_key_id: "SSEKMSKeyId",
1128
1257
  # kms_context: "KMSContext",
1129
1258
  # },
@@ -1154,11 +1283,12 @@ module Aws::S3
1154
1283
  # value: "MetadataValue",
1155
1284
  # },
1156
1285
  # ],
1157
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
1286
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
1158
1287
  # },
1159
1288
  # },
1160
1289
  # },
1161
1290
  # request_payer: "requester", # accepts requester
1291
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1162
1292
  # expected_bucket_owner: "AccountId",
1163
1293
  # })
1164
1294
  # @param [Hash] options ({})
@@ -1169,24 +1299,41 @@ module Aws::S3
1169
1299
  # @option options [String] :request_payer
1170
1300
  # Confirms that the requester knows that they will be charged for the
1171
1301
  # request. Bucket owners need not specify this parameter in their
1172
- # requests. For information about downloading objects from requester
1173
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1302
+ # requests. For information about downloading objects from Requester
1303
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1174
1304
  # in the *Amazon S3 User Guide*.
1175
1305
  #
1176
1306
  #
1177
1307
  #
1178
1308
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1309
+ # @option options [String] :checksum_algorithm
1310
+ # Indicates the algorithm used to create the checksum for the object
1311
+ # when using the SDK. This header will not provide any additional
1312
+ # functionality if not using the SDK. When sending this header, there
1313
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1314
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1315
+ # `400 Bad Request`. For more information, see [Checking object
1316
+ # integrity][1] in the *Amazon S3 User Guide*.
1317
+ #
1318
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1319
+ # `ChecksumAlgorithm` parameter.
1320
+ #
1321
+ #
1322
+ #
1323
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1179
1324
  # @option options [String] :expected_bucket_owner
1180
1325
  # The account ID of the expected bucket owner. If the bucket is owned by
1181
- # a different account, the request will fail with an HTTP `403 (Access
1182
- # Denied)` error.
1326
+ # a different account, the request fails with the HTTP status code `403
1327
+ # Forbidden` (access denied).
1183
1328
  # @return [Types::RestoreObjectOutput]
1184
1329
  def restore_object(options = {})
1185
1330
  options = options.merge(
1186
1331
  bucket: @bucket_name,
1187
1332
  key: @key
1188
1333
  )
1189
- resp = @client.restore_object(options)
1334
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1335
+ @client.restore_object(options)
1336
+ end
1190
1337
  resp.data
1191
1338
  end
1192
1339
 
@@ -1312,6 +1459,7 @@ module Aws::S3
1312
1459
  # request_payer: "requester", # accepts requester
1313
1460
  # bypass_governance_retention: false,
1314
1461
  # expected_bucket_owner: "AccountId",
1462
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1315
1463
  # })
1316
1464
  # @param options ({})
1317
1465
  # @option options [String] :mfa
@@ -1322,8 +1470,8 @@ module Aws::S3
1322
1470
  # @option options [String] :request_payer
1323
1471
  # Confirms that the requester knows that they will be charged for the
1324
1472
  # request. Bucket owners need not specify this parameter in their
1325
- # requests. For information about downloading objects from requester
1326
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1473
+ # requests. For information about downloading objects from Requester
1474
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1327
1475
  # in the *Amazon S3 User Guide*.
1328
1476
  #
1329
1477
  #
@@ -1331,12 +1479,30 @@ module Aws::S3
1331
1479
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1332
1480
  # @option options [Boolean] :bypass_governance_retention
1333
1481
  # Specifies whether you want to delete this object even if it has a
1334
- # Governance-type Object Lock in place. You must have sufficient
1335
- # permissions to perform this operation.
1482
+ # Governance-type Object Lock in place. To use this header, you must
1483
+ # have the `s3:BypassGovernanceRetention` permission.
1336
1484
  # @option options [String] :expected_bucket_owner
1337
1485
  # The account ID of the expected bucket owner. If the bucket is owned by
1338
- # a different account, the request will fail with an HTTP `403 (Access
1339
- # Denied)` error.
1486
+ # a different account, the request fails with the HTTP status code `403
1487
+ # Forbidden` (access denied).
1488
+ # @option options [String] :checksum_algorithm
1489
+ # Indicates the algorithm used to create the checksum for the object
1490
+ # when using the SDK. This header will not provide any additional
1491
+ # functionality if not using the SDK. When sending this header, there
1492
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1493
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1494
+ # `400 Bad Request`. For more information, see [Checking object
1495
+ # integrity][1] in the *Amazon S3 User Guide*.
1496
+ #
1497
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1498
+ # `ChecksumAlgorithm` parameter.
1499
+ #
1500
+ # This checksum algorithm must be the same for all parts and it match
1501
+ # the checksum value supplied in the `CreateMultipartUpload` request.
1502
+ #
1503
+ #
1504
+ #
1505
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1340
1506
  # @return [void]
1341
1507
  def batch_delete!(options = {})
1342
1508
  batch_enum.each do |batch|
@@ -1349,7 +1515,9 @@ module Aws::S3
1349
1515
  key: item.key
1350
1516
  }
1351
1517
  end
1352
- batch[0].client.delete_objects(params)
1518
+ Aws::Plugins::UserAgent.feature('resource') do
1519
+ batch[0].client.delete_objects(params)
1520
+ end
1353
1521
  end
1354
1522
  nil
1355
1523
  end