aws-sdk-s3 1.86.2 → 1.116.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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +913 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/arn/access_point_arn.rb +19 -12
  6. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
  7. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +69 -0
  8. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +15 -12
  9. data/lib/aws-sdk-s3/bucket.rb +145 -47
  10. data/lib/aws-sdk-s3/bucket_acl.rb +27 -8
  11. data/lib/aws-sdk-s3/bucket_cors.rb +28 -11
  12. data/lib/aws-sdk-s3/bucket_lifecycle.rb +30 -11
  13. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +31 -9
  14. data/lib/aws-sdk-s3/bucket_logging.rb +24 -8
  15. data/lib/aws-sdk-s3/bucket_notification.rb +21 -9
  16. data/lib/aws-sdk-s3/bucket_policy.rb +26 -9
  17. data/lib/aws-sdk-s3/bucket_request_payment.rb +26 -10
  18. data/lib/aws-sdk-s3/bucket_tagging.rb +26 -9
  19. data/lib/aws-sdk-s3/bucket_versioning.rb +67 -16
  20. data/lib/aws-sdk-s3/bucket_website.rb +26 -9
  21. data/lib/aws-sdk-s3/client.rb +3633 -1862
  22. data/lib/aws-sdk-s3/client_api.rb +546 -116
  23. data/lib/aws-sdk-s3/customizations/bucket.rb +8 -3
  24. data/lib/aws-sdk-s3/customizations/object.rb +116 -18
  25. data/lib/aws-sdk-s3/encryption/client.rb +1 -1
  26. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
  27. data/lib/aws-sdk-s3/encryptionV2/client.rb +1 -1
  28. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +0 -4
  29. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +3 -3
  30. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +0 -4
  31. data/lib/aws-sdk-s3/errors.rb +1 -1
  32. data/lib/aws-sdk-s3/event_streams.rb +1 -1
  33. data/lib/aws-sdk-s3/file_downloader.rb +7 -2
  34. data/lib/aws-sdk-s3/file_uploader.rb +8 -3
  35. data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -7
  36. data/lib/aws-sdk-s3/multipart_upload.rb +133 -19
  37. data/lib/aws-sdk-s3/multipart_upload_part.rb +141 -21
  38. data/lib/aws-sdk-s3/object.rb +391 -130
  39. data/lib/aws-sdk-s3/object_acl.rb +30 -11
  40. data/lib/aws-sdk-s3/object_summary.rb +243 -115
  41. data/lib/aws-sdk-s3/object_version.rb +80 -53
  42. data/lib/aws-sdk-s3/plugins/accelerate.rb +13 -4
  43. data/lib/aws-sdk-s3/plugins/arn.rb +125 -58
  44. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +1 -1
  45. data/lib/aws-sdk-s3/plugins/dualstack.rb +33 -32
  46. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  47. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +1 -1
  48. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +17 -11
  49. data/lib/aws-sdk-s3/plugins/md5s.rb +5 -3
  50. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
  51. data/lib/aws-sdk-s3/plugins/s3_signer.rb +55 -28
  52. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  53. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  54. data/lib/aws-sdk-s3/presigned_post.rb +38 -19
  55. data/lib/aws-sdk-s3/presigner.rb +33 -30
  56. data/lib/aws-sdk-s3/resource.rb +24 -4
  57. data/lib/aws-sdk-s3/types.rb +3777 -1306
  58. data/lib/aws-sdk-s3/waiters.rb +1 -1
  59. data/lib/aws-sdk-s3.rb +2 -2
  60. metadata +20 -14
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -42,7 +42,7 @@ module Aws::S3
42
42
  @key
43
43
  end
44
44
 
45
- # The date the Object was Last Modified
45
+ # Creation date of the object.
46
46
  # @return [Time]
47
47
  def last_modified
48
48
  data[:last_modified]
@@ -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
@@ -275,6 +284,7 @@ module Aws::S3
275
284
  # object_summary.copy_from({
276
285
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
277
286
  # cache_control: "CacheControl",
287
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
278
288
  # content_disposition: "ContentDisposition",
279
289
  # content_encoding: "ContentEncoding",
280
290
  # content_language: "ContentLanguage",
@@ -295,7 +305,7 @@ module Aws::S3
295
305
  # metadata_directive: "COPY", # accepts COPY, REPLACE
296
306
  # tagging_directive: "COPY", # accepts COPY, REPLACE
