aws-sdk-s3 1.121.0 → 1.136.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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +99 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +122 -60
  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 +2017 -1674
  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 +1 -1
  20. data/lib/aws-sdk-s3/customizations/object.rb +91 -18
  21. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  22. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  23. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  24. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  25. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  26. data/lib/aws-sdk-s3/endpoint_parameters.rb +4 -0
  27. data/lib/aws-sdk-s3/endpoint_provider.rb +22 -246
  28. data/lib/aws-sdk-s3/endpoints.rb +1 -0
  29. data/lib/aws-sdk-s3/file_downloader.rb +170 -44
  30. data/lib/aws-sdk-s3/file_uploader.rb +8 -6
  31. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +5 -3
  32. data/lib/aws-sdk-s3/multipart_upload.rb +27 -13
  33. data/lib/aws-sdk-s3/multipart_upload_part.rb +19 -9
  34. data/lib/aws-sdk-s3/object.rb +151 -105
  35. data/lib/aws-sdk-s3/object_acl.rb +14 -6
  36. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  37. data/lib/aws-sdk-s3/object_multipart_copier.rb +33 -17
  38. data/lib/aws-sdk-s3/object_summary.rb +144 -89
  39. data/lib/aws-sdk-s3/object_version.rb +55 -21
  40. data/lib/aws-sdk-s3/presigned_post.rb +52 -43
  41. data/lib/aws-sdk-s3/presigner.rb +4 -2
  42. data/lib/aws-sdk-s3/resource.rb +7 -3
  43. data/lib/aws-sdk-s3/types.rb +854 -484
  44. data/lib/aws-sdk-s3.rb +1 -1
  45. metadata +6 -6
@@ -15,18 +15,21 @@ module Aws
15
15
  MAX_PARTS = 10_000
16
16
 
17
17
  # @option options [Client] :client
18
- # @option [Integer] :min_part_size (52428800) Size of copied parts.
19
- # Defaults to 50MB.
20
- # will be constructed from the given `options' hash.
21
- # @option [Integer] :thread_count (10) Number of concurrent threads to
22
- # use for copying parts.
18
+ # @option options [Integer] :min_part_size (52428800)
19
+ # Size of copied parts. Defaults to 50MB.
20
+ # @option options [Integer] :thread_count (10) Number of concurrent
21
+ # threads to use for copying parts.
22
+ # @option options [Boolean] :use_source_parts (false) Use part sizes
23
+ # defined on the source object if any exist. If copying or moving an
24
+ # object that is already multipart, this does not re-part the object,
25
+ # instead re-using the part definitions on the original. That means
26
+ # the etag and any checksums will not change. This is especially
27
+ # useful if the source object has parts with varied sizes.
23
28
  def initialize(options = {})
29
+ @use_source_parts = options.delete(:use_source_parts) || false
24
30
  @thread_count = options.delete(:thread_count) || 10
25
31
  @min_part_size = options.delete(:min_part_size) || (FIVE_MB * 10)
26
32
  @client = options[:client] || Client.new
27
- if options[:checksum_algorithm]
28
- raise ArgumentError, 'Multipart Copy does not support setting :checksum_algorithm'
29
- end
30
33
  end
31
34
 
32
35
  # @return [Client]
@@ -78,10 +81,9 @@ module Aws
78
81
  end
79
82
 
80
83
  def copy_part(part)
81
- {
82
- etag: @client.upload_part_copy(part).copy_part_result.etag,
83
- part_number: part[:part_number],
84
- }
84
+ @client.upload_part_copy(part).copy_part_result.to_h.merge({
85
+ part_number: part[:part_number]
86
+ }).tap { |result| result.delete(:last_modified) }
85
87
  end
86
88
 
87
89
  def complete_upload(parts, options)
@@ -104,24 +106,37 @@ module Aws
104
106
  parts = []
105
107
  options = options_for(:upload_part_copy, options)
106
108
  while offset < size
