aws-sdk-s3 1.13.0 → 1.146.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1131 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/bucket.rb +805 -91
  6. data/lib/aws-sdk-s3/bucket_acl.rb +66 -17
  7. data/lib/aws-sdk-s3/bucket_cors.rb +79 -17
  8. data/lib/aws-sdk-s3/bucket_lifecycle.rb +66 -19
  9. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +68 -19
  10. data/lib/aws-sdk-s3/bucket_logging.rb +68 -18
  11. data/lib/aws-sdk-s3/bucket_notification.rb +56 -20
  12. data/lib/aws-sdk-s3/bucket_policy.rb +107 -17
  13. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  14. data/lib/aws-sdk-s3/bucket_request_payment.rb +60 -15
  15. data/lib/aws-sdk-s3/bucket_tagging.rb +71 -17
  16. data/lib/aws-sdk-s3/bucket_versioning.rb +133 -17
  17. data/lib/aws-sdk-s3/bucket_website.rb +78 -17
  18. data/lib/aws-sdk-s3/client.rb +16336 -3915
  19. data/lib/aws-sdk-s3/client_api.rb +1364 -173
  20. data/lib/aws-sdk-s3/customizations/bucket.rb +57 -38
  21. data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
  22. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  23. data/lib/aws-sdk-s3/customizations/object.rb +327 -53
  24. data/lib/aws-sdk-s3/customizations/object_summary.rb +12 -0
  25. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  26. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  27. data/lib/aws-sdk-s3/customizations.rb +12 -1
  28. data/lib/aws-sdk-s3/encryption/client.rb +29 -8
  29. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
  30. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  31. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  32. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  33. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  34. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +11 -3
  35. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  36. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  37. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  38. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +46 -11
  39. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  40. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  41. data/lib/aws-sdk-s3/encryption.rb +4 -0
  42. data/lib/aws-sdk-s3/encryptionV2/client.rb +570 -0
  43. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +223 -0
  44. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  45. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  46. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
  47. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  48. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  49. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  50. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  51. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  52. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +173 -0
  53. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  54. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  55. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  56. data/lib/aws-sdk-s3/endpoint_parameters.rb +178 -0
  57. data/lib/aws-sdk-s3/endpoint_provider.rb +591 -0
  58. data/lib/aws-sdk-s3/endpoints.rb +2590 -0
  59. data/lib/aws-sdk-s3/errors.rb +123 -1
  60. data/lib/aws-sdk-s3/event_streams.rb +20 -7
  61. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  62. data/lib/aws-sdk-s3/express_credentials_cache.rb +30 -0
  63. data/lib/aws-sdk-s3/express_credentials_provider.rb +36 -0
  64. data/lib/aws-sdk-s3/file_downloader.rb +184 -51
  65. data/lib/aws-sdk-s3/file_part.rb +16 -13
  66. data/lib/aws-sdk-s3/file_uploader.rb +39 -20
  67. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  68. data/lib/aws-sdk-s3/multipart_file_uploader.rb +82 -23
  69. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +202 -0
  70. data/lib/aws-sdk-s3/multipart_upload.rb +242 -31
  71. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  72. data/lib/aws-sdk-s3/multipart_upload_part.rb +371 -47
  73. data/lib/aws-sdk-s3/object.rb +2260 -217
  74. data/lib/aws-sdk-s3/object_acl.rb +105 -24
  75. data/lib/aws-sdk-s3/object_copier.rb +9 -5
  76. data/lib/aws-sdk-s3/object_multipart_copier.rb +43 -19
  77. data/lib/aws-sdk-s3/object_summary.rb +1851 -186
  78. data/lib/aws-sdk-s3/object_version.rb +457 -74
  79. data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
  80. data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
  81. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +7 -43
  82. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +20 -3
  83. data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
  84. data/lib/aws-sdk-s3/plugins/endpoints.rb +274 -0
  85. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
  86. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +91 -0
  87. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
  88. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
  89. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
  90. data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
  91. data/lib/aws-sdk-s3/plugins/md5s.rb +35 -27
  92. data/lib/aws-sdk-s3/plugins/redirects.rb +5 -1
  93. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  94. data/lib/aws-sdk-s3/plugins/s3_signer.rb +60 -91
  95. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  96. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  97. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
  98. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  99. data/lib/aws-sdk-s3/presigned_post.rb +160 -99
  100. data/lib/aws-sdk-s3/presigner.rb +172 -77
  101. data/lib/aws-sdk-s3/resource.rb +122 -6
  102. data/lib/aws-sdk-s3/types.rb +13937 -5517
  103. data/lib/aws-sdk-s3/waiters.rb +67 -1
  104. data/lib/aws-sdk-s3.rb +16 -6
  105. data/sig/bucket.rbs +212 -0
  106. data/sig/bucket_acl.rbs +78 -0
  107. data/sig/bucket_cors.rbs +69 -0
  108. data/sig/bucket_lifecycle.rbs +88 -0
  109. data/sig/bucket_lifecycle_configuration.rbs +111 -0
  110. data/sig/bucket_logging.rbs +76 -0
  111. data/sig/bucket_notification.rbs +114 -0
  112. data/sig/bucket_policy.rbs +59 -0
  113. data/sig/bucket_request_payment.rbs +54 -0
  114. data/sig/bucket_tagging.rbs +65 -0
  115. data/sig/bucket_versioning.rbs +77 -0
  116. data/sig/bucket_website.rbs +93 -0
  117. data/sig/client.rbs +2360 -0
  118. data/sig/errors.rbs +34 -0
  119. data/sig/multipart_upload.rbs +110 -0
  120. data/sig/multipart_upload_part.rbs +105 -0
  121. data/sig/object.rbs +436 -0
  122. data/sig/object_acl.rbs +86 -0
  123. data/sig/object_summary.rbs +334 -0
  124. data/sig/object_version.rbs +131 -0
  125. data/sig/resource.rbs +124 -0
  126. data/sig/types.rbs +2562 -0
  127. data/sig/waiters.rbs +83 -0
  128. metadata +70 -16
