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
@@ -57,9 +57,9 @@ module Aws::S3
57
57
  end
58
58
 
59
59
  # If the object expiration is configured (see PUT Bucket lifecycle), the
60
- # response includes this header. It includes the expiry-date and rule-id
61
- # key-value pairs providing object expiration information. The value of
62
- # the rule-id is URL encoded.
60
+ # response includes this header. It includes the `expiry-date` and
61
+ # `rule-id` key-value pairs providing object expiration information. The
62
+ # value of the `rule-id` is URL-encoded.
63
63
  # @return [String]
64
64
  def expiration
65
65
  data[:expiration]
@@ -109,8 +109,64 @@ module Aws::S3
109
109
  data[:content_length]
110
110
  end
111
111
 
112
- # An ETag is an opaque identifier assigned by a web server to a specific
113
- # version of a resource found at a URL.
112
+ # The base64-encoded, 32-bit CRC32 checksum of the object. This will
113
+ # only be present if it was uploaded with the object. With multipart
114
+ # uploads, this may not be a checksum value of the object. For more
115
+ # information about how checksums are calculated with multipart uploads,
116
+ # see [ Checking object integrity][1] in the *Amazon S3 User Guide*.
117
+ #
118
+ #
119
+ #
120
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
121
+ # @return [String]
122
+ def checksum_crc32
123
+ data[:checksum_crc32]
124
+ end
125
+
126
+ # The base64-encoded, 32-bit CRC32C checksum of the object. This will
127
+ # only be present if it was uploaded with the object. With multipart
128
+ # uploads, this may not be a checksum value of the object. For more
129
+ # information about how checksums are calculated with multipart uploads,
130
+ # see [ Checking object integrity][1] in the *Amazon S3 User Guide*.
131
+ #
132
+ #
133
+ #
134
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
135
+ # @return [String]
136
+ def checksum_crc32c
137
+ data[:checksum_crc32c]
138
+ end
139
+
140
+ # The base64-encoded, 160-bit SHA-1 digest of the object. This will only
141
+ # be present if it was uploaded with the object. With multipart uploads,
142
+ # this may not be a checksum value of the object. For more information
143
+ # about how checksums are calculated with multipart uploads, see [
144
+ # Checking object integrity][1] in the *Amazon S3 User Guide*.
145
+ #
146
+ #
147
+ #
148
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
149
+ # @return [String]
150
+ def checksum_sha1
151
+ data[:checksum_sha1]
152
+ end
153
+
154
+ # The base64-encoded, 256-bit SHA-256 digest of the object. This will
155
+ # only be present if it was uploaded with the object. With multipart
156
+ # uploads, this may not be a checksum value of the object. For more
157
+ # information about how checksums are calculated with multipart uploads,
158
+ # see [ Checking object integrity][1] in the *Amazon S3 User Guide*.
159
+ #
160
+ #
161
+ #
162
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
163
+ # @return [String]
164
+ def checksum_sha256
165
+ data[:checksum_sha256]
166
+ end
167
+
168
+ # An entity tag (ETag) is an opaque identifier assigned by a web server
169
+ # to a specific version of a resource found at a URL.
114
170
  # @return [String]
115
171
  def etag
116
172
  data[:etag]
@@ -183,11 +239,8 @@ module Aws::S3
183
239
  data[:website_redirect_location]
184
240
  end
185
241
 
186
- # If the object is stored using server-side encryption either with an
187
- # AWS KMS customer master key (CMK) or an Amazon S3-managed encryption
188
- # key, the response includes this header with the value of the
189
- # server-side encryption algorithm used when storing this object in
190
- # Amazon S3 (for example, AES256, aws:kms).
242
+ # The server-side encryption algorithm used when storing this object in
243
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
191
244
  # @return [String]
192
245
  def server_side_encryption
193
246
  data[:server_side_encryption]
@@ -216,16 +269,16 @@ module Aws::S3
216
269
  data[:sse_customer_key_md5]
217
270
  end
218
271
 
219
- # If present, specifies the ID of the AWS Key Management Service (AWS
220
- # KMS) symmetric customer managed customer master key (CMK) that was
221
- # used for the object.
272
+ # If present, specifies the ID of the Key Management Service (KMS)
273
+ # symmetric encryption customer managed key that was used for the
274
+ # object.
222
275
  # @return [String]
223
276
  def ssekms_key_id
224
277
  data[:ssekms_key_id]
225
278
  end
226
279
 
227
280
  # Indicates whether the object uses an S3 Bucket Key for server-side
228
- # encryption with AWS KMS (SSE-KMS).
281
+ # encryption with Key Management Service (KMS) keys (SSE-KMS).
229
282
  # @return [Boolean]
230
283
  def bucket_key_enabled
231
284
  data[:bucket_key_enabled]
@@ -261,7 +314,7 @@ module Aws::S3
261
314
  # metadata (`HeadObject`) from these buckets, Amazon S3 will return the
262
315
  # `x-amz-replication-status` header in the response as follows:
263
316
  #
264
- # * If requesting an object from the source bucket Amazon S3 will
317
+ # * **If requesting an object from the source bucket**, Amazon S3 will
265
318
  # return the `x-amz-replication-status` header if the object in your
266
319
  # request is eligible for replication.
267
320
  #
@@ -274,12 +327,12 @@ module Aws::S3
274
327
  # value PENDING, COMPLETED or FAILED indicating object replication
275
328
  # status.
276
329
  #
