aws-sdk-s3 1.109.0 → 1.156.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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +352 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +241 -0
  6. data/lib/aws-sdk-s3/bucket.rb +585 -110
  7. data/lib/aws-sdk-s3/bucket_acl.rb +28 -6
  8. data/lib/aws-sdk-s3/bucket_cors.rb +34 -10
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +34 -10
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +34 -10
  11. data/lib/aws-sdk-s3/bucket_logging.rb +35 -6
  12. data/lib/aws-sdk-s3/bucket_notification.rb +12 -6
  13. data/lib/aws-sdk-s3/bucket_policy.rb +78 -10
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +28 -6
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +34 -10
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +72 -14
  18. data/lib/aws-sdk-s3/bucket_website.rb +34 -10
  19. data/lib/aws-sdk-s3/client.rb +7900 -3252
  20. data/lib/aws-sdk-s3/client_api.rb +706 -228
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
  22. data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
  23. data/lib/aws-sdk-s3/customizations/object.rb +97 -21
  24. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  25. data/lib/aws-sdk-s3/customizations.rb +10 -0
  26. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  27. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  28. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  29. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  30. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  31. data/lib/aws-sdk-s3/endpoint_parameters.rb +186 -0
  32. data/lib/aws-sdk-s3/endpoint_provider.rb +592 -0
  33. data/lib/aws-sdk-s3/endpoints.rb +2689 -0
  34. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  35. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  36. data/lib/aws-sdk-s3/file_downloader.rb +170 -45
  37. data/lib/aws-sdk-s3/file_uploader.rb +11 -4
  38. data/lib/aws-sdk-s3/multipart_file_uploader.rb +30 -11
  39. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +46 -17
  40. data/lib/aws-sdk-s3/multipart_upload.rb +194 -19
  41. data/lib/aws-sdk-s3/multipart_upload_part.rb +280 -30
  42. data/lib/aws-sdk-s3/object.rb +1753 -266
  43. data/lib/aws-sdk-s3/object_acl.rb +49 -13
  44. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  45. data/lib/aws-sdk-s3/object_multipart_copier.rb +46 -22
  46. data/lib/aws-sdk-s3/object_summary.rb +1497 -221
  47. data/lib/aws-sdk-s3/object_version.rb +383 -58
  48. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -50
  49. data/lib/aws-sdk-s3/plugins/access_grants.rb +114 -0
  50. data/lib/aws-sdk-s3/plugins/arn.rb +0 -184
  51. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  52. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  53. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -49
  54. data/lib/aws-sdk-s3/plugins/endpoints.rb +274 -0
  55. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  56. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
  57. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
  58. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
  59. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  60. data/lib/aws-sdk-s3/plugins/md5s.rb +6 -3
  61. data/lib/aws-sdk-s3/plugins/s3_signer.rb +42 -126
  62. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  63. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  64. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  65. data/lib/aws-sdk-s3/presigner.rb +28 -37
  66. data/lib/aws-sdk-s3/resource.rb +89 -13
  67. data/lib/aws-sdk-s3/types.rb +6544 -4909
  68. data/lib/aws-sdk-s3.rb +5 -1
  69. data/sig/bucket.rbs +212 -0
  70. data/sig/bucket_acl.rbs +78 -0
  71. data/sig/bucket_cors.rbs +69 -0
  72. data/sig/bucket_lifecycle.rbs +88 -0
  73. data/sig/bucket_lifecycle_configuration.rbs +111 -0
  74. data/sig/bucket_logging.rbs +76 -0
  75. data/sig/bucket_notification.rbs +114 -0
  76. data/sig/bucket_policy.rbs +59 -0
  77. data/sig/bucket_request_payment.rbs +54 -0
  78. data/sig/bucket_tagging.rbs +65 -0
  79. data/sig/bucket_versioning.rbs +77 -0
  80. data/sig/bucket_website.rbs +93 -0
  81. data/sig/client.rbs +2381 -0
  82. data/sig/customizations/bucket.rbs +19 -0
  83. data/sig/customizations/object.rbs +38 -0
  84. data/sig/customizations/object_summary.rbs +35 -0
  85. data/sig/errors.rbs +34 -0
  86. data/sig/multipart_upload.rbs +110 -0
  87. data/sig/multipart_upload_part.rbs +105 -0
  88. data/sig/object.rbs +442 -0
  89. data/sig/object_acl.rbs +86 -0
  90. data/sig/object_summary.rbs +334 -0
  91. data/sig/object_version.rbs +137 -0
  92. data/sig/resource.rbs +127 -0
  93. data/sig/types.rbs +2568 -0
  94. data/sig/waiters.rbs +95 -0
  95. metadata +50 -16
  96. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  97. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -68
  98. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  99. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -74
  100. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -69,6 +69,11 @@ module Aws::S3
69
69
  end
70
70
 
71
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>
72
77
  # @return [String]
73
78
  def storage_class
74
79
  data[:storage_class]
@@ -76,6 +81,11 @@ module Aws::S3
76
81
 
77
82
  # Specifies the owner of the object that is part of the multipart
78
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>
79
89
  # @return [Types::Owner]
80
90
  def owner
81
91
  data[:owner]
@@ -87,6 +97,12 @@ module Aws::S3
87
97
  data[:initiator]
88
98
  end
89
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
+
90
106
  # @!endgroup
91
107
 
92
108
  # @return [Client]
@@ -211,7 +227,9 @@ module Aws::S3
211
227
  :retry
