aws-sdk-s3 1.119.1 → 1.132.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +97 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +108 -55
  5. data/lib/aws-sdk-s3/bucket_acl.rb +9 -3
  6. data/lib/aws-sdk-s3/bucket_cors.rb +12 -4
  7. data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -4
  8. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -4
  9. data/lib/aws-sdk-s3/bucket_logging.rb +9 -3
  10. data/lib/aws-sdk-s3/bucket_notification.rb +9 -3
  11. data/lib/aws-sdk-s3/bucket_policy.rb +12 -4
  12. data/lib/aws-sdk-s3/bucket_request_payment.rb +9 -3
  13. data/lib/aws-sdk-s3/bucket_tagging.rb +12 -4
  14. data/lib/aws-sdk-s3/bucket_versioning.rb +15 -5
  15. data/lib/aws-sdk-s3/bucket_website.rb +12 -4
  16. data/lib/aws-sdk-s3/client.rb +1740 -1441
  17. data/lib/aws-sdk-s3/client_api.rb +24 -0
  18. data/lib/aws-sdk-s3/customizations/bucket.rb +3 -1
  19. data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
  20. data/lib/aws-sdk-s3/customizations/object.rb +49 -18
  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 +6 -2
  24. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  25. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  26. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  27. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  28. data/lib/aws-sdk-s3/endpoint_parameters.rb +4 -0
  29. data/lib/aws-sdk-s3/endpoint_provider.rb +103 -327
  30. data/lib/aws-sdk-s3/endpoints.rb +1 -0
  31. data/lib/aws-sdk-s3/file_downloader.rb +61 -25
  32. data/lib/aws-sdk-s3/file_uploader.rb +8 -6
  33. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +5 -3
  34. data/lib/aws-sdk-s3/multipart_upload.rb +12 -4
  35. data/lib/aws-sdk-s3/multipart_upload_part.rb +10 -4
  36. data/lib/aws-sdk-s3/object.rb +105 -77
  37. data/lib/aws-sdk-s3/object_acl.rb +9 -3
  38. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  39. data/lib/aws-sdk-s3/object_multipart_copier.rb +33 -17
  40. data/lib/aws-sdk-s3/object_summary.rb +103 -64
  41. data/lib/aws-sdk-s3/object_version.rb +35 -9
  42. data/lib/aws-sdk-s3/plugins/s3_signer.rb +13 -11
  43. data/lib/aws-sdk-s3/presigned_post.rb +52 -43
  44. data/lib/aws-sdk-s3/presigner.rb +4 -2
  45. data/lib/aws-sdk-s3/resource.rb +7 -3
  46. data/lib/aws-sdk-s3/types.rb +711 -405
  47. data/lib/aws-sdk-s3.rb +1 -1
  48. metadata +8 -6
@@ -98,6 +98,20 @@ module Aws::S3
98
98
  data[:owner]
99
99
  end
100
100
 
101
+ # Specifies the restoration status of an object. Objects in certain
102
+ # storage classes must be restored before they can be retrieved. For
103
+ # more information about these storage classes and how to work with
104
+ # archived objects, see [ Working with archived objects][1] in the
105
+ # *Amazon S3 User Guide*.
106
+ #
107
+ #
108
+ #
109
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
110
+ # @return [Types::RestoreStatus]
111
+ def restore_status
112
+ data[:restore_status]
113
+ end
114
+
101
115
  # @!endgroup
102
116
 
103
117
  # @return [Client]
@@ -152,8 +166,10 @@ module Aws::S3
152
166
  options, params = separate_params_and_options(options)
153
167
  waiter = Waiters::ObjectExists.new(options)
154
168
  yield_waiter_and_warn(waiter, &block) if block_given?
