aws-sdk-s3 1.114.0 → 1.125.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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +94 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +51 -28
  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 +1721 -1457
  17. data/lib/aws-sdk-s3/client_api.rb +189 -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 +86 -57
  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 +72 -46
  41. data/lib/aws-sdk-s3/object_version.rb +21 -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 +32 -126
  51. data/lib/aws-sdk-s3/presigned_post.rb +9 -16
  52. data/lib/aws-sdk-s3/presigner.rb +20 -33
  53. data/lib/aws-sdk-s3/resource.rb +7 -3
  54. data/lib/aws-sdk-s3/types.rb +406 -3903
  55. data/lib/aws-sdk-s3.rb +5 -1
  56. metadata +10 -9
  57. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  58. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -68
  59. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  60. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -74
  61. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -152,8 +152,10 @@ module Aws::S3
152
152
  options, params = separate_params_and_options(options)
153
153
  waiter = Waiters::ObjectExists.new(options)
154
154
  yield_waiter_and_warn(waiter, &block) if block_given?
155
- waiter.wait(params.merge(bucket: @bucket_name,
155
+ Aws::Plugins::UserAgent.feature('resource') do
156
+ waiter.wait(params.merge(bucket: @bucket_name,
156
157
  key: @key))
158
+ end
157
159
  ObjectSummary.new({
158
160
  bucket_name: @bucket_name,
159
161
  key: @key,
@@ -171,8 +173,10 @@ module Aws::S3
171
173
  options, params = separate_params_and_options(options)
172
174
  waiter = Waiters::ObjectNotExists.new(options)
173
175
  yield_waiter_and_warn(waiter, &block) if block_given?
174
- waiter.wait(params.merge(bucket: @bucket_name,
176
+ Aws::Plugins::UserAgent.feature('resource') do
177
+ waiter.wait(params.merge(bucket: @bucket_name,
175
178
  key: @key))
179
+ end
176
180
  ObjectSummary.new({
177
181
  bucket_name: @bucket_name,
178
182
  key: @key,
@@ -274,7 +278,9 @@ module Aws::S3
274
278
  :retry
275
279
  end
276
280
  end
277
- Aws::Waiters::Waiter.new(options).wait({})
281
+ Aws::Plugins::UserAgent.feature('resource') do
282
+ Aws::Waiters::Waiter.new(options).wait({})
283
+ end
278
284
  end
279
285
 
280
286
  # @!group Actions
@@ -304,8 +310,8 @@ module Aws::S3
304
310
  # },
305
311
  # metadata_directive: "COPY", # accepts COPY, REPLACE
306
312
  # 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
313
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
314
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
309
315
  # website_redirect_location: "WebsiteRedirectLocation",
310
316
  # sse_customer_algorithm: "SSECustomerAlgorithm",
311
317
  # sse_customer_key: "SSECustomerKey",
@@ -352,7 +358,7 @@ module Aws::S3
352
358
  # @option options [required, String] :copy_source
353
359
  # Specifies the source object for the copy operation. You specify the
354
360
  # value in one of two formats, depending on whether you want to access
355
- # the source object through an [access point][1]\:
361
+ # the source object through an [access point][1]:
356
362
  #
357
363
  # * For objects not accessed through an access point, specify the name
358
364
  # of the source bucket and the key of the source object, separated by
@@ -434,7 +440,7 @@ module Aws::S3
434
440
  # or replaced with tag-set provided in the request.
435
441
  # @option options [String] :server_side_encryption
436
442
  # The server-side encryption algorithm used when storing this object in
437
- # Amazon S3 (for example, AES256, aws:kms).
443
+ # Amazon S3 (for example, AES256, `aws:kms`).
438
444
  # @option options [String] :storage_class
439
445
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
440
446
  # created objects. The STANDARD storage class provides high durability
@@ -449,7 +455,10 @@ module Aws::S3
449
455
  # @option options [String] :website_redirect_location
450
456
  # If the bucket is configured as a website, redirects requests for this
451
457
  # 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.
458
+ # Amazon S3 stores the value of this header in the object metadata. This
459
+ # value is unique to each object and is not copied when using the
460
+ # `x-amz-metadata-directive` header. Instead, you may opt to provide
461
+ # this header in combination with the directive.
453
462
  # @option options [String] :sse_customer_algorithm
454
463
  # Specifies the algorithm to use to when encrypting the object (for
455
464
  # example, AES256).
@@ -533,7 +542,9 @@ module Aws::S3
533
542
  bucket: @bucket_name,
534
543
  key: @key
535
544
  )
536
- resp = @client.copy_object(options)
545
+ resp = Aws::Plugins::UserAgent.feature('resource') do
546
+ @client.copy_object(options)
547
+ end
537
548
  resp.data
538
549
  end
539
550
 
@@ -578,7 +589,9 @@ module Aws::S3
578
589
  bucket: @bucket_name,
579
590
  key: @key
580
591
  )
581
- resp = @client.delete_object(options)
592
+ resp = Aws::Plugins::UserAgent.feature('resource') do
593
+ @client.delete_object(options)
594
+ end
582
595
  resp.data
583
596
  end
584
597
 
@@ -621,7 +634,7 @@ module Aws::S3
621
634
  # @option options [String] :range
622
635
  # Downloads the specified range bytes of an object. For more information
623
636
  # about the HTTP Range header, see
624
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
637
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
625
638
  #
626
639
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
627
640
  # `GET` request.
@@ -630,7 +643,7 @@ module Aws::S3
630
643
  #
631
644
  #
632
645
  #
633
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
646
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
634
647
  # @option options [String] :response_cache_control
635
648
  # Sets the `Cache-Control` header of the response.
636
649
  # @option options [String] :response_content_disposition
@@ -685,7 +698,9 @@ module Aws::S3
685
698
  bucket: @bucket_name,
686
699
  key: @key
687
700
  )
688
- resp = @client.get_object(options, &block)
701
+ resp = Aws::Plugins::UserAgent.feature('resource') do
702
+ @client.get_object(options, &block)
703
+ end
689
704
  resp.data
690
705
  end
691
706
 
@@ -706,8 +721,8 @@ module Aws::S3
706
721
  # metadata: {
707
722
  # "MetadataKey" => "MetadataValue",
708
723
  # },
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
724
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
725
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
711
726
  # website_redirect_location: "WebsiteRedirectLocation",
712
727
  # sse_customer_algorithm: "SSECustomerAlgorithm",
713
728
  # sse_customer_key: "SSECustomerKey",
@@ -763,7 +778,7 @@ module Aws::S3
763
778
  # A map of metadata to store with the object in S3.
764
779
  # @option options [String] :server_side_encryption
765
780
  # The server-side encryption algorithm used when storing this object in
766
- # Amazon S3 (for example, AES256, aws:kms).
781
+ # Amazon S3 (for example, AES256, `aws:kms`).
767
782
  # @option options [String] :storage_class
768
783
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
769
784
  # created objects. The STANDARD storage class provides high durability
@@ -793,13 +808,13 @@ module Aws::S3
793
808
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
794
809
  # ensure that the encryption key was transmitted without error.
795
810
  # @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
800
- # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
801
- # [Specifying the Signature Version in Request Authentication][1] in the
802
- # *Amazon S3 User Guide*.
811
+ # Specifies the ID of the symmetric encryption customer managed key to
812
+ # use for object encryption. All GET and PUT requests for an object
813
+ # protected by Amazon Web Services KMS will fail if not made via SSL or
814
+ # using SigV4. For information about configuring using any of the
815
+ # officially supported Amazon Web Services SDKs and Amazon Web Services
816
+ # CLI, see [Specifying the Signature Version in Request
817
+ # Authentication][1] in the *Amazon S3 User Guide*.
803
818
  #
804
819
  #
805
820
  #
@@ -855,7 +870,9 @@ module Aws::S3
855
870
  bucket: @bucket_name,
856
871
  key: @key
857
872
  )
858
- resp = @client.create_multipart_upload(options)
873
+ resp = Aws::Plugins::UserAgent.feature('resource') do
874
+ @client.create_multipart_upload(options)
875
+ end
859
876
  MultipartUpload.new(
860
877
  bucket_name: @bucket_name,
861
878
  object_key: @key,
@@ -889,8 +906,8 @@ module Aws::S3
889
906
  # metadata: {
890
907
  # "MetadataKey" => "MetadataValue",
891
908
  # },
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
909
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
910
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
894
911
  # website_redirect_location: "WebsiteRedirectLocation",
895
912
  # sse_customer_algorithm: "SSECustomerAlgorithm",
896
913
  # sse_customer_key: "SSECustomerKey",
@@ -928,30 +945,30 @@ module Aws::S3
928
945
  # @option options [String] :content_disposition
929
946
  # Specifies presentational information for the object. For more
930
947
  # information, see
931
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
948
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
932
949
  #
933
950
  #
934
951
  #
935
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
952
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
936
953
  # @option options [String] :content_encoding
937
954
  # Specifies what content encodings have been applied to the object and
938
955
  # thus what decoding mechanisms must be applied to obtain the media-type
939
956
  # referenced by the Content-Type header field. For more information, see
940
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
957
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
941
958
  #
942
959
  #
943
960
  #
944
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
961
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
945
962
  # @option options [String] :content_language
946
963
  # The language the content is in.
947
964
  # @option options [Integer] :content_length
948
965
  # Size of the body in bytes. This parameter is useful when the size of
949
966
  # the body cannot be determined automatically. For more information, see
950
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
967
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
951
968
  #
952
969
  #
953
970
  #
954
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
971
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
955
972
  # @option options [String] :content_md5
956
973
  # The base64-encoded 128-bit MD5 digest of the message (without the
957
974
  # headers) according to RFC 1864. This header can be used as a message
@@ -967,11 +984,11 @@ module Aws::S3
967
984
  # @option options [String] :content_type
968
985
  # A standard MIME type describing the format of the contents. For more
969
986
  # information, see
970
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
987
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
971
988
  #
972
989
  #
973
990
  #
974
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
991
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
975
992
  # @option options [String] :checksum_algorithm
976
993
  # Indicates the algorithm used to create the checksum for the object
977
994
  # when using the SDK. This header will not provide any additional
@@ -1030,11 +1047,11 @@ module Aws::S3
1030
1047
  # @option options [Time,DateTime,Date,Integer,String] :expires
1031
1048
  # The date and time at which the object is no longer cacheable. For more
1032
1049
  # information, see
1033
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
1050
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
1034
1051
  #
1035
1052
  #
1036
1053
  #
1037
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
1054
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
1038
1055
  # @option options [String] :grant_full_control
1039
1056
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
1040
1057
  # object.
@@ -1056,7 +1073,7 @@ module Aws::S3
1056
1073
  # A map of metadata to store with the object in S3.
1057
1074
  # @option options [String] :server_side_encryption
1058
1075
  # The server-side encryption algorithm used when storing this object in
1059
- # Amazon S3 (for example, AES256, aws:kms).
1076
+ # Amazon S3 (for example, AES256, `aws:kms`).
1060
1077
  # @option options [String] :storage_class
1061
1078
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1062
1079
  # created objects. The STANDARD storage class provides high durability
@@ -1107,9 +1124,9 @@ module Aws::S3
1107
1124
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1108
1125
  # ensure that the encryption key was transmitted without error.
1109
1126
  # @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
1127
+ # If `x-amz-server-side-encryption` has a valid value of `aws:kms`, this
1128
+ # header specifies the ID of the Amazon Web Services Key Management
1129
+ # Service (Amazon Web Services KMS) symmetric encryption customer
1113
1130
  # managed key that was used for the object. If you specify
1114
1131
  # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1115
1132
  # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
@@ -1119,7 +1136,10 @@ module Aws::S3
1119
1136
  # @option options [String] :ssekms_encryption_context
1120
1137
  # Specifies the Amazon Web Services KMS Encryption Context to use for
1121
1138
  # object encryption. The value of this header is a base64-encoded UTF-8
1122
- # string holding JSON with the encryption context key-value pairs.
1139
+ # string holding JSON with the encryption context key-value pairs. This
1140
+ # value is stored as object metadata and automatically gets passed on to
1141
+ # Amazon Web Services KMS for future `GetObject` or `CopyObject`
1142
+ # operations on this object.
1123
1143
  # @option options [Boolean] :bucket_key_enabled
1124
1144
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1125
1145
  # encryption with server-side encryption using AWS KMS (SSE-KMS).
@@ -1163,7 +1183,9 @@ module Aws::S3
1163
1183
  bucket: @bucket_name,
1164
1184
  key: @key
1165
1185
  )
1166
- resp = @client.put_object(options)
1186
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1187
+ @client.put_object(options)
1188
+ end
1167
1189
  resp.data
1168
1190
  end
1169
1191
 
@@ -1217,7 +1239,7 @@ module Aws::S3
1217
1239
  # bucket_name: "BucketName", # required
1218
1240
  # prefix: "LocationPrefix", # required
1219
1241
  # encryption: {
1220
- # encryption_type: "AES256", # required, accepts AES256, aws:kms
1242
+ # encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
1221
1243
  # kms_key_id: "SSEKMSKeyId",
1222
1244
  # kms_context: "KMSContext",
1223
1245
  # },
@@ -1248,7 +1270,7 @@ module Aws::S3
1248
1270
  # value: "MetadataValue",
1249
1271
  # },
1250
1272
  # ],
1251
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
1273
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
1252
1274
  # },
1253
1275
  # },
1254
1276
  # },
@@ -1296,7 +1318,9 @@ module Aws::S3
1296
1318
  bucket: @bucket_name,
1297
1319
  key: @key
1298
1320
  )
1299
- resp = @client.restore_object(options)
1321
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1322
+ @client.restore_object(options)
1323
+ end
1300
1324
  resp.data
1301
1325
  end
1302
1326
 
@@ -1478,7 +1502,9 @@ module Aws::S3
1478
1502
  key: item.key
1479
1503
  }
1480
1504
  end
1481
- batch[0].client.delete_objects(params)
1505
+ Aws::Plugins::UserAgent.feature('resource') do
1506
+ batch[0].client.delete_objects(params)
1507
+ end
1482
1508
  end
1483
1509
  nil
1484
1510
  end
@@ -229,7 +229,9 @@ module Aws::S3
229
229
  :retry
230
230
  end
231
231
  end
232
- Aws::Waiters::Waiter.new(options).wait({})
232
+ Aws::Plugins::UserAgent.feature('resource') do
233
+ Aws::Waiters::Waiter.new(options).wait({})
234
+ end
233
235
  end
234
236
 
235
237
  # @!group Actions
@@ -273,7 +275,9 @@ module Aws::S3
273
275
  key: @object_key,
274
276
  version_id: @id
275
277
  )
276
- resp = @client.delete_object(options)
278
+ resp = Aws::Plugins::UserAgent.feature('resource') do
279
+ @client.delete_object(options)
280
+ end
277
281
  resp.data
278
282
  end
279
283
 
@@ -315,7 +319,7 @@ module Aws::S3
315
319
  # @option options [String] :range
316
320
  # Downloads the specified range bytes of an object. For more information
317
321
  # about the HTTP Range header, see
318
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
322
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
319
323
  #
320
324
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
321
325
  # `GET` request.
@@ -324,7 +328,7 @@ module Aws::S3
324
328
  #
325
329
  #
326
330
  #
327
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
331
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
328
332
  # @option options [String] :response_cache_control
329
333
  # Sets the `Cache-Control` header of the response.
330
334
  # @option options [String] :response_content_disposition
@@ -378,7 +382,9 @@ module Aws::S3
378
382
  key: @object_key,
379
383
  version_id: @id
380
384
  )