109
+ part_size = calculate_part_size(part_number, default_part_size, options)
107
110
  parts << options.merge({
108
111
  part_number: part_number,
109
- copy_source_range: byte_range(offset, default_part_size, size),
112
+ copy_source_range: byte_range(offset, part_size, size),
110
113
  })
111
114
  part_number += 1
112
- offset += default_part_size
115
+ offset += part_size
113
116
  end
114
117
  parts
115
118
  end
116
119
 
117
- def byte_range(offset, default_part_size, size)
118
- if offset + default_part_size < size
119
- "bytes=#{offset}-#{offset + default_part_size - 1}"
120
+ def byte_range(offset, part_size, size)
121
+ if offset + part_size < size
122
+ "bytes=#{offset}-#{offset + part_size - 1}"
120
123
  else
121
124
  "bytes=#{offset}-#{size - 1}"
122
125
  end
123
126
  end
124
127
 
128
+ def calculate_part_size(part_number, default_part_size, options)
129
+ if @use_source_parts && source_has_parts(options)
130
+ source_metadata(options.merge({ part_number: part_number }))[:content_length]
131
+ else
132
+ default_part_size
133
+ end
134
+ end
135
+
136
+ def source_has_parts(options)
137
+ @source_has_parts ||= source_metadata(options.merge({ part_number: 1 }))[:parts_count]
138
+ end
139
+
125
140
  def source_metadata(options)
126
141
  if options[:content_length]
127
142
  return { content_length: options.delete(:content_length) }
@@ -138,6 +153,7 @@ module Aws
138
153
  key = CGI.unescape(key)
139
154
  opts = { bucket: bucket, key: key }
140
155
  opts[:version_id] = version_id if version_id
156
+ opts[:part_number] = options[:part_number] if options[:part_number]
141
157
  client.head_object(opts).to_h
142
158
  end
143
159
 
@@ -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,7 +324,7 @@ 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
327
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
308
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",
@@ -434,14 +454,15 @@ 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
- # By default, Amazon S3 uses the STANDARD Storage Class to store newly
440
- # created objects. The STANDARD storage class provides high durability
441
- # and high availability. Depending on performance needs, you can specify
442
- # a different Storage Class. Amazon S3 on Outposts only uses the
443
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
444
- # in the *Amazon S3 User Guide*.
459
+ # If the `x-amz-storage-class` header is not used, the copied object
460
+ # will be stored in the STANDARD Storage Class by default. The STANDARD
461
+ # storage class provides high durability and high availability.
462
+ # Depending on performance needs, you can specify a different Storage
463
+ # Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For
464
+ # more information, see [Storage Classes][1] in the *Amazon S3 User
465
+ # Guide*.
445
466
  #
446
467
  #
447
468
  #
@@ -449,7 +470,10 @@ module Aws::S3
449
470
  # @option options [String] :website_redirect_location
450
471
  # If the bucket is configured as a website, redirects requests for this
451
472
  # 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.
473
+ # Amazon S3 stores the value of this header in the object metadata. This
474
+ # value is unique to each object and is not copied when using the
475
+ # `x-amz-metadata-directive` header. Instead, you may opt to provide
476
+ # this header in combination with the directive.
453
477
  # @option options [String] :sse_customer_algorithm
454
478
  # Specifies the algorithm to use to when encrypting the object (for
455
479
  # example, AES256).
@@ -464,13 +488,12 @@ module Aws::S3
464
488
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
465
489
  # ensure that the encryption key was transmitted without error.
466
490
  # @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*.
491
+ # Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object
492
+ # encryption. All GET and PUT requests for an object protected by KMS
493
+ # will fail if they're not made via SSL or using SigV4. For information
494
+ # about configuring any of the officially supported Amazon Web Services
495
+ # SDKs and Amazon Web Services CLI, see [Specifying the Signature
496
+ # Version in Request Authentication][1] in the *Amazon S3 User Guide*.
474
497
  #
475
498
  #
476
499
  #
@@ -481,9 +504,9 @@ module Aws::S3
481
504
  # string holding JSON with the encryption context key-value pairs.
