aws-sdk-s3 1.113.0 → 1.129.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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +131 -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 +1869 -1550
  17. data/lib/aws-sdk-s3/client_api.rb +213 -189
  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 +32 -19
  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 +142 -0
  29. data/lib/aws-sdk-s3/endpoint_provider.rb +733 -0
  30. data/lib/aws-sdk-s3/endpoints.rb +2150 -0
  31. data/lib/aws-sdk-s3/file_downloader.rb +28 -24
  32. data/lib/aws-sdk-s3/file_uploader.rb +8 -6
  33. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +41 -13
  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 +11 -5
  40. data/lib/aws-sdk-s3/object_summary.rb +106 -65
  41. data/lib/aws-sdk-s3/object_version.rb +35 -9
  42. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -50
  43. data/lib/aws-sdk-s3/plugins/arn.rb +0 -184
  44. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  45. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  46. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -49
  47. data/lib/aws-sdk-s3/plugins/endpoints.rb +262 -0
  48. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  49. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +0 -29
  50. data/lib/aws-sdk-s3/plugins/s3_signer.rb +35 -124
  51. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  52. data/lib/aws-sdk-s3/presigned_post.rb +61 -59
  53. data/lib/aws-sdk-s3/presigner.rb +24 -35
  54. data/lib/aws-sdk-s3/resource.rb +7 -3
  55. data/lib/aws-sdk-s3/types.rb +714 -4040
  56. data/lib/aws-sdk-s3.rb +5 -1
  57. metadata +12 -11
  58. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  59. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -68
  60. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  61. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -74
  62. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -66,7 +66,9 @@ module Aws::S3
66
66
  #
67
67
  # * If an object is created by either the Multipart Upload or Part Copy
68
68
  # operation, the ETag is not an MD5 digest, regardless of the method
69
- # 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.
70
72
  # @return [String]
71
73
  def etag
72
74
  data[:etag]
@@ -96,6 +98,20 @@ module Aws::S3
96
98
  data[:owner]
97
99
  end
98
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
+
99
115
  # @!endgroup
100
116
 
101
117
  # @return [Client]
@@ -150,8 +166,10 @@ module Aws::S3
150
166
  options, params = separate_params_and_options(options)
151
167
  waiter = Waiters::ObjectExists.new(options)
152
168
  yield_waiter_and_warn(waiter, &block) if block_given?