155
- waiter.wait(params.merge(bucket: @bucket_name,
169
+ Aws::Plugins::UserAgent.feature('resource') do
170
+ waiter.wait(params.merge(bucket: @bucket_name,
156
171
  key: @key))
172
+ end
157
173
  ObjectSummary.new({
158
174
  bucket_name: @bucket_name,
159
175
  key: @key,
@@ -171,8 +187,10 @@ module Aws::S3
171
187
  options, params = separate_params_and_options(options)
172
188
  waiter = Waiters::ObjectNotExists.new(options)
173
189
  yield_waiter_and_warn(waiter, &block) if block_given?
174
- waiter.wait(params.merge(bucket: @bucket_name,
190
+ Aws::Plugins::UserAgent.feature('resource') do
191
+ waiter.wait(params.merge(bucket: @bucket_name,
175
192
  key: @key))
193
+ end
176
194
  ObjectSummary.new({
177
195
  bucket_name: @bucket_name,
178
196
  key: @key,
@@ -274,7 +292,9 @@ module Aws::S3
274
292
  :retry
275
293
  end
276
294
  end
277
- Aws::Waiters::Waiter.new(options).wait({})
295
+ Aws::Plugins::UserAgent.feature('resource') do
296
+ Aws::Waiters::Waiter.new(options).wait({})
297
+ end
278
298
  end
279
299
 
280
300
  # @!group Actions
@@ -304,8 +324,8 @@ module Aws::S3
304
324
  # },
305
325
  # metadata_directive: "COPY", # accepts COPY, REPLACE
306
326
  # tagging_directive: "COPY", # accepts COPY, REPLACE
307
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
308
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
327
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
328
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
309
329
  # website_redirect_location: "WebsiteRedirectLocation",
310
330
  # sse_customer_algorithm: "SSECustomerAlgorithm",
311
331
  # sse_customer_key: "SSECustomerKey",
@@ -352,7 +372,7 @@ module Aws::S3
352
372
  # @option options [required, String] :copy_source
353
373
  # Specifies the source object for the copy operation. You specify the
354
374
  # value in one of two formats, depending on whether you want to access
355
- # the source object through an [access point][1]\:
375
+ # the source object through an [access point][1]:
356
376
  #
357
377
  # * For objects not accessed through an access point, specify the name
358
378
  # of the source bucket and the key of the source object, separated by
@@ -434,7 +454,7 @@ module Aws::S3
434
454
  # or replaced with tag-set provided in the request.
435
455
  # @option options [String] :server_side_encryption
436
456
  # The server-side encryption algorithm used when storing this object in
437
- # Amazon S3 (for example, AES256, aws:kms).
457
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
438
458
  # @option options [String] :storage_class
439
459
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
440
460
  # created objects. The STANDARD storage class provides high durability
@@ -449,7 +469,10 @@ module Aws::S3
449
469
  # @option options [String] :website_redirect_location
450
470
  # If the bucket is configured as a website, redirects requests for this
451
471
  # object to another object in the same bucket or to an external URL.
452
- # Amazon S3 stores the value of this header in the object metadata.
472
+ # Amazon S3 stores the value of this header in the object metadata. This
473
+ # value is unique to each object and is not copied when using the
474
+ # `x-amz-metadata-directive` header. Instead, you may opt to provide
475
+ # this header in combination with the directive.
453
476
  # @option options [String] :sse_customer_algorithm
454
477
  # Specifies the algorithm to use to when encrypting the object (for
455
478
  # example, AES256).
@@ -464,13 +487,12 @@ module Aws::S3
464
487
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
465
488
  # ensure that the encryption key was transmitted without error.
466
489
  # @option options [String] :ssekms_key_id
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*.
490
+ # Specifies the KMS key ID to use for object encryption. All GET and PUT
491
+ # requests for an object protected by KMS will fail if they're not made
492
+ # via SSL or using SigV4. For information about configuring any of the
493
+ # officially supported Amazon Web Services SDKs and Amazon Web Services
494
+ # CLI, see [Specifying the Signature Version in Request
495
+ # Authentication][1] in the *Amazon S3 User Guide*.
474
496
  #
475
497
  #
476
498
  #
@@ -481,9 +503,9 @@ module Aws::S3
481
503
  # string holding JSON with the encryption context key-value pairs.
482
504
  # @option options [Boolean] :bucket_key_enabled
483
505
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
484
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
485
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
486
- # for object encryption with SSE-KMS.
506
+ # encryption with server-side encryption using Key Management Service
507
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
508
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
487
509
  #
488
510
  # Specifying this header with a COPY action doesn’t affect bucket-level
489
511
  # settings for S3 Bucket Key.
@@ -533,7 +555,9 @@ module Aws::S3
533
555
  bucket: @bucket_name,
534
556
  key: @key
535
557
  )
536
- resp = @client.copy_object(options)
558
+ resp = Aws::Plugins::UserAgent.feature('resource') do
559
+ @client.copy_object(options)
560
+ end
537
561
  resp.data
538
562
  end
539
563
 
@@ -578,7 +602,9 @@ module Aws::S3
578
602
  bucket: @bucket_name,
579
603
  key: @key
580
604
  )
581
- resp = @client.delete_object(options)
605
+ resp = Aws::Plugins::UserAgent.feature('resource') do
606
+ @client.delete_object(options)
607
+ end
582
608
  resp.data
583
609
  end
584
610
 
@@ -621,7 +647,7 @@ module Aws::S3
621
647
  # @option options [String] :range
622
648
  # Downloads the specified range bytes of an object. For more information
623
649
  # about the HTTP Range header, see
624
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
650
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
625
651
  #
626
652
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
627
653
  # `GET` request.
@@ -630,7 +656,7 @@ module Aws::S3
630
656
  #
631
657
  #
632
658
  #
633
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
659
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
634
660
  # @option options [String] :response_cache_control
635
661
  # Sets the `Cache-Control` header of the response.
636
662
  # @option options [String] :response_content_disposition
@@ -685,7 +711,9 @@ module Aws::S3
685
711
  bucket: @bucket_name,
686
712
  key: @key
687
713
  )
688
- resp = @client.get_object(options, &block)
714
+ resp = Aws::Plugins::UserAgent.feature('resource') do
715
+ @client.get_object(options, &block)
716
+ end
689
717
  resp.data
690
718
  end
691
719
 
@@ -706,8 +734,8 @@ module Aws::S3
706
734
  # metadata: {
707
735
  # "MetadataKey" => "MetadataValue",
708
736
  # },
709
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
710
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
737
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
738
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
711
739
  # website_redirect_location: "WebsiteRedirectLocation",
712
740
  # sse_customer_algorithm: "SSECustomerAlgorithm",
713
741
  # sse_customer_key: "SSECustomerKey",
@@ -763,7 +791,7 @@ module Aws::S3
763
791
  # A map of metadata to store with the object in S3.
764
792
  # @option options [String] :server_side_encryption
765
793
  # The server-side encryption algorithm used when storing this object in
766
- # Amazon S3 (for example, AES256, aws:kms).
794
+ # Amazon S3 (for example, `AES256`, `aws:kms`).
767
795
  # @option options [String] :storage_class
768
796
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
769
797
  # created objects. The STANDARD storage class provides high durability
@@ -793,10 +821,10 @@ module Aws::S3
793
821
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
794
822
  # ensure that the encryption key was transmitted without error.
795
823
  # @option options [String] :ssekms_key_id
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
824
+ # Specifies the ID of the symmetric encryption customer managed key to
825
+ # use for object encryption. All GET and PUT requests for an object
826
+ # protected by KMS will fail if they're not made via SSL or using
827
+ # SigV4. For information about configuring any of the officially
800
828
  # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
801
829
  # [Specifying the Signature Version in Request Authentication][1] in the
802
830
  # *Amazon S3 User Guide*.
@@ -810,9 +838,9 @@ module Aws::S3
810
838
  # string holding JSON with the encryption context key-value pairs.
811
839
  # @option options [Boolean] :bucket_key_enabled
812
840
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
813
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
814
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
815
- # for object encryption with SSE-KMS.
841
+ # encryption with server-side encryption using Key Management Service
842
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
843
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
816
844
  #
817
845
  # Specifying this header with an object action doesn’t affect
818
846
  # bucket-level settings for S3 Bucket Key.
@@ -855,7 +883,9 @@ module Aws::S3
855
883
  bucket: @bucket_name,
856
884
  key: @key
857
885
  )
858
- resp = @client.create_multipart_upload(options)
886
+ resp = Aws::Plugins::UserAgent.feature('resource') do
887
+ @client.create_multipart_upload(options)
888
+ end
859
889
  MultipartUpload.new(
860
890
  bucket_name: @bucket_name,
861
891
  object_key: @key,
@@ -889,8 +919,8 @@ module Aws::S3
889
919
  # metadata: {
890
920
  # "MetadataKey" => "MetadataValue",
891
921
  # },
892
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
893
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
922
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
923
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
894
924
  # website_redirect_location: "WebsiteRedirectLocation",
895
925
  # sse_customer_algorithm: "SSECustomerAlgorithm",
896
926
  # sse_customer_key: "SSECustomerKey",
@@ -928,30 +958,30 @@ module Aws::S3
928
958
  # @option options [String] :content_disposition
929
959
  # Specifies presentational information for the object. For more
930
960
  # information, see
931
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
961
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
932
962
  #
933
963
  #
934
964
  #
935
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
965
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
936
966
  # @option options [String] :content_encoding
937
967
  # Specifies what content encodings have been applied to the object and
938
968
  # thus what decoding mechanisms must be applied to obtain the media-type
939
969
  # referenced by the Content-Type header field. For more information, see
940
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
970
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
941
971
  #
942
972
  #
943
973
  #
944
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
974
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
945
975
  # @option options [String] :content_language
946
976
  # The language the content is in.
947
977
  # @option options [Integer] :content_length
948
978
  # Size of the body in bytes. This parameter is useful when the size of
949
979
  # the body cannot be determined automatically. For more information, see
950
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
980
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
951
981
  #
952
982
  #
953
983
  #
954
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
984
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
955
985
  # @option options [String] :content_md5
956
986
  # The base64-encoded 128-bit MD5 digest of the message (without the
957
987
  # headers) according to RFC 1864. This header can be used as a message
@@ -967,11 +997,11 @@ module Aws::S3
967
997
  # @option options [String] :content_type
968
998
  # A standard MIME type describing the format of the contents. For more
969
999
  # information, see
970
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
1000
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
971
1001
  #
972
1002
  #
973
1003
  #
974
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
1004
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
975
1005
  # @option options [String] :checksum_algorithm
976
1006
  # Indicates the algorithm used to create the checksum for the object
977
1007
  # when using the SDK. This header will not provide any additional
@@ -1030,11 +1060,11 @@ module Aws::S3
1030
1060
  # @option options [Time,DateTime,Date,Integer,String] :expires
1031
1061
  # The date and time at which the object is no longer cacheable. For more
1032
1062
  # information, see
1033
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
1063
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
1034
1064
  #
1035
1065
  #
1036
1066
  #
1037
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
1067
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
1038
1068
  # @option options [String] :grant_full_control
1039
1069
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
1040
1070
  # object.
@@ -1056,7 +1086,7 @@ module Aws::S3
1056
1086
  # A map of metadata to store with the object in S3.
1057
1087
  # @option options [String] :server_side_encryption
1058
1088
  # The server-side encryption algorithm used when storing this object in
1059
- # Amazon S3 (for example, AES256, aws:kms).
1089
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
1060
1090
  # @option options [String] :storage_class
1061
1091
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1062
1092
  # created objects. The STANDARD storage class provides high durability
@@ -1107,24 +1137,27 @@ module Aws::S3
1107
1137
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1108
1138
  # ensure that the encryption key was transmitted without error.
1109
1139
  # @option options [String] :ssekms_key_id
1110
- # If `x-amz-server-side-encryption` is present and has the value of
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
1114
- # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1140
+ # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
1141
+ # `aws:kms:dsse`, this header specifies the ID of the Key Management
1142
+ # Service (KMS) symmetric encryption customer managed key that was used
1143
+ # for the object. If you specify `x-amz-server-side-encryption:aws:kms`
1144
+ # or `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
1115
1145
  # 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.
1146
+ # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
1147
+ # KMS key does not exist in the same account that's issuing the
1148
+ # command, you must use the full ARN and not just the ID.
1119
1149
  # @option options [String] :ssekms_encryption_context
1120
1150
  # Specifies the Amazon Web Services KMS Encryption Context to use for
1121
1151
  # object encryption. The value of this header is a base64-encoded UTF-8
1122
- # string holding JSON with the encryption context key-value pairs.
1152
+ # string holding JSON with the encryption context key-value pairs. This
1153
+ # value is stored as object metadata and automatically gets passed on to
1154
+ # Amazon Web Services KMS for future `GetObject` or `CopyObject`
1155
+ # operations on this object.
1123
1156
  # @option options [Boolean] :bucket_key_enabled
1124
1157
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1125
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
1126
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1127
- # for object encryption with SSE-KMS.
1158
+ # encryption with server-side encryption using Key Management Service
1159
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
1160
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
1128
1161
  #
1129
1162
  # Specifying this header with a PUT action doesn’t affect bucket-level
1130
1163
  # settings for S3 Bucket Key.
@@ -1163,7 +1196,9 @@ module Aws::S3
1163
1196
  bucket: @bucket_name,
1164
1197
  key: @key
1165
1198
  )
1166
- resp = @client.put_object(options)
1199
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1200
+ @client.put_object(options)
1201
+ end
1167
1202
  resp.data
1168
1203
  end
1169
1204
 
@@ -1217,7 +1252,7 @@ module Aws::S3
1217
1252
  # bucket_name: "BucketName", # required
1218
1253
  # prefix: "LocationPrefix", # required
1219
1254
  # encryption: {
1220
- # encryption_type: "AES256", # required, accepts AES256, aws:kms
1255
+ # encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
1221
1256
  # kms_key_id: "SSEKMSKeyId",
1222
1257
  # kms_context: "KMSContext",
1223
1258
  # },
@@ -1248,7 +1283,7 @@ module Aws::S3
1248
1283
  # value: "MetadataValue",
1249
1284
  # },
1250
1285
  # ],
1251
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
1286
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
1252
1287
  # },
1253
1288
  # },
1254
1289
  # },
@@ -1296,7 +1331,9 @@ module Aws::S3
1296
1331
  bucket: @bucket_name,
1297
1332
  key: @key
1298
1333
  )
1299
- resp = @client.restore_object(options)
1334
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1335
+ @client.restore_object(options)
1336
+ end
1300
1337
  resp.data
1301
1338
  end
1302
1339
 
@@ -1478,7 +1515,9 @@ module Aws::S3
1478
1515
  key: item.key
1479
1516
  }
1480
1517
  end
1481
- batch[0].client.delete_objects(params)
1518
+ Aws::Plugins::UserAgent.feature('resource') do
1519
+ batch[0].client.delete_objects(params)
1520
+ end
1482
1521
  end
1483
1522
  nil
1484
1523
  end
@@ -105,6 +105,20 @@ module Aws::S3
105
105
  data[:owner]
106
106
  end
107
107
 
108
+ # Specifies the restoration status of an object. Objects in certain
109
+ # storage classes must be restored before they can be retrieved. For
110
+ # more information about these storage classes and how to work with
111
+ # archived objects, see [ Working with archived objects][1] in the
112
+ # *Amazon S3 User Guide*.
113
+ #
114
+ #
115
+ #
116
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
117
+ # @return [Types::RestoreStatus]
118
+ def restore_status
119
+ data[:restore_status]
120
+ end
121
+
108
122
  # @!endgroup
109
123
 
110
124
  # @return [Client]
@@ -229,7 +243,9 @@ module Aws::S3
229
243
  :retry
230
244
  end
231
245
  end
232
- Aws::Waiters::Waiter.new(options).wait({})
246
+ Aws::Plugins::UserAgent.feature('resource') do
247
+ Aws::Waiters::Waiter.new(options).wait({})
248
+ end
233
249
  end
234
250
 
235
251
  # @!group Actions
@@ -273,7 +289,9 @@ module Aws::S3
273
289
  key: @object_key,
274
290
  version_id: @id
275
291
  )
276
- resp = @client.delete_object(options)
292
+ resp = Aws::Plugins::UserAgent.feature('resource') do
293
+ @client.delete_object(options)
294
+ end
277
295
  resp.data
278
296
  end
279
297
 
@@ -315,7 +333,7 @@ module Aws::S3
315
333
  # @option options [String] :range
316
334
  # Downloads the specified range bytes of an object. For more information
317
335
  # about the HTTP Range header, see
318
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
336
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
319
337
  #
320
338
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
321
339
  # `GET` request.
@@ -324,7 +342,7 @@ module Aws::S3
324
342
  #
325
343
  #
326
344
  #
327
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
345
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
328
346
  # @option options [String] :response_cache_control
329
347
  # Sets the `Cache-Control` header of the response.
330
348
  # @option options [String] :response_content_disposition
@@ -378,7 +396,9 @@ module Aws::S3
378
396
  key: @object_key,
379
397
  version_id: @id
380
398
  )