482
505
  # @option options [Boolean] :bucket_key_enabled
483
506
  # 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.
507
+ # encryption with server-side encryption using Key Management Service
508
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
509
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
487
510
  #
488
511
  # Specifying this header with a COPY action doesn’t affect bucket-level
489
512
  # settings for S3 Bucket Key.
@@ -501,9 +524,11 @@ module Aws::S3
501
524
  # @option options [String] :request_payer
502
525
  # Confirms that the requester knows that they will be charged for the
503
526
  # request. Bucket owners need not specify this parameter in their
504
- # requests. For information about downloading objects from Requester
505
- # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
506
- # in the *Amazon S3 User Guide*.
527
+ # requests. If either the source or destination Amazon S3 bucket has
528
+ # Requester Pays enabled, the requester will pay for corresponding
529
+ # charges to copy the object. For information about downloading objects
530
+ # from Requester Pays buckets, see [Downloading Objects in Requester
531
+ # Pays Buckets][1] in the *Amazon S3 User Guide*.
507
532
  #
508
533
  #
509
534
  #
@@ -533,7 +558,9 @@ module Aws::S3
533
558
  bucket: @bucket_name,
534
559
  key: @key
535
560
  )
536
- resp = @client.copy_object(options)
561
+ resp = Aws::Plugins::UserAgent.feature('resource') do
562
+ @client.copy_object(options)
563
+ end
537
564
  resp.data
538
565
  end
539
566
 
@@ -557,9 +584,11 @@ module Aws::S3
557
584
  # @option options [String] :request_payer
558
585
  # Confirms that the requester knows that they will be charged for the
559
586
  # request. Bucket owners need not specify this parameter in their
560
- # requests. For information about downloading objects from Requester
561
- # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
562
- # in the *Amazon S3 User Guide*.
587
+ # requests. If either the source or destination Amazon S3 bucket has
588
+ # Requester Pays enabled, the requester will pay for corresponding
589
+ # charges to copy the object. For information about downloading objects
590
+ # from Requester Pays buckets, see [Downloading Objects in Requester
591
+ # Pays Buckets][1] in the *Amazon S3 User Guide*.
563
592
  #
564
593
  #
565
594
  #
@@ -578,7 +607,9 @@ module Aws::S3
578
607
  bucket: @bucket_name,
579
608
  key: @key
580
609
  )
581
- resp = @client.delete_object(options)
610
+ resp = Aws::Plugins::UserAgent.feature('resource') do
611
+ @client.delete_object(options)
612
+ end
582
613
  resp.data
583
614
  end
584
615
 
@@ -621,7 +652,7 @@ module Aws::S3
621
652
  # @option options [String] :range
622
653
  # Downloads the specified range bytes of an object. For more information
623
654
  # about the HTTP Range header, see
624
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
655
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
625
656
  #
626
657
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
627
658
  # `GET` request.
@@ -630,7 +661,7 @@ module Aws::S3
630
661
  #
631
662
  #
632
663
  #
633
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
664
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
634
665
  # @option options [String] :response_cache_control
635
666
  # Sets the `Cache-Control` header of the response.
636
667
  # @option options [String] :response_content_disposition
@@ -661,9 +692,11 @@ module Aws::S3
661
692
  # @option options [String] :request_payer
662
693
  # Confirms that the requester knows that they will be charged for the
663
694
  # request. Bucket owners need not specify this parameter in their
664
- # requests. For information about downloading objects from Requester
665
- # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
666
- # in the *Amazon S3 User Guide*.
695
+ # requests. If either the source or destination Amazon S3 bucket has
696
+ # Requester Pays enabled, the requester will pay for corresponding
697
+ # charges to copy the object. For information about downloading objects
698
+ # from Requester Pays buckets, see [Downloading Objects in Requester
699
+ # Pays Buckets][1] in the *Amazon S3 User Guide*.
667
700
  #
668
701
  #
669
702
  #
@@ -685,7 +718,9 @@ module Aws::S3
685
718
  bucket: @bucket_name,