@@ -1,11 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
8
10
  module Aws::S3
11
+
9
12
  class MultipartUpload
10
13
 
11
14
  extend Aws::Deprecations
@@ -27,6 +30,7 @@ module Aws::S3
27
30
  @id = extract_id(args, options)
28
31
  @data = options.delete(:data)
29
32
  @client = options.delete(:client) || Client.new(options)
33
+ @waiter_block_warned = false
30
34
  end
31
35
 
32
36
  # @!group Read-Only Attributes
@@ -65,11 +69,23 @@ module Aws::S3
65
69
  end
66
70
 
67
71
  # The class of storage used to store the object.
72
+ #
73
+ # <note markdown="1"> **Directory buckets** - Only the S3 Express One Zone storage class is
74
+ # supported by directory buckets to store objects.
75
+ #
76
+ # </note>
68
77
  # @return [String]
69
78
  def storage_class
70
79
  data[:storage_class]
71
80
  end
72
81
 
82
+ # Specifies the owner of the object that is part of the multipart
83
+ # upload.
84
+ #
85
+ # <note markdown="1"> **Directory buckets** - The bucket owner is returned as the object
86
+ # owner for all the objects.
87
+ #
88
+ # </note>
73
89
  # @return [Types::Owner]
74
90
  def owner
75
91
  data[:owner]
@@ -81,6 +97,12 @@ module Aws::S3
81
97
  data[:initiator]
82
98
  end
83
99
 
100
+ # The algorithm that was used to create a checksum of the object.
101
+ # @return [String]
102
+ def checksum_algorithm
103
+ data[:checksum_algorithm]
104
+ end
105
+
84
106
  # @!endgroup
85
107
 
86
108
  # @return [Client]
@@ -116,7 +138,8 @@ module Aws::S3
116
138
  # Waiter polls an API operation until a resource enters a desired
117
139
  # state.
118
140
  #
119
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
141
+ # @note The waiting operation is performed on a copy. The original resource
142
+ # remains unchanged.
120
143
  #
121
144
  # ## Basic Usage
122
145
  #
@@ -129,13 +152,15 @@ module Aws::S3
129
152
  #
130
153
  # ## Example
131
154
  #
132
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
155
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
156
+ # instance.state.name == 'running'
157
+ # end
133
158
  #
134
159
  # ## Configuration
135
160
  #
136
161
  # You can configure the maximum number of polling attempts, and the