381
- resp = @client.get_object(options, &block)
399
+ resp = Aws::Plugins::UserAgent.feature('resource') do
400
+ @client.get_object(options, &block)
401
+ end
382
402
  resp.data
383
403
  end
384
404
 
@@ -412,8 +432,10 @@ module Aws::S3
412
432
  # Return the object only if it has not been modified since the specified
413
433
  # time; otherwise, return a 412 (precondition failed) error.
414
434
  # @option options [String] :range
415
- # Because `HeadObject` returns only the metadata for an object, this
416
- # parameter has no effect.
435
+ # HeadObject returns only the metadata for an object. If the Range is
436
+ # satisfiable, only the `ContentLength` is affected in the response. If
437
+ # the Range is not satisfiable, S3 returns a `416 - Requested Range Not
438
+ # Satisfiable` error.
417
439
  # @option options [String] :sse_customer_algorithm
418
440
  # Specifies the algorithm to use to when encrypting the object (for
419
441
  # example, AES256).
@@ -460,7 +482,9 @@ module Aws::S3
460
482
  key: @object_key,
461
483
  version_id: @id
462
484
  )
463
- resp = @client.head_object(options)
485
+ resp = Aws::Plugins::UserAgent.feature('resource') do
486
+ @client.head_object(options)
487
+ end
464
488
  resp.data