686
719
  key: @key
687
720
  )
688
- resp = @client.get_object(options, &block)
721
+ resp = Aws::Plugins::UserAgent.feature('resource') do
722
+ @client.get_object(options, &block)
723
+ end
689
724
  resp.data
690
725
  end
691
726
 
@@ -706,7 +741,7 @@ module Aws::S3
706
741
  # metadata: {
707
742
  # "MetadataKey" => "MetadataValue",
708
743
  # },
709
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
744
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
710
745
  # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
711
746
  # website_redirect_location: "WebsiteRedirectLocation",
712
747
  # sse_customer_algorithm: "SSECustomerAlgorithm",
@@ -763,7 +798,7 @@ module Aws::S3
763
798
  # A map of metadata to store with the object in S3.
764
799
  # @option options [String] :server_side_encryption
765
800
  # The server-side encryption algorithm used when storing this object in
766
- # Amazon S3 (for example, AES256, aws:kms).
801
+ # Amazon S3 (for example, `AES256`, `aws:kms`).
767
802
  # @option options [String] :storage_class
768
803
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
769
804
  # created objects. The STANDARD storage class provides high durability
@@ -793,13 +828,13 @@ module Aws::S3
793
828
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
794
829
  # ensure that the encryption key was transmitted without error.
795
830
  # @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*.
831
+ # Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric
832
+ # encryption customer managed key to use for object encryption. All GET
833
+ # and PUT requests for an object protected by KMS will fail if they're
834
+ # not made via SSL or using SigV4. For information about configuring any
835
+ # of the officially supported Amazon Web Services SDKs and Amazon Web
836
+ # Services CLI, see [Specifying the Signature Version in Request
837
+ # Authentication][1] in the *Amazon S3 User Guide*.
803
838
  #
804
839
  #
805
840
  #
@@ -810,18 +845,20 @@ module Aws::S3
810
845
  # string holding JSON with the encryption context key-value pairs.
811
846
  # @option options [Boolean] :bucket_key_enabled
812
847
  # 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.
848
+ # encryption with server-side encryption using Key Management Service
849
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
850
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
816
851
  #
817
852
  # Specifying this header with an object action doesn’t affect
818
853
  # bucket-level settings for S3 Bucket Key.
819
854
  # @option options [String] :request_payer
820
855
  # Confirms that the requester knows that they will be charged for the
821
856
  # request. Bucket owners need not specify this parameter in their
822
- # requests. For information about downloading objects from Requester
823
- # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
824
- # in the *Amazon S3 User Guide*.
857
+ # requests. If either the source or destination Amazon S3 bucket has
858
+ # Requester Pays enabled, the requester will pay for corresponding
859
+ # charges to copy the object. For information about downloading objects
860
+ # from Requester Pays buckets, see [Downloading Objects in Requester
861
+ # Pays Buckets][1] in the *Amazon S3 User Guide*.
825
862
  #
826
863
  #
827
864
  #
@@ -855,7 +892,9 @@ module Aws::S3
855
892
  bucket: @bucket_name,
856
893
  key: @key
857
894
  )