212
228
  end
213
229
  end
214
- Aws::Waiters::Waiter.new(options).wait({})
230
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
231
+ Aws::Waiters::Waiter.new(options).wait({})
232
+ end
215
233
  end
216
234
 
217
235
  # @!group Actions
@@ -226,17 +244,23 @@ module Aws::S3
226
244
  # @option options [String] :request_payer
227
245
  # Confirms that the requester knows that they will be charged for the
228
246
  # request. Bucket owners need not specify this parameter in their
229
- # requests. For information about downloading objects from requester
230
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
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]
231
251
  # in the *Amazon S3 User Guide*.
232
252
  #
253
+ # <note markdown="1"> This functionality is not supported for directory buckets.
254
+ #
255
+ # </note>
256
+ #
233
257
  #
234
258
  #
235
259
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
236
260
  # @option options [String] :expected_bucket_owner
237
- # The account ID of the expected bucket owner. If the bucket is owned by
238
- # a different account, the request will fail with an HTTP `403 (Access
239
- # Denied)` error.
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).
240
264
  # @return [Types::AbortMultipartUploadOutput]
241
265
  def abort(options = {})
242
266
  options = options.merge(
@@ -244,7 +268,9 @@ module Aws::S3
244
268
  key: @object_key,
245
269
  upload_id: @id
246
270
  )
247
- resp = @client.abort_multipart_upload(options)
271
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
272
+ @client.abort_multipart_upload(options)
273
+ end
248
274
  resp.data
249
275
  end
250
276
 
@@ -255,30 +281,127 @@ module Aws::S3
255
281
  # parts: [
256
282
  # {
257
283
  # etag: "ETag",
284
+ # checksum_crc32: "ChecksumCRC32",
285
+ # checksum_crc32c: "ChecksumCRC32C",
286
+ # checksum_sha1: "ChecksumSHA1",
287
+ # checksum_sha256: "ChecksumSHA256",
258
288
  # part_number: 1,
259
289
  # },
260
290
  # ],
261
291
  # },
292
+ # checksum_crc32: "ChecksumCRC32",
293
+ # checksum_crc32c: "ChecksumCRC32C",
294
+ # checksum_sha1: "ChecksumSHA1",
295
+ # checksum_sha256: "ChecksumSHA256",
262
296
  # request_payer: "requester", # accepts requester
263
297
  # expected_bucket_owner: "AccountId",
298
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
299
+ # sse_customer_key: "SSECustomerKey",
300
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
264
301
  # })
265
302
  # @param [Hash] options ({})
266
303
  # @option options [Types::CompletedMultipartUpload] :multipart_upload
267
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
268
345
  # @option options [String] :request_payer
269
346
  # Confirms that the requester knows that they will be charged for the
270
347
  # request. Bucket owners need not specify this parameter in their
271
- # requests. For information about downloading objects from requester
272
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
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]
273
352
  # in the *Amazon S3 User Guide*.
274
353
  #
354
+ # <note markdown="1"> This functionality is not supported for directory buckets.
355
+ #
356
+ # </note>
357
+ #
275
358
  #
276
359
  #
277
360
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
278
361
  # @option options [String] :expected_bucket_owner
279
- # The account ID of the expected bucket owner. If the bucket is owned by
280
- # a different account, the request will fail with an HTTP `403 (Access
281
- # Denied)` error.
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
282
405
  # @return [Object]
283
406
  def complete(options = {})
284
407
  options = options.merge(
@@ -286,7 +409,9 @@ module Aws::S3
286
409
  key: @object_key,
287
410
  upload_id: @id
288
411
  )
289
- @client.complete_multipart_upload(options)
412
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
413
+ @client.complete_multipart_upload(options)
414
+ end
290
415
  Object.new(
291
416
  bucket_name: @bucket_name,
292
417
  key: @object_key,
@@ -322,22 +447,70 @@ module Aws::S3
322
447
  # parts = multipart_upload.parts({
323
448
  # request_payer: "requester", # accepts requester
324
449
  # expected_bucket_owner: "AccountId",
450
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
451
+ # sse_customer_key: "SSECustomerKey",
452
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
325
453
  # })
326
454
  # @param [Hash] options ({})
327
455
  # @option options [String] :request_payer
328
456
  # Confirms that the requester knows that they will be charged for the
329
457
  # request. Bucket owners need not specify this parameter in their
330
- # requests. For information about downloading objects from requester
331
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
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]
332
462
  # in the *Amazon S3 User Guide*.
333
463
  #
464
+ # <note markdown="1"> This functionality is not supported for directory buckets.
465
+ #
466
+ # </note>
467
+ #
334
468
  #
335
469
  #
336
470
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
337
471
  # @option options [String] :expected_bucket_owner
338
- # The account ID of the expected bucket owner. If the bucket is owned by
339
- # a different account, the request will fail with an HTTP `403 (Access
340
- # Denied)` error.
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
341
514
  # @return [MultipartUploadPart::Collection]
342
515
  def parts(options = {})
343
516
  batches = Enumerator.new do |y|
@@ -346,7 +519,9 @@ module Aws::S3
346
519
  key: @object_key,
347
520
  upload_id: @id
348
521
  )
349
- resp = @client.list_parts(options)
522
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
523
+ @client.list_parts(options)
524
+ end
350
525
  resp.each_page do |page|
351
526
  batch = []
352
527
  page.data.parts.each do |p|