277
- # * If requesting an object from a destination bucket Amazon S3 will
278
- # return the `x-amz-replication-status` header with value REPLICA if
279
- # the object in your request is a replica that Amazon S3 created and
280
- # there is no replica modification replication in progress.
330
+ # * **If requesting an object from a destination bucket**, Amazon S3
331
+ # will return the `x-amz-replication-status` header with value REPLICA
332
+ # if the object in your request is a replica that Amazon S3 created
333
+ # and there is no replica modification replication in progress.
281
334
  #
282
- # * When replicating objects to multiple destination buckets the
335
+ # * **When replicating objects to multiple destination buckets**, the
283
336
  # `x-amz-replication-status` header acts differently. The header of
284
337
  # the source object will only return a value of COMPLETED when
285
338
  # replication is successful to all destinations. The header will
@@ -297,7 +350,9 @@ module Aws::S3
297
350
  data[:replication_status]
298
351
  end
299
352
 
300
- # The count of parts this object has.
353
+ # The count of parts this object has. This value is only returned if you
354
+ # specify `partNumber` in your request and the object was uploaded as a
355
+ # multipart upload.
301
356
  # @return [Integer]
302
357
  def parts_count
303
358
  data[:parts_count]
@@ -352,10 +407,12 @@ module Aws::S3
352
407
  #
353
408
  # @return [self]
354
409
  def load