858
- resp = @client.create_multipart_upload(options)
895
+ resp = Aws::Plugins::UserAgent.feature('resource') do
896
+ @client.create_multipart_upload(options)
897
+ end
859
898
  MultipartUpload.new(
860
899
  bucket_name: @bucket_name,
861
900
  object_key: @key,
@@ -889,7 +928,7 @@ module Aws::S3
889
928
  # metadata: {
890
929
  # "MetadataKey" => "MetadataValue",
891
930
  # },
892
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
931
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
893
932
  # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
894
933
  # website_redirect_location: "WebsiteRedirectLocation",
895
934
  # sse_customer_algorithm: "SSECustomerAlgorithm",
@@ -928,30 +967,30 @@ module Aws::S3
928
967
  # @option options [String] :content_disposition
929
968
  # Specifies presentational information for the object. For more
930
969
  # information, see
931
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
970
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
932
971
  #
933
972
  #
934
973
  #
935
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
974
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
936
975
  # @option options [String] :content_encoding
937
976
  # Specifies what content encodings have been applied to the object and
938
977
  # thus what decoding mechanisms must be applied to obtain the media-type
939
978
  # referenced by the Content-Type header field. For more information, see
940
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
979
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
941
980
  #
942
981
  #
943
982
  #
944
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
983
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
945
984
  # @option options [String] :content_language
946
985
  # The language the content is in.
947
986
  # @option options [Integer] :content_length
948
987
  # Size of the body in bytes. This parameter is useful when the size of
949
988
  # the body cannot be determined automatically. For more information, see
950
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
989
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
951
990
  #
952
991
  #
953
992
  #
954
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
993
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
955
994
  # @option options [String] :content_md5
956
995
  # The base64-encoded 128-bit MD5 digest of the message (without the
957
996
  # headers) according to RFC 1864. This header can be used as a message
@@ -967,11 +1006,11 @@ module Aws::S3
967
1006
  # @option options [String] :content_type
968
1007
  # A standard MIME type describing the format of the contents. For more
969
1008
  # information, see
970
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
1009
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
971
1010
  #
972
1011
  #
973
1012
  #
974
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
1013
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
975
1014
  # @option options [String] :checksum_algorithm
976
1015
  # Indicates the algorithm used to create the checksum for the object
977
1016
  # when using the SDK. This header will not provide any additional
@@ -1030,11 +1069,11 @@ module Aws::S3
1030
1069
  # @option options [Time,DateTime,Date,Integer,String] :expires
1031
1070
  # The date and time at which the object is no longer cacheable. For more
1032
1071
  # information, see
1033
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
1072
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
1034
1073
  #
1035
1074
  #
1036
1075
  #
1037
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
1076
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
1038
1077
  # @option options [String] :grant_full_control
1039
1078
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
1040
1079
  # object.
@@ -1056,7 +1095,7 @@ module Aws::S3
1056
1095
  # A map of metadata to store with the object in S3.
1057
1096
  # @option options [String] :server_side_encryption
1058
1097
  # The server-side encryption algorithm used when storing this object in
1059
- # Amazon S3 (for example, AES256, aws:kms).
1098
+ # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
1060
1099
  # @option options [String] :storage_class
1061
1100
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1062
1101
  # created objects. The STANDARD storage class provides high durability
@@ -1107,33 +1146,39 @@ module Aws::S3
1107
1146
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1108
1147
  # ensure that the encryption key was transmitted without error.
1109
1148
  # @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`
1149
+ # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
1150
+ # `aws:kms:dsse`, this header specifies the ID (Key ID, Key ARN, or Key
1151
+ # Alias) of the Key Management Service (KMS) symmetric encryption
1152
+ # customer managed key that was used for the object. If you specify
1153
+ # `x-amz-server-side-encryption:aws:kms` or
1154
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
1115
1155
  # 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.
1156
+ # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
1157
+ # KMS key does not exist in the same account that's issuing the
1158
+ # command, you must use the full ARN and not just the ID.
1119
1159
  # @option options [String] :ssekms_encryption_context
1120
1160
  # Specifies the Amazon Web Services KMS Encryption Context to use for
1121
1161
  # object encryption. The value of this header is a base64-encoded UTF-8
1122
- # string holding JSON with the encryption context key-value pairs.
1162
+ # string holding JSON with the encryption context key-value pairs. This
1163
+ # value is stored as object metadata and automatically gets passed on to
1164
+ # Amazon Web Services KMS for future `GetObject` or `CopyObject`
1165
+ # operations on this object.
1123
1166
  # @option options [Boolean] :bucket_key_enabled
1124
1167
  # 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.
1168
+ # encryption with server-side encryption using Key Management Service
1169
+ # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
1170
+ # to use an S3 Bucket Key for object encryption with SSE-KMS.
1128
1171
  #
1129
1172
  # Specifying this header with a PUT action doesn’t affect bucket-level
1130
1173
  # settings for S3 Bucket Key.
1131
1174
  # @option options [String] :request_payer
1132
1175
  # Confirms that the requester knows that they will be charged for the
1133
1176
  # request. Bucket owners need not specify this parameter in their
1134
- # requests. For information about downloading objects from Requester
1135
- # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1136
- # in the *Amazon S3 User Guide*.
1177
+ # requests. If either the source or destination Amazon S3 bucket has
1178
+ # Requester Pays enabled, the requester will pay for corresponding
1179
+ # charges to copy the object. For information about downloading objects
1180
+ # from Requester Pays buckets, see [Downloading Objects in Requester
1181
+ # Pays Buckets][1] in the *Amazon S3 User Guide*.
1137
1182
  #
1138
1183
  #
1139
1184
  #
@@ -1163,7 +1208,9 @@ module Aws::S3
1163
1208
  bucket: @bucket_name,
1164
1209
  key: @key
1165
1210
  )