465
489
  end
466
490
 
@@ -589,7 +613,9 @@ module Aws::S3
589
613
  version_id: item.id
590
614
  }
591
615
  end
592
- batch[0].client.delete_objects(params)
616
+ Aws::Plugins::UserAgent.feature('resource') do
617
+ batch[0].client.delete_objects(params)
618
+ end
593
619
  end
594
620
  nil
595
621
  end
@@ -52,7 +52,9 @@ module Aws
52
52
 
53
53
  def check_for_cached_region(context, bucket)
54
54
  cached_region = S3::BUCKET_REGIONS[bucket]
55
- if cached_region && cached_region != context.config.region
55
+ if cached_region &&
56
+ cached_region != context.config.region &&
57
+ !S3Signer.custom_endpoint?(context)
56
58
  context.http_request.endpoint.host = S3Signer.new_hostname(
57
59
  context, cached_region
58
60
  )
@@ -77,7 +79,7 @@ module Aws
77
79
  def handle_region_errors(response)
78
80
  if wrong_sigv4_region?(response) &&
79
81
  !fips_region?(response) &&
80
- !custom_endpoint?(response) &&
82
+ !S3Signer.custom_endpoint?(response.context) &&
81
83
  !expired_credentials?(response)
82
84
  get_region_and_retry(response.context)