297
307
  # 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
308
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
299
309
  # website_redirect_location: "WebsiteRedirectLocation",
300
310
  # sse_customer_algorithm: "SSECustomerAlgorithm",
301
311
  # sse_customer_key: "SSECustomerKey",
@@ -321,6 +331,14 @@ module Aws::S3
321
331
  # This action is not supported by Amazon S3 on Outposts.
322
332
  # @option options [String] :cache_control
323
333
  # Specifies caching behavior along the request/reply chain.
334
+ # @option options [String] :checksum_algorithm
335
+ # Indicates the algorithm you want Amazon S3 to use to create the
336
+ # checksum for the object. For more information, see [Checking object
337
+ # integrity][1] in the *Amazon S3 User Guide*.
338
+ #
339
+ #
340
+ #
341
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
324
342
  # @option options [String] :content_disposition
325
343
  # Specifies presentational information for the object.
326
344
  # @option options [String] :content_encoding
@@ -340,8 +358,8 @@ module Aws::S3
340
358
  # of the source bucket and the key of the source object, separated by
341
359
  # a slash (/). For example, to copy the object `reports/january.pdf`
342
360
  # from the bucket `awsexamplebucket`, use
343
- # `awsexamplebucket/reports/january.pdf`. The value must be URL
344
- # encoded.
361
+ # `awsexamplebucket/reports/january.pdf`. The value must be
362
+ # URL-encoded.
345
363
  #
346
364
  # * For objects accessed through access points, specify the Amazon
347
365
  # Resource Name (ARN) of the object as accessed through the access
@@ -354,7 +372,8 @@ module Aws::S3
354
372
  # The value must be URL encoded.
355
373
  #
356
374
  # <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.
375
+ # source and destination buckets are in the same Amazon Web Services
376
+ # Region.
358
377
  #
359
378
  # </note>
360
379
  #
@@ -365,7 +384,7 @@ module Aws::S3
365
384
  # outpost `my-outpost` owned by account `123456789012` in Region
366
385
  # `us-west-2`, use the URL encoding of
367
386
  # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
368
- # The value must be URL encoded.
387
+ # The value must be URL-encoded.
369
388
  #
370
389
  # To copy a specific version of an object, append
371
390
  # `?versionId=<version-id>` to the value (for example,
@@ -375,7 +394,7 @@ module Aws::S3
375
394
  #
376
395
  #
377
396
  #
378
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html
397
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
379
398
  # @option options [String] :copy_source_if_match
380
399
  # Copies the object if its entity tag (ETag) matches the specified tag.
381
400
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -422,7 +441,7 @@ module Aws::S3
422
441
  # and high availability. Depending on performance needs, you can specify
423
442
  # a different Storage Class. Amazon S3 on Outposts only uses the
424
443
  # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
425
- # in the *Amazon S3 Service Developer Guide*.
444
+ # in the *Amazon S3 User Guide*.
426
445
  #
427
446
  #
428
447
  #
@@ -445,28 +464,29 @@ module Aws::S3
445
464
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
446
465
  # ensure that the encryption key was transmitted without error.
447
466
  # @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
453
- # Developer Guide*.
467
+ # Specifies the Amazon Web Services KMS key ID to use for object
468
+ # encryption. All GET and PUT requests for an object protected by Amazon
469
+ # Web Services KMS will fail if not made via SSL or using SigV4. For
470
+ # information about configuring using any of the officially supported
471
+ # Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying
472
+ # the Signature Version in Request Authentication][1] in the *Amazon S3
473
+ # User Guide*.
454
474
  #
455
475
  #
456
476
  #
457
477
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
458
478
  # @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.
479
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
480
+ # object encryption. The value of this header is a base64-encoded UTF-8
481
+ # string holding JSON with the encryption context key-value pairs.
462
482
  # @option options [Boolean] :bucket_key_enabled
463
483
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
464
484
  # encryption with server-side encryption using AWS KMS (SSE-KMS).
465
485
  # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
466
486
  # for object encryption with SSE-KMS.
467
487
  #
468
- # Specifying this header with a COPY operation doesn’t affect
469
- # bucket-level settings for S3 Bucket Key.
488
+ # Specifying this header with a COPY action doesn’t affect bucket-level
489
+ # settings for S3 Bucket Key.
470
490
  # @option options [String] :copy_source_sse_customer_algorithm
471
491
  # Specifies the algorithm to use when decrypting the source object (for