153
- waiter.wait(params.merge(bucket: @bucket_name,
169
+ Aws::Plugins::UserAgent.feature('resource') do
170
+ waiter.wait(params.merge(bucket: @bucket_name,
154
171
  key: @key))
172
+ end
155
173
  ObjectSummary.new({
156
174
  bucket_name: @bucket_name,
157
175
  key: @key,
@@ -169,8 +187,10 @@ module Aws::S3
169
187
  options, params = separate_params_and_options(options)
170
188
  waiter = Waiters::ObjectNotExists.new(options)
171
189
  yield_waiter_and_warn(waiter, &block) if block_given?
172
- waiter.wait(params.merge(bucket: @bucket_name,
190
+ Aws::Plugins::UserAgent.feature('resource') do
191
+ waiter.wait(params.merge(bucket: @bucket_name,
173
192
  key: @key))
193
+ end
174
194
  ObjectSummary.new({
175
195
  bucket_name: @bucket_name,
176
196
  key: @key,
@@ -272,7 +292,9 @@ module Aws::S3
272
292
  :retry
273
293
  end
274
294
  end
275
- Aws::Waiters::Waiter.new(options).wait({})
295
+ Aws::Plugins::UserAgent.feature('resource') do
296
+ Aws::Waiters::Waiter.new(options).wait({})
297
+ end
276
298
  end
277
299
 
278
300
  # @!group Actions
@@ -302,8 +324,8 @@ module Aws::S3
302
324
  # },
303
325
  # metadata_directive: "COPY", # accepts COPY, REPLACE
304
326
  # tagging_directive: "COPY", # accepts COPY, REPLACE
305
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
306
- # 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
307
329
  # website_redirect_location: "WebsiteRedirectLocation",
308
330
  # sse_customer_algorithm: "SSECustomerAlgorithm",
309
331
  # sse_customer_key: "SSECustomerKey",
@@ -350,7 +372,7 @@ module Aws::S3
350
372
  # @option options [required, String] :copy_source
351
373
  # Specifies the source object for the copy operation. You specify the
352
374
  # value in one of two formats, depending on whether you want to access
353
- # the source object through an [access point][1]\:
375
+ # the source object through an [access point][1]:
354
376
  #
355
377
  # * For objects not accessed through an access point, specify the name
356
378
  # of the source bucket and the key of the source object, separated by
@@ -432,7 +454,7 @@ module Aws::S3
432
454
  # or replaced with tag-set provided in the request.
433
455
  # @option options [String] :server_side_encryption
434
456
  # The server-side encryption algorithm used when storing this object in
435
- # Amazon S3 (for example, AES256, aws:kms).
457
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
436
458
  # @option options [String] :storage_class
437
459
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
438
460
  # created objects. The STANDARD storage class provides high durability
@@ -447,7 +469,10 @@ module Aws::S3
447
469
  # @option options [String] :website_redirect_location
448
470
  # If the bucket is configured as a website, redirects requests for this
449
471
  # object to another object in the same bucket or to an external URL.
450
- # 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.
451
476
  # @option options [String] :sse_customer_algorithm
452
477
  # Specifies the algorithm to use to when encrypting the object (for
453
478
  # example, AES256).
@@ -462,13 +487,12 @@ module Aws::S3
462
487
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
463
488
  # ensure that the encryption key was transmitted without error.
464
489
  # @option options [String] :ssekms_key_id
465
- # Specifies the Amazon Web Services KMS key ID to use for object
466
- # encryption. All GET and PUT requests for an object protected by Amazon
467
- # Web Services KMS will fail if not made via SSL or using SigV4. For
468
- # information about configuring using any of the officially supported
469
- # Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying
470
- # the Signature Version in Request Authentication][1] in the *Amazon S3
471
- # 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*.
472
496
  #
473
497
  #
474
498
  #
@@ -479,9 +503,9 @@ module Aws::S3
479
503
  # string holding JSON with the encryption context key-value pairs.
480
504
  # @option options [Boolean] :bucket_key_enabled
481
505
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
482
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
483
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
484
- # 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.
485
509
  #
486
510
  # Specifying this header with a COPY action doesn’t affect bucket-level
487
511
  # settings for S3 Bucket Key.
@@ -531,7 +555,9 @@ module Aws::S3
531
555
  bucket: @bucket_name,
532
556
  key: @key
533
557
  )
534
- resp = @client.copy_object(options)
558
+ resp = Aws::Plugins::UserAgent.feature('resource') do
559
+ @client.copy_object(options)
560
+ end
535
561
  resp.data
536
562
  end
537
563
 
@@ -576,7 +602,9 @@ module Aws::S3
576
602
  bucket: @bucket_name,
577
603
  key: @key
578
604
  )
579
- resp = @client.delete_object(options)
605
+ resp = Aws::Plugins::UserAgent.feature('resource') do
606
+ @client.delete_object(options)
607
+ end
580
608
  resp.data
581
609
  end
582
610
 
@@ -619,7 +647,7 @@ module Aws::S3
619
647
  # @option options [String] :range
620
648
  # Downloads the specified range bytes of an object. For more information
621
649
  # about the HTTP Range header, see
622
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
650
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
623
651
  #
624
652
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
625
653
  # `GET` request.
@@ -628,7 +656,7 @@ module Aws::S3
628
656
  #
629
657
  #
630
658
  #
631
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
659
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
632
660
  # @option options [String] :response_cache_control
633
661
  # Sets the `Cache-Control` header of the response.
634
662
  # @option options [String] :response_content_disposition
@@ -683,7 +711,9 @@ module Aws::S3
683
711
  bucket: @bucket_name,
684
712
  key: @key
685
713
  )
686
- resp = @client.get_object(options, &block)
714
+ resp = Aws::Plugins::UserAgent.feature('resource') do
715
+ @client.get_object(options, &block)
716
+ end
687
717
  resp.data
688
718
  end
689
719
 
@@ -704,8 +734,8 @@ module Aws::S3
704
734
  # metadata: {
705
735
  # "MetadataKey" => "MetadataValue",
706
736
  # },
707
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
708
- # 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
709
739
  # website_redirect_location: "WebsiteRedirectLocation",
710
740
  # sse_customer_algorithm: "SSECustomerAlgorithm",
711
741
  # sse_customer_key: "SSECustomerKey",
@@ -761,7 +791,7 @@ module Aws::S3
761
791
  # A map of metadata to store with the object in S3.
762
792
  # @option options [String] :server_side_encryption
763
793
  # The server-side encryption algorithm used when storing this object in
764
- # Amazon S3 (for example, AES256, aws:kms).
794
+ # Amazon S3 (for example, `AES256`, `aws:kms`).
765
795
  # @option options [String] :storage_class
766
796
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
767
797
  # created objects. The STANDARD storage class provides high durability
@@ -791,10 +821,10 @@ module Aws::S3
791
821
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
792
822
  # ensure that the encryption key was transmitted without error.
793
823
  # @option options [String] :ssekms_key_id
794
- # Specifies the ID of the symmetric customer managed key to use for
795
- # object encryption. All GET and PUT requests for an object protected by
796
- # Amazon Web Services KMS will fail if not made via SSL or using SigV4.
797
- # 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
798
828
  # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
799
829
  # [Specifying the Signature Version in Request Authentication][1] in the
800
830
  # *Amazon S3 User Guide*.
@@ -808,9 +838,9 @@ module Aws::S3
808
838
  # string holding JSON with the encryption context key-value pairs.
809
839
  # @option options [Boolean] :bucket_key_enabled
810
840
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
811
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
812
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
813
- # 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.
814
844
  #
815
845
  # Specifying this header with an object action doesn’t affect
816
846
  # bucket-level settings for S3 Bucket Key.
@@ -853,7 +883,9 @@ module Aws::S3
853
883
  bucket: @bucket_name,
854
884
  key: @key
855
885
  )
856
- resp = @client.create_multipart_upload(options)
886
+ resp = Aws::Plugins::UserAgent.feature('resource') do
887
+ @client.create_multipart_upload(options)
888
+ end
857
889
  MultipartUpload.new(
858
890
  bucket_name: @bucket_name,
859
891
  object_key: @key,
@@ -887,8 +919,8 @@ module Aws::S3
887
919
  # metadata: {
888
920
  # "MetadataKey" => "MetadataValue",
889
921
  # },
890
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
891
- # 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
892
924
  # website_redirect_location: "WebsiteRedirectLocation",
893
925
  # sse_customer_algorithm: "SSECustomerAlgorithm",
894
926
  # sse_customer_key: "SSECustomerKey",
@@ -926,30 +958,30 @@ module Aws::S3
926
958
  # @option options [String] :content_disposition
927
959
  # Specifies presentational information for the object. For more
928
960
  # information, see
929
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
961
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
930
962
  #
931
963
  #
932
964
  #
933
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
965
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
934
966
  # @option options [String] :content_encoding
935
967
  # Specifies what content encodings have been applied to the object and
936
968
  # thus what decoding mechanisms must be applied to obtain the media-type
937
969
  # referenced by the Content-Type header field. For more information, see
938
- # [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].
939
971
  #
940
972
  #
941
973
  #
942
- # [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
943
975
  # @option options [String] :content_language
944
976
  # The language the content is in.
945
977
  # @option options [Integer] :content_length
946
978
  # Size of the body in bytes. This parameter is useful when the size of
947
979
  # the body cannot be determined automatically. For more information, see
948
- # [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].
949
981
  #
950
982
  #
951
983
  #
952
- # [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
953
985
  # @option options [String] :content_md5
954
986
  # The base64-encoded 128-bit MD5 digest of the message (without the
955
987
  # headers) according to RFC 1864. This header can be used as a message
@@ -965,11 +997,11 @@ module Aws::S3
965
997
  # @option options [String] :content_type
966
998
  # A standard MIME type describing the format of the contents. For more
967
999
  # information, see
968
- # [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].
969
1001
  #
970
1002
  #
971
1003
  #
972
- # [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
973
1005
  # @option options [String] :checksum_algorithm
974
1006
  # Indicates the algorithm used to create the checksum for the object
975
1007
  # when using the SDK. This header will not provide any additional
@@ -1028,11 +1060,11 @@ module Aws::S3
1028
1060
  # @option options [Time,DateTime,Date,Integer,String] :expires
1029
1061
  # The date and time at which the object is no longer cacheable. For more
1030
1062
  # information, see
1031
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
1063
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
1032
1064
  #
1033
1065
  #
1034
1066
  #
1035
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
1067
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
1036
1068
  # @option options [String] :grant_full_control
1037
1069
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
1038
1070
  # object.
@@ -1054,7 +1086,7 @@ module Aws::S3
1054
1086
  # A map of metadata to store with the object in S3.
1055
1087
  # @option options [String] :server_side_encryption
1056
1088
  # The server-side encryption algorithm used when storing this object in
1057
- # Amazon S3 (for example, AES256, aws:kms).
1089
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
1058
1090
  # @option options [String] :storage_class
1059
1091
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1060
1092
  # created objects. The STANDARD storage class provides high durability
@@ -1105,24 +1137,27 @@ module Aws::S3
1105
1137
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1106
1138
  # ensure that the encryption key was transmitted without error.
1107
1139
  # @option options [String] :ssekms_key_id
1108
- # If `x-amz-server-side-encryption` is present and has the value of
1109
- # `aws:kms`, this header specifies the ID of the Amazon Web Services Key
1110
- # Management Service (Amazon Web Services KMS) symmetrical customer
1111
- # managed key that was used for the object. If you specify
1112
- # `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`
1113
1145
  # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1114
- # Amazon Web Services managed key to protect the data. If the KMS key
1115
- # does not exist in the same account issuing the command, you must use
1116
- # 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.
1117
1149
  # @option options [String] :ssekms_encryption_context
1118
1150
  # Specifies the Amazon Web Services KMS Encryption Context to use for
1119
1151
  # object encryption. The value of this header is a base64-encoded UTF-8
1120
- # 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.
1121
1156
  # @option options [Boolean] :bucket_key_enabled
1122
1157
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1123
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
1124
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1125
- # 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.
1126
1161
  #
1127
1162
  # Specifying this header with a PUT action doesn’t affect bucket-level
1128
1163
  # settings for S3 Bucket Key.
@@ -1161,7 +1196,9 @@ module Aws::S3
1161
1196
  bucket: @bucket_name,
1162
1197
  key: @key
1163
1198
  )
1164
- resp = @client.put_object(options)
1199
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1200
+ @client.put_object(options)
1201
+ end
1165
1202
  resp.data
1166
1203
  end
1167
1204
 
@@ -1215,7 +1252,7 @@ module Aws::S3
1215
1252
  # bucket_name: "BucketName", # required
1216
1253
  # prefix: "LocationPrefix", # required
1217
1254
  # encryption: {
1218
- # encryption_type: "AES256", # required, accepts AES256, aws:kms
1255
+ # encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
1219
1256
  # kms_key_id: "SSEKMSKeyId",
1220
1257
  # kms_context: "KMSContext",
1221
1258
  # },
@@ -1246,7 +1283,7 @@ module Aws::S3
1246
1283
  # value: "MetadataValue",
1247
1284
  # },
1248
1285
  # ],
1249
- # 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
1250
1287
  # },
1251
1288
  # },
1252
1289
  # },
@@ -1294,7 +1331,9 @@ module Aws::S3
1294
1331
  bucket: @bucket_name,
1295
1332
  key: @key
1296
1333
  )
1297
- resp = @client.restore_object(options)
1334
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1335
+ @client.restore_object(options)
1336
+ end
1298
1337
  resp.data
1299
1338
  end
1300
1339
 
@@ -1476,7 +1515,9 @@ module Aws::S3
1476
1515
  key: item.key
1477
1516
  }
1478
1517
  end
1479
- batch[0].client.delete_objects(params)
1518
+ Aws::Plugins::UserAgent.feature('resource') do
1519
+ batch[0].client.delete_objects(params)
1520
+ end
1480
1521
  end
1481
1522
  nil
1482
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
@@ -23,73 +23,26 @@ each bucket. [Go here for more information](http://docs.aws.amazon.com/AmazonS3/
23
23
  operations = config.api.operation_names - [
24
24
  :create_bucket, :list_buckets, :delete_bucket
25
25
  ]
26
- # Need 2 handlers so that the context can be set for other plugins
27
- # and to remove :use_accelerate_endpoint from the params.
28
26
  handlers.add(
29
27
  OptionHandler, step: :initialize, operations: operations
30
28
  )
31
- handlers.add(
32
- AccelerateHandler, step: :build, priority: 11, operations: operations
33
- )
34
29
  end
35
30
 
36
31
  # @api private
37
32
  class OptionHandler < Seahorse::Client::Handler
38
33
  def call(context)
39
34
  # Support client configuration and per-operation configuration
35
+ # TODO: move this to an options hash and warn here.
40
36
  if context.params.is_a?(Hash)
41
37
  accelerate = context.params.delete(:use_accelerate_endpoint)
42
38
  end
43
- accelerate = context.config.use_accelerate_endpoint if accelerate.nil?
44
- # Raise if :endpoint and accelerate are both provided
45
- if accelerate && !context.config.regional_endpoint
46
- raise ArgumentError,
47
- 'Cannot use both :use_accelerate_endpoint and :endpoint'
48
- end
49
- # Raise if :use_fips_endpoint and accelerate are both provided
50
- if accelerate && context.config.use_fips_endpoint
51
- raise ArgumentError,
52
- 'Cannot use both :use_accelerate_endpoint and '\
53
- ':use_fips_endpoint'
39
+ if accelerate.nil?
40
+ accelerate = context.config.use_accelerate_endpoint
54
41
  end
55
42
  context[:use_accelerate_endpoint] = accelerate
56
43
  @handler.call(context)
57
44
  end
58
45
  end
59
-
60
- # @api private
61
- class AccelerateHandler < Seahorse::Client::Handler
62
- def call(context)
63
- if context.config.regional_endpoint && context[:use_accelerate_endpoint]
64
- dualstack = !!context[:use_dualstack_endpoint]
65
- use_accelerate_endpoint(context, dualstack)
66
- end
67
- @handler.call(context)
68
- end
69
-
70
- private
71
-
72
- def use_accelerate_endpoint(context, dualstack)
73
- bucket_name = context.params[:bucket]
74
- validate_bucket_name!(bucket_name)
75
- endpoint = URI.parse(context.http_request.endpoint.to_s)
76
- endpoint.scheme = 'https'
77
- endpoint.port = 443
78
- endpoint.host = "#{bucket_name}.s3-accelerate"\
79
- "#{'.dualstack' if dualstack}.amazonaws.com"
80
- context.http_request.endpoint = endpoint.to_s
81
- # s3 accelerate endpoint doesn't work with 'expect' header
82
- context.http_request.headers.delete('expect')
83
- end
84
-
85
- def validate_bucket_name!(bucket_name)
86
- unless BucketDns.dns_compatible?(bucket_name, _ssl = true)
87
- raise ArgumentError,
88
- 'Unable to use `use_accelerate_endpoint: true` on buckets '\
89
- 'with non-DNS compatible names.'
90
- end
91
- end
92
- end
93
46
  end
94
47
  end
95
48
  end