137
- # delay (in seconds) between each polling attempt. The waiting condition is set
138
- # by passing a block to {#wait_until}:
162
+ # delay (in seconds) between each polling attempt. The waiting condition is
163
+ # set by passing a block to {#wait_until}:
139
164
  #
140
165
  # # poll for ~25 seconds
141
166
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -166,17 +191,16 @@ module Aws::S3
166
191
  # # resource did not enter the desired state in time
167
192
  # end
168
193
  #
194
+ # @yieldparam [Resource] resource to be used in the waiting condition.
169
195
  #
170
- # @yield param [Resource] resource to be used in the waiting condition
171
- #
172
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
173
- # because the waiter has entered a state that it will not transition
174
- # out of, preventing success.
196
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
197
+ # terminates because the waiter has entered a state that it will not
198
+ # transition out of, preventing success.
175
199
  #
176
200
  # yet successful.
177
201
  #
178
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
179
- # while polling for a resource that is not expected.
202
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
203
+ # encountered while polling for a resource that is not expected.
180
204
  #
181
205
  # @raise [NotImplementedError] Raised when the resource does not
182
206
  #
@@ -203,7 +227,9 @@ module Aws::S3
203
227
  :retry
204
228
  end
205
229
  end
206
- Aws::Waiters::Waiter.new(options).wait({})
230
+ Aws::Plugins::UserAgent.feature('resource') do
231
+ Aws::Waiters::Waiter.new(options).wait({})
232
+ end
207
233
  end
208
234
 
209
235
  # @!group Actions
@@ -212,14 +238,29 @@ module Aws::S3
212
238
  #
213
239
  # multipart_upload.abort({
214
240
  # request_payer: "requester", # accepts requester
241
+ # expected_bucket_owner: "AccountId",
215
242
  # })
216
243
  # @param [Hash] options ({})
217
244
  # @option options [String] :request_payer
218
- # Confirms that the requester knows that she or he will be charged for
219
- # the request. Bucket owners need not specify this parameter in their
220
- # requests. Documentation on downloading objects from requester pays
221
- # buckets can be found at
222
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
245
+ # Confirms that the requester knows that they will be charged for the
246
+ # request. Bucket owners need not specify this parameter in their
247
+ # requests. If either the source or destination S3 bucket has Requester
248
+ # Pays enabled, the requester will pay for corresponding charges to copy
249
+ # the object. For information about downloading objects from Requester
250
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
251
+ # in the *Amazon S3 User Guide*.
252
+ #
253
+ # <note markdown="1"> This functionality is not supported for directory buckets.
254
+ #
255
+ # </note>
256
+ #
257
+ #
258
+ #
259
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
260
+ # @option options [String] :expected_bucket_owner
261
+ # The account ID of the expected bucket owner. If the account ID that
262
+ # you provide does not match the actual owner of the bucket, the request
263
+ # fails with the HTTP status code `403 Forbidden` (access denied).
223
264
  # @return [Types::AbortMultipartUploadOutput]
224
265
  def abort(options = {})
225
266
  options = options.merge(
@@ -227,7 +268,9 @@ module Aws::S3
227
268
  key: @object_key,
228
269
  upload_id: @id
229
270
  )
230
- resp = @client.abort_multipart_upload(options)
271
+ resp = Aws::Plugins::UserAgent.feature('resource') do
272
+ @client.abort_multipart_upload(options)
273
+ end
231
274
  resp.data
232
275
  end
233
276
 
@@ -238,20 +281,127 @@ module Aws::S3
238
281
  # parts: [
239
282
  # {
240
283
  # etag: "ETag",
284
+ # checksum_crc32: "ChecksumCRC32",
285
+ # checksum_crc32c: "ChecksumCRC32C",
286
+ # checksum_sha1: "ChecksumSHA1",
287
+ # checksum_sha256: "ChecksumSHA256",
241
288
  # part_number: 1,
242
289
  # },
243
290
  # ],
244
291
  # },
292
+ # checksum_crc32: "ChecksumCRC32",
293
+ # checksum_crc32c: "ChecksumCRC32C",
294
+ # checksum_sha1: "ChecksumSHA1",
295
+ # checksum_sha256: "ChecksumSHA256",
245
296
  # request_payer: "requester", # accepts requester
