aws-sdk-s3 1.136.0 → 1.176.1

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 (86) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +250 -1
  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 +250 -0
  6. data/lib/aws-sdk-s3/bucket.rb +671 -139
  7. data/lib/aws-sdk-s3/bucket_acl.rb +12 -12
  8. data/lib/aws-sdk-s3/bucket_cors.rb +16 -16
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +21 -16
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +74 -17
  11. data/lib/aws-sdk-s3/bucket_logging.rb +19 -12
  12. data/lib/aws-sdk-s3/bucket_notification.rb +6 -6
  13. data/lib/aws-sdk-s3/bucket_policy.rb +62 -18
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +12 -12
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +16 -16
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +32 -32
  18. data/lib/aws-sdk-s3/bucket_website.rb +16 -16
  19. data/lib/aws-sdk-s3/client.rb +7597 -2823
  20. data/lib/aws-sdk-s3/client_api.rb +288 -22
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
  22. data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
  23. data/lib/aws-sdk-s3/customizations/object.rb +11 -5
  24. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  25. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  26. data/lib/aws-sdk-s3/customizations.rb +25 -31
  27. data/lib/aws-sdk-s3/encryption/client.rb +2 -2
  28. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
  29. data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
  30. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
  31. data/lib/aws-sdk-s3/endpoint_parameters.rb +53 -18
  32. data/lib/aws-sdk-s3/endpoint_provider.rb +125 -6
  33. data/lib/aws-sdk-s3/endpoints.rb +545 -1261
  34. data/lib/aws-sdk-s3/errors.rb +47 -0
  35. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  36. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  37. data/lib/aws-sdk-s3/file_downloader.rb +1 -2
  38. data/lib/aws-sdk-s3/file_uploader.rb +1 -1
  39. data/lib/aws-sdk-s3/multipart_file_uploader.rb +4 -4
  40. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +6 -5
  41. data/lib/aws-sdk-s3/multipart_upload.rb +139 -36
  42. data/lib/aws-sdk-s3/multipart_upload_part.rb +175 -54
  43. data/lib/aws-sdk-s3/object.rb +1923 -313
  44. data/lib/aws-sdk-s3/object_acl.rb +34 -22
  45. data/lib/aws-sdk-s3/object_copier.rb +1 -1
  46. data/lib/aws-sdk-s3/object_multipart_copier.rb +10 -8
  47. data/lib/aws-sdk-s3/object_summary.rb +1690 -250
  48. data/lib/aws-sdk-s3/object_version.rb +397 -67
  49. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  50. data/lib/aws-sdk-s3/plugins/endpoints.rb +32 -208
  51. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
  52. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
  53. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  54. data/lib/aws-sdk-s3/plugins/md5s.rb +2 -1
  55. data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
  56. data/lib/aws-sdk-s3/presigner.rb +5 -2
  57. data/lib/aws-sdk-s3/resource.rb +121 -22
  58. data/lib/aws-sdk-s3/types.rb +5960 -1526
  59. data/lib/aws-sdk-s3.rb +35 -31
  60. data/sig/bucket.rbs +221 -0
  61. data/sig/bucket_acl.rbs +78 -0
  62. data/sig/bucket_cors.rbs +69 -0
  63. data/sig/bucket_lifecycle.rbs +88 -0
  64. data/sig/bucket_lifecycle_configuration.rbs +115 -0
  65. data/sig/bucket_logging.rbs +76 -0
  66. data/sig/bucket_notification.rbs +114 -0
  67. data/sig/bucket_policy.rbs +59 -0
  68. data/sig/bucket_request_payment.rbs +54 -0
  69. data/sig/bucket_tagging.rbs +65 -0
  70. data/sig/bucket_versioning.rbs +77 -0
  71. data/sig/bucket_website.rbs +93 -0
  72. data/sig/client.rbs +2450 -0
  73. data/sig/customizations/bucket.rbs +19 -0
  74. data/sig/customizations/object.rbs +38 -0
  75. data/sig/customizations/object_summary.rbs +35 -0
  76. data/sig/errors.rbs +42 -0
  77. data/sig/multipart_upload.rbs +113 -0
  78. data/sig/multipart_upload_part.rbs +105 -0
  79. data/sig/object.rbs +448 -0
  80. data/sig/object_acl.rbs +86 -0
  81. data/sig/object_summary.rbs +340 -0
  82. data/sig/object_version.rbs +140 -0
  83. data/sig/resource.rbs +132 -0
  84. data/sig/types.rbs +2682 -0
  85. data/sig/waiters.rbs +95 -0
  86. metadata +44 -11
@@ -41,6 +41,14 @@ module Aws::S3
41
41
  data[:creation_date]
42
42
  end
43
43
 
44
+ # `BucketRegion` indicates the Amazon Web Services region where the
45
+ # bucket is located. If the request contains at least one valid
46
+ # parameter, it is included in the response.
47
+ # @return [String]
48
+ def bucket_region
49
+ data[:bucket_region]
50
+ end
51
+
44
52
  # @!endgroup
45
53
 
46
54
  # @return [Client]
@@ -95,7 +103,7 @@ module Aws::S3
95
103
  options, params = separate_params_and_options(options)
96
104
  waiter = Waiters::BucketExists.new(options)
97
105
  yield_waiter_and_warn(waiter, &block) if block_given?
98
- Aws::Plugins::UserAgent.feature('resource') do
106
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
99
107
  waiter.wait(params.merge(bucket: @name))
100
108
  end