1166
- resp = @client.put_object(options)
1211
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1212
+ @client.put_object(options)
1213
+ end
1167
1214
  resp.data
1168
1215
  end
1169
1216
 
@@ -1217,7 +1264,7 @@ module Aws::S3
1217
1264
  # bucket_name: "BucketName", # required
1218
1265
  # prefix: "LocationPrefix", # required
1219
1266
  # encryption: {
1220
- # encryption_type: "AES256", # required, accepts AES256, aws:kms
1267
+ # encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
1221
1268
  # kms_key_id: "SSEKMSKeyId",
1222
1269
  # kms_context: "KMSContext",
1223
1270
  # },
@@ -1264,9 +1311,11 @@ module Aws::S3
1264
1311
  # @option options [String] :request_payer
1265
1312
  # Confirms that the requester knows that they will be charged for the
1266
1313
  # request. Bucket owners need not specify this parameter in their
1267
- # requests. For information about downloading objects from Requester
1268
- # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1269
- # in the *Amazon S3 User Guide*.
1314
+ # requests. If either the source or destination Amazon S3 bucket has
1315
+ # Requester Pays enabled, the requester will pay for corresponding
1316
+ # charges to copy the object. For information about downloading objects
1317
+ # from Requester Pays buckets, see [Downloading Objects in Requester
1318
+ # Pays Buckets][1] in the *Amazon S3 User Guide*.
1270
1319
  #
1271
1320
  #
1272
1321
  #
@@ -1296,7 +1345,9 @@ module Aws::S3
1296
1345
  bucket: @bucket_name,
1297
1346
  key: @key
1298
1347
  )
1299
- resp = @client.restore_object(options)
1348
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1349
+ @client.restore_object(options)
1350
+ end
1300
1351
  resp.data
1301
1352
  end
1302
1353
 
@@ -1433,9 +1484,11 @@ module Aws::S3
1433
1484
  # @option options [String] :request_payer
1434
1485
  # Confirms that the requester knows that they will be charged for the
1435
1486
  # request. Bucket owners need not specify this parameter in their
1436
- # requests. For information about downloading objects from Requester
1437
- # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1438
- # in the *Amazon S3 User Guide*.
1487
+ # requests. If either the source or destination Amazon S3 bucket has
1488
+ # Requester Pays enabled, the requester will pay for corresponding
1489
+ # charges to copy the object. For information about downloading objects
1490
+ # from Requester Pays buckets, see [Downloading Objects in Requester
1491
+ # Pays Buckets][1] in the *Amazon S3 User Guide*.
1439
1492
  #
1440
1493
  #
1441
1494
  #
@@ -1478,7 +1531,9 @@ module Aws::S3
1478
1531
  key: item.key
1479
1532
  }
1480
1533
  end
1481
- batch[0].client.delete_objects(params)
1534
+ Aws::Plugins::UserAgent.feature('resource') do
1535
+ batch[0].client.delete_objects(params)
1536
+ end
1482
1537
  end
1483
1538
  nil
1484
1539
  end