472
492
  # example, AES256).
@@ -481,9 +501,9 @@ module Aws::S3
481
501
  # @option options [String] :request_payer
482
502
  # Confirms that the requester knows that they will be charged for the
483
503
  # 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]
486
- # in the *Amazon S3 Developer Guide*.
504
+ # requests. For information about downloading objects from Requester
505
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
506
+ # in the *Amazon S3 User Guide*.
487
507
  #
488
508
  #
489
509
  #
@@ -498,15 +518,15 @@ module Aws::S3
498
518
  # The date and time when you want the copied object's Object Lock to
499
519
  # expire.
500
520
  # @option options [String] :object_lock_legal_hold_status
501
- # Specifies whether you want to apply a Legal Hold to the copied object.
521
+ # Specifies whether you want to apply a legal hold to the copied object.
502
522
  # @option options [String] :expected_bucket_owner
503
- # 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.
523
+ # The account ID of the expected destination bucket owner. If the
524
+ # destination bucket is owned by a different account, the request fails
525
+ # with the HTTP status code `403 Forbidden` (access denied).
506
526
  # @option options [String] :expected_source_bucket_owner
507
- # 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.
527
+ # The account ID of the expected source bucket owner. If the source
528
+ # bucket is owned by a different account, the request fails with the
529
+ # HTTP status code `403 Forbidden` (access denied).
510
530
  # @return [Types::CopyObjectOutput]
511
531
  def copy_from(options = {})