101
109
  Bucket.new({
@@ -114,7 +122,7 @@ module Aws::S3
114
122
  options, params = separate_params_and_options(options)
115
123
  waiter = Waiters::BucketNotExists.new(options)
116
124
  yield_waiter_and_warn(waiter, &block) if block_given?
117
- Aws::Plugins::UserAgent.feature('resource') do
125
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
118
126
  waiter.wait(params.merge(bucket: @name))
119
127
  end
120
128
  Bucket.new({
@@ -217,7 +225,7 @@ module Aws::S3
217
225
  :retry
218
226
  end
219
227
  end
220
- Aws::Plugins::UserAgent.feature('resource') do
228
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
221
229
  Aws::Waiters::Waiter.new(options).wait({})
222
230
  end
223
231
  end
@@ -229,7 +237,15 @@ module Aws::S3
229
237
  # bucket.create({
230
238
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read
231
239
  # create_bucket_configuration: {
232
- # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2, ap-south-2, eu-south-2
240
+ # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
241
+ # location: {
242
+ # type: "AvailabilityZone", # accepts AvailabilityZone, LocalZone
243
+ # name: "LocationNameAsString",
244
+ # },
245
+ # bucket: {
246
+ # data_redundancy: "SingleAvailabilityZone", # accepts SingleAvailabilityZone, SingleLocalZone
247
+ # type: "Directory", # accepts Directory
248
+ # },
233
249
  # },
234
250
  # grant_full_control: "GrantFullControl",
235
251
  # grant_read: "GrantRead",
@@ -242,46 +258,91 @@ module Aws::S3
242
258
  # @param [Hash] options ({})
243
259
  # @option options [String] :acl
244
260
  # The canned ACL to apply to the bucket.
261
+ #
262
+ # <note markdown="1"> This functionality is not supported for directory buckets.
263
+ #
264
+ # </note>
245
265
  # @option options [Types::CreateBucketConfiguration] :create_bucket_configuration
246
266
  # The configuration information for the bucket.
247
267
  # @option options [String] :grant_full_control
248
268
  # Allows grantee the read, write, read ACP, and write ACP permissions on
249
269
  # the bucket.
270
+ #
271
+ # <note markdown="1"> This functionality is not supported for directory buckets.
272
+ #
273
+ # </note>
250
274
  # @option options [String] :grant_read
251
275
  # Allows grantee to list the objects in the bucket.
276
+ #
277
+ # <note markdown="1"> This functionality is not supported for directory buckets.
278
+ #
279
+ # </note>
252
280
  # @option options [String] :grant_read_acp
253
281
  # Allows grantee to read the bucket ACL.
282
+ #
283
+ # <note markdown="1"> This functionality is not supported for directory buckets.
284
+ #
285
+ # </note>
254
286
  # @option options [String] :grant_write
255
287
  # Allows grantee to create new objects in the bucket.
256
288
  #
257
289
  # For the bucket and object owners of existing objects, also allows
258
290
  # deletions and overwrites of those objects.
291
+ #
292
+ # <note markdown="1"> This functionality is not supported for directory buckets.
293
+ #
294
+ # </note>
259
295
  # @option options [String] :grant_write_acp
260
296
  # Allows grantee to write the ACL for the applicable bucket.
297
+ #
298
+ # <note markdown="1"> This functionality is not supported for directory buckets.
299
+ #
300
+ # </note>
261
301
  # @option options [Boolean] :object_lock_enabled_for_bucket
262
302
  # Specifies whether you want S3 Object Lock to be enabled for the new
263
303
  # bucket.
304
+ #
305
+ # <note markdown="1"> This functionality is not supported for directory buckets.
306
+ #
307
+ # </note>
264
308
  # @option options [String] :object_ownership
265
309
  # The container element for object ownership for a bucket's ownership
266
310
  # controls.
267
311
  #
268
- # BucketOwnerPreferred - Objects uploaded to the bucket change ownership
269
- # to the bucket owner if the objects are uploaded with the
312
+ # `BucketOwnerPreferred` - Objects uploaded to the bucket change
313
+ # ownership to the bucket owner if the objects are uploaded with the
270
314
  # `bucket-owner-full-control` canned ACL.
271
315
  #
272
- # ObjectWriter - The uploading account will own the object if the object
273
- # is uploaded with the `bucket-owner-full-control` canned ACL.
316
+ # `ObjectWriter` - The uploading account will own the object if the
317
+ # object is uploaded with the `bucket-owner-full-control` canned ACL.
318
+ #
319
+ # `BucketOwnerEnforced` - Access control lists (ACLs) are disabled and
320
+ # no longer affect permissions. The bucket owner automatically owns and
321
+ # has full control over every object in the bucket. The bucket only
322
+ # accepts PUT requests that don't specify an ACL or specify bucket
323
+ # owner full control ACLs (such as the predefined
324
+ # `bucket-owner-full-control` canned ACL or a custom ACL in XML format
325
+ # that grants the same permissions).
326
+ #
327
+ # By default, `ObjectOwnership` is set to `BucketOwnerEnforced` and ACLs
328
+ # are disabled. We recommend keeping ACLs disabled, except in uncommon
329
+ # use cases where you must control access for each object individually.
330
+ # For more information about S3 Object Ownership, see [Controlling
331
+ # ownership of objects and disabling ACLs for your bucket][1] in the
332
+ # *Amazon S3 User Guide*.
333
+ #
334
+ # <note markdown="1"> This functionality is not supported for directory buckets. Directory
335
+ # buckets use the bucket owner enforced setting for S3 Object Ownership.
336
+ #
337
+ # </note>
338
+ #
339
+ #
274
340
  #
275
- # BucketOwnerEnforced - Access control lists (ACLs) are disabled and no
276
- # longer affect permissions. The bucket owner automatically owns and has
277
- # full control over every object in the bucket. The bucket only accepts
278
- # PUT requests that don't specify an ACL or bucket owner full control
279
- # ACLs, such as the `bucket-owner-full-control` canned ACL or an
280
- # equivalent form of this ACL expressed in the XML format.
341
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
281
342
  # @return [Types::CreateBucketOutput]
282
343
  def create(options = {})
283
344
  options = options.merge(bucket: @name)
284
- resp = Aws::Plugins::UserAgent.feature('resource') do
345
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
285
346
  @client.create_bucket(options)
286
347
  end
287
348
  resp.data
@@ -294,13 +355,19 @@ module Aws::S3
294
355
  # })
295
356
  # @param [Hash] options ({})
296
357
  # @option options [String] :expected_bucket_owner
297
- # The account ID of the expected bucket owner. If the bucket is owned by
298
- # a different account, the request fails with the HTTP status code `403
299
- # Forbidden` (access denied).
358
+ # The account ID of the expected bucket owner. If the account ID that
359
+ # you provide does not match the actual owner of the bucket, the request
360
+ # fails with the HTTP status code `403 Forbidden` (access denied).
361
+ #
362
+ # <note markdown="1"> For directory buckets, this header is not supported in this API
363
+ # operation. If you specify this header, the request fails with the HTTP
364
+ # status code `501 Not Implemented`.
365
+ #
366
+ # </note>
300
367
  # @return [EmptyStructure]
301
368
  def delete(options = {})
302
369
  options = options.merge(bucket: @name)
303
- resp = Aws::Plugins::UserAgent.feature('resource') do
370
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
304
371
  @client.delete_bucket(options)
305
372
  end
306
373
  resp.data
@@ -314,6 +381,9 @@ module Aws::S3
314
381
  # {
315
382
  # key: "ObjectKey", # required
316
383
  # version_id: "ObjectVersionId",
384
+ # etag: "ETag",
385
+ # last_modified_time: Time.now,
386
+ # size: 1,
317
387
  # },
318
388
  # ],
319
389
  # quiet: false,
@@ -332,14 +402,35 @@ module Aws::S3
332
402
  # space, and the value that is displayed on your authentication device.
333
403
  # Required to permanently delete a versioned object if versioning is
334
404
  # configured with MFA delete enabled.
405
+ #
406
+ # When performing the `DeleteObjects` operation on an MFA delete enabled
407
+ # bucket, which attempts to delete the specified versioned objects, you
408
+ # must include an MFA token. If you don't provide an MFA token, the
409
+ # entire request will fail, even if there are non-versioned objects that
410
+ # you are trying to delete. If you provide an invalid token, whether
411
+ # there are versioned object keys in the request or not, the entire
412
+ # Multi-Object Delete request will fail. For information about MFA
413
+ # Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
414
+ #
415
+ # <note markdown="1"> This functionality is not supported for directory buckets.
416
+ #
417
+ # </note>
418
+ #
419
+ #
420
+ #
421
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
335
422
  # @option options [String] :request_payer
336
423
  # Confirms that the requester knows that they will be charged for the
337
424
  # request. Bucket owners need not specify this parameter in their
338
- # requests. If either the source or destination Amazon S3 bucket has
339
- # Requester Pays enabled, the requester will pay for corresponding
340
- # charges to copy the object. For information about downloading objects
341
- # from Requester Pays buckets, see [Downloading Objects in Requester
342
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
425
+ # requests. If either the source or destination S3 bucket has Requester
426
+ # Pays enabled, the requester will pay for corresponding charges to copy
427
+ # the object. For information about downloading objects from Requester
428
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
429
+ # in the *Amazon S3 User Guide*.
430
+ #
431
+ # <note markdown="1"> This functionality is not supported for directory buckets.
432
+ #
433
+ # </note>
343
434
  #
344
435
  #
345
436
  #
@@ -348,32 +439,52 @@ module Aws::S3
348
439
  # Specifies whether you want to delete this object even if it has a
349
440
  # Governance-type Object Lock in place. To use this header, you must
350
441
  # have the `s3:BypassGovernanceRetention` permission.
442
+ #
443
+ # <note markdown="1"> This functionality is not supported for directory buckets.
444
+ #
445
+ # </note>
351
446
  # @option options [String] :expected_bucket_owner
352
- # The account ID of the expected bucket owner. If the bucket is owned by
353
- # a different account, the request fails with the HTTP status code `403
354
- # Forbidden` (access denied).
447
+ # The account ID of the expected bucket owner. If the account ID that
448
+ # you provide does not match the actual owner of the bucket, the request
449
+ # fails with the HTTP status code `403 Forbidden` (access denied).
355
450
  # @option options [String] :checksum_algorithm
356
451
  # Indicates the algorithm used to create the checksum for the object
357
- # when using the SDK. This header will not provide any additional
358
- # functionality if not using the SDK. When sending this header, there
359
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
360
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
361
- # `400 Bad Request`. For more information, see [Checking object
362
- # integrity][1] in the *Amazon S3 User Guide*.
452
+ # when you use the SDK. This header will not provide any additional
453
+ # functionality if you don't use the SDK. When you send this header,
454
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
455
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
456
+ # with the HTTP status code `400 Bad Request`.
457
+ #
458
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
459
+ # the supported algorithm from the following list:
460
+ #
461
+ # * `CRC32`
462
+ #
463
+ # * `CRC32C`
464
+ #
465
+ # * `SHA1`
466
+ #
467
+ # * `SHA256`
468
+ #
469
+ # For more information, see [Checking object integrity][1] in the
470
+ # *Amazon S3 User Guide*.
471
+ #
472
+ # If the individual checksum value you provide through
473
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
474
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
475
+ # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
476
+ # that matches the provided value in `x-amz-checksum-algorithm `.
363
477
  #
364
478
  # If you provide an individual checksum, Amazon S3 ignores any provided
365
479
  # `ChecksumAlgorithm` parameter.
366
480
  #
367
- # This checksum algorithm must be the same for all parts and it match
368
- # the checksum value supplied in the `CreateMultipartUpload` request.
369
- #
370
481
  #
371
482
  #
372
483
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
373
484
  # @return [Types::DeleteObjectsOutput]
374
485
  def delete_objects(options = {})
375
486
  options = options.merge(bucket: @name)
376
- resp = Aws::Plugins::UserAgent.feature('resource') do
487
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
377
488
  @client.delete_objects(options)
378
489
  end
379
490
  resp.data
@@ -397,16 +508,19 @@ module Aws::S3
397
508
  # checksum_sha1: "ChecksumSHA1",
398
509
  # checksum_sha256: "ChecksumSHA256",
399
510
  # expires: Time.now,
511
+ # if_match: "IfMatch",
512
+ # if_none_match: "IfNoneMatch",
400
513
  # grant_full_control: "GrantFullControl",
401
514
  # grant_read: "GrantRead",
402
515
  # grant_read_acp: "GrantReadACP",
403
516
  # grant_write_acp: "GrantWriteACP",
404
517
  # key: "ObjectKey", # required
518
+ # write_offset_bytes: 1,
405
519
  # metadata: {
406
520
  # "MetadataKey" => "MetadataValue",
407
521
  # },
408
522
  # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
409
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
523
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
410
524
  # website_redirect_location: "WebsiteRedirectLocation",
411
525
  # sse_customer_algorithm: "SSECustomerAlgorithm",
412
526
  # sse_customer_key: "SSECustomerKey",
@@ -424,13 +538,41 @@ module Aws::S3
424
538
  # @param [Hash] options ({})
425
539
  # @option options [String] :acl
426
540
  # The canned ACL to apply to the object. For more information, see
427
- # [Canned ACL][1].
541
+ # [Canned ACL][1] in the *Amazon S3 User Guide*.
542
+ #
543
+ # When adding a new object, you can use headers to grant ACL-based
544
+ # permissions to individual Amazon Web Services accounts or to
545
+ # predefined groups defined by Amazon S3. These permissions are then
546
+ # added to the ACL on the object. By default, all objects are private.
547
+ # Only the owner has full access control. For more information, see
548
+ # [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
549
+ # REST API][3] in the *Amazon S3 User Guide*.
550
+ #
551
+ # If the bucket that you're uploading objects to uses the bucket owner
552
+ # enforced setting for S3 Object Ownership, ACLs are disabled and no
553
+ # longer affect permissions. Buckets that use this setting only accept
554
+ # PUT requests that don't specify an ACL or PUT requests that specify
555
+ # bucket owner full control ACLs, such as the
556
+ # `bucket-owner-full-control` canned ACL or an equivalent form of this
557
+ # ACL expressed in the XML format. PUT requests that contain other ACLs
558
+ # (for example, custom grants to certain Amazon Web Services accounts)
559
+ # fail and return a `400` error with the error code
560
+ # `AccessControlListNotSupported`. For more information, see [
561
+ # Controlling ownership of objects and disabling ACLs][4] in the *Amazon
562
+ # S3 User Guide*.
428
563
  #
429
- # This action is not supported by Amazon S3 on Outposts.
564
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
565
+ #
566
+ # * This functionality is not supported for Amazon S3 on Outposts.
567
+ #
568
+ # </note>
430
569
  #
431
570
  #
432
571
  #
433
572
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
573
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
574
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
575
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
434
576
  # @option options [String, StringIO, File] :body
435
577
  # Object data.
436
578
  # @option options [String] :cache_control
@@ -477,9 +619,22 @@ module Aws::S3
477
619
  # information about REST request authentication, see [REST
478
620
  # Authentication][1].
479
621
  #
622
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
623
+ # for any request to upload an object with a retention period configured
624
+ # using Amazon S3 Object Lock. For more information, see [Uploading
625
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
626
+ # Guide*.
627
+ #
628
+ # </note>
629
+ #
630
+ # <note markdown="1"> This functionality is not supported for directory buckets.
631
+ #
632
+ # </note>
633
+ #
480
634
  #
481
635
  #
482
636
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
637
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
483
638
  # @option options [String] :content_type
484
639
  # A standard MIME type describing the format of the contents. For more
485
640
  # information, see
@@ -490,25 +645,53 @@ module Aws::S3
490
645
  # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
491
646
  # @option options [String] :checksum_algorithm
492
647
  # Indicates the algorithm used to create the checksum for the object
493
- # when using the SDK. This header will not provide any additional
494
- # functionality if not using the SDK. When sending this header, there
495
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
496
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
497
- # `400 Bad Request`. For more information, see [Checking object
498
- # integrity][1] in the *Amazon S3 User Guide*.
648
+ # when you use the SDK. This header will not provide any additional
649
+ # functionality if you don't use the SDK. When you send this header,
650
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
651
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
652
+ # with the HTTP status code `400 Bad Request`.
499
653
  #
500
- # If you provide an individual checksum, Amazon S3 ignores any provided
501
- # `ChecksumAlgorithm` parameter.
654
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
655
+ # the supported algorithm from the following list:
656
+ #
657
+ # * `CRC32`
658
+ #
659
+ # * `CRC32C`
660
+ #
661
+ # * `SHA1`
662
+ #
663
+ # * `SHA256`
664
+ #
665
+ # For more information, see [Checking object integrity][1] in the
666
+ # *Amazon S3 User Guide*.
667
+ #
668
+ # If the individual checksum value you provide through
669
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
670
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
671
+ # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
672
+ # that matches the provided value in `x-amz-checksum-algorithm `.
673
+ #
674
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
675
+ # for any request to upload an object with a retention period configured
676
+ # using Amazon S3 Object Lock. For more information, see [Uploading
677
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
678
+ # Guide*.
679
+ #
680
+ # </note>
681
+ #
682
+ # For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
683
+ # is the default checksum algorithm that's used for performance.
502
684
  #
503
685
  #
504
686
  #
505
687
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
688
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
506
689
  # @option options [String] :checksum_crc32
507
690
  # This header can be used as a data integrity check to verify that the
508
691
  # data received is the same data that was originally sent. This header
509
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
510
- # more information, see [Checking object integrity][1] in the *Amazon S3
511
- # User Guide*.
692
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
693
+ # For more information, see [Checking object integrity][1] in the
694
+ # *Amazon S3 User Guide*.
512
695
  #
513
696
  #
514
697
  #
@@ -516,7 +699,7 @@ module Aws::S3
516
699
  # @option options [String] :checksum_crc32c
517
700
  # This header can be used as a data integrity check to verify that the
518
701
  # data received is the same data that was originally sent. This header
519
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
702
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
520
703
  # For more information, see [Checking object integrity][1] in the
521
704
  # *Amazon S3 User Guide*.
522
705
  #
@@ -551,37 +734,167 @@ module Aws::S3
551
734
  #
552
735
  #
553
736
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
737
+ # @option options [String] :if_match
738
+ # Uploads the object only if the ETag (entity tag) value provided during
739
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
740
+ # values do not match, the operation returns a `412 Precondition Failed`
741
+ # error.
742
+ #
743
+ # If a conflicting operation occurs during the upload S3 returns a `409
744
+ # ConditionalRequestConflict` response. On a 409 failure you should
745
+ # fetch the object's ETag and retry the upload.
746
+ #
747
+ # Expects the ETag value as a string.
748
+ #
749
+ # For more information about conditional requests, see [RFC 7232][1], or
750
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
751
+ #
752
+ #
753
+ #
754
+ # [1]: https://tools.ietf.org/html/rfc7232
755
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
756
+ # @option options [String] :if_none_match
757
+ # Uploads the object only if the object key name does not already exist
758
+ # in the bucket specified. Otherwise, Amazon S3 returns a `412
759
+ # Precondition Failed` error.
760
+ #
761
+ # If a conflicting operation occurs during the upload S3 returns a `409
762
+ # ConditionalRequestConflict` response. On a 409 failure you should
763
+ # retry the upload.
764
+ #
765
+ # Expects the '*' (asterisk) character.
766
+ #
767
+ # For more information about conditional requests, see [RFC 7232][1], or
768
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
769
+ #
770
+ #
771
+ #
772
+ # [1]: https://tools.ietf.org/html/rfc7232
773
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
554
774
  # @option options [String] :grant_full_control
555
775
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
556
776
  # object.
557
777
  #
558
- # This action is not supported by Amazon S3 on Outposts.
778
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
779
+ #
780
+ # * This functionality is not supported for Amazon S3 on Outposts.
781
+ #
782
+ # </note>
559
783
  # @option options [String] :grant_read
560
784
  # Allows grantee to read the object data and its metadata.
561
785
  #
562
- # This action is not supported by Amazon S3 on Outposts.
786
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
787
+ #
788
+ # * This functionality is not supported for Amazon S3 on Outposts.
789
+ #
790
+ # </note>
563
791
  # @option options [String] :grant_read_acp
564
792
  # Allows grantee to read the object ACL.
565
793
  #
566
- # This action is not supported by Amazon S3 on Outposts.
794
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
795
+ #
796
+ # * This functionality is not supported for Amazon S3 on Outposts.
797
+ #
798
+ # </note>
567
799
  # @option options [String] :grant_write_acp
568
800
  # Allows grantee to write the ACL for the applicable object.
569
801
  #
570
- # This action is not supported by Amazon S3 on Outposts.
802
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
803
+ #
804
+ # * This functionality is not supported for Amazon S3 on Outposts.
805
+ #
806
+ # </note>
571
807
  # @option options [required, String] :key
572
808
  # Object key for which the PUT action was initiated.
809
+ # @option options [Integer] :write_offset_bytes
810
+ # Specifies the offset for appending data to existing objects in bytes.
811
+ # The offset must be equal to the size of the existing object being
812
+ # appended to. If no object exists, setting this header to 0 will create
813
+ # a new object.
814
+ #
815
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
816
+ # Express One Zone storage class in directory buckets.
817
+ #
818
+ # </note>
573
819
  # @option options [Hash<String,String>] :metadata
574
820
  # A map of metadata to store with the object in S3.
575
821
  # @option options [String] :server_side_encryption
576
- # The server-side encryption algorithm used when storing this object in
577
- # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
822
+ # The server-side encryption algorithm that was used when you store this
823
+ # object in Amazon S3 (for example, `AES256`, `aws:kms`,
824
+ # `aws:kms:dsse`).
825
+ #
826
+ # * <b>General purpose buckets </b> - You have four mutually exclusive
827
+ # options to protect data using server-side encryption in Amazon S3,
828
+ # depending on how you choose to manage the encryption keys.
829
+ # Specifically, the encryption key options are Amazon S3 managed keys
830
+ # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
831
+ # customer-provided keys (SSE-C). Amazon S3 encrypts data with
832
+ # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
833
+ # default. You can optionally tell Amazon S3 to encrypt data at rest
834
+ # by using server-side encryption with other key options. For more
835
+ # information, see [Using Server-Side Encryption][1] in the *Amazon S3
836
+ # User Guide*.
837
+ #
838
+ # * <b>Directory buckets </b> - For directory buckets, there are only
839
+ # two supported options for server-side encryption: server-side
840
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
841
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
842
+ # recommend that the bucket's default encryption uses the desired
843
+ # encryption configuration and you don't override the bucket default
844
+ # encryption in your `CreateSession` requests or `PUT` object
845
+ # requests. Then, new objects are automatically encrypted with the
846
+ # desired encryption settings. For more information, see [Protecting
847
+ # data with server-side encryption][2] in the *Amazon S3 User Guide*.
848
+ # For more information about the encryption overriding behaviors in
849
+ # directory buckets, see [Specifying server-side encryption with KMS
850
+ # for new object uploads][3].
851
+ #
852
+ # In the Zonal endpoint API calls (except [CopyObject][4] and
853
+ # [UploadPartCopy][5]) using the REST API, the encryption request
854
+ # headers must match the encryption settings that are specified in the
855
+ # `CreateSession` request. You can't override the values of the
856
+ # encryption settings (`x-amz-server-side-encryption`,
857
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
858
+ # `x-amz-server-side-encryption-context`, and
859
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
860
+ # specified in the `CreateSession` request. You don't need to
861
+ # explicitly specify these encryption settings values in Zonal
862
+ # endpoint API calls, and Amazon S3 will use the encryption settings
863
+ # values from the `CreateSession` request to protect new objects in
864
+ # the directory bucket.
865
+ #
866
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
867
+ # `CreateSession`, the session token refreshes automatically to avoid
868
+ # service interruptions when a session expires. The CLI or the Amazon
869
+ # Web Services SDKs use the bucket's default encryption configuration
870
+ # for the `CreateSession` request. It's not supported to override the
871
+ # encryption settings values in the `CreateSession` request. So in the
872
+ # Zonal endpoint API calls (except [CopyObject][4] and
873
+ # [UploadPartCopy][5]), the encryption request headers must match the
874
+ # default encryption configuration of the directory bucket.
875
+ #
876
+ # </note>
877
+ #
878
+ #
879
+ #
880
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
881
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
882
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
883
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
884
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
578
885
  # @option options [String] :storage_class
579
886
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
580
887
  # created objects. The STANDARD storage class provides high durability
581
888
  # and high availability. Depending on performance needs, you can specify
582
- # a different Storage Class. Amazon S3 on Outposts only uses the
583
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
584
- # in the *Amazon S3 User Guide*.
889
+ # a different Storage Class. For more information, see [Storage
890
+ # Classes][1] in the *Amazon S3 User Guide*.
891
+ #
892
+ # <note markdown="1"> * For directory buckets, only the S3 Express One Zone storage class is
893
+ # supported to store newly created objects.
894
+ #
895
+ # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
896
+ #
897
+ # </note>
585
898
  #
586
899
  #
587
900
  #
@@ -590,7 +903,8 @@ module Aws::S3
590
903
  # If the bucket is configured as a website, redirects requests for this
591
904
  # object to another object in the same bucket or to an external URL.
592
905
  # Amazon S3 stores the value of this header in the object metadata. For
593
- # information about object metadata, see [Object Key and Metadata][1].
906
+ # information about object metadata, see [Object Key and Metadata][1] in
907
+ # the *Amazon S3 User Guide*.
594
908
  #
595
909
  # In the following example, the request header sets the redirect to an
596
910
  # object (anotherPage.html) in the same bucket:
@@ -604,7 +918,11 @@ module Aws::S3
604
918
  #
605
919
  # For more information about website hosting in Amazon S3, see [Hosting
606
920
  # Websites on Amazon S3][2] and [How to Configure Website Page
607
- # Redirects][3].
921
+ # Redirects][3] in the *Amazon S3 User Guide*.
922
+ #
923
+ # <note markdown="1"> This functionality is not supported for directory buckets.
924
+ #
925
+ # </note>
608
926
  #
609
927
  #
610
928
  #
@@ -612,52 +930,123 @@ module Aws::S3
612
930
  # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
613
931
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
614
932
  # @option options [String] :sse_customer_algorithm
615
- # Specifies the algorithm to use to when encrypting the object (for
616
- # example, AES256).
933
+ # Specifies the algorithm to use when encrypting the object (for
934
+ # example, `AES256`).
935
+ #
936
+ # <note markdown="1"> This functionality is not supported for directory buckets.
937
+ #
938
+ # </note>
617
939
  # @option options [String] :sse_customer_key
618
940
  # Specifies the customer-provided encryption key for Amazon S3 to use in
619
941
  # encrypting data. This value is used to store the object and then it is
620
942
  # discarded; Amazon S3 does not store the encryption key. The key must
621
943
  # be appropriate for use with the algorithm specified in the
622
944
  # `x-amz-server-side-encryption-customer-algorithm` header.
945
+ #
946
+ # <note markdown="1"> This functionality is not supported for directory buckets.
947
+ #
948
+ # </note>
623
949
  # @option options [String] :sse_customer_key_md5
624
950
  # Specifies the 128-bit MD5 digest of the encryption key according to
625
951
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
626
952
  # ensure that the encryption key was transmitted without error.
953
+ #
954
+ # <note markdown="1"> This functionality is not supported for directory buckets.
955
+ #
956
+ # </note>
627
957
  # @option options [String] :ssekms_key_id
628
- # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
629
- # `aws:kms:dsse`, this header specifies the ID (Key ID, Key ARN, or Key
630
- # Alias) of the Key Management Service (KMS) symmetric encryption
631
- # customer managed key that was used for the object. If you specify
632
- # `x-amz-server-side-encryption:aws:kms` or
633
- # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
634
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
635
- # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
636
- # KMS key does not exist in the same account that's issuing the
637
- # command, you must use the full ARN and not just the ID.
958
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
959
+ # object encryption. If the KMS key doesn't exist in the same account
960
+ # that's issuing the command, you must use the full Key ARN not the Key
961
+ # ID.
962
+ #
963
+ # **General purpose buckets** - If you specify
964
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
965
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
966
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
967
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
968
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
969
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
970
+ #
971
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
972
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
973
+ # header is implicitly assigned the ID of the KMS symmetric encryption
974
+ # customer managed key that's configured for your directory bucket's
975
+ # default encryption setting. If you want to specify the `
976
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
977
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
978
+ # customer managed key that's configured for your directory bucket's
979
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
980
+ # Request` error. Only use the key ID or key ARN. The key alias format
981
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
982
+ # support 1 [customer managed key][1] per directory bucket for the
983
+ # lifetime of the bucket. The [Amazon Web Services managed key][2]
984
+ # (`aws/s3`) isn't supported.
985
+ #
986
+ #
987
+ #
988
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
989
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
638
990
  # @option options [String] :ssekms_encryption_context
639
- # Specifies the Amazon Web Services KMS Encryption Context to use for
640
- # object encryption. The value of this header is a base64-encoded UTF-8
641
- # string holding JSON with the encryption context key-value pairs. This
642
- # value is stored as object metadata and automatically gets passed on to
643
- # Amazon Web Services KMS for future `GetObject` or `CopyObject`
644
- # operations on this object.
991
+ # Specifies the Amazon Web Services KMS Encryption Context as an
992
+ # additional encryption context to use for object encryption. The value
993
+ # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
994
+ # which contains the encryption context as key-value pairs. This value
995
+ # is stored as object metadata and automatically gets passed on to
996
+ # Amazon Web Services KMS for future `GetObject` operations on this
997
+ # object.
998
+ #
999
+ # **General purpose buckets** - This value must be explicitly added
1000
+ # during `CopyObject` operations if you want an additional encryption
1001
+ # context for your object. For more information, see [Encryption
1002
+ # context][1] in the *Amazon S3 User Guide*.
1003
+ #
1004
+ # **Directory buckets** - You can optionally provide an explicit
1005
+ # encryption context value. The value must match the default encryption
1006
+ # context - the bucket Amazon Resource Name (ARN). An additional
1007
+ # encryption context value is not supported.
1008
+ #
1009
+ #
1010
+ #
1011
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
645
1012
  # @option options [Boolean] :bucket_key_enabled
646
1013
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
647
1014
  # encryption with server-side encryption using Key Management Service
648
- # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
649
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
1015
+ # (KMS) keys (SSE-KMS).
650
1016
  #
651
- # Specifying this header with a PUT action doesn’t affect bucket-level
652
- # settings for S3 Bucket Key.
1017
+ # **General purpose buckets** - Setting this header to `true` causes
1018
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
1019
+ # Also, specifying this header with a PUT action doesn't affect
1020
+ # bucket-level settings for S3 Bucket Key.
1021
+ #
1022
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
1023
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
1024
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
1025
+ # from general purpose buckets to directory buckets, from directory
1026
+ # buckets to general purpose buckets, or between directory buckets,
1027
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
1028
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
1029
+ # makes a call to KMS every time a copy request is made for a
1030
+ # KMS-encrypted object.
1031
+ #
1032
+ #
1033
+ #
1034
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
1035
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
1036
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
1037
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
653
1038
  # @option options [String] :request_payer
654
1039
  # Confirms that the requester knows that they will be charged for the
655
1040
  # request. Bucket owners need not specify this parameter in their
656
- # requests. If either the source or destination Amazon S3 bucket has
657
- # Requester Pays enabled, the requester will pay for corresponding
658
- # charges to copy the object. For information about downloading objects
659
- # from Requester Pays buckets, see [Downloading Objects in Requester
660
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
1041
+ # requests. If either the source or destination S3 bucket has Requester
1042
+ # Pays enabled, the requester will pay for corresponding charges to copy
1043
+ # the object. For information about downloading objects from Requester
1044
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1045
+ # in the *Amazon S3 User Guide*.
1046
+ #
1047
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1048
+ #
1049
+ # </note>
661
1050
  #
662
1051
  #
663
1052
  #
@@ -665,26 +1054,43 @@ module Aws::S3
665
1054
  # @option options [String] :tagging
666
1055
  # The tag-set for the object. The tag-set must be encoded as URL Query
667
1056
  # parameters. (For example, "Key1=Value1")
1057
+ #
1058
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1059
+ #
1060
+ # </note>
668
1061
  # @option options [String] :object_lock_mode
669
1062
  # The Object Lock mode that you want to apply to this object.
1063
+ #
1064
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1065
+ #
1066
+ # </note>
670
1067
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
671
1068
  # The date and time when you want this object's Object Lock to expire.
672
1069
  # Must be formatted as a timestamp parameter.
1070
+ #
1071
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1072
+ #
1073
+ # </note>
673
1074
  # @option options [String] :object_lock_legal_hold_status
674
1075
  # Specifies whether a legal hold will be applied to this object. For
675
- # more information about S3 Object Lock, see [Object Lock][1].
1076
+ # more information about S3 Object Lock, see [Object Lock][1] in the
1077
+ # *Amazon S3 User Guide*.
1078
+ #
1079
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1080
+ #
1081
+ # </note>
676
1082
  #
677
1083
  #
678
1084
  #
679
1085
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
680
1086
  # @option options [String] :expected_bucket_owner
681
- # The account ID of the expected bucket owner. If the bucket is owned by
682
- # a different account, the request fails with the HTTP status code `403
683
- # Forbidden` (access denied).
1087
+ # The account ID of the expected bucket owner. If the account ID that
1088
+ # you provide does not match the actual owner of the bucket, the request
1089
+ # fails with the HTTP status code `403 Forbidden` (access denied).
684
1090
  # @return [Object]
685
1091
  def put_object(options = {})
686
1092
  options = options.merge(bucket: @name)
687
- Aws::Plugins::UserAgent.feature('resource') do
1093
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
688
1094
  @client.put_object(options)
689
1095
  end
690
1096
  Object.new(
@@ -757,30 +1163,70 @@ module Aws::S3
757
1163
  # don't specify the prefix parameter, then the substring starts at the
758
1164
  # beginning of the key. The keys that are grouped under `CommonPrefixes`
759
1165
  # result element are not returned elsewhere in the response.
1166
+ #
1167
+ # <note markdown="1"> **Directory buckets** - For directory buckets, `/` is the only
1168
+ # supported delimiter.
1169
+ #
1170
+ # </note>
760
1171
  # @option options [String] :encoding_type
761
- # Requests Amazon S3 to encode the object keys in the response and
762
- # specifies the encoding method to use. An object key can contain any
763
- # Unicode character; however, the XML 1.0 parser cannot parse some
764
- # characters, such as characters with an ASCII value from 0 to 10. For
765
- # characters that are not supported in XML 1.0, you can add this
766
- # parameter to request that Amazon S3 encode the keys in the response.
1172
+ # Encoding type used by Amazon S3 to encode the [object keys][1] in the
1173
+ # response. Responses are encoded only in UTF-8. An object key can
1174
+ # contain any Unicode character. However, the XML 1.0 parser can't
1175
+ # parse certain characters, such as characters with an ASCII value from
1176
+ # 0 to 10. For characters that aren't supported in XML 1.0, you can add
1177
+ # this parameter to request that Amazon S3 encode the keys in the
1178
+ # response. For more information about characters to avoid in object key
1179
+ # names, see [Object key naming guidelines][2].
1180
+ #
1181
+ # <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
1182
+ # in an object's key name will be percent-encoded according to UTF-8
1183
+ # code values. For example, the object `test_file(3).png` will appear as
1184
+ # `test_file%283%29.png`.
1185
+ #
1186
+ # </note>
1187
+ #
1188
+ #
1189
+ #
1190
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
1191
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
767
1192
  # @option options [String] :key_marker
768
- # Together with `upload-id-marker`, this parameter specifies the
769
- # multipart upload after which listing should begin.
1193
+ # Specifies the multipart upload after which listing should begin.
770
1194
  #
771
- # If `upload-id-marker` is not specified, only the keys
772
- # lexicographically greater than the specified `key-marker` will be
773
- # included in the list.
1195
+ # <note markdown="1"> * **General purpose buckets** - For general purpose buckets,
1196
+ # `key-marker` is an object key. Together with `upload-id-marker`,
1197
+ # this parameter specifies the multipart upload after which listing
1198
+ # should begin.
774
1199
  #
775
- # If `upload-id-marker` is specified, any multipart uploads for a key
776
- # equal to the `key-marker` might also be included, provided those
777
- # multipart uploads have upload IDs lexicographically greater than the
778
- # specified `upload-id-marker`.
1200
+ # If `upload-id-marker` is not specified, only the keys
1201
+ # lexicographically greater than the specified `key-marker` will be
1202
+ # included in the list.
1203
+ #
1204
+ # If `upload-id-marker` is specified, any multipart uploads for a key
1205
+ # equal to the `key-marker` might also be included, provided those
1206
+ # multipart uploads have upload IDs lexicographically greater than the
1207
+ # specified `upload-id-marker`.
1208
+ #
1209
+ # * **Directory buckets** - For directory buckets, `key-marker` is
1210
+ # obfuscated and isn't a real object key. The `upload-id-marker`
1211
+ # parameter isn't supported by directory buckets. To list the
1212
+ # additional multipart uploads, you only need to set the value of
1213
+ # `key-marker` to the `NextKeyMarker` value from the previous
1214
+ # response.
1215
+ #
1216
+ # In the `ListMultipartUploads` response, the multipart uploads
1217
+ # aren't sorted lexicographically based on the object keys.
1218
+ #
1219
+ # </note>
779
1220
  # @option options [String] :prefix
780
1221
  # Lists in-progress uploads only for those keys that begin with the
781
1222
  # specified prefix. You can use prefixes to separate a bucket into
782
1223
  # different grouping of keys. (You can think of using `prefix` to make
783
1224
  # groups in the same way that you'd use a folder in a file system.)
1225
+ #
1226
+ # <note markdown="1"> **Directory buckets** - For directory buckets, only prefixes that end
1227
+ # in a delimiter (`/`) are supported.
1228
+ #
1229
+ # </note>
784
1230
  # @option options [String] :upload_id_marker
785
1231
  # Together with key-marker, specifies the multipart upload after which
786
1232
  # listing should begin. If key-marker is not specified, the
@@ -788,18 +1234,26 @@ module Aws::S3
788
1234
  # uploads for a key equal to the key-marker might be included in the
789
1235
  # list only if they have an upload ID lexicographically greater than the
790
1236
  # specified `upload-id-marker`.
1237
+ #
1238
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1239
+ #
1240
+ # </note>
791
1241
  # @option options [String] :expected_bucket_owner
792
- # The account ID of the expected bucket owner. If the bucket is owned by
793
- # a different account, the request fails with the HTTP status code `403
794
- # Forbidden` (access denied).
1242
+ # The account ID of the expected bucket owner. If the account ID that
1243
+ # you provide does not match the actual owner of the bucket, the request
1244
+ # fails with the HTTP status code `403 Forbidden` (access denied).
795
1245
  # @option options [String] :request_payer
796
1246
  # Confirms that the requester knows that they will be charged for the
797
1247
  # request. Bucket owners need not specify this parameter in their
798
- # requests. If either the source or destination Amazon S3 bucket has
799
- # Requester Pays enabled, the requester will pay for corresponding
800
- # charges to copy the object. For information about downloading objects
801
- # from Requester Pays buckets, see [Downloading Objects in Requester
802
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
1248
+ # requests. If either the source or destination S3 bucket has Requester
1249
+ # Pays enabled, the requester will pay for corresponding charges to copy
1250
+ # the object. For information about downloading objects from Requester
1251
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1252
+ # in the *Amazon S3 User Guide*.
1253
+ #
1254
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1255
+ #
1256
+ # </note>
803
1257
  #
804
1258
  #
805
1259
  #
@@ -808,7 +1262,7 @@ module Aws::S3
808
1262
  def multipart_uploads(options = {})
809
1263
  batches = Enumerator.new do |y|
810
1264
  options = options.merge(bucket: @name)
811
- resp = Aws::Plugins::UserAgent.feature('resource') do
1265
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
812
1266
  @client.list_multipart_uploads(options)
813
1267
  end
814
1268
  resp.each_page do |page|
@@ -867,12 +1321,26 @@ module Aws::S3
867
1321
  # the `max-keys` limitation. These keys are not returned elsewhere in
868
1322
  # the response.
869
1323
  # @option options [String] :encoding_type
870
- # Requests Amazon S3 to encode the object keys in the response and
871
- # specifies the encoding method to use. An object key can contain any
872
- # Unicode character; however, the XML 1.0 parser cannot parse some
873
- # characters, such as characters with an ASCII value from 0 to 10. For
874
- # characters that are not supported in XML 1.0, you can add this
875
- # parameter to request that Amazon S3 encode the keys in the response.
1324
+ # Encoding type used by Amazon S3 to encode the [object keys][1] in the
1325
+ # response. Responses are encoded only in UTF-8. An object key can
1326
+ # contain any Unicode character. However, the XML 1.0 parser can't
1327
+ # parse certain characters, such as characters with an ASCII value from
1328
+ # 0 to 10. For characters that aren't supported in XML 1.0, you can add
1329
+ # this parameter to request that Amazon S3 encode the keys in the
1330
+ # response. For more information about characters to avoid in object key
1331
+ # names, see [Object key naming guidelines][2].
1332
+ #
1333
+ # <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
1334
+ # in an object's key name will be percent-encoded according to UTF-8
1335
+ # code values. For example, the object `test_file(3).png` will appear as
1336
+ # `test_file%283%29.png`.
1337
+ #
1338
+ # </note>
1339
+ #
1340
+ #
1341
+ #
1342
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
1343
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
876
1344
  # @option options [String] :key_marker
877
1345
  # Specifies the key to start with when listing objects in a bucket.
878
1346
  # @option options [String] :prefix
@@ -885,17 +1353,21 @@ module Aws::S3
885
1353
  # @option options [String] :version_id_marker
886
1354
  # Specifies the object version you want to start listing from.
887
1355
  # @option options [String] :expected_bucket_owner
888
- # The account ID of the expected bucket owner. If the bucket is owned by
889
- # a different account, the request fails with the HTTP status code `403
890
- # Forbidden` (access denied).
1356
+ # The account ID of the expected bucket owner. If the account ID that
1357
+ # you provide does not match the actual owner of the bucket, the request
1358
+ # fails with the HTTP status code `403 Forbidden` (access denied).
891
1359
  # @option options [String] :request_payer
892
1360
  # Confirms that the requester knows that they will be charged for the
893
1361
  # request. Bucket owners need not specify this parameter in their
894
- # requests. If either the source or destination Amazon S3 bucket has
895
- # Requester Pays enabled, the requester will pay for corresponding
896
- # charges to copy the object. For information about downloading objects
897
- # from Requester Pays buckets, see [Downloading Objects in Requester
898
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
1362
+ # requests. If either the source or destination S3 bucket has Requester
1363
+ # Pays enabled, the requester will pay for corresponding charges to copy
1364
+ # the object. For information about downloading objects from Requester
1365
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1366
+ # in the *Amazon S3 User Guide*.
1367
+ #
1368
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1369
+ #
1370
+ # </note>
899
1371
  #
900
1372
  #
901
1373
  #
@@ -907,7 +1379,7 @@ module Aws::S3
907
1379
  def object_versions(options = {})
908
1380
  batches = Enumerator.new do |y|
909
1381
  options = options.merge(bucket: @name)
910
- resp = Aws::Plugins::UserAgent.feature('resource') do
1382
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
911
1383
  @client.list_object_versions(options)
912
1384
  end
913
1385
  resp.each_page do |page|
@@ -942,34 +1414,91 @@ module Aws::S3
942
1414
  # @param [Hash] options ({})
943
1415
  # @option options [String] :delimiter
944
1416
  # A delimiter is a character that you use to group keys.
1417
+ #
1418
+ # <note markdown="1"> * **Directory buckets** - For directory buckets, `/` is the only
1419
+ # supported delimiter.
1420
+ #
1421
+ # * <b>Directory buckets </b> - When you query `ListObjectsV2` with a
1422
+ # delimiter during in-progress multipart uploads, the `CommonPrefixes`
1423
+ # response parameter contains the prefixes that are associated with
1424
+ # the in-progress multipart uploads. For more information about
1425
+ # multipart uploads, see [Multipart Upload Overview][1] in the *Amazon
1426
+ # S3 User Guide*.
1427
+ #
1428
+ # </note>
1429
+ #
1430
+ #
1431
+ #
1432
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
945
1433
  # @option options [String] :encoding_type
946
- # Encoding type used by Amazon S3 to encode object keys in the response.
1434
+ # Encoding type used by Amazon S3 to encode the [object keys][1] in the
1435
+ # response. Responses are encoded only in UTF-8. An object key can
1436
+ # contain any Unicode character. However, the XML 1.0 parser can't
1437
+ # parse certain characters, such as characters with an ASCII value from
1438
+ # 0 to 10. For characters that aren't supported in XML 1.0, you can add
1439
+ # this parameter to request that Amazon S3 encode the keys in the
1440
+ # response. For more information about characters to avoid in object key
1441
+ # names, see [Object key naming guidelines][2].
1442
+ #
1443
+ # <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
1444
+ # in an object's key name will be percent-encoded according to UTF-8
1445
+ # code values. For example, the object `test_file(3).png` will appear as
1446
+ # `test_file%283%29.png`.
1447
+ #
1448
+ # </note>
1449
+ #
1450
+ #
1451
+ #
1452
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
1453
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
947
1454
  # @option options [String] :prefix
948
1455
  # Limits the response to keys that begin with the specified prefix.
1456
+ #
1457
+ # <note markdown="1"> **Directory buckets** - For directory buckets, only prefixes that end
1458
+ # in a delimiter (`/`) are supported.
1459
+ #
1460
+ # </note>
949
1461
  # @option options [Boolean] :fetch_owner
950
1462
  # The owner field is not present in `ListObjectsV2` by default. If you
951
1463
  # want to return the owner field with each key in the result, then set
952
1464
  # the `FetchOwner` field to `true`.
1465
+ #
1466
+ # <note markdown="1"> **Directory buckets** - For directory buckets, the bucket owner is
1467
+ # returned as the object owner for all objects.
1468
+ #
1469
+ # </note>
953
1470
  # @option options [String] :start_after
954
1471
  # StartAfter is where you want Amazon S3 to start listing from. Amazon
955
1472
  # S3 starts listing after this specified key. StartAfter can be any key
956
1473
  # in the bucket.
1474
+ #
1475
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1476
+ #
1477
+ # </note>
957
1478
  # @option options [String] :request_payer
958
1479
  # Confirms that the requester knows that she or he will be charged for
959
1480
  # the list objects request in V2 style. Bucket owners need not specify
960
1481
  # this parameter in their requests.
1482
+ #
1483
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1484
+ #
1485
+ # </note>
961
1486
  # @option options [String] :expected_bucket_owner
962
- # The account ID of the expected bucket owner. If the bucket is owned by
963
- # a different account, the request fails with the HTTP status code `403
964
- # Forbidden` (access denied).
1487
+ # The account ID of the expected bucket owner. If the account ID that
1488
+ # you provide does not match the actual owner of the bucket, the request
1489
+ # fails with the HTTP status code `403 Forbidden` (access denied).
965
1490
  # @option options [Array<String>] :optional_object_attributes
966
1491
  # Specifies the optional fields that you want returned in the response.
967
1492
  # Fields that you do not specify are not returned.
1493
+ #
1494
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1495
+ #
1496
+ # </note>
968
1497
  # @return [ObjectSummary::Collection]
969
1498
  def objects(options = {})
970
1499
  batches = Enumerator.new do |y|
971
1500
  options = options.merge(bucket: @name)
972
- resp = Aws::Plugins::UserAgent.feature('resource') do
1501
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
973
1502
  @client.list_objects_v2(options)
974
1503
  end
975
1504
  resp.each_page do |page|
@@ -1078,3 +1607,6 @@ module Aws::S3
1078
1607
  class Collection < Aws::Resources::Collection; end
1079
1608
  end
1080
1609
  end
1610
+
1611
+ # Load customizations if they exist
1612
+ require 'aws-sdk-s3/customizations/bucket'