381
- resp = @client.get_object(options, &block)
385
+ resp = Aws::Plugins::UserAgent.feature('resource') do
386
+ @client.get_object(options, &block)
387
+ end
382
388
  resp.data
383
389
  end
384
390
 
@@ -412,8 +418,10 @@ module Aws::S3
412
418
  # Return the object only if it has not been modified since the specified
413
419
  # time; otherwise, return a 412 (precondition failed) error.
414
420
  # @option options [String] :range
415
- # Because `HeadObject` returns only the metadata for an object, this
416
- # parameter has no effect.
421
+ # HeadObject returns only the metadata for an object. If the Range is
422
+ # satisfiable, only the `ContentLength` is affected in the response. If
423
+ # the Range is not satisfiable, S3 returns a `416 - Requested Range Not
424
+ # Satisfiable` error.
417
425
  # @option options [String] :sse_customer_algorithm
418
426
  # Specifies the algorithm to use to when encrypting the object (for
419
427
  # example, AES256).
@@ -460,7 +468,9 @@ module Aws::S3
460
468
  key: @object_key,
461
469
  version_id: @id
462
470
  )
463
- resp = @client.head_object(options)
471
+ resp = Aws::Plugins::UserAgent.feature('resource') do
472
+ @client.head_object(options)
473
+ end
464
474
  resp.data
465
475
  end
466
476
 
@@ -589,7 +599,9 @@ module Aws::S3
589
599
  version_id: item.id
590
600
  }
591
601
  end
592
- batch[0].client.delete_objects(params)
602
+ Aws::Plugins::UserAgent.feature('resource') do
603
+ batch[0].client.delete_objects(params)
604
+ end
593
605
  end
594
606
  nil
595
607
  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