512
532
  options = options.merge(
@@ -537,20 +557,21 @@ module Aws::S3
537
557
  # @option options [String] :request_payer
538
558
  # Confirms that the requester knows that they will be charged for the
539
559
  # 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]
542
- # in the *Amazon S3 Developer Guide*.
560
+ # requests. For information about downloading objects from Requester
561
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
562
+ # in the *Amazon S3 User Guide*.
543
563
  #
544
564
  #
545
565
  #
546
566
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
547
567
  # @option options [Boolean] :bypass_governance_retention
548
568
  # Indicates whether S3 Object Lock should bypass Governance-mode
549
- # restrictions to process this operation.
569
+ # restrictions to process this operation. To use this header, you must
570
+ # have the `s3:BypassGovernanceRetention` permission.
550
571
  # @option options [String] :expected_bucket_owner
551
- # 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.
572
+ # The account ID of the expected bucket owner. If the bucket is owned by
573
+ # a different account, the request fails with the HTTP status code `403
574
+ # Forbidden` (access denied).
554
575
  # @return [Types::DeleteObjectOutput]
555
576
  def delete(options = {})
556
577
  options = options.merge(
@@ -582,20 +603,21 @@ module Aws::S3
582
603
  # request_payer: "requester", # accepts requester
583
604
  # part_number: 1,
584
605
  # expected_bucket_owner: "AccountId",
606
+ # checksum_mode: "ENABLED", # accepts ENABLED
585
607
  # })
586
608
  # @param [Hash] options ({})
587
609
  # @option options [String] :if_match
588
610
  # Return the object only if its entity tag (ETag) is the same as the one
589
- # specified, otherwise return a 412 (precondition failed).
611
+ # specified; otherwise, return a 412 (precondition failed) error.
590
612
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
591
613
  # Return the object only if it has been modified since the specified
592
- # time, otherwise return a 304 (not modified).
614
+ # time; otherwise, return a 304 (not modified) error.
593
615
  # @option options [String] :if_none_match
594
616
  # Return the object only if its entity tag (ETag) is different from the
595
- # one specified, otherwise return a 304 (not modified).
617
+ # one specified; otherwise, return a 304 (not modified) error.
596
618
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
597
619
  # Return the object only if it has not been modified since the specified
598
- # time, otherwise return a 412 (precondition failed).
620
+ # time; otherwise, return a 412 (precondition failed) error.
599
621
  # @option options [String] :range
600
622
  # Downloads the specified range bytes of an object. For more information
601
623
  # about the HTTP Range header, see
@@ -624,13 +646,13 @@ module Aws::S3
624
646
  # @option options [String] :version_id
625
647
  # VersionId used to reference a specific version of the object.
626
648
  # @option options [String] :sse_customer_algorithm
627
- # Specifies the algorithm to use to when encrypting the object (for
649
+ # Specifies the algorithm to use to when decrypting the object (for
628
650
  # example, AES256).
629
651
  # @option options [String] :sse_customer_key
630
- # Specifies the customer-provided encryption key for Amazon S3 to use in
631
- # encrypting data. This value is used to store the object and then it is
632
- # discarded; Amazon S3 does not store the encryption key. The key must
633
- # be appropriate for use with the algorithm specified in the
652
+ # Specifies the customer-provided encryption key for Amazon S3 used to
653
+ # encrypt the data. This value is used to decrypt the object when
654
+ # recovering it and must match the one used when storing the data. The
655
+ # key must be appropriate for use with the algorithm specified in the
634
656
  # `x-amz-server-side-encryption-customer-algorithm` header.
635
657
  # @option options [String] :sse_customer_key_md5
636
658
  # Specifies the 128-bit MD5 digest of the encryption key according to
@@ -639,9 +661,9 @@ module Aws::S3
639
661
  # @option options [String] :request_payer
640
662
  # Confirms that the requester knows that they will be charged for the
641
663
  # 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]
644
- # in the *Amazon S3 Developer Guide*.
664
+ # requests. For information about downloading objects from Requester
665
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
666
+ # in the *Amazon S3 User Guide*.
645
667
  #
646
668
  #
647
669
  #
@@ -652,9 +674,11 @@ module Aws::S3
652
674
  # for the part specified. Useful for downloading just a part of an
653
675
  # object.
654
676
  # @option options [String] :expected_bucket_owner
655
- # 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.
677
+ # The account ID of the expected bucket owner. If the bucket is owned by
678
+ # a different account, the request fails with the HTTP status code `403
679
+ # Forbidden` (access denied).
680
+ # @option options [String] :checksum_mode
681
+ # To retrieve the checksum, this mode must be enabled.
658
682
  # @return [Types::GetObjectOutput]
659
683
  def get(options = {}, &block)
660
684
  options = options.merge(
@@ -683,7 +707,7 @@ module Aws::S3
683
707
  # "MetadataKey" => "MetadataValue",
684
708
  # },
685
709
  # 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
710
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
687
711
  # website_redirect_location: "WebsiteRedirectLocation",
688
712
  # sse_customer_algorithm: "SSECustomerAlgorithm",
689
713
  # sse_customer_key: "SSECustomerKey",
@@ -697,6 +721,7 @@ module Aws::S3
697
721
  # object_lock_retain_until_date: Time.now,
698
722
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
699
723
  # expected_bucket_owner: "AccountId",
724
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
700
725
  # })
701
726
  # @param [Hash] options ({})
702
727
  # @option options [String] :acl
@@ -745,7 +770,7 @@ module Aws::S3
745
770
  # and high availability. Depending on performance needs, you can specify
746
771
  # a different Storage Class. Amazon S3 on Outposts only uses the
747
772
  # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
748
- # in the *Amazon S3 Service Developer Guide*.
773
+ # in the *Amazon S3 User Guide*.
749
774
  #
750
775
  #
751
776
  #
@@ -768,34 +793,35 @@ module Aws::S3
768
793
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
769
794
  # ensure that the encryption key was transmitted without error.
770
795
  # @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 Developer Guide*.
796
+ # Specifies the ID of the symmetric customer managed key to use for
797
+ # object encryption. All GET and PUT requests for an object protected by
798
+ # Amazon Web Services KMS will fail if not made via SSL or using SigV4.
799
+ # For information about configuring using any of the officially
800
+ # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
801
+ # [Specifying the Signature Version in Request Authentication][1] in the
802
+ # *Amazon S3 User Guide*.
777
803
  #
778
804
  #
779
805
  #
780
- # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
806
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
781
807
  # @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.
808
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
809
+ # object encryption. The value of this header is a base64-encoded UTF-8
810
+ # string holding JSON with the encryption context key-value pairs.
785
811
  # @option options [Boolean] :bucket_key_enabled
786
812
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
787
813
  # encryption with server-side encryption using AWS KMS (SSE-KMS).
788
814
  # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
789
815
  # for object encryption with SSE-KMS.
790
816
  #
791
- # Specifying this header with an object operation doesn’t affect
817
+ # Specifying this header with an object action doesn’t affect
792
818
  # bucket-level settings for S3 Bucket Key.
793
819
  # @option options [String] :request_payer
794
820
  # Confirms that the requester knows that they will be charged for the
795
821
  # 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]
798
- # in the *Amazon S3 Developer Guide*.
822
+ # requests. For information about downloading objects from Requester
823
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
824
+ # in the *Amazon S3 User Guide*.
799
825
  #
800
826
  #
801
827
  #
@@ -809,12 +835,20 @@ module Aws::S3
809
835
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
810
836
  # Specifies the date and time when you want the Object Lock to expire.
811
837
  # @option options [String] :object_lock_legal_hold_status
812
- # Specifies whether you want to apply a Legal Hold to the uploaded
838
+ # Specifies whether you want to apply a legal hold to the uploaded
813
839
  # object.
814
840
  # @option options [String] :expected_bucket_owner
815
- # 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.
841
+ # The account ID of the expected bucket owner. If the bucket is owned by
842
+ # a different account, the request fails with the HTTP status code `403
843
+ # Forbidden` (access denied).
844
+ # @option options [String] :checksum_algorithm
845
+ # Indicates the algorithm you want Amazon S3 to use to create the
846
+ # checksum for the object. For more information, see [Checking object
847
+ # integrity][1] in the *Amazon S3 User Guide*.
848
+ #
849
+ #
850
+ #
851
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
818
852
  # @return [MultipartUpload]
819
853
  def initiate_multipart_upload(options = {})
820
854
  options = options.merge(
@@ -842,6 +876,11 @@ module Aws::S3
842
876
  # content_length: 1,
843
877
  # content_md5: "ContentMD5",
844
878
  # content_type: "ContentType",
879
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
880
+ # checksum_crc32: "ChecksumCRC32",
881
+ # checksum_crc32c: "ChecksumCRC32C",
882
+ # checksum_sha1: "ChecksumSHA1",
883
+ # checksum_sha256: "ChecksumSHA256",
845
884
  # expires: Time.now,
846
885
  # grant_full_control: "GrantFullControl",
847
886
  # grant_read: "GrantRead",
@@ -851,7 +890,7 @@ module Aws::S3
851
890
  # "MetadataKey" => "MetadataValue",
852
891
  # },
853
892
  # 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
893
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
855
894
  # website_redirect_location: "WebsiteRedirectLocation",
856
895
  # sse_customer_algorithm: "SSECustomerAlgorithm",
857
896
  # sse_customer_key: "SSECustomerKey",
@@ -933,6 +972,61 @@ module Aws::S3
933
972
  #
934
973
  #
935
974
  # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
975
+ # @option options [String] :checksum_algorithm
976
+ # Indicates the algorithm used to create the checksum for the object
977
+ # when using the SDK. This header will not provide any additional
978
+ # functionality if not using the SDK. When sending this header, there
979
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
980
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
981
+ # `400 Bad Request`. For more information, see [Checking object
982
+ # integrity][1] in the *Amazon S3 User Guide*.
983
+ #
984
+ # If you provide an individual checksum, Amazon S3 ignores any provided
985
+ # `ChecksumAlgorithm` parameter.
986
+ #
987
+ #
988
+ #
989
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
990
+ # @option options [String] :checksum_crc32
991
+ # This header can be used as a data integrity check to verify that the
992
+ # data received is the same data that was originally sent. This header
993
+ # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
994
+ # more information, see [Checking object integrity][1] in the *Amazon S3
995
+ # User Guide*.
996
+ #
997
+ #
998
+ #
999
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1000
+ # @option options [String] :checksum_crc32c
1001
+ # This header can be used as a data integrity check to verify that the
1002
+ # data received is the same data that was originally sent. This header
1003
+ # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
1004
+ # For more information, see [Checking object integrity][1] in the
1005
+ # *Amazon S3 User Guide*.
1006
+ #
1007
+ #
1008
+ #
1009
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1010
+ # @option options [String] :checksum_sha1
1011
+ # This header can be used as a data integrity check to verify that the
1012
+ # data received is the same data that was originally sent. This header
1013
+ # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
1014
+ # more information, see [Checking object integrity][1] in the *Amazon S3
1015
+ # User Guide*.
1016
+ #
1017
+ #
1018
+ #
1019
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1020
+ # @option options [String] :checksum_sha256
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, 256-bit SHA-256 digest of the object.
1024
+ # For more information, see [Checking object integrity][1] in the
1025
+ # *Amazon S3 User Guide*.
1026
+ #
1027
+ #
1028
+ #
1029
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
936
1030
  # @option options [Time,DateTime,Date,Integer,String] :expires
937
1031
  # The date and time at which the object is no longer cacheable. For more
938
1032
  # information, see
@@ -969,7 +1063,7 @@ module Aws::S3
969
1063
  # and high availability. Depending on performance needs, you can specify
970
1064
  # a different Storage Class. Amazon S3 on Outposts only uses the
971
1065
  # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
972
- # in the *Amazon S3 Service Developer Guide*.
1066
+ # in the *Amazon S3 User Guide*.
973
1067
  #
974
1068
  #
975
1069
  #
@@ -1014,34 +1108,32 @@ module Aws::S3
1014
1108
  # ensure that the encryption key was transmitted without error.
1015
1109
  # @option options [String] :ssekms_key_id
1016
1110
  # 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.
1020
- #
1021
- # If the value of `x-amz-server-side-encryption` is `aws:kms`, this
1022
- # header specifies the ID of the symmetric customer managed AWS KMS CMK
1023
- # that will be used for the object. If you specify
1111
+ # `aws:kms`, this header specifies the ID of the Amazon Web Services Key
1112
+ # Management Service (Amazon Web Services KMS) symmetrical customer
1113
+ # managed key that was used for the object. If you specify
1024
1114
  # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1025
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the AWS
1026
- # managed CMK in AWS to protect the data.
1115
+ # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1116
+ # Amazon Web Services managed key to protect the data. If the KMS key
1117
+ # does not exist in the same account issuing the command, you must use
1118
+ # the full ARN and not just the ID.
1027
1119
  # @option options [String] :ssekms_encryption_context
1028
- # Specifies the AWS KMS Encryption Context to use for object encryption.
1029
- # The value of this header is a base64-encoded UTF-8 string holding JSON
1030
- # with the encryption context key-value pairs.
1120
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1121
+ # object encryption. The value of this header is a base64-encoded UTF-8
1122
+ # string holding JSON with the encryption context key-value pairs.
1031
1123
  # @option options [Boolean] :bucket_key_enabled
1032
1124
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1033
1125
  # encryption with server-side encryption using AWS KMS (SSE-KMS).
1034
1126
  # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1035
1127
  # for object encryption with SSE-KMS.
1036
1128
  #
1037
- # Specifying this header with a PUT operation doesn’t affect
1038
- # bucket-level settings for S3 Bucket Key.
1129
+ # Specifying this header with a PUT action doesn’t affect bucket-level
1130
+ # settings for S3 Bucket Key.
1039
1131
  # @option options [String] :request_payer
1040
1132
  # Confirms that the requester knows that they will be charged for the
1041
1133
  # request. Bucket owners need not specify this parameter in their
1042
- # requests. For information about downloading objects from requester
1043
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1044
- # in the *Amazon S3 Developer Guide*.
1134
+ # requests. For information about downloading objects from Requester
1135
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1136
+ # in the *Amazon S3 User Guide*.
1045
1137
  #
1046
1138
  #
1047
1139
  #
@@ -1053,6 +1145,7 @@ module Aws::S3
1053
1145
  # The Object Lock mode that you want to apply to this object.
1054
1146
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
1055
1147
  # The date and time when you want this object's Object Lock to expire.
1148
+ # Must be formatted as a timestamp parameter.
1056
1149
  # @option options [String] :object_lock_legal_hold_status
1057
1150
  # Specifies whether a legal hold will be applied to this object. For
1058
1151
  # more information about S3 Object Lock, see [Object Lock][1].
@@ -1061,9 +1154,9 @@ module Aws::S3
1061
1154
  #
1062
1155
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1063
1156
  # @option options [String] :expected_bucket_owner
1064
- # The account id of the expected bucket owner. If the bucket is owned by
1065
- # a different account, the request will fail with an HTTP `403 (Access
1066
- # Denied)` error.
1157
+ # The account ID of the expected bucket owner. If the bucket is owned by
1158
+ # a different account, the request fails with the HTTP status code `403
1159
+ # Forbidden` (access denied).
1067
1160
  # @return [Types::PutObjectOutput]
1068
1161
  def put(options = {})
1069
1162
  options = options.merge(
@@ -1155,11 +1248,12 @@ module Aws::S3
1155
1248
  # value: "MetadataValue",
1156
1249
  # },
1157
1250
  # ],
1158
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
1251
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
1159
1252
  # },
1160
1253
  # },
1161
1254
  # },
1162
1255
  # request_payer: "requester", # accepts requester
1256
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1163
1257
  # expected_bucket_owner: "AccountId",
1164
1258
  # })
1165
1259
  # @param [Hash] options ({})
@@ -1170,17 +1264,32 @@ module Aws::S3
1170
1264
  # @option options [String] :request_payer
1171
1265
  # Confirms that the requester knows that they will be charged for the
1172
1266
  # request. Bucket owners need not specify this parameter in their
1173
- # requests. For information about downloading objects from requester
1174
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1175
- # in the *Amazon S3 Developer Guide*.
1267
+ # requests. For information about downloading objects from Requester
1268
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1269
+ # in the *Amazon S3 User Guide*.
1176
1270
  #
1177
1271
  #
1178
1272
  #
1179
1273
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1274
+ # @option options [String] :checksum_algorithm
1275
+ # Indicates the algorithm used to create the checksum for the object
1276
+ # when using the SDK. This header will not provide any additional
1277
+ # functionality if not using the SDK. When sending this header, there
1278
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1279
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1280
+ # `400 Bad Request`. For more information, see [Checking object
1281
+ # integrity][1] in the *Amazon S3 User Guide*.
1282
+ #
1283
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1284
+ # `ChecksumAlgorithm` parameter.
1285
+ #
1286
+ #
1287
+ #
1288
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1180
1289
  # @option options [String] :expected_bucket_owner
1181
- # The account id of the expected bucket owner. If the bucket is owned by
1182
- # a different account, the request will fail with an HTTP `403 (Access
1183
- # Denied)` error.
1290
+ # The account ID of the expected bucket owner. If the bucket is owned by
1291
+ # a different account, the request fails with the HTTP status code `403
1292
+ # Forbidden` (access denied).
1184
1293
  # @return [Types::RestoreObjectOutput]
1185
1294
  def restore_object(options = {})
1186
1295
  options = options.merge(
@@ -1313,6 +1422,7 @@ module Aws::S3
1313
1422
  # request_payer: "requester", # accepts requester
1314
1423
  # bypass_governance_retention: false,
1315
1424
  # expected_bucket_owner: "AccountId",
1425
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1316
1426
  # })
1317
1427
  # @param options ({})
1318
1428
  # @option options [String] :mfa
@@ -1323,21 +1433,39 @@ module Aws::S3
1323
1433
  # @option options [String] :request_payer
1324
1434
  # Confirms that the requester knows that they will be charged for the
1325
1435
  # request. Bucket owners need not specify this parameter in their
1326
- # requests. For information about downloading objects from requester
1327
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1328
- # in the *Amazon S3 Developer Guide*.
1436
+ # requests. For information about downloading objects from Requester
1437
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1438
+ # in the *Amazon S3 User Guide*.
1329
1439
  #
1330
1440
  #
1331
1441
  #
1332
1442
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1333
1443
  # @option options [Boolean] :bypass_governance_retention
1334
1444
  # Specifies whether you want to delete this object even if it has a
1335
- # Governance-type Object Lock in place. You must have sufficient
1336
- # permissions to perform this operation.
1445
+ # Governance-type Object Lock in place. To use this header, you must
1446
+ # have the `s3:BypassGovernanceRetention` permission.
1337
1447
  # @option options [String] :expected_bucket_owner
1338
- # The account id of the expected bucket owner. If the bucket is owned by
1339
- # a different account, the request will fail with an HTTP `403 (Access
1340
- # Denied)` error.
1448
+ # The account ID of the expected bucket owner. If the bucket is owned by
1449
+ # a different account, the request fails with the HTTP status code `403
1450
+ # Forbidden` (access denied).
1451
+ # @option options [String] :checksum_algorithm
1452
+ # Indicates the algorithm used to create the checksum for the object
1453
+ # when using the SDK. This header will not provide any additional
1454
+ # functionality if not using the SDK. When sending this header, there
1455
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1456
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1457
+ # `400 Bad Request`. For more information, see [Checking object
1458
+ # integrity][1] in the *Amazon S3 User Guide*.
1459
+ #
1460
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1461
+ # `ChecksumAlgorithm` parameter.
1462
+ #
1463
+ # This checksum algorithm must be the same for all parts and it match
1464
+ # the checksum value supplied in the `CreateMultipartUpload` request.
1465
+ #
1466
+ #
1467
+ #
1468
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1341
1469
  # @return [void]
1342
1470
  def batch_delete!(options = {})
1343
1471
  batch_enum.each do |batch|