355
- resp = @client.head_object(
410
+ resp = Aws::Plugins::UserAgent.feature('resource') do
411
+ @client.head_object(
356
412
  bucket: @bucket_name,
357
413
  key: @key
358
414
  )
415
+ end
359
416
  @data = resp.data
360
417
  self
361
418
  end
@@ -400,8 +457,10 @@ module Aws::S3
400
457
  options, params = separate_params_and_options(options)
401
458
  waiter = Waiters::ObjectExists.new(options)
402
459
  yield_waiter_and_warn(waiter, &block) if block_given?
403
- waiter.wait(params.merge(bucket: @bucket_name,
460
+ Aws::Plugins::UserAgent.feature('resource') do
461
+ waiter.wait(params.merge(bucket: @bucket_name,
404
462
  key: @key))
463
+ end
405
464
  Object.new({
406
465
  bucket_name: @bucket_name,
407
466
  key: @key,
@@ -419,8 +478,10 @@ module Aws::S3
419
478
  options, params = separate_params_and_options(options)
420
479
  waiter = Waiters::ObjectNotExists.new(options)
421
480
  yield_waiter_and_warn(waiter, &block) if block_given?
422
- waiter.wait(params.merge(bucket: @bucket_name,
481
+ Aws::Plugins::UserAgent.feature('resource') do
482
+ waiter.wait(params.merge(bucket: @bucket_name,
423
483
  key: @key))
484
+ end
424
485
  Object.new({
425
486
  bucket_name: @bucket_name,
426
487
  key: @key,
@@ -522,7 +583,9 @@ module Aws::S3
522
583
  :retry
523
584
  end
524
585
  end
525
- Aws::Waiters::Waiter.new(options).wait({})
586
+ Aws::Plugins::UserAgent.feature('resource') do
587
+ Aws::Waiters::Waiter.new(options).wait({})
588
+ end
526
589
  end
527
590
 
528
591
  # @!group Actions
@@ -532,6 +595,7 @@ module Aws::S3
532
595
  # object.copy_from({
533
596
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
534
597
  # cache_control: "CacheControl",
598
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
535
599
  # content_disposition: "ContentDisposition",
536
600
  # content_encoding: "ContentEncoding",
537
601
  # content_language: "ContentLanguage",
@@ -551,8 +615,8 @@ module Aws::S3
551
615
  # },
552
616
  # metadata_directive: "COPY", # accepts COPY, REPLACE
553
617
  # tagging_directive: "COPY", # accepts COPY, REPLACE
554
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
555
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
618
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
619
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
556
620
  # website_redirect_location: "WebsiteRedirectLocation",
557
621
  # sse_customer_algorithm: "SSECustomerAlgorithm",
558
622
  # sse_customer_key: "SSECustomerKey",
@@ -578,6 +642,14 @@ module Aws::S3
578
642
  # This action is not supported by Amazon S3 on Outposts.
579
643
  # @option options [String] :cache_control
580
644
  # Specifies caching behavior along the request/reply chain.
645
+ # @option options [String] :checksum_algorithm
646
+ # Indicates the algorithm you want Amazon S3 to use to create the
647
+ # checksum for the object. For more information, see [Checking object
648
+ # integrity][1] in the *Amazon S3 User Guide*.
649
+ #
650
+ #
651
+ #
652
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
581
653
  # @option options [String] :content_disposition
582
654
  # Specifies presentational information for the object.
583
655
  # @option options [String] :content_encoding
@@ -591,14 +663,14 @@ module Aws::S3
591
663
  # @option options [required, String] :copy_source
592
664
  # Specifies the source object for the copy operation. You specify the
593
665
  # value in one of two formats, depending on whether you want to access
594
- # the source object through an [access point][1]\:
666
+ # the source object through an [access point][1]:
595
667
  #
596
668
  # * For objects not accessed through an access point, specify the name
597
669
  # of the source bucket and the key of the source object, separated by
598
670
  # a slash (/). For example, to copy the object `reports/january.pdf`
599
671
  # from the bucket `awsexamplebucket`, use
600
- # `awsexamplebucket/reports/january.pdf`. The value must be URL
601
- # encoded.
672
+ # `awsexamplebucket/reports/january.pdf`. The value must be
673
+ # URL-encoded.
602
674
  #
603
675
  # * For objects accessed through access points, specify the Amazon
604
676
  # Resource Name (ARN) of the object as accessed through the access
@@ -611,7 +683,8 @@ module Aws::S3
611
683
  # The value must be URL encoded.
612
684
  #
613
685
  # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
614
- # source and destination buckets are in the same AWS Region.
686
+ # source and destination buckets are in the same Amazon Web Services
687
+ # Region.
615
688
  #
616
689
  # </note>
617
690
  #
@@ -622,7 +695,7 @@ module Aws::S3
622
695
  # outpost `my-outpost` owned by account `123456789012` in Region
623
696
  # `us-west-2`, use the URL encoding of
624
697
  # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
625
- # The value must be URL encoded.
698
+ # The value must be URL-encoded.
626
699
  #
627
700
  # To copy a specific version of an object, append
628
701
  # `?versionId=<version-id>` to the value (for example,
@@ -672,7 +745,7 @@ module Aws::S3
672
745
  # or replaced with tag-set provided in the request.
673
746
  # @option options [String] :server_side_encryption
674
747
  # The server-side encryption algorithm used when storing this object in
675
- # Amazon S3 (for example, AES256, aws:kms).
748
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
676
749
  # @option options [String] :storage_class
677
750
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
678
751
  # created objects. The STANDARD storage class provides high durability
@@ -687,7 +760,10 @@ module Aws::S3
687
760
  # @option options [String] :website_redirect_location
688
761
  # If the bucket is configured as a website, redirects requests for this
689
762
  # object to another object in the same bucket or to an external URL.
690
- # Amazon S3 stores the value of this header in the object metadata.
763
+ # Amazon S3 stores the value of this header in the object metadata. This
764
+ # value is unique to each object and is not copied when using the
765
+ # `x-amz-metadata-directive` header. Instead, you may opt to provide
766
+ # this header in combination with the directive.
691
767
  # @option options [String] :sse_customer_algorithm
692
768
  # Specifies the algorithm to use to when encrypting the object (for
693
769
  # example, AES256).
@@ -702,25 +778,25 @@ module Aws::S3
702
778
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
703
779
  # ensure that the encryption key was transmitted without error.
704
780
  # @option options [String] :ssekms_key_id
705
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
706
- # PUT requests for an object protected by AWS KMS will fail if not made
707
- # via SSL or using SigV4. For information about configuring using any of
708
- # the officially supported AWS SDKs and AWS CLI, see [Specifying the
709
- # Signature Version in Request Authentication][1] in the *Amazon S3 User
710
- # Guide*.
781
+ # Specifies the KMS key ID to use for object encryption. All GET and PUT
782
+ # requests for an object protected by KMS will fail if they're not made
783
+ # via SSL or using SigV4. For information about configuring any of the
784
+ # officially supported Amazon Web Services SDKs and Amazon Web Services
785
+ # CLI, see [Specifying the Signature Version in Request
786
+ # Authentication][1] in the *Amazon S3 User Guide*.
711
787
  #
712
788
  #
713
789
  #
714
790
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
715
791
  # @option options [String] :ssekms_encryption_context
716
- # Specifies the AWS KMS Encryption Context to use for object encryption.
717
- # The value of this header is a base64-encoded UTF-8 string holding JSON
718
- # with the encryption context key-value pairs.
792
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
793
+ # object encryption. The value of this header is a base64-encoded UTF-8
794
+ # string holding JSON with the encryption context key-value pairs.
719
795
  # @option options [Boolean] :bucket_key_enabled
720
796
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
721
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
722
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
723
- # for object encryption with SSE-KMS.
797
+ # encryption with server-side encryption using Key Management Service
798
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
799
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
724
800
  #
725
801
  # Specifying this header with a COPY action doesn’t affect bucket-level
726
802
  # settings for S3 Bucket Key.
@@ -738,8 +814,8 @@ module Aws::S3
738
814
  # @option options [String] :request_payer
739
815
  # Confirms that the requester knows that they will be charged for the
740
816
  # request. Bucket owners need not specify this parameter in their
741
- # requests. For information about downloading objects from requester
742
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
817
+ # requests. For information about downloading objects from Requester
818
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
743
819
  # in the *Amazon S3 User Guide*.
744
820
  #
745
821
  #
@@ -755,22 +831,24 @@ module Aws::S3
755
831
  # The date and time when you want the copied object's Object Lock to
756
832
  # expire.
757
833
  # @option options [String] :object_lock_legal_hold_status
758
- # Specifies whether you want to apply a Legal Hold to the copied object.
834
+ # Specifies whether you want to apply a legal hold to the copied object.
759
835
  # @option options [String] :expected_bucket_owner
760
836
  # The account ID of the expected destination bucket owner. If the
761
- # destination bucket is owned by a different account, the request will
762
- # fail with an HTTP `403 (Access Denied)` error.
837
+ # destination bucket is owned by a different account, the request fails
838
+ # with the HTTP status code `403 Forbidden` (access denied).
763
839
  # @option options [String] :expected_source_bucket_owner
764
840
  # The account ID of the expected source bucket owner. If the source
765
- # bucket is owned by a different account, the request will fail with an
766
- # HTTP `403 (Access Denied)` error.
841
+ # bucket is owned by a different account, the request fails with the
842
+ # HTTP status code `403 Forbidden` (access denied).
767
843
  # @return [Types::CopyObjectOutput]
768
844
  def copy_from(options = {})
769
845
  options = options.merge(
770
846
  bucket: @bucket_name,
771
847
  key: @key
772
848
  )
773
- resp = @client.copy_object(options)
849
+ resp = Aws::Plugins::UserAgent.feature('resource') do
850
+ @client.copy_object(options)
851
+ end
774
852
  resp.data
775
853
  end
776
854
 
@@ -794,8 +872,8 @@ module Aws::S3
794
872
  # @option options [String] :request_payer
795
873
  # Confirms that the requester knows that they will be charged for the
796
874
  # request. Bucket owners need not specify this parameter in their
797
- # requests. For information about downloading objects from requester
798
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
875
+ # requests. For information about downloading objects from Requester
876
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
799
877
  # in the *Amazon S3 User Guide*.
800
878
  #
801
879
  #
@@ -803,18 +881,21 @@ module Aws::S3
803
881
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
804
882
  # @option options [Boolean] :bypass_governance_retention
805
883
  # Indicates whether S3 Object Lock should bypass Governance-mode
806
- # restrictions to process this operation.
884
+ # restrictions to process this operation. To use this header, you must
885
+ # have the `s3:BypassGovernanceRetention` permission.
807
886
  # @option options [String] :expected_bucket_owner
808
887
  # The account ID of the expected bucket owner. If the bucket is owned by
809
- # a different account, the request will fail with an HTTP `403 (Access
810
- # Denied)` error.
888
+ # a different account, the request fails with the HTTP status code `403
889
+ # Forbidden` (access denied).
811
890
  # @return [Types::DeleteObjectOutput]
812
891
  def delete(options = {})
813
892
  options = options.merge(
814
893
  bucket: @bucket_name,
815
894
  key: @key
816
895
  )
817
- resp = @client.delete_object(options)
896
+ resp = Aws::Plugins::UserAgent.feature('resource') do
897
+ @client.delete_object(options)
898
+ end
818
899
  resp.data
819
900
  end
820
901
 
@@ -839,24 +920,25 @@ module Aws::S3
839
920
  # request_payer: "requester", # accepts requester
840
921
  # part_number: 1,
841
922
  # expected_bucket_owner: "AccountId",
923
+ # checksum_mode: "ENABLED", # accepts ENABLED
842
924
  # })
843
925
  # @param [Hash] options ({})
844
926
  # @option options [String] :if_match
845
927
  # Return the object only if its entity tag (ETag) is the same as the one
846
- # specified, otherwise return a 412 (precondition failed).
928
+ # specified; otherwise, return a 412 (precondition failed) error.
847
929
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
848
930
  # Return the object only if it has been modified since the specified
849
- # time, otherwise return a 304 (not modified).
931
+ # time; otherwise, return a 304 (not modified) error.
850
932
  # @option options [String] :if_none_match
851
933
  # Return the object only if its entity tag (ETag) is different from the
852
- # one specified, otherwise return a 304 (not modified).
934
+ # one specified; otherwise, return a 304 (not modified) error.
853
935
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
854
936
  # Return the object only if it has not been modified since the specified
855
- # time, otherwise return a 412 (precondition failed).
937
+ # time; otherwise, return a 412 (precondition failed) error.
856
938
  # @option options [String] :range
857
939
  # Downloads the specified range bytes of an object. For more information
858
940
  # about the HTTP Range header, see
859
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
941
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
860
942
  #
861
943
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
862
944
  # `GET` request.
@@ -865,7 +947,7 @@ module Aws::S3
865
947
  #
866
948
  #
867
949
  #
868
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
950
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
869
951
  # @option options [String] :response_cache_control
870
952
  # Sets the `Cache-Control` header of the response.
871
953
  # @option options [String] :response_content_disposition
@@ -896,8 +978,8 @@ module Aws::S3
896
978
  # @option options [String] :request_payer
897
979
  # Confirms that the requester knows that they will be charged for the
898
980
  # request. Bucket owners need not specify this parameter in their
899
- # requests. For information about downloading objects from requester
900
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
981
+ # requests. For information about downloading objects from Requester
982
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
901
983
  # in the *Amazon S3 User Guide*.
902
984
  #
903
985
  #
@@ -910,15 +992,19 @@ module Aws::S3
910
992
  # object.
911
993
  # @option options [String] :expected_bucket_owner
912
994
  # The account ID of the expected bucket owner. If the bucket is owned by
913
- # a different account, the request will fail with an HTTP `403 (Access
914
- # Denied)` error.
995
+ # a different account, the request fails with the HTTP status code `403
996
+ # Forbidden` (access denied).
997
+ # @option options [String] :checksum_mode
998
+ # To retrieve the checksum, this mode must be enabled.
915
999
  # @return [Types::GetObjectOutput]
916
1000
  def get(options = {}, &block)
917
1001
  options = options.merge(
918
1002
  bucket: @bucket_name,
919
1003
  key: @key
920
1004
  )
921
- resp = @client.get_object(options, &block)
1005
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1006
+ @client.get_object(options, &block)
1007
+ end
922
1008
  resp.data
923
1009
  end
924
1010
 
@@ -939,8 +1025,8 @@ module Aws::S3
939
1025
  # metadata: {
940
1026
  # "MetadataKey" => "MetadataValue",
941
1027
  # },
942
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
943
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
1028
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
1029
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
944
1030
  # website_redirect_location: "WebsiteRedirectLocation",
945
1031
  # sse_customer_algorithm: "SSECustomerAlgorithm",
946
1032
  # sse_customer_key: "SSECustomerKey",
@@ -954,6 +1040,7 @@ module Aws::S3
954
1040
  # object_lock_retain_until_date: Time.now,
955
1041
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
956
1042
  # expected_bucket_owner: "AccountId",
1043
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
957
1044
  # })
958
1045
  # @param [Hash] options ({})
959
1046
  # @option options [String] :acl
@@ -995,7 +1082,7 @@ module Aws::S3
995
1082
  # A map of metadata to store with the object in S3.
996
1083
  # @option options [String] :server_side_encryption
997
1084
  # The server-side encryption algorithm used when storing this object in
998
- # Amazon S3 (for example, AES256, aws:kms).
1085
+ # Amazon S3 (for example, `AES256`, `aws:kms`).
999
1086
  # @option options [String] :storage_class
1000
1087
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1001
1088
  # created objects. The STANDARD storage class provides high durability
@@ -1025,33 +1112,34 @@ module Aws::S3
1025
1112
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1026
1113
  # ensure that the encryption key was transmitted without error.
1027
1114
  # @option options [String] :ssekms_key_id
1028
- # Specifies the ID of the symmetric customer managed AWS KMS CMK to use
1029
- # for object encryption. All GET and PUT requests for an object
1030
- # protected by AWS KMS will fail if not made via SSL or using SigV4. For
1031
- # information about configuring using any of the officially supported
1032
- # AWS SDKs and AWS CLI, see [Specifying the Signature Version in Request
1033
- # Authentication][1] in the *Amazon S3 User Guide*.
1115
+ # Specifies the ID of the symmetric encryption customer managed key to
1116
+ # use for object encryption. All GET and PUT requests for an object
1117
+ # protected by KMS will fail if they're not made via SSL or using
1118
+ # SigV4. For information about configuring any of the officially
1119
+ # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
1120
+ # [Specifying the Signature Version in Request Authentication][1] in the
1121
+ # *Amazon S3 User Guide*.
1034
1122
  #
1035
1123
  #
1036
1124
  #
1037
1125
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1038
1126
  # @option options [String] :ssekms_encryption_context
1039
- # Specifies the AWS KMS Encryption Context to use for object encryption.
1040
- # The value of this header is a base64-encoded UTF-8 string holding JSON
1041
- # with the encryption context key-value pairs.
1127
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1128
+ # object encryption. The value of this header is a base64-encoded UTF-8
1129
+ # string holding JSON with the encryption context key-value pairs.
1042
1130
  # @option options [Boolean] :bucket_key_enabled
1043
1131
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1044
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
1045
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1046
- # for object encryption with SSE-KMS.
1132
+ # encryption with server-side encryption using Key Management Service
1133
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
1134
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
1047
1135
  #
1048
1136
  # Specifying this header with an object action doesn’t affect
1049
1137
  # bucket-level settings for S3 Bucket Key.
1050
1138
  # @option options [String] :request_payer
1051
1139
  # Confirms that the requester knows that they will be charged for the
1052
1140
  # request. Bucket owners need not specify this parameter in their
1053
- # requests. For information about downloading objects from requester
1054
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1141
+ # requests. For information about downloading objects from Requester
1142
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1055
1143
  # in the *Amazon S3 User Guide*.
1056
1144
  #
1057
1145
  #
@@ -1066,19 +1154,29 @@ module Aws::S3
1066
1154
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
1067
1155
  # Specifies the date and time when you want the Object Lock to expire.
1068
1156
  # @option options [String] :object_lock_legal_hold_status
1069
- # Specifies whether you want to apply a Legal Hold to the uploaded
1157
+ # Specifies whether you want to apply a legal hold to the uploaded
1070
1158
  # object.
1071
1159
  # @option options [String] :expected_bucket_owner
1072
1160
  # The account ID of the expected bucket owner. If the bucket is owned by
1073
- # a different account, the request will fail with an HTTP `403 (Access
1074
- # Denied)` error.
1161
+ # a different account, the request fails with the HTTP status code `403
1162
+ # Forbidden` (access denied).
1163
+ # @option options [String] :checksum_algorithm
1164
+ # Indicates the algorithm you want Amazon S3 to use to create the
1165
+ # checksum for the object. For more information, see [Checking object
1166
+ # integrity][1] in the *Amazon S3 User Guide*.
1167
+ #
1168
+ #
1169
+ #
1170
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1075
1171
  # @return [MultipartUpload]
1076
1172
  def initiate_multipart_upload(options = {})
1077
1173
  options = options.merge(
1078
1174
  bucket: @bucket_name,
1079
1175
  key: @key
1080
1176
  )
1081
- resp = @client.create_multipart_upload(options)
1177
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1178
+ @client.create_multipart_upload(options)
1179
+ end
1082
1180
  MultipartUpload.new(
1083
1181
  bucket_name: @bucket_name,
1084
1182
  object_key: @key,
@@ -1099,6 +1197,11 @@ module Aws::S3
1099
1197
  # content_length: 1,
1100
1198
  # content_md5: "ContentMD5",
1101
1199
  # content_type: "ContentType",
1200
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1201
+ # checksum_crc32: "ChecksumCRC32",
1202
+ # checksum_crc32c: "ChecksumCRC32C",
1203
+ # checksum_sha1: "ChecksumSHA1",
1204
+ # checksum_sha256: "ChecksumSHA256",
1102
1205
  # expires: Time.now,
1103
1206
  # grant_full_control: "GrantFullControl",
1104
1207
  # grant_read: "GrantRead",
@@ -1107,8 +1210,8 @@ module Aws::S3
1107
1210
  # metadata: {
1108
1211
  # "MetadataKey" => "MetadataValue",
1109
1212
  # },
1110
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
1111
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
1213
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
1214
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
1112
1215
  # website_redirect_location: "WebsiteRedirectLocation",
1113
1216
  # sse_customer_algorithm: "SSECustomerAlgorithm",
1114
1217
  # sse_customer_key: "SSECustomerKey",
@@ -1146,30 +1249,30 @@ module Aws::S3
1146
1249
  # @option options [String] :content_disposition
1147
1250
  # Specifies presentational information for the object. For more
1148
1251
  # information, see
1149
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
1252
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
1150
1253
  #
1151
1254
  #
1152
1255
  #
1153
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
1256
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
1154
1257
  # @option options [String] :content_encoding
1155
1258
  # Specifies what content encodings have been applied to the object and
1156
1259
  # thus what decoding mechanisms must be applied to obtain the media-type
1157
1260
  # referenced by the Content-Type header field. For more information, see
1158
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
1261
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
1159
1262
  #
1160
1263
  #
1161
1264
  #
1162
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
1265
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
1163
1266
  # @option options [String] :content_language
1164
1267
  # The language the content is in.
1165
1268
  # @option options [Integer] :content_length
1166
1269
  # Size of the body in bytes. This parameter is useful when the size of
1167
1270
  # the body cannot be determined automatically. For more information, see
1168
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
1271
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
1169
1272
  #
1170
1273
  #
1171
1274
  #
1172
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
1275
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
1173
1276
  # @option options [String] :content_md5
1174
1277
  # The base64-encoded 128-bit MD5 digest of the message (without the
1175
1278
  # headers) according to RFC 1864. This header can be used as a message
@@ -1185,19 +1288,74 @@ module Aws::S3
1185
1288
  # @option options [String] :content_type
1186
1289
  # A standard MIME type describing the format of the contents. For more
1187
1290
  # information, see
1188
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
1291
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
1292
+ #
1293
+ #
1294
+ #
1295
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
1296
+ # @option options [String] :checksum_algorithm
1297
+ # Indicates the algorithm used to create the checksum for the object
1298
+ # when using the SDK. This header will not provide any additional
1299
+ # functionality if not using the SDK. When sending this header, there
1300
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1301
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1302
+ # `400 Bad Request`. For more information, see [Checking object
1303
+ # integrity][1] in the *Amazon S3 User Guide*.
1304
+ #
1305
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1306
+ # `ChecksumAlgorithm` parameter.
1307
+ #
1308
+ #
1309
+ #
1310
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1311
+ # @option options [String] :checksum_crc32
1312
+ # This header can be used as a data integrity check to verify that the
1313
+ # data received is the same data that was originally sent. This header
1314
+ # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
1315
+ # more information, see [Checking object integrity][1] in the *Amazon S3
1316
+ # User Guide*.
1317
+ #
1318
+ #
1189
1319
  #
1320
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1321
+ # @option options [String] :checksum_crc32c
1322
+ # This header can be used as a data integrity check to verify that the
1323
+ # data received is the same data that was originally sent. This header
1324
+ # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
1325
+ # For more information, see [Checking object integrity][1] in the
1326
+ # *Amazon S3 User Guide*.
1190
1327
  #
1191
1328
  #
1192
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
1329
+ #
1330
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1331
+ # @option options [String] :checksum_sha1
1332
+ # This header can be used as a data integrity check to verify that the
1333
+ # data received is the same data that was originally sent. This header
1334
+ # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
1335
+ # more information, see [Checking object integrity][1] in the *Amazon S3
1336
+ # User Guide*.
1337
+ #
1338
+ #
1339
+ #
1340
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1341
+ # @option options [String] :checksum_sha256
1342
+ # This header can be used as a data integrity check to verify that the
1343
+ # data received is the same data that was originally sent. This header
1344
+ # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
1345
+ # For more information, see [Checking object integrity][1] in the
1346
+ # *Amazon S3 User Guide*.
1347
+ #
1348
+ #
1349
+ #
1350
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1193
1351
  # @option options [Time,DateTime,Date,Integer,String] :expires
1194
1352
  # The date and time at which the object is no longer cacheable. For more
1195
1353
  # information, see
1196
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
1354
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
1197
1355
  #
1198
1356
  #
1199
1357
  #
1200
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
1358
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
1201
1359
  # @option options [String] :grant_full_control
1202
1360
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
1203
1361
  # object.
@@ -1219,7 +1377,7 @@ module Aws::S3
1219
1377
  # A map of metadata to store with the object in S3.
1220
1378
  # @option options [String] :server_side_encryption
1221
1379
  # The server-side encryption algorithm used when storing this object in
1222
- # Amazon S3 (for example, AES256, aws:kms).
1380
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
1223
1381
  # @option options [String] :storage_class
1224
1382
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1225
1383
  # created objects. The STANDARD storage class provides high durability
@@ -1270,32 +1428,35 @@ module Aws::S3
1270
1428
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1271
1429
  # ensure that the encryption key was transmitted without error.
1272
1430
  # @option options [String] :ssekms_key_id
1273
- # If `x-amz-server-side-encryption` is present and has the value of
1274
- # `aws:kms`, this header specifies the ID of the AWS Key Management
1275
- # Service (AWS KMS) symmetrical customer managed customer master key
1276
- # (CMK) that was used for the object. If you specify
1277
- # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1278
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the AWS
1279
- # managed CMK in AWS to protect the data. If the KMS key does not exist
1280
- # in the same account issuing the command, you must use the full ARN and
1281
- # not just the ID.
1431
+ # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
1432
+ # `aws:kms:dsse`, this header specifies the ID of the Key Management
1433
+ # Service (KMS) symmetric encryption customer managed key that was used
1434
+ # for the object. If you specify `x-amz-server-side-encryption:aws:kms`
1435
+ # or `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
1436
+ # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1437
+ # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
1438
+ # KMS key does not exist in the same account that's issuing the
1439
+ # command, you must use the full ARN and not just the ID.
1282
1440
  # @option options [String] :ssekms_encryption_context
1283
- # Specifies the AWS KMS Encryption Context to use for object encryption.
1284
- # The value of this header is a base64-encoded UTF-8 string holding JSON
1285
- # with the encryption context key-value pairs.
1441
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1442
+ # object encryption. The value of this header is a base64-encoded UTF-8
1443
+ # string holding JSON with the encryption context key-value pairs. This
1444
+ # value is stored as object metadata and automatically gets passed on to
1445
+ # Amazon Web Services KMS for future `GetObject` or `CopyObject`
1446
+ # operations on this object.
1286
1447
  # @option options [Boolean] :bucket_key_enabled
1287
1448
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1288
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
1289
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1290
- # for object encryption with SSE-KMS.
1449
+ # encryption with server-side encryption using Key Management Service
1450
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
1451
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
1291
1452
  #
1292
1453
  # Specifying this header with a PUT action doesn’t affect bucket-level
1293
1454
  # settings for S3 Bucket Key.
1294
1455
  # @option options [String] :request_payer
1295
1456
  # Confirms that the requester knows that they will be charged for the
1296
1457
  # request. Bucket owners need not specify this parameter in their
1297
- # requests. For information about downloading objects from requester
1298
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1458
+ # requests. For information about downloading objects from Requester
1459
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1299
1460
  # in the *Amazon S3 User Guide*.
1300
1461
  #
1301
1462
  #
@@ -1318,15 +1479,17 @@ module Aws::S3
1318
1479
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1319
1480
  # @option options [String] :expected_bucket_owner
1320
1481
  # The account ID of the expected bucket owner. If the bucket is owned by
1321
- # a different account, the request will fail with an HTTP `403 (Access
1322
- # Denied)` error.
1482
+ # a different account, the request fails with the HTTP status code `403
1483
+ # Forbidden` (access denied).
1323
1484
  # @return [Types::PutObjectOutput]
1324
1485
  def put(options = {})
1325
1486
  options = options.merge(
1326
1487
  bucket: @bucket_name,
1327
1488
  key: @key
1328
1489
  )
1329
- resp = @client.put_object(options)
1490
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1491
+ @client.put_object(options)
1492
+ end
1330
1493
  resp.data
1331
1494
  end
1332
1495
 
@@ -1380,7 +1543,7 @@ module Aws::S3
1380
1543
  # bucket_name: "BucketName", # required
1381
1544
  # prefix: "LocationPrefix", # required
1382
1545
  # encryption: {
1383
- # encryption_type: "AES256", # required, accepts AES256, aws:kms
1546
+ # encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
1384
1547
  # kms_key_id: "SSEKMSKeyId",
1385
1548
  # kms_context: "KMSContext",
1386
1549
  # },
@@ -1411,11 +1574,12 @@ module Aws::S3
1411
1574
  # value: "MetadataValue",
1412
1575
  # },
1413
1576
  # ],
1414
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
1577
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
1415
1578
  # },
1416
1579
  # },
1417
1580
  # },
1418
1581
  # request_payer: "requester", # accepts requester
1582
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1419
1583
  # expected_bucket_owner: "AccountId",
1420
1584
  # })
1421
1585
  # @param [Hash] options ({})
@@ -1426,24 +1590,41 @@ module Aws::S3
1426
1590
  # @option options [String] :request_payer
1427
1591
  # Confirms that the requester knows that they will be charged for the
1428
1592
  # request. Bucket owners need not specify this parameter in their
1429
- # requests. For information about downloading objects from requester
1430
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1593
+ # requests. For information about downloading objects from Requester
1594
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1431
1595
  # in the *Amazon S3 User Guide*.
1432
1596
  #
1433
1597
  #
1434
1598
  #
1435
1599
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1600
+ # @option options [String] :checksum_algorithm
1601
+ # Indicates the algorithm used to create the checksum for the object
1602
+ # when using the SDK. This header will not provide any additional
1603
+ # functionality if not using the SDK. When sending this header, there
1604
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1605
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1606
+ # `400 Bad Request`. For more information, see [Checking object
1607
+ # integrity][1] in the *Amazon S3 User Guide*.
1608
+ #
1609
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1610
+ # `ChecksumAlgorithm` parameter.
1611
+ #
1612
+ #
1613
+ #
1614
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1436
1615
  # @option options [String] :expected_bucket_owner
1437
1616
  # The account ID of the expected bucket owner. If the bucket is owned by
1438
- # a different account, the request will fail with an HTTP `403 (Access
1439
- # Denied)` error.
1617
+ # a different account, the request fails with the HTTP status code `403
1618
+ # Forbidden` (access denied).
1440
1619
  # @return [Types::RestoreObjectOutput]
1441
1620
  def restore_object(options = {})
1442
1621
  options = options.merge(
1443
1622
  bucket: @bucket_name,
1444
1623
  key: @key
1445
1624
  )
1446
- resp = @client.restore_object(options)
1625
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1626
+ @client.restore_object(options)
1627
+ end
1447
1628
  resp.data
1448
1629
  end
1449
1630
 
@@ -1462,33 +1643,26 @@ module Aws::S3
1462
1643
  # request_payer: "requester", # accepts requester
1463
1644
  # part_number: 1,
1464
1645
  # expected_bucket_owner: "AccountId",
1646
+ # checksum_mode: "ENABLED", # accepts ENABLED
1465
1647
  # })
1466
1648
  # @param [Hash] options ({})
1467
1649
  # @option options [String] :if_match
1468
1650
  # Return the object only if its entity tag (ETag) is the same as the one
1469
- # specified, otherwise return a 412 (precondition failed).
1651
+ # specified; otherwise, return a 412 (precondition failed) error.
1470
1652
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
1471
1653
  # Return the object only if it has been modified since the specified
1472
- # time, otherwise return a 304 (not modified).
1654
+ # time; otherwise, return a 304 (not modified) error.
1473
1655
  # @option options [String] :if_none_match
1474
1656
  # Return the object only if its entity tag (ETag) is different from the
1475
- # one specified, otherwise return a 304 (not modified).
1657
+ # one specified; otherwise, return a 304 (not modified) error.
1476
1658
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
1477
1659
  # Return the object only if it has not been modified since the specified
1478
- # time, otherwise return a 412 (precondition failed).
1660
+ # time; otherwise, return a 412 (precondition failed) error.
1479
1661
  # @option options [String] :range
1480
- # Downloads the specified range bytes of an object. For more information
1481
- # about the HTTP Range header, see
1482
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
1483
- #
1484
- # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
1485
- # `GET` request.
1486
- #
1487
- # </note>
1488
- #
1489
- #
1490
- #
1491
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
1662
+ # HeadObject returns only the metadata for an object. If the Range is
1663
+ # satisfiable, only the `ContentLength` is affected in the response. If
1664
+ # the Range is not satisfiable, S3 returns a `416 - Requested Range Not
1665
+ # Satisfiable` error.
1492
1666
  # @option options [String] :version_id
1493
1667
  # VersionId used to reference a specific version of the object.
1494
1668
  # @option options [String] :sse_customer_algorithm
@@ -1507,8 +1681,8 @@ module Aws::S3
1507
1681
  # @option options [String] :request_payer
1508
1682
  # Confirms that the requester knows that they will be charged for the
1509
1683
  # request. Bucket owners need not specify this parameter in their
1510
- # requests. For information about downloading objects from requester
1511
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1684
+ # requests. For information about downloading objects from Requester
1685
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1512
1686
  # in the *Amazon S3 User Guide*.
1513
1687
  #
1514
1688
  #
@@ -1521,15 +1695,24 @@ module Aws::S3
1521
1695
  # the number of parts in this object.
1522
1696
  # @option options [String] :expected_bucket_owner
1523
1697
  # The account ID of the expected bucket owner. If the bucket is owned by
1524
- # a different account, the request will fail with an HTTP `403 (Access
1525
- # Denied)` error.
1698
+ # a different account, the request fails with the HTTP status code `403
1699
+ # Forbidden` (access denied).
1700
+ # @option options [String] :checksum_mode
1701
+ # To retrieve the checksum, this parameter must be enabled.
1702
+ #
1703
+ # In addition, if you enable `ChecksumMode` and the object is encrypted
1704
+ # with Amazon Web Services Key Management Service (Amazon Web Services
1705
+ # KMS), you must have permission to use the `kms:Decrypt` action for the
1706
+ # request to succeed.
1526
1707
  # @return [Types::HeadObjectOutput]
1527
1708
  def head(options = {})
1528
1709
  options = options.merge(
1529
1710
  bucket: @bucket_name,
1530
1711
  key: @key
1531
1712
  )
1532
- resp = @client.head_object(options)
1713
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1714
+ @client.head_object(options)
1715
+ end
1533
1716
  resp.data
1534
1717
  end
1535
1718
 
@@ -1646,6 +1829,7 @@ module Aws::S3
1646
1829
  # request_payer: "requester", # accepts requester
1647
1830
  # bypass_governance_retention: false,
1648
1831
  # expected_bucket_owner: "AccountId",
1832
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1649
1833
  # })
1650
1834
  # @param options ({})
1651
1835
  # @option options [String] :mfa
@@ -1656,8 +1840,8 @@ module Aws::S3
1656
1840
  # @option options [String] :request_payer
1657
1841
  # Confirms that the requester knows that they will be charged for the
1658
1842
  # request. Bucket owners need not specify this parameter in their
1659
- # requests. For information about downloading objects from requester
1660
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1843
+ # requests. For information about downloading objects from Requester
1844
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1661
1845
  # in the *Amazon S3 User Guide*.
1662
1846
  #
1663
1847
  #
@@ -1665,12 +1849,30 @@ module Aws::S3
1665
1849
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1666
1850
  # @option options [Boolean] :bypass_governance_retention
1667
1851
  # Specifies whether you want to delete this object even if it has a
1668
- # Governance-type Object Lock in place. You must have sufficient
1669
- # permissions to perform this operation.
1852
+ # Governance-type Object Lock in place. To use this header, you must
1853
+ # have the `s3:BypassGovernanceRetention` permission.
1670
1854
  # @option options [String] :expected_bucket_owner
1671
1855
  # The account ID of the expected bucket owner. If the bucket is owned by
1672
- # a different account, the request will fail with an HTTP `403 (Access
1673
- # Denied)` error.
1856
+ # a different account, the request fails with the HTTP status code `403
1857
+ # Forbidden` (access denied).
1858
+ # @option options [String] :checksum_algorithm
1859
+ # Indicates the algorithm used to create the checksum for the object
1860
+ # when using the SDK. This header will not provide any additional
1861
+ # functionality if not using the SDK. When sending this header, there
1862
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1863
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1864
+ # `400 Bad Request`. For more information, see [Checking object
1865
+ # integrity][1] in the *Amazon S3 User Guide*.
1866
+ #
1867
+ # If you provide an individual checksum, Amazon S3 ignores any provided
1868
+ # `ChecksumAlgorithm` parameter.
1869
+ #
1870
+ # This checksum algorithm must be the same for all parts and it match
1871
+ # the checksum value supplied in the `CreateMultipartUpload` request.
1872
+ #
1873
+ #
1874
+ #
1875
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1674
1876
  # @return [void]
1675
1877
  def batch_delete!(options = {})
1676
1878
  batch_enum.each do |batch|
@@ -1683,7 +1885,9 @@ module Aws::S3
1683
1885
  key: item.key
1684
1886
  }
1685
1887
  end
1686
- batch[0].client.delete_objects(params)
1888
+ Aws::Plugins::UserAgent.feature('resource') do
1889
+ batch[0].client.delete_objects(params)
1890
+ end
1687
1891
  end
1688
1892
  nil
1689
1893
  end