83
85
  else
@@ -106,15 +108,6 @@ module Aws
106
108
  resp.context.http_response.body_contents.match(/<Code>ExpiredToken<\/Code>/)
107
109
  end
108
110
 
109
- def custom_endpoint?(resp)
110
- region = resp.context.config.region
111
- partition = Aws::Endpoints::Matchers.aws_partition(region)
112
- endpoint = resp.context.http_request.endpoint
113
-
114
- !endpoint.hostname.include?(partition['dnsSuffix']) &&
115
- !endpoint.hostname.include?(partition['dualStackDnsSuffix'])
116
- end
117
-
118
111
  def wrong_sigv4_region?(resp)
119
112
  resp.context.http_response.status_code == 400 &&
120
113
  (resp.context.http_response.headers['x-amz-bucket-region'] ||
@@ -168,6 +161,15 @@ module Aws
168
161
  context.config.endpoint_provider.resolve_endpoint(endpoint_params)
169
162
  URI(endpoint.url).host
170
163
  end
164
+
165
+ def custom_endpoint?(context)
166
+ region = context.config.region
167
+ partition = Aws::Endpoints::Matchers.aws_partition(region)
168
+ endpoint = context.http_request.endpoint
169
+
170
+ !endpoint.hostname.include?(partition['dnsSuffix']) &&
171
+ !endpoint.hostname.include?(partition['dualStackDnsSuffix'])
172
+ end
171
173
  end
172
174
  end
173
175
  end