aws-sdk-s3 1.79.1 → 1.212.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 (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1548 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  6. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  7. data/lib/aws-sdk-s3/bucket.rb +900 -98
  8. data/lib/aws-sdk-s3/bucket_acl.rb +44 -10
  9. data/lib/aws-sdk-s3/bucket_cors.rb +51 -11
  10. data/lib/aws-sdk-s3/bucket_lifecycle.rb +53 -8
  11. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +107 -9
  12. data/lib/aws-sdk-s3/bucket_logging.rb +43 -6
  13. data/lib/aws-sdk-s3/bucket_notification.rb +32 -9
  14. data/lib/aws-sdk-s3/bucket_policy.rb +90 -6
  15. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  16. data/lib/aws-sdk-s3/bucket_request_payment.rb +38 -8
  17. data/lib/aws-sdk-s3/bucket_tagging.rb +46 -7
  18. data/lib/aws-sdk-s3/bucket_versioning.rb +127 -9
  19. data/lib/aws-sdk-s3/bucket_website.rb +46 -7
  20. data/lib/aws-sdk-s3/client.rb +13729 -3146
  21. data/lib/aws-sdk-s3/client_api.rb +1604 -277
  22. data/lib/aws-sdk-s3/customizations/bucket.rb +31 -47
  23. data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
  24. data/lib/aws-sdk-s3/customizations/object.rb +253 -82
  25. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  26. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  27. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  28. data/lib/aws-sdk-s3/customizations.rb +28 -29
  29. data/lib/aws-sdk-s3/default_executor.rb +103 -0
  30. data/lib/aws-sdk-s3/encryption/client.rb +9 -5
  31. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
  32. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +2 -0
  33. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +2 -0
  34. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +15 -9
  35. data/lib/aws-sdk-s3/encryptionV2/client.rb +105 -26
  36. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +7 -165
  37. data/lib/aws-sdk-s3/encryptionV2/decryption.rb +205 -0
  38. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +20 -3
  39. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +2 -4
  40. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +2 -0
  41. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +18 -6
  42. data/lib/aws-sdk-s3/encryptionV2/utils.rb +5 -0
  43. data/lib/aws-sdk-s3/encryptionV3/client.rb +885 -0
  44. data/lib/aws-sdk-s3/encryptionV3/decrypt_handler.rb +98 -0
  45. data/lib/aws-sdk-s3/encryptionV3/decryption.rb +244 -0
  46. data/lib/aws-sdk-s3/encryptionV3/default_cipher_provider.rb +159 -0
  47. data/lib/aws-sdk-s3/encryptionV3/default_key_provider.rb +35 -0
  48. data/lib/aws-sdk-s3/encryptionV3/encrypt_handler.rb +98 -0
  49. data/lib/aws-sdk-s3/encryptionV3/errors.rb +47 -0
  50. data/lib/aws-sdk-s3/encryptionV3/io_auth_decrypter.rb +60 -0
  51. data/lib/aws-sdk-s3/encryptionV3/io_decrypter.rb +35 -0
  52. data/lib/aws-sdk-s3/encryptionV3/io_encrypter.rb +84 -0
  53. data/lib/aws-sdk-s3/encryptionV3/key_provider.rb +28 -0
  54. data/lib/aws-sdk-s3/encryptionV3/kms_cipher_provider.rb +159 -0
  55. data/lib/aws-sdk-s3/encryptionV3/materials.rb +58 -0
  56. data/lib/aws-sdk-s3/encryptionV3/utils.rb +321 -0
  57. data/lib/aws-sdk-s3/encryption_v2.rb +1 -0
  58. data/lib/aws-sdk-s3/encryption_v3.rb +24 -0
  59. data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
  60. data/lib/aws-sdk-s3/endpoint_provider.rb +889 -0
  61. data/lib/aws-sdk-s3/endpoints.rb +1544 -0
  62. data/lib/aws-sdk-s3/errors.rb +80 -1
  63. data/lib/aws-sdk-s3/event_streams.rb +1 -1
  64. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  65. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  66. data/lib/aws-sdk-s3/file_downloader.rb +258 -82
  67. data/lib/aws-sdk-s3/file_uploader.rb +25 -14
  68. data/lib/aws-sdk-s3/legacy_signer.rb +17 -26
  69. data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
  70. data/lib/aws-sdk-s3/multipart_file_uploader.rb +111 -86
  71. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +110 -92
  72. data/lib/aws-sdk-s3/multipart_upload.rb +304 -14
  73. data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
  74. data/lib/aws-sdk-s3/multipart_upload_part.rb +344 -20
  75. data/lib/aws-sdk-s3/object.rb +2457 -225
  76. data/lib/aws-sdk-s3/object_acl.rb +76 -15
  77. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  78. data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -23
  79. data/lib/aws-sdk-s3/object_summary.rb +2033 -169
  80. data/lib/aws-sdk-s3/object_version.rb +470 -53
  81. data/lib/aws-sdk-s3/plugins/accelerate.rb +1 -39
  82. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  83. data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
  84. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -41
  85. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  86. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +44 -0
  87. data/lib/aws-sdk-s3/plugins/dualstack.rb +2 -49
  88. data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
  89. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +3 -1
  90. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
  91. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +1 -1
  92. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +87 -26
  93. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +8 -26
  94. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  95. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -68
  96. data/lib/aws-sdk-s3/plugins/s3_signer.rb +48 -88
  97. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +28 -9
  98. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
  99. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  100. data/lib/aws-sdk-s3/presigner.rb +50 -42
  101. data/lib/aws-sdk-s3/resource.rb +144 -15
  102. data/lib/aws-sdk-s3/transfer_manager.rb +321 -0
  103. data/lib/aws-sdk-s3/types.rb +12223 -4723
  104. data/lib/aws-sdk-s3/waiters.rb +1 -1
  105. data/lib/aws-sdk-s3.rb +37 -28
  106. data/sig/bucket.rbs +231 -0
  107. data/sig/bucket_acl.rbs +78 -0
  108. data/sig/bucket_cors.rbs +69 -0
  109. data/sig/bucket_lifecycle.rbs +88 -0
  110. data/sig/bucket_lifecycle_configuration.rbs +115 -0
  111. data/sig/bucket_logging.rbs +76 -0
  112. data/sig/bucket_notification.rbs +114 -0
  113. data/sig/bucket_policy.rbs +59 -0
  114. data/sig/bucket_request_payment.rbs +54 -0
  115. data/sig/bucket_tagging.rbs +65 -0
  116. data/sig/bucket_versioning.rbs +77 -0
  117. data/sig/bucket_website.rbs +93 -0
  118. data/sig/client.rbs +2612 -0
  119. data/sig/customizations/bucket.rbs +19 -0
  120. data/sig/customizations/object.rbs +38 -0
  121. data/sig/customizations/object_summary.rbs +35 -0
  122. data/sig/errors.rbs +44 -0
  123. data/sig/multipart_upload.rbs +120 -0
  124. data/sig/multipart_upload_part.rbs +109 -0
  125. data/sig/object.rbs +464 -0
  126. data/sig/object_acl.rbs +86 -0
  127. data/sig/object_summary.rbs +347 -0
  128. data/sig/object_version.rbs +143 -0
  129. data/sig/resource.rbs +141 -0
  130. data/sig/types.rbs +2899 -0
  131. data/sig/waiters.rbs +95 -0
  132. metadata +74 -16
  133. data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -212
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -76,6 +76,73 @@ module Aws::S3
76
76
  data[:size]
77
77
  end
78
78
 
79
+ # The Base64 encoded, 32-bit `CRC32` checksum of the part. This checksum
80
+ # is present if the object was uploaded with the `CRC32` checksum
81
+ # algorithm. For more information, see [Checking object integrity][1] in
82
+ # the *Amazon S3 User Guide*.
83
+ #
84
+ #
85
+ #
86
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
87
+ # @return [String]
88
+ def checksum_crc32
89
+ data[:checksum_crc32]
90
+ end
91
+
92
+ # The Base64 encoded, 32-bit `CRC32C` checksum of the part. This
93
+ # checksum is present if the object was uploaded with the `CRC32C`
94
+ # checksum algorithm. For more information, see [Checking object
95
+ # integrity][1] in the *Amazon S3 User Guide*.
96
+ #
97
+ #
98
+ #
99
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
100
+ # @return [String]
101
+ def checksum_crc32c
102
+ data[:checksum_crc32c]
103
+ end
104
+
105
+ # The Base64 encoded, 64-bit `CRC64NVME` checksum of the part. This
106
+ # checksum is present if the multipart upload request was created with
107
+ # the `CRC64NVME` checksum algorithm, or if the object was uploaded
108
+ # without a checksum (and Amazon S3 added the default checksum,
109
+ # `CRC64NVME`, to the uploaded object). For more information, see
110
+ # [Checking object integrity][1] in the *Amazon S3 User Guide*.
111
+ #
112
+ #
113
+ #
114
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
115
+ # @return [String]
116
+ def checksum_crc64nvme
117
+ data[:checksum_crc64nvme]
118
+ end
119
+
120
+ # The Base64 encoded, 160-bit `SHA1` checksum of the part. This checksum
121
+ # is present if the object was uploaded with the `SHA1` checksum
122
+ # algorithm. For more information, see [Checking object integrity][1] in
123
+ # the *Amazon S3 User Guide*.
124
+ #
125
+ #
126
+ #
127
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
128
+ # @return [String]
129
+ def checksum_sha1
130
+ data[:checksum_sha1]
131
+ end
132
+
133
+ # The Base64 encoded, 256-bit `SHA256` checksum of the part. This
134
+ # checksum is present if the object was uploaded with the `SHA256`
135
+ # checksum algorithm. For more information, see [Checking object
136
+ # integrity][1] in the *Amazon S3 User Guide*.
137
+ #
138
+ #
139
+ #
140
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
141
+ # @return [String]
142
+ def checksum_sha256
143
+ data[:checksum_sha256]
144
+ end
145
+
79
146
  # @!endgroup
80
147
 
81
148
  # @return [Client]
@@ -200,7 +267,9 @@ module Aws::S3
200
267
  :retry
201
268
  end
202
269
  end
203
- Aws::Waiters::Waiter.new(options).wait({})
270
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
271
+ Aws::Waiters::Waiter.new(options).wait({})
272
+ end
204
273
  end
205
274
 
206
275
  # @!group Actions
@@ -221,21 +290,125 @@ module Aws::S3
221
290
  # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
222
291
  # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
223
292
  # request_payer: "requester", # accepts requester
293
+ # expected_bucket_owner: "AccountId",
294
+ # expected_source_bucket_owner: "AccountId",
224
295
  # })
225
296
  # @param [Hash] options ({})
226
297
  # @option options [required, String] :copy_source
227
- # The name of the source bucket and key name of the source object,
228
- # separated by a slash (/). Must be URL-encoded.
298
+ # Specifies the source object for the copy operation. You specify the
299
+ # value in one of two formats, depending on whether you want to access
300
+ # the source object through an [access point][1]:
301
+ #
302
+ # * For objects not accessed through an access point, specify the name
303
+ # of the source bucket and key of the source object, separated by a
304
+ # slash (/). For example, to copy the object `reports/january.pdf`
305
+ # from the bucket `awsexamplebucket`, use
306
+ # `awsexamplebucket/reports/january.pdf`. The value must be
307
+ # URL-encoded.
308
+ #
309
+ # * For objects accessed through access points, specify the Amazon
310
+ # Resource Name (ARN) of the object as accessed through the access
311
+ # point, in the format
312
+ # `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
313
+ # For example, to copy the object `reports/january.pdf` through access
314
+ # point `my-access-point` owned by account `123456789012` in Region
315
+ # `us-west-2`, use the URL encoding of
316
+ # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
317
+ # The value must be URL encoded.
318
+ #
319
+ # <note markdown="1"> * Amazon S3 supports copy operations using Access points only when
320
+ # the source and destination buckets are in the same Amazon Web
321
+ # Services Region.
322
+ #
323
+ # * Access points are not supported by directory buckets.
324
+ #
325
+ # </note>
326
+ #
327
+ # Alternatively, for objects accessed through Amazon S3 on Outposts,
328
+ # specify the ARN of the object as accessed in the format
329
+ # `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
330
+ # For example, to copy the object `reports/january.pdf` through
331
+ # outpost `my-outpost` owned by account `123456789012` in Region
332
+ # `us-west-2`, use the URL encoding of
333
+ # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
334
+ # The value must be URL-encoded.
335
+ #
336
+ # If your bucket has versioning enabled, you could have multiple
337
+ # versions of the same object. By default, `x-amz-copy-source`
338
+ # identifies the current version of the source object to copy. To copy a
339
+ # specific version of the source object to copy, append
340
+ # `?versionId=<version-id>` to the `x-amz-copy-source` request header
341
+ # (for example, `x-amz-copy-source:
342
+ # /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
343
+ #
344
+ # If the current version is a delete marker and you don't specify a
345
+ # versionId in the `x-amz-copy-source` request header, Amazon S3 returns
346
+ # a `404 Not Found` error, because the object does not exist. If you
347
+ # specify versionId in the `x-amz-copy-source` and the versionId is a
348
+ # delete marker, Amazon S3 returns an HTTP `400 Bad Request` error,
349
+ # because you are not allowed to specify a delete marker as a version
350
+ # for the `x-amz-copy-source`.
351
+ #
352
+ # <note markdown="1"> **Directory buckets** - S3 Versioning isn't enabled and supported for
353
+ # directory buckets.
354
+ #
355
+ # </note>
356
+ #
357
+ #
358
+ #
359
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
229
360
  # @option options [String] :copy_source_if_match
230
361
  # Copies the object if its entity tag (ETag) matches the specified tag.
362
+ #
363
+ # If both of the `x-amz-copy-source-if-match` and
364
+ # `x-amz-copy-source-if-unmodified-since` headers are present in the
365
+ # request as follows:
366
+ #
367
+ # `x-amz-copy-source-if-match` condition evaluates to `true`, and;
368
+ #
369
+ # `x-amz-copy-source-if-unmodified-since` condition evaluates to
370
+ # `false`;
371
+ #
372
+ # Amazon S3 returns `200 OK` and copies the data.
231
373
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
232
374
  # Copies the object if it has been modified since the specified time.
375
+ #
376
+ # If both of the `x-amz-copy-source-if-none-match` and
377
+ # `x-amz-copy-source-if-modified-since` headers are present in the
378
+ # request as follows:
379
+ #
380
+ # `x-amz-copy-source-if-none-match` condition evaluates to `false`, and;
381
+ #
382
+ # `x-amz-copy-source-if-modified-since` condition evaluates to `true`;
383
+ #
384
+ # Amazon S3 returns `412 Precondition Failed` response code.
233
385
  # @option options [String] :copy_source_if_none_match
234
386
  # Copies the object if its entity tag (ETag) is different than the
235
387
  # specified ETag.
388
+ #
389
+ # If both of the `x-amz-copy-source-if-none-match` and
390
+ # `x-amz-copy-source-if-modified-since` headers are present in the
391
+ # request as follows:
392
+ #
393
+ # `x-amz-copy-source-if-none-match` condition evaluates to `false`, and;
394
+ #
395
+ # `x-amz-copy-source-if-modified-since` condition evaluates to `true`;
396
+ #
397
+ # Amazon S3 returns `412 Precondition Failed` response code.
236
398
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
237
399
  # Copies the object if it hasn't been modified since the specified
238
400
  # time.
401
+ #
402
+ # If both of the `x-amz-copy-source-if-match` and
403
+ # `x-amz-copy-source-if-unmodified-since` headers are present in the
404
+ # request as follows:
405
+ #
406
+ # `x-amz-copy-source-if-match` condition evaluates to `true`, and;
407
+ #
408
+ # `x-amz-copy-source-if-unmodified-since` condition evaluates to
409
+ # `false`;
410
+ #
411
+ # Amazon S3 returns `200 OK` and copies the data.
239
412
  # @option options [String] :copy_source_range
240
413
  # The range of bytes to copy from the source object. The range value
241
414
  # must use the form bytes=first-last, where the first and last are the
@@ -243,41 +416,87 @@ module Aws::S3
243
416
  # you want to copy the first 10 bytes of the source. You can copy a
244
417
  # range only if the source object is greater than 5 MB.
245
418
  # @option options [String] :sse_customer_algorithm
246
- # Specifies the algorithm to use to when encrypting the object (for
419
+ # Specifies the algorithm to use when encrypting the object (for
247
420
  # example, AES256).
421
+ #
422
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
423
+ # directory bucket.
424
+ #
425
+ # </note>
248
426
  # @option options [String] :sse_customer_key
249
427
  # Specifies the customer-provided encryption key for Amazon S3 to use in
250
428
  # encrypting data. This value is used to store the object and then it is
251
429
  # discarded; Amazon S3 does not store the encryption key. The key must
252
430
  # be appropriate for use with the algorithm specified in the
253
- # `x-amz-server-side​-encryption​-customer-algorithm` header. This must
254
- # be the same encryption key specified in the initiate multipart upload
431
+ # `x-amz-server-side-encryption-customer-algorithm` header. This must be
432
+ # the same encryption key specified in the initiate multipart upload
255
433
  # request.
434
+ #
435
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
436
+ # directory bucket.
437
+ #
438
+ # </note>
256
439
  # @option options [String] :sse_customer_key_md5
257
440
  # Specifies the 128-bit MD5 digest of the encryption key according to
258
441
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
259
442
  # ensure that the encryption key was transmitted without error.
443
+ #
444
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
445
+ # directory bucket.
446
+ #
447
+ # </note>
260
448
  # @option options [String] :copy_source_sse_customer_algorithm
261
449
  # Specifies the algorithm to use when decrypting the source object (for
262
- # example, AES256).
450
+ # example, `AES256`).
451
+ #
452
+ # <note markdown="1"> This functionality is not supported when the source object is in a
453
+ # directory bucket.
454
+ #
455
+ # </note>
263
456
  # @option options [String] :copy_source_sse_customer_key
264
457
  # Specifies the customer-provided encryption key for Amazon S3 to use to
265
458
  # decrypt the source object. The encryption key provided in this header
266
459
  # must be one that was used when the source object was created.
460
+ #
461
+ # <note markdown="1"> This functionality is not supported when the source object is in a
462
+ # directory bucket.
463
+ #
464
+ # </note>
267
465
  # @option options [String] :copy_source_sse_customer_key_md5
268
466
  # Specifies the 128-bit MD5 digest of the encryption key according to
269
467
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
270
468
  # ensure that the encryption key was transmitted without error.
469
+ #
470
+ # <note markdown="1"> This functionality is not supported when the source object is in a
471
+ # directory bucket.
472
+ #
473
+ # </note>
271
474
  # @option options [String] :request_payer
272
475
  # Confirms that the requester knows that they will be charged for the
273
476
  # request. Bucket owners need not specify this parameter in their
274
- # requests. For information about downloading objects from requester
275
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
276
- # in the *Amazon S3 Developer Guide*.
477
+ # requests. If either the source or destination S3 bucket has Requester
478
+ # Pays enabled, the requester will pay for corresponding charges to copy
479
+ # the object. For information about downloading objects from Requester
480
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
481
+ # in the *Amazon S3 User Guide*.
482
+ #
483
+ # <note markdown="1"> This functionality is not supported for directory buckets.
484
+ #
485
+ # </note>
277
486
  #
278
487
  #
279
488
  #
280
489
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
490
+ # @option options [String] :expected_bucket_owner
491
+ # The account ID of the expected destination bucket owner. If the
492
+ # account ID that you provide does not match the actual owner of the
493
+ # destination bucket, the request fails with the HTTP status code `403
494
+ # Forbidden` (access denied).
495
+ # @option options [String] :expected_source_bucket_owner
496
+ # The account ID of the expected source bucket owner. If the account ID
497
+ # that you provide does not match the actual owner of the source bucket,
498
+ # the request fails with the HTTP status code `403 Forbidden` (access
499
+ # denied).
281
500
  # @return [Types::UploadPartCopyOutput]
282
501
  def copy_from(options = {})
283
502
  options = options.merge(
@@ -286,7 +505,9 @@ module Aws::S3
286
505
  upload_id: @multipart_upload_id,
287
506
  part_number: @part_number
288
507
  )
289
- resp = @client.upload_part_copy(options)
508
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
509
+ @client.upload_part_copy(options)
510
+ end
290
511
  resp.data
291
512
  end
292
513
 
@@ -296,10 +517,17 @@ module Aws::S3
296
517
  # body: source_file,
297
518
  # content_length: 1,
298
519
  # content_md5: "ContentMD5",
520
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
521
+ # checksum_crc32: "ChecksumCRC32",
522
+ # checksum_crc32c: "ChecksumCRC32C",
523
+ # checksum_crc64nvme: "ChecksumCRC64NVME",
524
+ # checksum_sha1: "ChecksumSHA1",
525
+ # checksum_sha256: "ChecksumSHA256",
299
526
  # sse_customer_algorithm: "SSECustomerAlgorithm",
300
527
  # sse_customer_key: "SSECustomerKey",
301
528
  # sse_customer_key_md5: "SSECustomerKeyMD5",
302
529
  # request_payer: "requester", # accepts requester
530
+ # expected_bucket_owner: "AccountId",
303
531
  # })
304
532
  # @param [Hash] options ({})
305
533
  # @option options [String, StringIO, File] :body
@@ -308,34 +536,128 @@ module Aws::S3
308
536
  # Size of the body in bytes. This parameter is useful when the size of
309
537
  # the body cannot be determined automatically.
310
538
  # @option options [String] :content_md5
311
- # The base64-encoded 128-bit MD5 digest of the part data. This parameter
539
+ # The Base64 encoded 128-bit MD5 digest of the part data. This parameter
312
540
  # is auto-populated when using the command from the CLI. This parameter
313
541
  # is required if object lock parameters are specified.
542
+ #
543
+ # <note markdown="1"> This functionality is not supported for directory buckets.
544
+ #
545
+ # </note>
546
+ # @option options [String] :checksum_algorithm
547
+ # Indicates the algorithm used to create the checksum for the object
548
+ # when you use the SDK. This header will not provide any additional
549
+ # functionality if you don't use the SDK. When you send this header,
550
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
551
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
552
+ # status code `400 Bad Request`. For more information, see [Checking
553
+ # object integrity][1] in the *Amazon S3 User Guide*.
554
+ #
555
+ # If you provide an individual checksum, Amazon S3 ignores any provided
556
+ # `ChecksumAlgorithm` parameter.
557
+ #
558
+ # This checksum algorithm must be the same for all parts and it match
559
+ # the checksum value supplied in the `CreateMultipartUpload` request.
560
+ #
561
+ #
562
+ #
563
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
564
+ # @option options [String] :checksum_crc32
565
+ # This header can be used as a data integrity check to verify that the
566
+ # data received is the same data that was originally sent. This header
567
+ # specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
568
+ # For more information, see [Checking object integrity][1] in the
569
+ # *Amazon S3 User Guide*.
570
+ #
571
+ #
572
+ #
573
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
574
+ # @option options [String] :checksum_crc32c
575
+ # This header can be used as a data integrity check to verify that the
576
+ # data received is the same data that was originally sent. This header
577
+ # specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
578
+ # For more information, see [Checking object integrity][1] in the
579
+ # *Amazon S3 User Guide*.
580
+ #
581
+ #
582
+ #
583
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
584
+ # @option options [String] :checksum_crc64nvme
585
+ # This header can be used as a data integrity check to verify that the
586
+ # data received is the same data that was originally sent. This header
587
+ # specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the part.
588
+ # For more information, see [Checking object integrity][1] in the
589
+ # *Amazon S3 User Guide*.
590
+ #
591
+ #
592
+ #
593
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
594
+ # @option options [String] :checksum_sha1
595
+ # This header can be used as a data integrity check to verify that the
596
+ # data received is the same data that was originally sent. This header
597
+ # specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
598
+ # more information, see [Checking object integrity][1] in the *Amazon S3
599
+ # User Guide*.
600
+ #
601
+ #
602
+ #
603
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
604
+ # @option options [String] :checksum_sha256
605
+ # This header can be used as a data integrity check to verify that the
606
+ # data received is the same data that was originally sent. This header
607
+ # specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
608
+ # For more information, see [Checking object integrity][1] in the
609
+ # *Amazon S3 User Guide*.
610
+ #
611
+ #
612
+ #
613
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
314
614
  # @option options [String] :sse_customer_algorithm
315
- # Specifies the algorithm to use to when encrypting the object (for
615
+ # Specifies the algorithm to use when encrypting the object (for
316
616
  # example, AES256).
617
+ #
618
+ # <note markdown="1"> This functionality is not supported for directory buckets.
619
+ #
620
+ # </note>
317
621
  # @option options [String] :sse_customer_key
318
622
  # Specifies the customer-provided encryption key for Amazon S3 to use in
319
623
  # encrypting data. This value is used to store the object and then it is
320
624
  # discarded; Amazon S3 does not store the encryption key. The key must
321
625
  # be appropriate for use with the algorithm specified in the
322
- # `x-amz-server-side​-encryption​-customer-algorithm header`. This must
323
- # be the same encryption key specified in the initiate multipart upload
626
+ # `x-amz-server-side-encryption-customer-algorithm header`. This must be
627
+ # the same encryption key specified in the initiate multipart upload
324
628
  # request.
629
+ #
630
+ # <note markdown="1"> This functionality is not supported for directory buckets.
631
+ #
632
+ # </note>
325
633
  # @option options [String] :sse_customer_key_md5
326
634
  # Specifies the 128-bit MD5 digest of the encryption key according to
327
635
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
328
636
  # ensure that the encryption key was transmitted without error.
637
+ #
638
+ # <note markdown="1"> This functionality is not supported for directory buckets.
639
+ #
640
+ # </note>
329
641
  # @option options [String] :request_payer
330
642
  # Confirms that the requester knows that they will be charged for the
331
643
  # request. Bucket owners need not specify this parameter in their
332
- # requests. For information about downloading objects from requester
333
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
334
- # in the *Amazon S3 Developer Guide*.
644
+ # requests. If either the source or destination S3 bucket has Requester
645
+ # Pays enabled, the requester will pay for corresponding charges to copy
646
+ # the object. For information about downloading objects from Requester
647
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
648
+ # in the *Amazon S3 User Guide*.
649
+ #
650
+ # <note markdown="1"> This functionality is not supported for directory buckets.
651
+ #
652
+ # </note>
335
653
  #
336
654
  #
337
655
  #
338
656
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
657
+ # @option options [String] :expected_bucket_owner
658
+ # The account ID of the expected bucket owner. If the account ID that
659
+ # you provide does not match the actual owner of the bucket, the request
660
+ # fails with the HTTP status code `403 Forbidden` (access denied).
339
661
  # @return [Types::UploadPartOutput]
340
662
  def upload(options = {})
341
663
  options = options.merge(
@@ -344,7 +666,9 @@ module Aws::S3
344
666
  upload_id: @multipart_upload_id,
345
667
  part_number: @part_number
346
668
  )
347
- resp = @client.upload_part(options)
669
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
670
+ @client.upload_part(options)
671
+ end
348
672
  resp.data
349
673
  end
350
674