297
+ # expected_bucket_owner: "AccountId",
298
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
299
+ # sse_customer_key: "SSECustomerKey",
300
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
246
301
  # })
247
302
  # @param [Hash] options ({})
248
303
  # @option options [Types::CompletedMultipartUpload] :multipart_upload
304
+ # The container for the multipart upload request information.
305
+ # @option options [String] :checksum_crc32
306
+ # This header can be used as a data integrity check to verify that the
307
+ # data received is the same data that was originally sent. This header
308
+ # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
309
+ # more information, see [Checking object integrity][1] in the *Amazon S3
310
+ # User Guide*.
311
+ #
312
+ #
313
+ #
314
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
315
+ # @option options [String] :checksum_crc32c
316
+ # This header can be used as a data integrity check to verify that the
317
+ # data received is the same data that was originally sent. This header
318
+ # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
319
+ # For more information, see [Checking object integrity][1] in the
320
+ # *Amazon S3 User Guide*.
321
+ #
322
+ #
323
+ #
324
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
325
+ # @option options [String] :checksum_sha1
326
+ # This header can be used as a data integrity check to verify that the
327
+ # data received is the same data that was originally sent. This header
328
+ # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
329
+ # more information, see [Checking object integrity][1] in the *Amazon S3
330
+ # User Guide*.
331
+ #
332
+ #
333
+ #
334
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
335
+ # @option options [String] :checksum_sha256
336
+ # This header can be used as a data integrity check to verify that the
337
+ # data received is the same data that was originally sent. This header
338
+ # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
339
+ # For more information, see [Checking object integrity][1] in the
340
+ # *Amazon S3 User Guide*.
341
+ #
342
+ #
343
+ #
344
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
249
345
  # @option options [String] :request_payer
250
- # Confirms that the requester knows that she or he will be charged for
251
- # the request. Bucket owners need not specify this parameter in their
252
- # requests. Documentation on downloading objects from requester pays
253
- # buckets can be found at
254
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
346
+ # Confirms that the requester knows that they will be charged for the
347
+ # request. Bucket owners need not specify this parameter in their
348
+ # requests. If either the source or destination S3 bucket has Requester
349
+ # Pays enabled, the requester will pay for corresponding charges to copy
350
+ # the object. For information about downloading objects from Requester
351
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
352
+ # in the *Amazon S3 User Guide*.
353
+ #
354
+ # <note markdown="1"> This functionality is not supported for directory buckets.
355
+ #
356
+ # </note>
357
+ #
358
+ #
359
+ #
360
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
361
+ # @option options [String] :expected_bucket_owner
362
+ # The account ID of the expected bucket owner. If the account ID that
363
+ # you provide does not match the actual owner of the bucket, the request
364
+ # fails with the HTTP status code `403 Forbidden` (access denied).
365
+ # @option options [String] :sse_customer_algorithm
366
+ # The server-side encryption (SSE) algorithm used to encrypt the object.
367
+ # This parameter is required only when the object was created using a
368
+ # checksum algorithm or if your bucket policy requires the use of SSE-C.
369
+ # For more information, see [Protecting data using SSE-C keys][1] in the
370
+ # *Amazon S3 User Guide*.
371
+ #
372
+ # <note markdown="1"> This functionality is not supported for directory buckets.
373
+ #
374
+ # </note>
375
+ #
376
+ #
377
+ #
378
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key
379
+ # @option options [String] :sse_customer_key
380
+ # The server-side encryption (SSE) customer managed key. This parameter
381
+ # is needed only when the object was created using a checksum algorithm.
382
+ # For more information, see [Protecting data using SSE-C keys][1] in the
383
+ # *Amazon S3 User Guide*.
384
+ #
385
+ # <note markdown="1"> This functionality is not supported for directory buckets.
386
+ #
387
+ # </note>
388
+ #
389
+ #
390
+ #
391
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
392
+ # @option options [String] :sse_customer_key_md5
393
+ # The MD5 server-side encryption (SSE) customer managed key. This
394
+ # parameter is needed only when the object was created using a checksum
395
+ # algorithm. For more information, see [Protecting data using SSE-C
396
+ # keys][1] in the *Amazon S3 User Guide*.
397
+ #
398
+ # <note markdown="1"> This functionality is not supported for directory buckets.
399
+ #
400
+ # </note>
401
+ #
402
+ #
403
+ #
404
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
255
405
  # @return [Object]
256
406
  def complete(options = {})
257
407
  options = options.merge(
@@ -259,7 +409,9 @@ module Aws::S3
259
409
  key: @object_key,
260
410
  upload_id: @id
261
411
  )
262
- resp = @client.complete_multipart_upload(options)
412
+ Aws::Plugins::UserAgent.feature('resource') do
413
+ @client.complete_multipart_upload(options)
414
+ end
263
415
  Object.new(
264
416
  bucket_name: @bucket_name,
265
417
  key: @object_key,
@@ -294,14 +446,71 @@ module Aws::S3
294
446
  #
295
447
  # parts = multipart_upload.parts({
296
448
  # request_payer: "requester", # accepts requester
449
+ # expected_bucket_owner: "AccountId",
450
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
451
+ # sse_customer_key: "SSECustomerKey",
452
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
297
453
  # })
298
454
  # @param [Hash] options ({})
299
455
  # @option options [String] :request_payer
300
- # Confirms that the requester knows that she or he will be charged for
301
- # the request. Bucket owners need not specify this parameter in their
302
- # requests. Documentation on downloading objects from requester pays
303
- # buckets can be found at
304
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
456
+ # Confirms that the requester knows that they will be charged for the
457
+ # request. Bucket owners need not specify this parameter in their
458
+ # requests. If either the source or destination S3 bucket has Requester
459
+ # Pays enabled, the requester will pay for corresponding charges to copy
460
+ # the object. For information about downloading objects from Requester
461
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
462
+ # in the *Amazon S3 User Guide*.
463
+ #
464
+ # <note markdown="1"> This functionality is not supported for directory buckets.
465
+ #
466
+ # </note>
467
+ #
468
+ #
469
+ #
470
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
471
+ # @option options [String] :expected_bucket_owner
472
+ # The account ID of the expected bucket owner. If the account ID that
473
+ # you provide does not match the actual owner of the bucket, the request
474
+ # fails with the HTTP status code `403 Forbidden` (access denied).
475
+ # @option options [String] :sse_customer_algorithm
476
+ # The server-side encryption (SSE) algorithm used to encrypt the object.
477
+ # This parameter is needed only when the object was created using a
478
+ # checksum algorithm. For more information, see [Protecting data using
479
+ # SSE-C keys][1] in the *Amazon S3 User Guide*.
480
+ #
481
+ # <note markdown="1"> This functionality is not supported for directory buckets.
482
+ #
483
+ # </note>
484
+ #
485
+ #
486
+ #
487
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
488
+ # @option options [String] :sse_customer_key
489
+ # The server-side encryption (SSE) customer managed key. This parameter
490
+ # is needed only when the object was created using a checksum algorithm.
491
+ # For more information, see [Protecting data using SSE-C keys][1] in the
492
+ # *Amazon S3 User Guide*.
493
+ #
494
+ # <note markdown="1"> This functionality is not supported for directory buckets.
495
+ #
496
+ # </note>
497
+ #
498
+ #
499
+ #
500
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
501
+ # @option options [String] :sse_customer_key_md5
502
+ # The MD5 server-side encryption (SSE) customer managed key. This
503
+ # parameter is needed only when the object was created using a checksum
504
+ # algorithm. For more information, see [Protecting data using SSE-C
505
+ # keys][1] in the *Amazon S3 User Guide*.
506
+ #
507
+ # <note markdown="1"> This functionality is not supported for directory buckets.
508
+ #
509
+ # </note>
510
+ #
511
+ #
512
+ #
513
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
305
514
  # @return [MultipartUploadPart::Collection]
306
515
  def parts(options = {})
307
516
  batches = Enumerator.new do |y|
@@ -310,7 +519,9 @@ module Aws::S3
310
519
  key: @object_key,
311
520
  upload_id: @id
312
521
  )
313
- resp = @client.list_parts(options)
522
+ resp = Aws::Plugins::UserAgent.feature('resource') do
523
+ @client.list_parts(options)
524
+ end
314
525
  resp.each_page do |page|
315
526
  batch = []
316
527
  page.data.parts.each do |p|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Aws
2
4
  module S3
3
5
  class MultipartUploadError < StandardError