aws-sdk-s3 1.103.0 → 1.202.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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +664 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  6. data/lib/aws-sdk-s3/bucket.rb +858 -116
  7. data/lib/aws-sdk-s3/bucket_acl.rb +32 -9
  8. data/lib/aws-sdk-s3/bucket_cors.rb +38 -13
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +43 -12
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +100 -13
  11. data/lib/aws-sdk-s3/bucket_logging.rb +35 -6
  12. data/lib/aws-sdk-s3/bucket_notification.rb +27 -9
  13. data/lib/aws-sdk-s3/bucket_policy.rb +79 -10
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +29 -7
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +35 -11
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +108 -17
  18. data/lib/aws-sdk-s3/bucket_website.rb +35 -11
  19. data/lib/aws-sdk-s3/client.rb +11799 -3636
  20. data/lib/aws-sdk-s3/client_api.rb +1201 -276
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
  22. data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
  23. data/lib/aws-sdk-s3/customizations/object.rb +216 -70
  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/types/permanent_redirect.rb +26 -0
  27. data/lib/aws-sdk-s3/customizations.rb +27 -29
  28. data/lib/aws-sdk-s3/default_executor.rb +103 -0
  29. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  30. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  31. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  32. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  33. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  34. data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
  35. data/lib/aws-sdk-s3/endpoint_provider.rb +716 -0
  36. data/lib/aws-sdk-s3/endpoints.rb +1518 -0
  37. data/lib/aws-sdk-s3/errors.rb +58 -0
  38. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  39. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  40. data/lib/aws-sdk-s3/file_downloader.rb +241 -87
  41. data/lib/aws-sdk-s3/file_uploader.rb +16 -13
  42. data/lib/aws-sdk-s3/legacy_signer.rb +2 -1
  43. data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
  44. data/lib/aws-sdk-s3/multipart_file_uploader.rb +108 -86
  45. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +110 -92
  46. data/lib/aws-sdk-s3/multipart_upload.rb +294 -19
  47. data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
  48. data/lib/aws-sdk-s3/multipart_upload_part.rb +297 -31
  49. data/lib/aws-sdk-s3/object.rb +2224 -269
  50. data/lib/aws-sdk-s3/object_acl.rb +59 -17
  51. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  52. data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -23
  53. data/lib/aws-sdk-s3/object_summary.rb +1915 -220
  54. data/lib/aws-sdk-s3/object_version.rb +450 -58
  55. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -44
  56. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  57. data/lib/aws-sdk-s3/plugins/arn.rb +0 -197
  58. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  59. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  60. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  61. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -55
  62. data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
  63. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  64. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
  65. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
  66. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
  67. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  68. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -68
  69. data/lib/aws-sdk-s3/plugins/s3_signer.rb +42 -111
  70. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +28 -9
  71. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
  72. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  73. data/lib/aws-sdk-s3/presigner.rb +32 -41
  74. data/lib/aws-sdk-s3/resource.rb +139 -12
  75. data/lib/aws-sdk-s3/transfer_manager.rb +304 -0
  76. data/lib/aws-sdk-s3/types.rb +10204 -5378
  77. data/lib/aws-sdk-s3.rb +35 -27
  78. data/sig/bucket.rbs +231 -0
  79. data/sig/bucket_acl.rbs +78 -0
  80. data/sig/bucket_cors.rbs +69 -0
  81. data/sig/bucket_lifecycle.rbs +88 -0
  82. data/sig/bucket_lifecycle_configuration.rbs +115 -0
  83. data/sig/bucket_logging.rbs +76 -0
  84. data/sig/bucket_notification.rbs +114 -0
  85. data/sig/bucket_policy.rbs +59 -0
  86. data/sig/bucket_request_payment.rbs +54 -0
  87. data/sig/bucket_tagging.rbs +65 -0
  88. data/sig/bucket_versioning.rbs +77 -0
  89. data/sig/bucket_website.rbs +93 -0
  90. data/sig/client.rbs +2586 -0
  91. data/sig/customizations/bucket.rbs +19 -0
  92. data/sig/customizations/object.rbs +38 -0
  93. data/sig/customizations/object_summary.rbs +35 -0
  94. data/sig/errors.rbs +44 -0
  95. data/sig/multipart_upload.rbs +120 -0
  96. data/sig/multipart_upload_part.rbs +109 -0
  97. data/sig/object.rbs +464 -0
  98. data/sig/object_acl.rbs +86 -0
  99. data/sig/object_summary.rbs +347 -0
  100. data/sig/object_version.rbs +143 -0
  101. data/sig/resource.rbs +141 -0
  102. data/sig/types.rbs +2868 -0
  103. data/sig/waiters.rbs +95 -0
  104. metadata +51 -16
  105. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  106. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -69
  107. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  108. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -73
  109. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -66,12 +66,36 @@ module Aws::S3
66
66
  #
67
67
  # * If an object is created by either the Multipart Upload or Part Copy
68
68
  # operation, the ETag is not an MD5 digest, regardless of the method
69
- # of encryption.
69
+ # of encryption. If an object is larger than 16 MB, the Amazon Web
70
+ # Services Management Console will upload or copy that object as a
71
+ # Multipart Upload, and therefore the ETag will not be an MD5 digest.
72
+ #
73
+ # <note markdown="1"> **Directory buckets** - MD5 is not supported by directory buckets.
74
+ #
75
+ # </note>
70
76
  # @return [String]
71
77
  def etag
72
78
  data[:etag]
73
79
  end
74
80
 
81
+ # The algorithm that was used to create a checksum of the object.
82
+ # @return [Array<String>]
83
+ def checksum_algorithm
84
+ data[:checksum_algorithm]
85
+ end
86
+
87
+ # The checksum type that is used to calculate the object’s checksum
88
+ # value. For more information, see [Checking object integrity][1] in the
89
+ # *Amazon S3 User Guide*.
90
+ #
91
+ #
92
+ #
93
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
94
+ # @return [String]
95
+ def checksum_type
96
+ data[:checksum_type]
97
+ end
98
+
75
99
  # Size in bytes of the object
76
100
  # @return [Integer]
77
101
  def size
@@ -79,17 +103,50 @@ module Aws::S3
79
103
  end
80
104
 
81
105
  # The class of storage used to store the object.
106
+ #
107
+ # <note markdown="1"> **Directory buckets** - Directory buckets only support
108
+ # `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
109
+ # Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent Access
110
+ # storage class) in Dedicated Local Zones.
111
+ #
112
+ # </note>
82
113
  # @return [String]
83
114
  def storage_class
84
115
  data[:storage_class]
85
116
  end
86
117
 
87
118
  # The owner of the object
119
+ #
120
+ # <note markdown="1"> **Directory buckets** - The bucket owner is returned as the object
121
+ # owner.
122
+ #
123
+ # </note>
88
124
  # @return [Types::Owner]
89
125
  def owner
90
126
  data[:owner]
91
127
  end
92
128
 
129
+ # Specifies the restoration status of an object. Objects in certain
130
+ # storage classes must be restored before they can be retrieved. For
131
+ # more information about these storage classes and how to work with
132
+ # archived objects, see [ Working with archived objects][1] in the
133
+ # *Amazon S3 User Guide*.
134
+ #
135
+ # <note markdown="1"> This functionality is not supported for directory buckets. Directory
136
+ # buckets only support `EXPRESS_ONEZONE` (the S3 Express One Zone
137
+ # storage class) in Availability Zones and `ONEZONE_IA` (the S3 One
138
+ # Zone-Infrequent Access storage class) in Dedicated Local Zones.
139
+ #
140
+ # </note>
141
+ #
142
+ #
143
+ #
144
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
145
+ # @return [Types::RestoreStatus]
146
+ def restore_status
147
+ data[:restore_status]
148
+ end
149
+
93
150
  # @!endgroup
94
151
 
95
152
  # @return [Client]
@@ -144,8 +201,10 @@ module Aws::S3
144
201
  options, params = separate_params_and_options(options)
145
202
  waiter = Waiters::ObjectExists.new(options)
146
203
  yield_waiter_and_warn(waiter, &block) if block_given?
147
- waiter.wait(params.merge(bucket: @bucket_name,
204
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
205
+ waiter.wait(params.merge(bucket: @bucket_name,
148
206
  key: @key))
207
+ end
149
208
  ObjectSummary.new({
150
209
  bucket_name: @bucket_name,
151
210
  key: @key,
@@ -163,8 +222,10 @@ module Aws::S3
163
222
  options, params = separate_params_and_options(options)
164
223
  waiter = Waiters::ObjectNotExists.new(options)
165
224
  yield_waiter_and_warn(waiter, &block) if block_given?
166
- waiter.wait(params.merge(bucket: @bucket_name,
225
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
226
+ waiter.wait(params.merge(bucket: @bucket_name,
167
227
  key: @key))
228
+ end
168
229
  ObjectSummary.new({
169
230
  bucket_name: @bucket_name,
170
231
  key: @key,
@@ -266,7 +327,9 @@ module Aws::S3
266
327
  :retry
267
328
  end
268
329
  end
269
- Aws::Waiters::Waiter.new(options).wait({})
330
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
331
+ Aws::Waiters::Waiter.new(options).wait({})
332
+ end
270
333
  end
271
334
 
272
335
  # @!group Actions
@@ -276,6 +339,7 @@ module Aws::S3
276
339
  # object_summary.copy_from({
277
340
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
278
341
  # cache_control: "CacheControl",
342
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
279
343
  # content_disposition: "ContentDisposition",
280
344
  # content_encoding: "ContentEncoding",
281
345
  # content_language: "ContentLanguage",
@@ -290,13 +354,15 @@ module Aws::S3
290
354
  # grant_read: "GrantRead",
291
355
  # grant_read_acp: "GrantReadACP",
292
356
  # grant_write_acp: "GrantWriteACP",
357
+ # if_match: "IfMatch",
358
+ # if_none_match: "IfNoneMatch",
293
359
  # metadata: {
294
360
  # "MetadataKey" => "MetadataValue",
295
361
  # },
296
362
  # metadata_directive: "COPY", # accepts COPY, REPLACE
297
363
  # tagging_directive: "COPY", # accepts COPY, REPLACE
298
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
299
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
364
+ # server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
365
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS
300
366
  # website_redirect_location: "WebsiteRedirectLocation",
301
367
  # sse_customer_algorithm: "SSECustomerAlgorithm",
302
368
  # sse_customer_key: "SSECustomerKey",
@@ -317,32 +383,98 @@ module Aws::S3
317
383
  # })
318
384
  # @param [Hash] options ({})
319
385
  # @option options [String] :acl
320
- # The canned ACL to apply to the object.
386
+ # The canned access control list (ACL) to apply to the object.
387
+ #
388
+ # When you copy an object, the ACL metadata is not preserved and is set
389
+ # to `private` by default. Only the owner has full access control. To
390
+ # override the default ACL setting, specify a new ACL when you generate
391
+ # a copy request. For more information, see [Using ACLs][1].
392
+ #
393
+ # If the destination bucket that you're copying objects to uses the
394
+ # bucket owner enforced setting for S3 Object Ownership, ACLs are
395
+ # disabled and no longer affect permissions. Buckets that use this
396
+ # setting only accept `PUT` requests that don't specify an ACL or `PUT`
397
+ # requests that specify bucket owner full control ACLs, such as the
398
+ # `bucket-owner-full-control` canned ACL or an equivalent form of this
399
+ # ACL expressed in the XML format. For more information, see
400
+ # [Controlling ownership of objects and disabling ACLs][2] in the
401
+ # *Amazon S3 User Guide*.
402
+ #
403
+ # <note markdown="1"> * If your destination bucket uses the bucket owner enforced setting
404
+ # for Object Ownership, all objects written to the bucket by any
405
+ # account will be owned by the bucket owner.
406
+ #
407
+ # * This functionality is not supported for directory buckets.
408
+ #
409
+ # * This functionality is not supported for Amazon S3 on Outposts.
321
410
  #
322
- # This action is not supported by Amazon S3 on Outposts.
411
+ # </note>
412
+ #
413
+ #
414
+ #
415
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
416
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
323
417
  # @option options [String] :cache_control
324
- # Specifies caching behavior along the request/reply chain.
418
+ # Specifies the caching behavior along the request/reply chain.
419
+ # @option options [String] :checksum_algorithm
420
+ # Indicates the algorithm that you want Amazon S3 to use to create the
421
+ # checksum for the object. For more information, see [Checking object
422
+ # integrity][1] in the *Amazon S3 User Guide*.
423
+ #
424
+ # When you copy an object, if the source object has a checksum, that
425
+ # checksum value will be copied to the new object by default. If the
426
+ # `CopyObject` request does not include this `x-amz-checksum-algorithm`
427
+ # header, the checksum algorithm will be copied from the source object
428
+ # to the destination object (if it's present on the source object). You
429
+ # can optionally specify a different checksum algorithm to use with the
430
+ # `x-amz-checksum-algorithm` header. Unrecognized or unsupported values
431
+ # will respond with the HTTP status code `400 Bad Request`.
432
+ #
433
+ # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
434
+ # is the default checksum algorithm that's used for performance.
435
+ #
436
+ # </note>
437
+ #
438
+ #
439
+ #
440
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
325
441
  # @option options [String] :content_disposition
326
- # Specifies presentational information for the object.
442
+ # Specifies presentational information for the object. Indicates whether
443
+ # an object should be displayed in a web browser or downloaded as a
444
+ # file. It allows specifying the desired filename for the downloaded
445
+ # file.
327
446
  # @option options [String] :content_encoding
328
447
  # Specifies what content encodings have been applied to the object and
329
448
  # thus what decoding mechanisms must be applied to obtain the media-type
330
449
  # referenced by the Content-Type header field.
450
+ #
451
+ # <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
452
+ # this header field.
453
+ #
454
+ # </note>
331
455
  # @option options [String] :content_language
332
456
  # The language the content is in.
333
457
  # @option options [String] :content_type
334
- # A standard MIME type describing the format of the object data.
458
+ # A standard MIME type that describes the format of the object data.
335
459
  # @option options [required, String] :copy_source
336
- # Specifies the source object for the copy operation. You specify the
337
- # value in one of two formats, depending on whether you want to access
338
- # the source object through an [access point][1]\:
460
+ # Specifies the source object for the copy operation. The source object
461
+ # can be up to 5 GB. If the source object is an object that was uploaded
462
+ # by using a multipart upload, the object copy will be a single part
463
+ # object after the source object is copied to the destination bucket.
464
+ #
465
+ # You specify the value of the copy source in one of two formats,
466
+ # depending on whether you want to access the source object through an
467
+ # [access point][1]:
339
468
  #
340
469
  # * For objects not accessed through an access point, specify the name
341
470
  # of the source bucket and the key of the source object, separated by
342
471
  # a slash (/). For example, to copy the object `reports/january.pdf`
343
- # from the bucket `awsexamplebucket`, use
344
- # `awsexamplebucket/reports/january.pdf`. The value must be URL
345
- # encoded.
472
+ # from the general purpose bucket `awsexamplebucket`, use
473
+ # `awsexamplebucket/reports/january.pdf`. The value must be
474
+ # URL-encoded. To copy the object `reports/january.pdf` from the
475
+ # directory bucket `awsexamplebucket--use1-az5--x-s3`, use
476
+ # `awsexamplebucket--use1-az5--x-s3/reports/january.pdf`. The value
477
+ # must be URL-encoded.
346
478
  #
347
479
  # * For objects accessed through access points, specify the Amazon
348
480
  # Resource Name (ARN) of the object as accessed through the access
@@ -354,9 +486,11 @@ module Aws::S3
354
486
  # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
355
487
  # The value must be URL encoded.
356
488
  #
357
- # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
358
- # source and destination buckets are in the same Amazon Web Services
359
- # Region.
489
+ # <note markdown="1"> * Amazon S3 supports copy operations using Access points only when
490
+ # the source and destination buckets are in the same Amazon Web
491
+ # Services Region.
492
+ #
493
+ # * Access points are not supported by directory buckets.
360
494
  #
361
495
  # </note>
362
496
  #
@@ -367,156 +501,607 @@ module Aws::S3
367
501
  # outpost `my-outpost` owned by account `123456789012` in Region
368
502
  # `us-west-2`, use the URL encoding of
369
503
  # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
370
- # The value must be URL encoded.
371
- #
372
- # To copy a specific version of an object, append
373
- # `?versionId=<version-id>` to the value (for example,
504
+ # The value must be URL-encoded.
505
+ #
506
+ # If your source bucket versioning is enabled, the `x-amz-copy-source`
507
+ # header by default identifies the current version of an object to copy.
508
+ # If the current version is a delete marker, Amazon S3 behaves as if the
509
+ # object was deleted. To copy a different version, use the `versionId`
510
+ # query parameter. Specifically, append `?versionId=<version-id>` to the
511
+ # value (for example,
374
512
  # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
375
513
  # If you don't specify a version ID, Amazon S3 copies the latest
376
514
  # version of the source object.
377
515
  #
516
+ # If you enable versioning on the destination bucket, Amazon S3
517
+ # generates a unique version ID for the copied object. This version ID
518
+ # is different from the version ID of the source object. Amazon S3
519
+ # returns the version ID of the copied object in the `x-amz-version-id`
520
+ # response header in the response.
521
+ #
522
+ # If you do not enable versioning or suspend it on the destination
523
+ # bucket, the version ID that Amazon S3 generates in the
524
+ # `x-amz-version-id` response header is always null.
525
+ #
526
+ # <note markdown="1"> **Directory buckets** - S3 Versioning isn't enabled and supported for
527
+ # directory buckets.
528
+ #
529
+ # </note>
530
+ #
378
531
  #
379
532
  #
380
533
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
381
534
  # @option options [String] :copy_source_if_match
382
535
  # Copies the object if its entity tag (ETag) matches the specified tag.
536
+ #
537
+ # If both the `x-amz-copy-source-if-match` and
538
+ # `x-amz-copy-source-if-unmodified-since` headers are present in the
539
+ # request and evaluate as follows, Amazon S3 returns `200 OK` and copies
540
+ # the data:
541
+ #
542
+ # * `x-amz-copy-source-if-match` condition evaluates to true
543
+ #
544
+ # * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
383
545
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
384
546
  # Copies the object if it has been modified since the specified time.
547
+ #
548
+ # If both the `x-amz-copy-source-if-none-match` and
549
+ # `x-amz-copy-source-if-modified-since` headers are present in the
550
+ # request and evaluate as follows, Amazon S3 returns the `412
551
+ # Precondition Failed` response code:
552
+ #
553
+ # * `x-amz-copy-source-if-none-match` condition evaluates to false
554
+ #
555
+ # * `x-amz-copy-source-if-modified-since` condition evaluates to true
385
556
  # @option options [String] :copy_source_if_none_match
386
557
  # Copies the object if its entity tag (ETag) is different than the
387
558
  # specified ETag.
559
+ #
560
+ # If both the `x-amz-copy-source-if-none-match` and
561
+ # `x-amz-copy-source-if-modified-since` headers are present in the
562
+ # request and evaluate as follows, Amazon S3 returns the `412
563
+ # Precondition Failed` response code:
564
+ #
565
+ # * `x-amz-copy-source-if-none-match` condition evaluates to false
566
+ #
567
+ # * `x-amz-copy-source-if-modified-since` condition evaluates to true
388
568
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
389
569
  # Copies the object if it hasn't been modified since the specified
390
570
  # time.
571
+ #
572
+ # If both the `x-amz-copy-source-if-match` and
573
+ # `x-amz-copy-source-if-unmodified-since` headers are present in the
574
+ # request and evaluate as follows, Amazon S3 returns `200 OK` and copies
575
+ # the data:
576
+ #
577
+ # * `x-amz-copy-source-if-match` condition evaluates to true
578
+ #
579
+ # * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
391
580
  # @option options [Time,DateTime,Date,Integer,String] :expires
392
581
  # The date and time at which the object is no longer cacheable.
393
582
  # @option options [String] :grant_full_control
394
583
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
395
584
  # object.
396
585
  #
397
- # This action is not supported by Amazon S3 on Outposts.
586
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
587
+ #
588
+ # * This functionality is not supported for Amazon S3 on Outposts.
589
+ #
590
+ # </note>
398
591
  # @option options [String] :grant_read
399
592
  # Allows grantee to read the object data and its metadata.
400
593
  #
401
- # This action is not supported by Amazon S3 on Outposts.
594
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
595
+ #
596
+ # * This functionality is not supported for Amazon S3 on Outposts.
597
+ #
598
+ # </note>
402
599
  # @option options [String] :grant_read_acp
403
600
  # Allows grantee to read the object ACL.
404
601
  #
405
- # This action is not supported by Amazon S3 on Outposts.
602
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
603
+ #
604
+ # * This functionality is not supported for Amazon S3 on Outposts.
605
+ #
606
+ # </note>
406
607
  # @option options [String] :grant_write_acp
407
608
  # Allows grantee to write the ACL for the applicable object.
408
609
  #
409
- # This action is not supported by Amazon S3 on Outposts.
610
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
611
+ #
612
+ # * This functionality is not supported for Amazon S3 on Outposts.
613
+ #
614
+ # </note>
615
+ # @option options [String] :if_match
616
+ # Copies the object if the entity tag (ETag) of the destination object
617
+ # matches the specified tag. If the ETag values do not match, the
618
+ # operation returns a `412 Precondition Failed` error. If a concurrent
619
+ # operation occurs during the upload S3 returns a `409
620
+ # ConditionalRequestConflict` response. On a 409 failure you should
621
+ # fetch the object's ETag and retry the upload.
622
+ #
623
+ # Expects the ETag value as a string.
624
+ #
625
+ # For more information about conditional requests, see [RFC 7232][1].
626
+ #
627
+ #
628
+ #
629
+ # [1]: https://tools.ietf.org/html/rfc7232
630
+ # @option options [String] :if_none_match
631
+ # Copies the object only if the object key name at the destination does
632
+ # not already exist in the bucket specified. Otherwise, Amazon S3
633
+ # returns a `412 Precondition Failed` error. If a concurrent operation
634
+ # occurs during the upload S3 returns a `409 ConditionalRequestConflict`
635
+ # response. On a 409 failure you should retry the upload.
636
+ #
637
+ # Expects the '*' (asterisk) character.
638
+ #
639
+ # For more information about conditional requests, see [RFC 7232][1].
640
+ #
641
+ #
642
+ #
643
+ # [1]: https://tools.ietf.org/html/rfc7232
410
644
  # @option options [Hash<String,String>] :metadata
411
645
  # A map of metadata to store with the object in S3.
412
646
  # @option options [String] :metadata_directive
413
647
  # Specifies whether the metadata is copied from the source object or
414
- # replaced with metadata provided in the request.
648
+ # replaced with metadata that's provided in the request. When copying
649
+ # an object, you can preserve all metadata (the default) or specify new
650
+ # metadata. If this header isn’t specified, `COPY` is the default
651
+ # behavior.
652
+ #
653
+ # **General purpose bucket** - For general purpose buckets, when you
654
+ # grant permissions, you can use the `s3:x-amz-metadata-directive`
655
+ # condition key to enforce certain metadata behavior when objects are
656
+ # uploaded. For more information, see [Amazon S3 condition key
657
+ # examples][1] in the *Amazon S3 User Guide*.
658
+ #
659
+ # <note markdown="1"> `x-amz-website-redirect-location` is unique to each object and is not
660
+ # copied when using the `x-amz-metadata-directive` header. To copy the
661
+ # value, you must specify `x-amz-website-redirect-location` in the
662
+ # request header.
663
+ #
664
+ # </note>
665
+ #
666
+ #
667
+ #
668
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html
415
669
  # @option options [String] :tagging_directive
416
- # Specifies whether the object tag-set are copied from the source object
417
- # or replaced with tag-set provided in the request.
670
+ # Specifies whether the object tag-set is copied from the source object
671
+ # or replaced with the tag-set that's provided in the request.
672
+ #
673
+ # The default value is `COPY`.
674
+ #
675
+ # <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
676
+ # operation, only the empty tag-set is supported. Any requests that
677
+ # attempt to write non-empty tags into directory buckets will receive a
678
+ # `501 Not Implemented` status code. When the destination bucket is a
679
+ # directory bucket, you will receive a `501 Not Implemented` response in
680
+ # any of the following situations:
681
+ #
682
+ # * When you attempt to `COPY` the tag-set from an S3 source object that
683
+ # has non-empty tags.
684
+ #
685
+ # * When you attempt to `REPLACE` the tag-set of a source object and set
686
+ # a non-empty value to `x-amz-tagging`.
687
+ #
688
+ # * When you don't set the `x-amz-tagging-directive` header and the
689
+ # source object has non-empty tags. This is because the default value
690
+ # of `x-amz-tagging-directive` is `COPY`.
691
+ #
692
+ # Because only the empty tag-set is supported for directory buckets in a
693
+ # `CopyObject` operation, the following situations are allowed:
694
+ #
695
+ # * When you attempt to `COPY` the tag-set from a directory bucket
696
+ # source object that has no tags to a general purpose bucket. It
697
+ # copies an empty tag-set to the destination object.
698
+ #
699
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
700
+ # source object and set the `x-amz-tagging` value of the directory
701
+ # bucket destination object to empty.
702
+ #
703
+ # * When you attempt to `REPLACE` the tag-set of a general purpose
704
+ # bucket source object that has non-empty tags and set the
705
+ # `x-amz-tagging` value of the directory bucket destination object to
706
+ # empty.
707
+ #
708
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
709
+ # source object and don't set the `x-amz-tagging` value of the
710
+ # directory bucket destination object. This is because the default
711
+ # value of `x-amz-tagging` is the empty value.
712
+ #
713
+ # </note>
418
714
  # @option options [String] :server_side_encryption
419
715
  # The server-side encryption algorithm used when storing this object in
420
- # Amazon S3 (for example, AES256, aws:kms).
716
+ # Amazon S3. Unrecognized or unsupported values won’t write a
717
+ # destination object and will receive a `400 Bad Request` response.
718
+ #
719
+ # Amazon S3 automatically encrypts all new objects that are copied to an
720
+ # S3 bucket. When copying an object, if you don't specify encryption
721
+ # information in your copy request, the encryption setting of the target
722
+ # object is set to the default encryption configuration of the
723
+ # destination bucket. By default, all buckets have a base level of
724
+ # encryption configuration that uses server-side encryption with Amazon
725
+ # S3 managed keys (SSE-S3). If the destination bucket has a different
726
+ # default encryption configuration, Amazon S3 uses the corresponding
727
+ # encryption key to encrypt the target object copy.
728
+ #
729
+ # With server-side encryption, Amazon S3 encrypts your data as it writes
730
+ # your data to disks in its data centers and decrypts the data when you
731
+ # access it. For more information about server-side encryption, see
732
+ # [Using Server-Side Encryption][1] in the *Amazon S3 User Guide*.
733
+ #
734
+ # <b>General purpose buckets </b>
735
+ #
736
+ # * For general purpose buckets, there are the following supported
737
+ # options for server-side encryption: server-side encryption with Key
738
+ # Management Service (KMS) keys (SSE-KMS), dual-layer server-side
739
+ # encryption with Amazon Web Services KMS keys (DSSE-KMS), and
740
+ # server-side encryption with customer-provided encryption keys
741
+ # (SSE-C). Amazon S3 uses the corresponding KMS key, or a
742
+ # customer-provided key to encrypt the target object copy.
743
+ #
744
+ # * When you perform a `CopyObject` operation, if you want to use a
745
+ # different type of encryption setting for the target object, you can
746
+ # specify appropriate encryption-related headers to encrypt the target
747
+ # object with an Amazon S3 managed key, a KMS key, or a
748
+ # customer-provided key. If the encryption setting in your request is
749
+ # different from the default encryption configuration of the
750
+ # destination bucket, the encryption setting in your request takes
751
+ # precedence.
752
+ #
753
+ # <b>Directory buckets </b>
754
+ #
755
+ # * For directory buckets, there are only two supported options for
756
+ # server-side encryption: server-side encryption with Amazon S3
757
+ # managed keys (SSE-S3) (`AES256`) and server-side encryption with KMS
758
+ # keys (SSE-KMS) (`aws:kms`). We recommend that the bucket's default
759
+ # encryption uses the desired encryption configuration and you don't
760
+ # override the bucket default encryption in your `CreateSession`
761
+ # requests or `PUT` object requests. Then, new objects are
762
+ # automatically encrypted with the desired encryption settings. For
763
+ # more information, see [Protecting data with server-side
764
+ # encryption][2] in the *Amazon S3 User Guide*. For more information
765
+ # about the encryption overriding behaviors in directory buckets, see
766
+ # [Specifying server-side encryption with KMS for new object
767
+ # uploads][3].
768
+ #
769
+ # * To encrypt new object copies to a directory bucket with SSE-KMS, we
770
+ # recommend you specify SSE-KMS as the directory bucket's default
771
+ # encryption configuration with a KMS key (specifically, a [customer
772
+ # managed key][4]). The [Amazon Web Services managed key][5]
773
+ # (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
774
+ # support 1 [customer managed key][4] per directory bucket for the
775
+ # lifetime of the bucket. After you specify a customer managed key for
776
+ # SSE-KMS, you can't override the customer managed key for the
777
+ # bucket's SSE-KMS configuration. Then, when you perform a
778
+ # `CopyObject` operation and want to specify server-side encryption
779
+ # settings for new object copies with SSE-KMS in the
780
+ # encryption-related request headers, you must ensure the encryption
781
+ # key is the same customer managed key that you specified for the
782
+ # directory bucket's default encryption configuration.
783
+ #
784
+ # * <b>S3 access points for Amazon FSx </b> - When accessing data stored
785
+ # in Amazon FSx file systems using S3 access points, the only valid
786
+ # server side encryption option is `aws:fsx`. All Amazon FSx file
787
+ # systems have encryption configured by default and are encrypted at
788
+ # rest. Data is automatically encrypted before being written to the
789
+ # file system, and automatically decrypted as it is read. These
790
+ # processes are handled transparently by Amazon FSx.
791
+ #
792
+ #
793
+ #
794
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html
795
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
796
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
797
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
798
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
421
799
  # @option options [String] :storage_class
422
- # By default, Amazon S3 uses the STANDARD Storage Class to store newly
423
- # created objects. The STANDARD storage class provides high durability
424
- # and high availability. Depending on performance needs, you can specify
425
- # a different Storage Class. Amazon S3 on Outposts only uses the
426
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
800
+ # If the `x-amz-storage-class` header is not used, the copied object
801
+ # will be stored in the `STANDARD` Storage Class by default. The
802
+ # `STANDARD` storage class provides high durability and high
803
+ # availability. Depending on performance needs, you can specify a
804
+ # different Storage Class.
805
+ #
806
+ # <note markdown="1"> * <b>Directory buckets </b> - Directory buckets only support
807
+ # `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
808
+ # Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent
809
+ # Access storage class) in Dedicated Local Zones. Unsupported storage
810
+ # class values won't write a destination object and will respond with
811
+ # the HTTP status code `400 Bad Request`.
812
+ #
813
+ # * <b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the
814
+ # `OUTPOSTS` Storage Class.
815
+ #
816
+ # </note>
817
+ #
818
+ # You can use the `CopyObject` action to change the storage class of an
819
+ # object that is already stored in Amazon S3 by using the
820
+ # `x-amz-storage-class` header. For more information, see [Storage
821
+ # Classes][1] in the *Amazon S3 User Guide*.
822
+ #
823
+ # Before using an object as a source object for the copy operation, you
824
+ # must restore a copy of it if it meets any of the following conditions:
825
+ #
826
+ # * The storage class of the source object is `GLACIER` or
827
+ # `DEEP_ARCHIVE`.
828
+ #
829
+ # * The storage class of the source object is `INTELLIGENT_TIERING` and
830
+ # it's [S3 Intelligent-Tiering access tier][2] is `Archive Access` or
831
+ # `Deep Archive Access`.
832
+ #
833
+ # For more information, see [RestoreObject][3] and [Copying Objects][4]
427
834
  # in the *Amazon S3 User Guide*.
428
835
  #
429
836
  #
430
837
  #
431
838
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
839
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition
840
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
841
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html
432
842
  # @option options [String] :website_redirect_location
433
- # If the bucket is configured as a website, redirects requests for this
434
- # object to another object in the same bucket or to an external URL.
435
- # Amazon S3 stores the value of this header in the object metadata.
843
+ # If the destination bucket is configured as a website, redirects
844
+ # requests for this object copy to another object in the same bucket or
845
+ # to an external URL. Amazon S3 stores the value of this header in the
846
+ # object metadata. This value is unique to each object and is not copied
847
+ # when using the `x-amz-metadata-directive` header. Instead, you may opt
848
+ # to provide this header in combination with the
849
+ # `x-amz-metadata-directive` header.
850
+ #
851
+ # <note markdown="1"> This functionality is not supported for directory buckets.
852
+ #
853
+ # </note>
436
854
  # @option options [String] :sse_customer_algorithm
437
- # Specifies the algorithm to use to when encrypting the object (for
438
- # example, AES256).
855
+ # Specifies the algorithm to use when encrypting the object (for
856
+ # example, `AES256`).
857
+ #
858
+ # When you perform a `CopyObject` operation, if you want to use a
859
+ # different type of encryption setting for the target object, you can
860
+ # specify appropriate encryption-related headers to encrypt the target
861
+ # object with an Amazon S3 managed key, a KMS key, or a
862
+ # customer-provided key. If the encryption setting in your request is
863
+ # different from the default encryption configuration of the destination
864
+ # bucket, the encryption setting in your request takes precedence.
865
+ #
866
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
867
+ # directory bucket.
868
+ #
869
+ # </note>
439
870
  # @option options [String] :sse_customer_key
440
871
  # Specifies the customer-provided encryption key for Amazon S3 to use in
441
872
  # encrypting data. This value is used to store the object and then it is
442
- # discarded; Amazon S3 does not store the encryption key. The key must
873
+ # discarded. Amazon S3 does not store the encryption key. The key must
443
874
  # be appropriate for use with the algorithm specified in the
444
875
  # `x-amz-server-side-encryption-customer-algorithm` header.
876
+ #
877
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
878
+ # directory bucket.
879
+ #
880
+ # </note>
445
881
  # @option options [String] :sse_customer_key_md5
446
882
  # Specifies the 128-bit MD5 digest of the encryption key according to
447
883
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
448
884
  # ensure that the encryption key was transmitted without error.
885
+ #
886
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
887
+ # directory bucket.
888
+ #
889
+ # </note>
449
890
  # @option options [String] :ssekms_key_id
450
- # Specifies the Amazon Web Services KMS key ID to use for object
451
- # encryption. All GET and PUT requests for an object protected by Amazon
452
- # Web Services KMS will fail if not made via SSL or using SigV4. For
453
- # information about configuring using any of the officially supported
454
- # Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying
455
- # the Signature Version in Request Authentication][1] in the *Amazon S3
456
- # User Guide*.
891
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
892
+ # object encryption. All GET and PUT requests for an object protected by
893
+ # KMS will fail if they're not made via SSL or using SigV4. For
894
+ # information about configuring any of the officially supported Amazon
895
+ # Web Services SDKs and Amazon Web Services CLI, see [Specifying the
896
+ # Signature Version in Request Authentication][1] in the *Amazon S3 User
897
+ # Guide*.
898
+ #
899
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
900
+ # recommended to specify the `x-amz-server-side-encryption` header to
901
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
902
+ # header implicitly uses the bucket's default KMS customer managed key
903
+ # ID. If you want to explicitly set the `
904
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
905
+ # bucket's default customer managed key (using key ID or ARN, not
906
+ # alias). Your SSE-KMS configuration can only support 1 [customer
907
+ # managed key][2] per directory bucket's lifetime. The [Amazon Web
908
+ # Services managed key][3] (`aws/s3`) isn't supported. Incorrect key
909
+ # specification results in an HTTP `400 Bad Request` error.
457
910
  #
458
911
  #
459
912
  #
460
913
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
914
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
915
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
461
916
  # @option options [String] :ssekms_encryption_context
462
- # Specifies the Amazon Web Services KMS Encryption Context to use for
463
- # object encryption. The value of this header is a base64-encoded UTF-8
464
- # string holding JSON with the encryption context key-value pairs.
917
+ # Specifies the Amazon Web Services KMS Encryption Context as an
918
+ # additional encryption context to use for the destination object
919
+ # encryption. The value of this header is a base64-encoded UTF-8 string
920
+ # holding JSON with the encryption context key-value pairs.
921
+ #
922
+ # **General purpose buckets** - This value must be explicitly added to
923
+ # specify encryption context for `CopyObject` requests if you want an
924
+ # additional encryption context for your destination object. The
925
+ # additional encryption context of the source object won't be copied to
926
+ # the destination object. For more information, see [Encryption
927
+ # context][1] in the *Amazon S3 User Guide*.
928
+ #
929
+ # **Directory buckets** - You can optionally provide an explicit
930
+ # encryption context value. The value must match the default encryption
931
+ # context - the bucket Amazon Resource Name (ARN). An additional
932
+ # encryption context value is not supported.
933
+ #
934
+ #
935
+ #
936
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
465
937
  # @option options [Boolean] :bucket_key_enabled
466
938
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
467
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
939
+ # encryption with server-side encryption using Key Management Service
940
+ # (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable
941
+ # an S3 Bucket Key for the object.
942
+ #
468
943
  # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
469
- # for object encryption with SSE-KMS.
944
+ # for object encryption with SSE-KMS. Specifying this header with a COPY
945
+ # action doesn’t affect bucket-level settings for S3 Bucket Key.
946
+ #
947
+ # For more information, see [Amazon S3 Bucket Keys][1] in the *Amazon S3
948
+ # User Guide*.
949
+ #
950
+ # <note markdown="1"> **Directory buckets** - S3 Bucket Keys aren't supported, when you
951
+ # copy SSE-KMS encrypted objects from general purpose buckets to
952
+ # directory buckets, from directory buckets to general purpose buckets,
953
+ # or between directory buckets, through [CopyObject][2]. In this case,
954
+ # Amazon S3 makes a call to KMS every time a copy request is made for a
955
+ # KMS-encrypted object.
470
956
  #
471
- # Specifying this header with a COPY action doesn’t affect bucket-level
472
- # settings for S3 Bucket Key.
957
+ # </note>
958
+ #
959
+ #
960
+ #
961
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
962
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
473
963
  # @option options [String] :copy_source_sse_customer_algorithm
474
964
  # Specifies the algorithm to use when decrypting the source object (for
475
- # example, AES256).
965
+ # example, `AES256`).
966
+ #
967
+ # If the source object for the copy is stored in Amazon S3 using SSE-C,
968
+ # you must provide the necessary encryption information in your request
969
+ # so that Amazon S3 can decrypt the object for copying.
970
+ #
971
+ # <note markdown="1"> This functionality is not supported when the source object is in a
972
+ # directory bucket.
973
+ #
974
+ # </note>
476
975
  # @option options [String] :copy_source_sse_customer_key
477
976
  # Specifies the customer-provided encryption key for Amazon S3 to use to
478
977
  # decrypt the source object. The encryption key provided in this header
479
- # must be one that was used when the source object was created.
978
+ # must be the same one that was used when the source object was created.
979
+ #
980
+ # If the source object for the copy is stored in Amazon S3 using SSE-C,
981
+ # you must provide the necessary encryption information in your request
982
+ # so that Amazon S3 can decrypt the object for copying.
983
+ #
984
+ # <note markdown="1"> This functionality is not supported when the source object is in a
985
+ # directory bucket.
986
+ #
987
+ # </note>
480
988
  # @option options [String] :copy_source_sse_customer_key_md5
481
989
  # Specifies the 128-bit MD5 digest of the encryption key according to
482
990
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
483
991
  # ensure that the encryption key was transmitted without error.
992
+ #
993
+ # If the source object for the copy is stored in Amazon S3 using SSE-C,
994
+ # you must provide the necessary encryption information in your request
995
+ # so that Amazon S3 can decrypt the object for copying.
996
+ #
997
+ # <note markdown="1"> This functionality is not supported when the source object is in a
998
+ # directory bucket.
999
+ #
1000
+ # </note>
484
1001
  # @option options [String] :request_payer
485
1002
  # Confirms that the requester knows that they will be charged for the
486
1003
  # request. Bucket owners need not specify this parameter in their
487
- # requests. For information about downloading objects from requester
488
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1004
+ # requests. If either the source or destination S3 bucket has Requester
1005
+ # Pays enabled, the requester will pay for corresponding charges to copy
1006
+ # the object. For information about downloading objects from Requester
1007
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
489
1008
  # in the *Amazon S3 User Guide*.
490
1009
  #
1010
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1011
+ #
1012
+ # </note>
1013
+ #
491
1014
  #
492
1015
  #
493
1016
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
494
1017
  # @option options [String] :tagging
495
- # The tag-set for the object destination object this value must be used
496
- # in conjunction with the `TaggingDirective`. The tag-set must be
497
- # encoded as URL Query parameters.
1018
+ # The tag-set for the object copy in the destination bucket. This value
1019
+ # must be used in conjunction with the `x-amz-tagging-directive` if you
1020
+ # choose `REPLACE` for the `x-amz-tagging-directive`. If you choose
1021
+ # `COPY` for the `x-amz-tagging-directive`, you don't need to set the
1022
+ # `x-amz-tagging` header, because the tag-set will be copied from the
1023
+ # source object directly. The tag-set must be encoded as URL Query
1024
+ # parameters.
1025
+ #
1026
+ # The default value is the empty value.
1027
+ #
1028
+ # <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
1029
+ # operation, only the empty tag-set is supported. Any requests that
1030
+ # attempt to write non-empty tags into directory buckets will receive a
1031
+ # `501 Not Implemented` status code. When the destination bucket is a
1032
+ # directory bucket, you will receive a `501 Not Implemented` response in
1033
+ # any of the following situations:
1034
+ #
1035
+ # * When you attempt to `COPY` the tag-set from an S3 source object that
1036
+ # has non-empty tags.
1037
+ #
1038
+ # * When you attempt to `REPLACE` the tag-set of a source object and set
1039
+ # a non-empty value to `x-amz-tagging`.
1040
+ #
1041
+ # * When you don't set the `x-amz-tagging-directive` header and the
1042
+ # source object has non-empty tags. This is because the default value
1043
+ # of `x-amz-tagging-directive` is `COPY`.
1044
+ #
1045
+ # Because only the empty tag-set is supported for directory buckets in a
1046
+ # `CopyObject` operation, the following situations are allowed:
1047
+ #
1048
+ # * When you attempt to `COPY` the tag-set from a directory bucket
1049
+ # source object that has no tags to a general purpose bucket. It
1050
+ # copies an empty tag-set to the destination object.
1051
+ #
1052
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
1053
+ # source object and set the `x-amz-tagging` value of the directory
1054
+ # bucket destination object to empty.
1055
+ #
1056
+ # * When you attempt to `REPLACE` the tag-set of a general purpose
1057
+ # bucket source object that has non-empty tags and set the
1058
+ # `x-amz-tagging` value of the directory bucket destination object to
1059
+ # empty.
1060
+ #
1061
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
1062
+ # source object and don't set the `x-amz-tagging` value of the
1063
+ # directory bucket destination object. This is because the default
1064
+ # value of `x-amz-tagging` is the empty value.
1065
+ #
1066
+ # </note>
498
1067
  # @option options [String] :object_lock_mode
499
- # The Object Lock mode that you want to apply to the copied object.
1068
+ # The Object Lock mode that you want to apply to the object copy.
1069
+ #
1070
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1071
+ #
1072
+ # </note>
500
1073
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
501
- # The date and time when you want the copied object's Object Lock to
1074
+ # The date and time when you want the Object Lock of the object copy to
502
1075
  # expire.
1076
+ #
1077
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1078
+ #
1079
+ # </note>
503
1080
  # @option options [String] :object_lock_legal_hold_status
504
- # Specifies whether you want to apply a Legal Hold to the copied object.
1081
+ # Specifies whether you want to apply a legal hold to the object copy.
1082
+ #
1083
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1084
+ #
1085
+ # </note>
505
1086
  # @option options [String] :expected_bucket_owner
506
1087
  # The account ID of the expected destination bucket owner. If the
507
- # destination bucket is owned by a different account, the request will
508
- # fail with an HTTP `403 (Access Denied)` error.
1088
+ # account ID that you provide does not match the actual owner of the
1089
+ # destination bucket, the request fails with the HTTP status code `403
1090
+ # Forbidden` (access denied).
509
1091
  # @option options [String] :expected_source_bucket_owner
510
- # The account ID of the expected source bucket owner. If the source
511
- # bucket is owned by a different account, the request will fail with an
512
- # HTTP `403 (Access Denied)` error.
1092
+ # The account ID of the expected source bucket owner. If the account ID
1093
+ # that you provide does not match the actual owner of the source bucket,
1094
+ # the request fails with the HTTP status code `403 Forbidden` (access
1095
+ # denied).
513
1096
  # @return [Types::CopyObjectOutput]
514
1097
  def copy_from(options = {})
515
1098
  options = options.merge(
516
1099
  bucket: @bucket_name,
517
1100
  key: @key
518
1101
  )
519
- resp = @client.copy_object(options)
1102
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1103
+ @client.copy_object(options)
1104
+ end
520
1105
  resp.data
521
1106
  end
522
1107
 
@@ -528,6 +1113,9 @@ module Aws::S3
528
1113
  # request_payer: "requester", # accepts requester
529
1114
  # bypass_governance_retention: false,
530
1115
  # expected_bucket_owner: "AccountId",
1116
+ # if_match: "IfMatch",
1117
+ # if_match_last_modified_time: Time.now,
1118
+ # if_match_size: 1,
531
1119
  # })
532
1120
  # @param [Hash] options ({})
533
1121
  # @option options [String] :mfa
@@ -535,33 +1123,92 @@ module Aws::S3
535
1123
  # space, and the value that is displayed on your authentication device.
536
1124
  # Required to permanently delete a versioned object if versioning is
537
1125
  # configured with MFA delete enabled.
1126
+ #
1127
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1128
+ #
1129
+ # </note>
538
1130
  # @option options [String] :version_id
539
- # VersionId used to reference a specific version of the object.
1131
+ # Version ID used to reference a specific version of the object.
1132
+ #
1133
+ # <note markdown="1"> For directory buckets in this API operation, only the `null` value of
1134
+ # the version ID is supported.
1135
+ #
1136
+ # </note>
540
1137
  # @option options [String] :request_payer
541
1138
  # Confirms that the requester knows that they will be charged for the
542
1139
  # request. Bucket owners need not specify this parameter in their
543
- # requests. For information about downloading objects from requester
544
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1140
+ # requests. If either the source or destination S3 bucket has Requester
1141
+ # Pays enabled, the requester will pay for corresponding charges to copy
1142
+ # the object. For information about downloading objects from Requester
1143
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
545
1144
  # in the *Amazon S3 User Guide*.
546
1145
  #
1146
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1147
+ #
1148
+ # </note>
1149
+ #
547
1150
  #
548
1151
  #
549
1152
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
550
1153
  # @option options [Boolean] :bypass_governance_retention
551
1154
  # Indicates whether S3 Object Lock should bypass Governance-mode
552
1155
  # restrictions to process this operation. To use this header, you must
553
- # have the `s3:PutBucketPublicAccessBlock` permission.
1156
+ # have the `s3:BypassGovernanceRetention` permission.
1157
+ #
1158
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1159
+ #
1160
+ # </note>
554
1161
  # @option options [String] :expected_bucket_owner
555
- # The account ID of the expected bucket owner. If the bucket is owned by
556
- # a different account, the request will fail with an HTTP `403 (Access
557
- # Denied)` error.
1162
+ # The account ID of the expected bucket owner. If the account ID that
1163
+ # you provide does not match the actual owner of the bucket, the request
1164
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1165
+ # @option options [String] :if_match
1166
+ # Deletes the object if the ETag (entity tag) value provided during the
1167
+ # delete operation matches the ETag of the object in S3. If the ETag
1168
+ # values do not match, the operation returns a `412 Precondition Failed`
1169
+ # error.
1170
+ #
1171
+ # Expects the ETag value as a string. `If-Match` does accept a string
1172
+ # value of an '*' (asterisk) character to denote a match of any ETag.
1173
+ #
1174
+ # For more information about conditional requests, see [RFC 7232][1].
1175
+ #
1176
+ #
1177
+ #
1178
+ # [1]: https://tools.ietf.org/html/rfc7232
1179
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
1180
+ # If present, the object is deleted only if its modification times
1181
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
1182
+ # match, the operation returns a `412 Precondition Failed` error. If the
1183
+ # `Timestamp` matches or if the object doesn’t exist, the operation
1184
+ # returns a `204 Success (No Content)` response.
1185
+ #
1186
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1187
+ #
1188
+ # </note>
1189
+ # @option options [Integer] :if_match_size
1190
+ # If present, the object is deleted only if its size matches the
1191
+ # provided size in bytes. If the `Size` value does not match, the
1192
+ # operation returns a `412 Precondition Failed` error. If the `Size`
1193
+ # matches or if the object doesn’t exist, the operation returns a `204
1194
+ # Success (No Content)` response.
1195
+ #
1196
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1197
+ #
1198
+ # </note>
1199
+ #
1200
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
1201
+ # `x-amz-if-match-size` conditional headers in conjunction with
1202
+ # each-other or individually.
558
1203
  # @return [Types::DeleteObjectOutput]
559
1204
  def delete(options = {})
560
1205
  options = options.merge(
561
1206
  bucket: @bucket_name,
562
1207
  key: @key
563
1208
  )
564
- resp = @client.delete_object(options)
1209
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1210
+ @client.delete_object(options)
1211
+ end
565
1212
  resp.data
566
1213
  end
567
1214
 
@@ -586,24 +1233,71 @@ module Aws::S3
586
1233
  # request_payer: "requester", # accepts requester
587
1234
  # part_number: 1,
588
1235
  # expected_bucket_owner: "AccountId",
1236
+ # checksum_mode: "ENABLED", # accepts ENABLED
589
1237
  # })
590
1238
  # @param [Hash] options ({})
591
1239
  # @option options [String] :if_match
592
1240
  # Return the object only if its entity tag (ETag) is the same as the one
593
- # specified, otherwise return a 412 (precondition failed).
1241
+ # specified in this header; otherwise, return a `412 Precondition
1242
+ # Failed` error.
1243
+ #
1244
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
1245
+ # present in the request as follows: `If-Match` condition evaluates to
1246
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
1247
+ # then, S3 returns `200 OK` and the data requested.
1248
+ #
1249
+ # For more information about conditional requests, see [RFC 7232][1].
1250
+ #
1251
+ #
1252
+ #
1253
+ # [1]: https://tools.ietf.org/html/rfc7232
594
1254
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
595
1255
  # Return the object only if it has been modified since the specified
596
- # time, otherwise return a 304 (not modified).
1256
+ # time; otherwise, return a `304 Not Modified` error.
1257
+ #
1258
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
1259
+ # present in the request as follows:` If-None-Match` condition evaluates
1260
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
1261
+ # then, S3 returns `304 Not Modified` status code.
1262
+ #
1263
+ # For more information about conditional requests, see [RFC 7232][1].
1264
+ #
1265
+ #
1266
+ #
1267
+ # [1]: https://tools.ietf.org/html/rfc7232
597
1268
  # @option options [String] :if_none_match
598
1269
  # Return the object only if its entity tag (ETag) is different from the
599
- # one specified, otherwise return a 304 (not modified).
1270
+ # one specified in this header; otherwise, return a `304 Not Modified`
1271
+ # error.
1272
+ #
1273
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
1274
+ # present in the request as follows:` If-None-Match` condition evaluates
1275
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
1276
+ # then, S3 returns `304 Not Modified` HTTP status code.
1277
+ #
1278
+ # For more information about conditional requests, see [RFC 7232][1].
1279
+ #
1280
+ #
1281
+ #
1282
+ # [1]: https://tools.ietf.org/html/rfc7232
600
1283
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
601
1284
  # Return the object only if it has not been modified since the specified
602
- # time, otherwise return a 412 (precondition failed).
1285
+ # time; otherwise, return a `412 Precondition Failed` error.
1286
+ #
1287
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
1288
+ # present in the request as follows: `If-Match` condition evaluates to
1289
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
1290
+ # then, S3 returns `200 OK` and the data requested.
1291
+ #
1292
+ # For more information about conditional requests, see [RFC 7232][1].
1293
+ #
1294
+ #
1295
+ #
1296
+ # [1]: https://tools.ietf.org/html/rfc7232
603
1297
  # @option options [String] :range
604
- # Downloads the specified range bytes of an object. For more information
1298
+ # Downloads the specified byte range of an object. For more information
605
1299
  # about the HTTP Range header, see
606
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
1300
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
607
1301
  #
608
1302
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
609
1303
  # `GET` request.
@@ -612,11 +1306,11 @@ module Aws::S3
612
1306
  #
613
1307
  #
614
1308
  #
615
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
1309
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
616
1310
  # @option options [String] :response_cache_control
617
1311
  # Sets the `Cache-Control` header of the response.
618
1312
  # @option options [String] :response_content_disposition
619
- # Sets the `Content-Disposition` header of the response
1313
+ # Sets the `Content-Disposition` header of the response.
620
1314
  # @option options [String] :response_content_encoding
621
1315
  # Sets the `Content-Encoding` header of the response.
622
1316
  # @option options [String] :response_content_language
@@ -626,27 +1320,128 @@ module Aws::S3
626
1320
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
627
1321
  # Sets the `Expires` header of the response.
628
1322
  # @option options [String] :version_id
629
- # VersionId used to reference a specific version of the object.
1323
+ # Version ID used to reference a specific version of the object.
1324
+ #
1325
+ # By default, the `GetObject` operation returns the current version of
1326
+ # an object. To return a different version, use the `versionId`
1327
+ # subresource.
1328
+ #
1329
+ # <note markdown="1"> * If you include a `versionId` in your request header, you must have
1330
+ # the `s3:GetObjectVersion` permission to access a specific version of
1331
+ # an object. The `s3:GetObject` permission is not required in this
1332
+ # scenario.
1333
+ #
1334
+ # * If you request the current version of an object without a specific
1335
+ # `versionId` in the request header, only the `s3:GetObject`
1336
+ # permission is required. The `s3:GetObjectVersion` permission is not
1337
+ # required in this scenario.
1338
+ #
1339
+ # * **Directory buckets** - S3 Versioning isn't enabled and supported
1340
+ # for directory buckets. For this API operation, only the `null` value
1341
+ # of the version ID is supported by directory buckets. You can only
1342
+ # specify `null` to the `versionId` query parameter in the request.
1343
+ #
1344
+ # </note>
1345
+ #
1346
+ # For more information about versioning, see [PutBucketVersioning][1].
1347
+ #
1348
+ #
1349
+ #
1350
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html
630
1351
  # @option options [String] :sse_customer_algorithm
631
- # Specifies the algorithm to use to when decrypting the object (for
632
- # example, AES256).
1352
+ # Specifies the algorithm to use when decrypting the object (for
1353
+ # example, `AES256`).
1354
+ #
1355
+ # If you encrypt an object by using server-side encryption with
1356
+ # customer-provided encryption keys (SSE-C) when you store the object in
1357
+ # Amazon S3, then when you GET the object, you must use the following
1358
+ # headers:
1359
+ #
1360
+ # * `x-amz-server-side-encryption-customer-algorithm`
1361
+ #
1362
+ # * `x-amz-server-side-encryption-customer-key`
1363
+ #
1364
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1365
+ #
1366
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1367
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1368
+ #
1369
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1370
+ #
1371
+ # </note>
1372
+ #
1373
+ #
1374
+ #
1375
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
633
1376
  # @option options [String] :sse_customer_key
634
- # Specifies the customer-provided encryption key for Amazon S3 used to
635
- # encrypt the data. This value is used to decrypt the object when
636
- # recovering it and must match the one used when storing the data. The
637
- # key must be appropriate for use with the algorithm specified in the
1377
+ # Specifies the customer-provided encryption key that you originally
1378
+ # provided for Amazon S3 to encrypt the data before storing it. This
1379
+ # value is used to decrypt the object when recovering it and must match
1380
+ # the one used when storing the data. The key must be appropriate for
1381
+ # use with the algorithm specified in the
638
1382
  # `x-amz-server-side-encryption-customer-algorithm` header.
1383
+ #
1384
+ # If you encrypt an object by using server-side encryption with
1385
+ # customer-provided encryption keys (SSE-C) when you store the object in
1386
+ # Amazon S3, then when you GET the object, you must use the following
1387
+ # headers:
1388
+ #
1389
+ # * `x-amz-server-side-encryption-customer-algorithm`
1390
+ #
1391
+ # * `x-amz-server-side-encryption-customer-key`
1392
+ #
1393
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1394
+ #
1395
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1396
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1397
+ #
1398
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1399
+ #
1400
+ # </note>
1401
+ #
1402
+ #
1403
+ #
1404
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
639
1405
  # @option options [String] :sse_customer_key_md5
640
- # Specifies the 128-bit MD5 digest of the encryption key according to
641
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
642
- # ensure that the encryption key was transmitted without error.
1406
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
1407
+ # key according to RFC 1321. Amazon S3 uses this header for a message
1408
+ # integrity check to ensure that the encryption key was transmitted
1409
+ # without error.
1410
+ #
1411
+ # If you encrypt an object by using server-side encryption with
1412
+ # customer-provided encryption keys (SSE-C) when you store the object in
1413
+ # Amazon S3, then when you GET the object, you must use the following
1414
+ # headers:
1415
+ #
1416
+ # * `x-amz-server-side-encryption-customer-algorithm`
1417
+ #
1418
+ # * `x-amz-server-side-encryption-customer-key`
1419
+ #
1420
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1421
+ #
1422
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1423
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1424
+ #
1425
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1426
+ #
1427
+ # </note>
1428
+ #
1429
+ #
1430
+ #
1431
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
643
1432
  # @option options [String] :request_payer
644
1433
  # Confirms that the requester knows that they will be charged for the
645
1434
  # request. Bucket owners need not specify this parameter in their
646
- # requests. For information about downloading objects from requester
647
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1435
+ # requests. If either the source or destination S3 bucket has Requester
1436
+ # Pays enabled, the requester will pay for corresponding charges to copy
1437
+ # the object. For information about downloading objects from Requester
1438
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
648
1439
  # in the *Amazon S3 User Guide*.
649
1440
  #
1441
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1442
+ #
1443
+ # </note>
1444
+ #
650
1445
  #
651
1446
  #
652
1447
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
@@ -656,16 +1451,20 @@ module Aws::S3
656
1451
  # for the part specified. Useful for downloading just a part of an
657
1452
  # object.
658
1453
  # @option options [String] :expected_bucket_owner
659
- # The account ID of the expected bucket owner. If the bucket is owned by
660
- # a different account, the request will fail with an HTTP `403 (Access
661
- # Denied)` error.
1454
+ # The account ID of the expected bucket owner. If the account ID that
1455
+ # you provide does not match the actual owner of the bucket, the request
1456
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1457
+ # @option options [String] :checksum_mode
1458
+ # To retrieve the checksum, this mode must be enabled.
662
1459
  # @return [Types::GetObjectOutput]
663
1460
  def get(options = {}, &block)
664
1461
  options = options.merge(
665
1462
  bucket: @bucket_name,
666
1463
  key: @key
667
1464
  )
668
- resp = @client.get_object(options, &block)
1465
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1466
+ @client.get_object(options, &block)
1467
+ end
669
1468
  resp.data
670
1469
  end
671
1470
 
@@ -686,8 +1485,8 @@ module Aws::S3
686
1485
  # metadata: {
687
1486
  # "MetadataKey" => "MetadataValue",
688
1487
  # },
689
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
690
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
1488
+ # server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
1489
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS
691
1490
  # website_redirect_location: "WebsiteRedirectLocation",
692
1491
  # sse_customer_algorithm: "SSECustomerAlgorithm",
693
1492
  # sse_customer_key: "SSECustomerKey",
@@ -701,12 +1500,34 @@ module Aws::S3
701
1500
  # object_lock_retain_until_date: Time.now,
702
1501
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
703
1502
  # expected_bucket_owner: "AccountId",
1503
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1504
+ # checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
704
1505
  # })
705
1506
  # @param [Hash] options ({})
706
1507
  # @option options [String] :acl
707
- # The canned ACL to apply to the object.
1508
+ # The canned ACL to apply to the object. Amazon S3 supports a set of
1509
+ # predefined ACLs, known as *canned ACLs*. Each canned ACL has a
1510
+ # predefined set of grantees and permissions. For more information, see
1511
+ # [Canned ACL][1] in the *Amazon S3 User Guide*.
1512
+ #
1513
+ # By default, all objects are private. Only the owner has full access
1514
+ # control. When uploading an object, you can grant access permissions to
1515
+ # individual Amazon Web Services accounts or to predefined groups
1516
+ # defined by Amazon S3. These permissions are then added to the access
1517
+ # control list (ACL) on the new object. For more information, see [Using
1518
+ # ACLs][2]. One way to grant the permissions using the request headers
1519
+ # is to specify a canned ACL with the `x-amz-acl` request header.
1520
+ #
1521
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
708
1522
  #
709
- # This action is not supported by Amazon S3 on Outposts.
1523
+ # * This functionality is not supported for Amazon S3 on Outposts.
1524
+ #
1525
+ # </note>
1526
+ #
1527
+ #
1528
+ #
1529
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
1530
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
710
1531
  # @option options [String] :cache_control
711
1532
  # Specifies caching behavior along the request/reply chain.
712
1533
  # @option options [String] :content_disposition
@@ -715,41 +1536,343 @@ module Aws::S3
715
1536
  # Specifies what content encodings have been applied to the object and
716
1537
  # thus what decoding mechanisms must be applied to obtain the media-type
717
1538
  # referenced by the Content-Type header field.
1539
+ #
1540
+ # <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
1541
+ # this header field.
1542
+ #
1543
+ # </note>
718
1544
  # @option options [String] :content_language
719
- # The language the content is in.
1545
+ # The language that the content is in.
720
1546
  # @option options [String] :content_type
721
1547
  # A standard MIME type describing the format of the object data.
722
1548
  # @option options [Time,DateTime,Date,Integer,String] :expires
723
1549
  # The date and time at which the object is no longer cacheable.
724
1550
  # @option options [String] :grant_full_control
725
- # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
726
- # object.
1551
+ # Specify access permissions explicitly to give the grantee READ,
1552
+ # READ\_ACP, and WRITE\_ACP permissions on the object.
1553
+ #
1554
+ # By default, all objects are private. Only the owner has full access
1555
+ # control. When uploading an object, you can use this header to
1556
+ # explicitly grant access permissions to specific Amazon Web Services
1557
+ # accounts or groups. This header maps to specific permissions that
1558
+ # Amazon S3 supports in an ACL. For more information, see [Access
1559
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1560
+ #
1561
+ # You specify each grantee as a type=value pair, where the type is one
1562
+ # of the following:
1563
+ #
1564
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1565
+ # Web Services account
1566
+ #
1567
+ # * `uri` – if you are granting permissions to a predefined group
1568
+ #
1569
+ # * `emailAddress` – if the value specified is the email address of an
1570
+ # Amazon Web Services account
1571
+ #
1572
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1573
+ # following Amazon Web Services Regions:
1574
+ #
1575
+ # * US East (N. Virginia)
1576
+ #
1577
+ # * US West (N. California)
1578
+ #
1579
+ # * US West (Oregon)
1580
+ #
1581
+ # * Asia Pacific (Singapore)
1582
+ #
1583
+ # * Asia Pacific (Sydney)
1584
+ #
1585
+ # * Asia Pacific (Tokyo)
1586
+ #
1587
+ # * Europe (Ireland)
1588
+ #
1589
+ # * South America (São Paulo)
1590
+ #
1591
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1592
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1593
+ # Reference.
1594
+ #
1595
+ # </note>
1596
+ #
1597
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1598
+ # Web Services accounts identified by account IDs permissions to read
1599
+ # object data and its metadata:
1600
+ #
1601
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1602
+ #
1603
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1604
+ #
1605
+ # * This functionality is not supported for Amazon S3 on Outposts.
1606
+ #
1607
+ # </note>
1608
+ #
1609
+ #
1610
+ #
1611
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1612
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
1613
+ # @option options [String] :grant_read
1614
+ # Specify access permissions explicitly to allow grantee to read the
1615
+ # object data and its metadata.
1616
+ #
1617
+ # By default, all objects are private. Only the owner has full access
1618
+ # control. When uploading an object, you can use this header to
1619
+ # explicitly grant access permissions to specific Amazon Web Services
1620
+ # accounts or groups. This header maps to specific permissions that
1621
+ # Amazon S3 supports in an ACL. For more information, see [Access
1622
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1623
+ #
1624
+ # You specify each grantee as a type=value pair, where the type is one
1625
+ # of the following:
1626
+ #
1627
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1628
+ # Web Services account
1629
+ #
1630
+ # * `uri` – if you are granting permissions to a predefined group
1631
+ #
1632
+ # * `emailAddress` – if the value specified is the email address of an
1633
+ # Amazon Web Services account
1634
+ #
1635
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1636
+ # following Amazon Web Services Regions:
1637
+ #
1638
+ # * US East (N. Virginia)
1639
+ #
1640
+ # * US West (N. California)
1641
+ #
1642
+ # * US West (Oregon)
1643
+ #
1644
+ # * Asia Pacific (Singapore)
1645
+ #
1646
+ # * Asia Pacific (Sydney)
1647
+ #
1648
+ # * Asia Pacific (Tokyo)
1649
+ #
1650
+ # * Europe (Ireland)
1651
+ #
1652
+ # * South America (São Paulo)
1653
+ #
1654
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1655
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1656
+ # Reference.
1657
+ #
1658
+ # </note>
1659
+ #
1660
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1661
+ # Web Services accounts identified by account IDs permissions to read
1662
+ # object data and its metadata:
1663
+ #
1664
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1665
+ #
1666
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1667
+ #
1668
+ # * This functionality is not supported for Amazon S3 on Outposts.
1669
+ #
1670
+ # </note>
1671
+ #
1672
+ #
1673
+ #
1674
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1675
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
1676
+ # @option options [String] :grant_read_acp
1677
+ # Specify access permissions explicitly to allows grantee to read the
1678
+ # object ACL.
1679
+ #
1680
+ # By default, all objects are private. Only the owner has full access
1681
+ # control. When uploading an object, you can use this header to
1682
+ # explicitly grant access permissions to specific Amazon Web Services
1683
+ # accounts or groups. This header maps to specific permissions that
1684
+ # Amazon S3 supports in an ACL. For more information, see [Access
1685
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1686
+ #
1687
+ # You specify each grantee as a type=value pair, where the type is one
1688
+ # of the following:
1689
+ #
1690
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1691
+ # Web Services account
1692
+ #
1693
+ # * `uri` – if you are granting permissions to a predefined group
1694
+ #
1695
+ # * `emailAddress` – if the value specified is the email address of an
1696
+ # Amazon Web Services account
1697
+ #
1698
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1699
+ # following Amazon Web Services Regions:
1700
+ #
1701
+ # * US East (N. Virginia)
1702
+ #
1703
+ # * US West (N. California)
1704
+ #
1705
+ # * US West (Oregon)
1706
+ #
1707
+ # * Asia Pacific (Singapore)
1708
+ #
1709
+ # * Asia Pacific (Sydney)
1710
+ #
1711
+ # * Asia Pacific (Tokyo)
1712
+ #
1713
+ # * Europe (Ireland)
1714
+ #
1715
+ # * South America (São Paulo)
1716
+ #
1717
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1718
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1719
+ # Reference.
727
1720
  #
728
- # This action is not supported by Amazon S3 on Outposts.
729
- # @option options [String] :grant_read
730
- # Allows grantee to read the object data and its metadata.
1721
+ # </note>
731
1722
  #
732
- # This action is not supported by Amazon S3 on Outposts.
733
- # @option options [String] :grant_read_acp
734
- # Allows grantee to read the object ACL.
1723
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1724
+ # Web Services accounts identified by account IDs permissions to read
1725
+ # object data and its metadata:
1726
+ #
1727
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1728
+ #
1729
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1730
+ #
1731
+ # * This functionality is not supported for Amazon S3 on Outposts.
735
1732
  #
736
- # This action is not supported by Amazon S3 on Outposts.
1733
+ # </note>
1734
+ #
1735
+ #
1736
+ #
1737
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1738
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
737
1739
  # @option options [String] :grant_write_acp
738
- # Allows grantee to write the ACL for the applicable object.
1740
+ # Specify access permissions explicitly to allows grantee to allow
1741
+ # grantee to write the ACL for the applicable object.
1742
+ #
1743
+ # By default, all objects are private. Only the owner has full access
1744
+ # control. When uploading an object, you can use this header to
1745
+ # explicitly grant access permissions to specific Amazon Web Services
1746
+ # accounts or groups. This header maps to specific permissions that
1747
+ # Amazon S3 supports in an ACL. For more information, see [Access
1748
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1749
+ #
1750
+ # You specify each grantee as a type=value pair, where the type is one
1751
+ # of the following:
1752
+ #
1753
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1754
+ # Web Services account
1755
+ #
1756
+ # * `uri` – if you are granting permissions to a predefined group
1757
+ #
1758
+ # * `emailAddress` – if the value specified is the email address of an
1759
+ # Amazon Web Services account
1760
+ #
1761
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1762
+ # following Amazon Web Services Regions:
1763
+ #
1764
+ # * US East (N. Virginia)
1765
+ #
1766
+ # * US West (N. California)
1767
+ #
1768
+ # * US West (Oregon)
1769
+ #
1770
+ # * Asia Pacific (Singapore)
1771
+ #
1772
+ # * Asia Pacific (Sydney)
1773
+ #
1774
+ # * Asia Pacific (Tokyo)
1775
+ #
1776
+ # * Europe (Ireland)
1777
+ #
1778
+ # * South America (São Paulo)
1779
+ #
1780
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1781
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1782
+ # Reference.
1783
+ #
1784
+ # </note>
1785
+ #
1786
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1787
+ # Web Services accounts identified by account IDs permissions to read
1788
+ # object data and its metadata:
1789
+ #
1790
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
739
1791
  #
740
- # This action is not supported by Amazon S3 on Outposts.
1792
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1793
+ #
1794
+ # * This functionality is not supported for Amazon S3 on Outposts.
1795
+ #
1796
+ # </note>
1797
+ #
1798
+ #
1799
+ #
1800
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1801
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
741
1802
  # @option options [Hash<String,String>] :metadata
742
1803
  # A map of metadata to store with the object in S3.
743
1804
  # @option options [String] :server_side_encryption
744
- # The server-side encryption algorithm used when storing this object in
745
- # Amazon S3 (for example, AES256, aws:kms).
1805
+ # The server-side encryption algorithm used when you store this object
1806
+ # in Amazon S3 or Amazon FSx.
1807
+ #
1808
+ # * <b>Directory buckets </b> - For directory buckets, there are only
1809
+ # two supported options for server-side encryption: server-side
1810
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
1811
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
1812
+ # recommend that the bucket's default encryption uses the desired
1813
+ # encryption configuration and you don't override the bucket default
1814
+ # encryption in your `CreateSession` requests or `PUT` object
1815
+ # requests. Then, new objects are automatically encrypted with the
1816
+ # desired encryption settings. For more information, see [Protecting
1817
+ # data with server-side encryption][1] in the *Amazon S3 User Guide*.
1818
+ # For more information about the encryption overriding behaviors in
1819
+ # directory buckets, see [Specifying server-side encryption with KMS
1820
+ # for new object uploads][2].
1821
+ #
1822
+ # In the Zonal endpoint API calls (except [CopyObject][3] and
1823
+ # [UploadPartCopy][4]) using the REST API, the encryption request
1824
+ # headers must match the encryption settings that are specified in the
1825
+ # `CreateSession` request. You can't override the values of the
1826
+ # encryption settings (`x-amz-server-side-encryption`,
1827
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
1828
+ # `x-amz-server-side-encryption-context`, and
1829
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
1830
+ # specified in the `CreateSession` request. You don't need to
1831
+ # explicitly specify these encryption settings values in Zonal
1832
+ # endpoint API calls, and Amazon S3 will use the encryption settings
1833
+ # values from the `CreateSession` request to protect new objects in
1834
+ # the directory bucket.
1835
+ #
1836
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
1837
+ # `CreateSession`, the session token refreshes automatically to avoid
1838
+ # service interruptions when a session expires. The CLI or the Amazon
1839
+ # Web Services SDKs use the bucket's default encryption configuration
1840
+ # for the `CreateSession` request. It's not supported to override the
1841
+ # encryption settings values in the `CreateSession` request. So in the
1842
+ # Zonal endpoint API calls (except [CopyObject][3] and
1843
+ # [UploadPartCopy][4]), the encryption request headers must match the
1844
+ # default encryption configuration of the directory bucket.
1845
+ #
1846
+ # </note>
1847
+ #
1848
+ # * <b>S3 access points for Amazon FSx </b> - When accessing data stored
1849
+ # in Amazon FSx file systems using S3 access points, the only valid
1850
+ # server side encryption option is `aws:fsx`. All Amazon FSx file
1851
+ # systems have encryption configured by default and are encrypted at
1852
+ # rest. Data is automatically encrypted before being written to the
1853
+ # file system, and automatically decrypted as it is read. These
1854
+ # processes are handled transparently by Amazon FSx.
1855
+ #
1856
+ #
1857
+ #
1858
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
1859
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
1860
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
1861
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
746
1862
  # @option options [String] :storage_class
747
1863
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
748
1864
  # created objects. The STANDARD storage class provides high durability
749
1865
  # and high availability. Depending on performance needs, you can specify
750
- # a different Storage Class. Amazon S3 on Outposts only uses the
751
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
752
- # in the *Amazon S3 User Guide*.
1866
+ # a different Storage Class. For more information, see [Storage
1867
+ # Classes][1] in the *Amazon S3 User Guide*.
1868
+ #
1869
+ # <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
1870
+ # Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
1871
+ # One Zone-Infrequent Access storage class) in Dedicated Local Zones.
1872
+ #
1873
+ # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
1874
+ #
1875
+ # </note>
753
1876
  #
754
1877
  #
755
1878
  #
@@ -758,75 +1881,174 @@ module Aws::S3
758
1881
  # If the bucket is configured as a website, redirects requests for this
759
1882
  # object to another object in the same bucket or to an external URL.
760
1883
  # Amazon S3 stores the value of this header in the object metadata.
1884
+ #
1885
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1886
+ #
1887
+ # </note>
761
1888
  # @option options [String] :sse_customer_algorithm
762
- # Specifies the algorithm to use to when encrypting the object (for
1889
+ # Specifies the algorithm to use when encrypting the object (for
763
1890
  # example, AES256).
1891
+ #
1892
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1893
+ #
1894
+ # </note>
764
1895
  # @option options [String] :sse_customer_key
765
1896
  # Specifies the customer-provided encryption key for Amazon S3 to use in
766
1897
  # encrypting data. This value is used to store the object and then it is
767
1898
  # discarded; Amazon S3 does not store the encryption key. The key must
768
1899
  # be appropriate for use with the algorithm specified in the
769
1900
  # `x-amz-server-side-encryption-customer-algorithm` header.
770
- # @option options [String] :sse_customer_key_md5
771
- # Specifies the 128-bit MD5 digest of the encryption key according to
772
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
773
- # ensure that the encryption key was transmitted without error.
774
- # @option options [String] :ssekms_key_id
775
- # Specifies the ID of the symmetric customer managed key to use for
776
- # object encryption. All GET and PUT requests for an object protected by
777
- # Amazon Web Services KMS will fail if not made via SSL or using SigV4.
778
- # For information about configuring using any of the officially
779
- # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
780
- # [Specifying the Signature Version in Request Authentication][1] in the
781
- # *Amazon S3 User Guide*.
782
1901
  #
1902
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1903
+ #
1904
+ # </note>
1905
+ # @option options [String] :sse_customer_key_md5
1906
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
1907
+ # key according to RFC 1321. Amazon S3 uses this header for a message
1908
+ # integrity check to ensure that the encryption key was transmitted
1909
+ # without error.
783
1910
  #
1911
+ # <note markdown="1"> This functionality is not supported for directory buckets.
784
1912
  #
785
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1913
+ # </note>
1914
+ # @option options [String] :ssekms_key_id
1915
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
1916
+ # object encryption. If the KMS key doesn't exist in the same account
1917
+ # that's issuing the command, you must use the full Key ARN not the Key
1918
+ # ID.
1919
+ #
1920
+ # **General purpose buckets** - If you specify
1921
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
1922
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
1923
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
1924
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
1925
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1926
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
1927
+ #
1928
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
1929
+ # recommended to specify the `x-amz-server-side-encryption` header to
1930
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
1931
+ # header implicitly uses the bucket's default KMS customer managed key
1932
+ # ID. If you want to explicitly set the `
1933
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
1934
+ # bucket's default customer managed key (using key ID or ARN, not
1935
+ # alias). Your SSE-KMS configuration can only support 1 [customer
1936
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
1937
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
1938
+ # specification results in an HTTP `400 Bad Request` error.
1939
+ #
1940
+ #
1941
+ #
1942
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
1943
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
786
1944
  # @option options [String] :ssekms_encryption_context
787
1945
  # Specifies the Amazon Web Services KMS Encryption Context to use for
788
- # object encryption. The value of this header is a base64-encoded UTF-8
789
- # string holding JSON with the encryption context key-value pairs.
1946
+ # object encryption. The value of this header is a Base64 encoded string
1947
+ # of a UTF-8 encoded JSON, which contains the encryption context as
1948
+ # key-value pairs.
1949
+ #
1950
+ # **Directory buckets** - You can optionally provide an explicit
1951
+ # encryption context value. The value must match the default encryption
1952
+ # context - the bucket Amazon Resource Name (ARN). An additional
1953
+ # encryption context value is not supported.
790
1954
  # @option options [Boolean] :bucket_key_enabled
791
1955
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
792
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
793
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
794
- # for object encryption with SSE-KMS.
1956
+ # encryption with server-side encryption using Key Management Service
1957
+ # (KMS) keys (SSE-KMS).
795
1958
  #
796
- # Specifying this header with an object action doesn’t affect
1959
+ # **General purpose buckets** - Setting this header to `true` causes
1960
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
1961
+ # Also, specifying this header with a PUT action doesn't affect
797
1962
  # bucket-level settings for S3 Bucket Key.
1963
+ #
1964
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
1965
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
1966
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
1967
+ # from general purpose buckets to directory buckets, from directory
1968
+ # buckets to general purpose buckets, or between directory buckets,
1969
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
1970
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
1971
+ # makes a call to KMS every time a copy request is made for a
1972
+ # KMS-encrypted object.
1973
+ #
1974
+ #
1975
+ #
1976
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
1977
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
1978
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
1979
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
798
1980
  # @option options [String] :request_payer
799
1981
  # Confirms that the requester knows that they will be charged for the
800
1982
  # request. Bucket owners need not specify this parameter in their
801
- # requests. For information about downloading objects from requester
802
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1983
+ # requests. If either the source or destination S3 bucket has Requester
1984
+ # Pays enabled, the requester will pay for corresponding charges to copy
1985
+ # the object. For information about downloading objects from Requester
1986
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
803
1987
  # in the *Amazon S3 User Guide*.
804
1988
  #
1989
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1990
+ #
1991
+ # </note>
1992
+ #
805
1993
  #
806
1994
  #
807
1995
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
808
1996
  # @option options [String] :tagging
809
1997
  # The tag-set for the object. The tag-set must be encoded as URL Query
810
1998
  # parameters.
1999
+ #
2000
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2001
+ #
2002
+ # </note>
811
2003
  # @option options [String] :object_lock_mode
812
2004
  # Specifies the Object Lock mode that you want to apply to the uploaded
813
2005
  # object.
2006
+ #
2007
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2008
+ #
2009
+ # </note>
814
2010
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
815
2011
  # Specifies the date and time when you want the Object Lock to expire.
2012
+ #
2013
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2014
+ #
2015
+ # </note>
816
2016
  # @option options [String] :object_lock_legal_hold_status
817
- # Specifies whether you want to apply a Legal Hold to the uploaded
2017
+ # Specifies whether you want to apply a legal hold to the uploaded
818
2018
  # object.
2019
+ #
2020
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2021
+ #
2022
+ # </note>
819
2023
  # @option options [String] :expected_bucket_owner
820
- # The account ID of the expected bucket owner. If the bucket is owned by
821
- # a different account, the request will fail with an HTTP `403 (Access
822
- # Denied)` error.
2024
+ # The account ID of the expected bucket owner. If the account ID that
2025
+ # you provide does not match the actual owner of the bucket, the request
2026
+ # fails with the HTTP status code `403 Forbidden` (access denied).
2027
+ # @option options [String] :checksum_algorithm
2028
+ # Indicates the algorithm that you want Amazon S3 to use to create the
2029
+ # checksum for the object. For more information, see [Checking object
2030
+ # integrity][1] in the *Amazon S3 User Guide*.
2031
+ #
2032
+ #
2033
+ #
2034
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2035
+ # @option options [String] :checksum_type
2036
+ # Indicates the checksum type that you want Amazon S3 to use to
2037
+ # calculate the object’s checksum value. For more information, see
2038
+ # [Checking object integrity in the Amazon S3 User Guide][1].
2039
+ #
2040
+ #
2041
+ #
2042
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
823
2043
  # @return [MultipartUpload]
824
2044
  def initiate_multipart_upload(options = {})
825
2045
  options = options.merge(
826
2046
  bucket: @bucket_name,
827
2047
  key: @key
828
2048
  )
829
- resp = @client.create_multipart_upload(options)
2049
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2050
+ @client.create_multipart_upload(options)
2051
+ end
830
2052
  MultipartUpload.new(
831
2053
  bucket_name: @bucket_name,
832
2054
  object_key: @key,
@@ -847,16 +2069,25 @@ module Aws::S3
847
2069
  # content_length: 1,
848
2070
  # content_md5: "ContentMD5",
849
2071
  # content_type: "ContentType",
2072
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
2073
+ # checksum_crc32: "ChecksumCRC32",
2074
+ # checksum_crc32c: "ChecksumCRC32C",
2075
+ # checksum_crc64nvme: "ChecksumCRC64NVME",
2076
+ # checksum_sha1: "ChecksumSHA1",
2077
+ # checksum_sha256: "ChecksumSHA256",
850
2078
  # expires: Time.now,
2079
+ # if_match: "IfMatch",
2080
+ # if_none_match: "IfNoneMatch",
851
2081
  # grant_full_control: "GrantFullControl",
852
2082
  # grant_read: "GrantRead",
853
2083
  # grant_read_acp: "GrantReadACP",
854
2084
  # grant_write_acp: "GrantWriteACP",
2085
+ # write_offset_bytes: 1,
855
2086
  # metadata: {
856
2087
  # "MetadataKey" => "MetadataValue",
857
2088
  # },
858
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
859
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
2089
+ # server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
2090
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS
860
2091
  # website_redirect_location: "WebsiteRedirectLocation",
861
2092
  # sse_customer_algorithm: "SSECustomerAlgorithm",
862
2093
  # sse_customer_key: "SSECustomerKey",
@@ -874,13 +2105,41 @@ module Aws::S3
874
2105
  # @param [Hash] options ({})
875
2106
  # @option options [String] :acl
876
2107
  # The canned ACL to apply to the object. For more information, see
877
- # [Canned ACL][1].
2108
+ # [Canned ACL][1] in the *Amazon S3 User Guide*.
2109
+ #
2110
+ # When adding a new object, you can use headers to grant ACL-based
2111
+ # permissions to individual Amazon Web Services accounts or to
2112
+ # predefined groups defined by Amazon S3. These permissions are then
2113
+ # added to the ACL on the object. By default, all objects are private.
2114
+ # Only the owner has full access control. For more information, see
2115
+ # [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
2116
+ # REST API][3] in the *Amazon S3 User Guide*.
2117
+ #
2118
+ # If the bucket that you're uploading objects to uses the bucket owner
2119
+ # enforced setting for S3 Object Ownership, ACLs are disabled and no
2120
+ # longer affect permissions. Buckets that use this setting only accept
2121
+ # PUT requests that don't specify an ACL or PUT requests that specify
2122
+ # bucket owner full control ACLs, such as the
2123
+ # `bucket-owner-full-control` canned ACL or an equivalent form of this
2124
+ # ACL expressed in the XML format. PUT requests that contain other ACLs
2125
+ # (for example, custom grants to certain Amazon Web Services accounts)
2126
+ # fail and return a `400` error with the error code
2127
+ # `AccessControlListNotSupported`. For more information, see [
2128
+ # Controlling ownership of objects and disabling ACLs][4] in the *Amazon
2129
+ # S3 User Guide*.
2130
+ #
2131
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2132
+ #
2133
+ # * This functionality is not supported for Amazon S3 on Outposts.
878
2134
  #
879
- # This action is not supported by Amazon S3 on Outposts.
2135
+ # </note>
880
2136
  #
881
2137
  #
882
2138
  #
883
2139
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
2140
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
2141
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
2142
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
884
2143
  # @option options [String, StringIO, File] :body
885
2144
  # Object data.
886
2145
  # @option options [String] :cache_control
@@ -894,32 +2153,32 @@ module Aws::S3
894
2153
  # @option options [String] :content_disposition
895
2154
  # Specifies presentational information for the object. For more
896
2155
  # information, see
897
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
2156
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
898
2157
  #
899
2158
  #
900
2159
  #
901
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
2160
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
902
2161
  # @option options [String] :content_encoding
903
2162
  # Specifies what content encodings have been applied to the object and
904
2163
  # thus what decoding mechanisms must be applied to obtain the media-type
905
2164
  # referenced by the Content-Type header field. For more information, see
906
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
2165
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
907
2166
  #
908
2167
  #
909
2168
  #
910
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
2169
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
911
2170
  # @option options [String] :content_language
912
2171
  # The language the content is in.
913
2172
  # @option options [Integer] :content_length
914
2173
  # Size of the body in bytes. This parameter is useful when the size of
915
2174
  # the body cannot be determined automatically. For more information, see
916
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
2175
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
917
2176
  #
918
2177
  #
919
2178
  #
920
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
2179
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
921
2180
  # @option options [String] :content_md5
922
- # The base64-encoded 128-bit MD5 digest of the message (without the
2181
+ # The Base64 encoded 128-bit `MD5` digest of the message (without the
923
2182
  # headers) according to RFC 1864. This header can be used as a message
924
2183
  # integrity check to verify that the data is the same data that was
925
2184
  # originally sent. Although it is optional, we recommend using the
@@ -927,54 +2186,300 @@ module Aws::S3
927
2186
  # information about REST request authentication, see [REST
928
2187
  # Authentication][1].
929
2188
  #
2189
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2190
+ # for any request to upload an object with a retention period configured
2191
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2192
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2193
+ # Guide*.
2194
+ #
2195
+ # </note>
2196
+ #
2197
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2198
+ #
2199
+ # </note>
2200
+ #
930
2201
  #
931
2202
  #
932
2203
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
2204
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
933
2205
  # @option options [String] :content_type
934
2206
  # A standard MIME type describing the format of the contents. For more
935
2207
  # information, see
936
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
2208
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
2209
+ #
2210
+ #
2211
+ #
2212
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
2213
+ # @option options [String] :checksum_algorithm
2214
+ # Indicates the algorithm used to create the checksum for the object
2215
+ # when you use the SDK. This header will not provide any additional
2216
+ # functionality if you don't use the SDK. When you send this header,
2217
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
2218
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
2219
+ # with the HTTP status code `400 Bad Request`.
2220
+ #
2221
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
2222
+ # the supported algorithm from the following list:
2223
+ #
2224
+ # * `CRC32`
2225
+ #
2226
+ # * `CRC32C`
2227
+ #
2228
+ # * `CRC64NVME`
2229
+ #
2230
+ # * `SHA1`
2231
+ #
2232
+ # * `SHA256`
2233
+ #
2234
+ # For more information, see [Checking object integrity][1] in the
2235
+ # *Amazon S3 User Guide*.
2236
+ #
2237
+ # If the individual checksum value you provide through
2238
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2239
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
2240
+ # request with a `BadDigest` error.
2241
+ #
2242
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2243
+ # for any request to upload an object with a retention period configured
2244
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2245
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2246
+ # Guide*.
2247
+ #
2248
+ # </note>
2249
+ #
2250
+ # For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2251
+ # is the default checksum algorithm that's used for performance.
2252
+ #
2253
+ #
2254
+ #
2255
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2256
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2257
+ # @option options [String] :checksum_crc32
2258
+ # This header can be used as a data integrity check to verify that the
2259
+ # data received is the same data that was originally sent. This header
2260
+ # specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
2261
+ # For more information, see [Checking object integrity][1] in the
2262
+ # *Amazon S3 User Guide*.
2263
+ #
2264
+ #
2265
+ #
2266
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2267
+ # @option options [String] :checksum_crc32c
2268
+ # This header can be used as a data integrity check to verify that the
2269
+ # data received is the same data that was originally sent. This header
2270
+ # specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
2271
+ # For more information, see [Checking object integrity][1] in the
2272
+ # *Amazon S3 User Guide*.
2273
+ #
2274
+ #
2275
+ #
2276
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2277
+ # @option options [String] :checksum_crc64nvme
2278
+ # This header can be used as a data integrity check to verify that the
2279
+ # data received is the same data that was originally sent. This header
2280
+ # specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
2281
+ # object. The `CRC64NVME` checksum is always a full object checksum. For
2282
+ # more information, see [Checking object integrity in the Amazon S3 User
2283
+ # Guide][1].
2284
+ #
2285
+ #
2286
+ #
2287
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2288
+ # @option options [String] :checksum_sha1
2289
+ # This header can be used as a data integrity check to verify that the
2290
+ # data received is the same data that was originally sent. This header
2291
+ # specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
2292
+ # more information, see [Checking object integrity][1] in the *Amazon S3
2293
+ # User Guide*.
937
2294
  #
938
2295
  #
939
2296
  #
940
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
2297
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2298
+ # @option options [String] :checksum_sha256
2299
+ # This header can be used as a data integrity check to verify that the
2300
+ # data received is the same data that was originally sent. This header
2301
+ # specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
2302
+ # For more information, see [Checking object integrity][1] in the
2303
+ # *Amazon S3 User Guide*.
2304
+ #
2305
+ #
2306
+ #
2307
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
941
2308
  # @option options [Time,DateTime,Date,Integer,String] :expires
942
2309
  # The date and time at which the object is no longer cacheable. For more
943
2310
  # information, see
944
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
2311
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
2312
+ #
2313
+ #
2314
+ #
2315
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2316
+ # @option options [String] :if_match
2317
+ # Uploads the object only if the ETag (entity tag) value provided during
2318
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
2319
+ # values do not match, the operation returns a `412 Precondition Failed`
2320
+ # error.
945
2321
  #
2322
+ # If a conflicting operation occurs during the upload S3 returns a `409
2323
+ # ConditionalRequestConflict` response. On a 409 failure you should
2324
+ # fetch the object's ETag and retry the upload.
946
2325
  #
2326
+ # Expects the ETag value as a string.
947
2327
  #
948
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
2328
+ # For more information about conditional requests, see [RFC 7232][1], or
2329
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2330
+ #
2331
+ #
2332
+ #
2333
+ # [1]: https://tools.ietf.org/html/rfc7232
2334
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
2335
+ # @option options [String] :if_none_match
2336
+ # Uploads the object only if the object key name does not already exist
2337
+ # in the bucket specified. Otherwise, Amazon S3 returns a `412
2338
+ # Precondition Failed` error.
2339
+ #
2340
+ # If a conflicting operation occurs during the upload S3 returns a `409
2341
+ # ConditionalRequestConflict` response. On a 409 failure you should
2342
+ # retry the upload.
2343
+ #
2344
+ # Expects the '*' (asterisk) character.
2345
+ #
2346
+ # For more information about conditional requests, see [RFC 7232][1], or
2347
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2348
+ #
2349
+ #
2350
+ #
2351
+ # [1]: https://tools.ietf.org/html/rfc7232
2352
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
949
2353
  # @option options [String] :grant_full_control
950
2354
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
951
2355
  # object.
952
2356
  #
953
- # This action is not supported by Amazon S3 on Outposts.
2357
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2358
+ #
2359
+ # * This functionality is not supported for Amazon S3 on Outposts.
2360
+ #
2361
+ # </note>
954
2362
  # @option options [String] :grant_read
955
2363
  # Allows grantee to read the object data and its metadata.
956
2364
  #
957
- # This action is not supported by Amazon S3 on Outposts.
2365
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2366
+ #
2367
+ # * This functionality is not supported for Amazon S3 on Outposts.
2368
+ #
2369
+ # </note>
958
2370
  # @option options [String] :grant_read_acp
959
2371
  # Allows grantee to read the object ACL.
960
2372
  #
961
- # This action is not supported by Amazon S3 on Outposts.
2373
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2374
+ #
2375
+ # * This functionality is not supported for Amazon S3 on Outposts.
2376
+ #
2377
+ # </note>
962
2378
  # @option options [String] :grant_write_acp
963
2379
  # Allows grantee to write the ACL for the applicable object.
964
2380
  #
965
- # This action is not supported by Amazon S3 on Outposts.
2381
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2382
+ #
2383
+ # * This functionality is not supported for Amazon S3 on Outposts.
2384
+ #
2385
+ # </note>
2386
+ # @option options [Integer] :write_offset_bytes
2387
+ # Specifies the offset for appending data to existing objects in bytes.
2388
+ # The offset must be equal to the size of the existing object being
2389
+ # appended to. If no object exists, setting this header to 0 will create
2390
+ # a new object.
2391
+ #
2392
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
2393
+ # Express One Zone storage class in directory buckets.
2394
+ #
2395
+ # </note>
966
2396
  # @option options [Hash<String,String>] :metadata
967
2397
  # A map of metadata to store with the object in S3.
968
2398
  # @option options [String] :server_side_encryption
969
- # The server-side encryption algorithm used when storing this object in
970
- # Amazon S3 (for example, AES256, aws:kms).
2399
+ # The server-side encryption algorithm that was used when you store this
2400
+ # object in Amazon S3 or Amazon FSx.
2401
+ #
2402
+ # * <b>General purpose buckets </b> - You have four mutually exclusive
2403
+ # options to protect data using server-side encryption in Amazon S3,
2404
+ # depending on how you choose to manage the encryption keys.
2405
+ # Specifically, the encryption key options are Amazon S3 managed keys
2406
+ # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
2407
+ # customer-provided keys (SSE-C). Amazon S3 encrypts data with
2408
+ # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
2409
+ # default. You can optionally tell Amazon S3 to encrypt data at rest
2410
+ # by using server-side encryption with other key options. For more
2411
+ # information, see [Using Server-Side Encryption][1] in the *Amazon S3
2412
+ # User Guide*.
2413
+ #
2414
+ # * <b>Directory buckets </b> - For directory buckets, there are only
2415
+ # two supported options for server-side encryption: server-side
2416
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
2417
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
2418
+ # recommend that the bucket's default encryption uses the desired
2419
+ # encryption configuration and you don't override the bucket default
2420
+ # encryption in your `CreateSession` requests or `PUT` object
2421
+ # requests. Then, new objects are automatically encrypted with the
2422
+ # desired encryption settings. For more information, see [Protecting
2423
+ # data with server-side encryption][2] in the *Amazon S3 User Guide*.
2424
+ # For more information about the encryption overriding behaviors in
2425
+ # directory buckets, see [Specifying server-side encryption with KMS
2426
+ # for new object uploads][3].
2427
+ #
2428
+ # In the Zonal endpoint API calls (except [CopyObject][4] and
2429
+ # [UploadPartCopy][5]) using the REST API, the encryption request
2430
+ # headers must match the encryption settings that are specified in the
2431
+ # `CreateSession` request. You can't override the values of the
2432
+ # encryption settings (`x-amz-server-side-encryption`,
2433
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
2434
+ # `x-amz-server-side-encryption-context`, and
2435
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
2436
+ # specified in the `CreateSession` request. You don't need to
2437
+ # explicitly specify these encryption settings values in Zonal
2438
+ # endpoint API calls, and Amazon S3 will use the encryption settings
2439
+ # values from the `CreateSession` request to protect new objects in
2440
+ # the directory bucket.
2441
+ #
2442
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
2443
+ # `CreateSession`, the session token refreshes automatically to avoid
2444
+ # service interruptions when a session expires. The CLI or the Amazon
2445
+ # Web Services SDKs use the bucket's default encryption configuration
2446
+ # for the `CreateSession` request. It's not supported to override the
2447
+ # encryption settings values in the `CreateSession` request. So in the
2448
+ # Zonal endpoint API calls (except [CopyObject][4] and
2449
+ # [UploadPartCopy][5]), the encryption request headers must match the
2450
+ # default encryption configuration of the directory bucket.
2451
+ #
2452
+ # </note>
2453
+ #
2454
+ # * <b>S3 access points for Amazon FSx </b> - When accessing data stored
2455
+ # in Amazon FSx file systems using S3 access points, the only valid
2456
+ # server side encryption option is `aws:fsx`. All Amazon FSx file
2457
+ # systems have encryption configured by default and are encrypted at
2458
+ # rest. Data is automatically encrypted before being written to the
2459
+ # file system, and automatically decrypted as it is read. These
2460
+ # processes are handled transparently by Amazon FSx.
2461
+ #
2462
+ #
2463
+ #
2464
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
2465
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
2466
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
2467
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
2468
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
971
2469
  # @option options [String] :storage_class
972
2470
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
973
2471
  # created objects. The STANDARD storage class provides high durability
974
2472
  # and high availability. Depending on performance needs, you can specify
975
- # a different Storage Class. Amazon S3 on Outposts only uses the
976
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
977
- # in the *Amazon S3 User Guide*.
2473
+ # a different Storage Class. For more information, see [Storage
2474
+ # Classes][1] in the *Amazon S3 User Guide*.
2475
+ #
2476
+ # <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
2477
+ # Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
2478
+ # One Zone-Infrequent Access storage class) in Dedicated Local Zones.
2479
+ #
2480
+ # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
2481
+ #
2482
+ # </note>
978
2483
  #
979
2484
  #
980
2485
  #
@@ -983,7 +2488,8 @@ module Aws::S3
983
2488
  # If the bucket is configured as a website, redirects requests for this
984
2489
  # object to another object in the same bucket or to an external URL.
985
2490
  # Amazon S3 stores the value of this header in the object metadata. For
986
- # information about object metadata, see [Object Key and Metadata][1].
2491
+ # information about object metadata, see [Object Key and Metadata][1] in
2492
+ # the *Amazon S3 User Guide*.
987
2493
  #
988
2494
  # In the following example, the request header sets the redirect to an
989
2495
  # object (anotherPage.html) in the same bucket:
@@ -997,7 +2503,11 @@ module Aws::S3
997
2503
  #
998
2504
  # For more information about website hosting in Amazon S3, see [Hosting
999
2505
  # Websites on Amazon S3][2] and [How to Configure Website Page
1000
- # Redirects][3].
2506
+ # Redirects][3] in the *Amazon S3 User Guide*.
2507
+ #
2508
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2509
+ #
2510
+ # </note>
1001
2511
  #
1002
2512
  #
1003
2513
  #
@@ -1005,76 +2515,169 @@ module Aws::S3
1005
2515
  # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
1006
2516
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
1007
2517
  # @option options [String] :sse_customer_algorithm
1008
- # Specifies the algorithm to use to when encrypting the object (for
1009
- # example, AES256).
2518
+ # Specifies the algorithm to use when encrypting the object (for
2519
+ # example, `AES256`).
2520
+ #
2521
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2522
+ #
2523
+ # </note>
1010
2524
  # @option options [String] :sse_customer_key
1011
2525
  # Specifies the customer-provided encryption key for Amazon S3 to use in
1012
2526
  # encrypting data. This value is used to store the object and then it is
1013
2527
  # discarded; Amazon S3 does not store the encryption key. The key must
1014
2528
  # be appropriate for use with the algorithm specified in the
1015
2529
  # `x-amz-server-side-encryption-customer-algorithm` header.
2530
+ #
2531
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2532
+ #
2533
+ # </note>
1016
2534
  # @option options [String] :sse_customer_key_md5
1017
2535
  # Specifies the 128-bit MD5 digest of the encryption key according to
1018
2536
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1019
2537
  # ensure that the encryption key was transmitted without error.
2538
+ #
2539
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2540
+ #
2541
+ # </note>
1020
2542
  # @option options [String] :ssekms_key_id
1021
- # If `x-amz-server-side-encryption` is present and has the value of
1022
- # `aws:kms`, this header specifies the ID of the Amazon Web Services Key
1023
- # Management Service (Amazon Web Services KMS) symmetrical customer
1024
- # managed key that was used for the object. If you specify
1025
- # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1026
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1027
- # Amazon Web Services managed key to protect the data. If the KMS key
1028
- # does not exist in the same account issuing the command, you must use
1029
- # the full ARN and not just the ID.
2543
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
2544
+ # object encryption. If the KMS key doesn't exist in the same account
2545
+ # that's issuing the command, you must use the full Key ARN not the Key
2546
+ # ID.
2547
+ #
2548
+ # **General purpose buckets** - If you specify
2549
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
2550
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
2551
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
2552
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
2553
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
2554
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
2555
+ #
2556
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
2557
+ # recommended to specify the `x-amz-server-side-encryption` header to
2558
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
2559
+ # header implicitly uses the bucket's default KMS customer managed key
2560
+ # ID. If you want to explicitly set the `
2561
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
2562
+ # bucket's default customer managed key (using key ID or ARN, not
2563
+ # alias). Your SSE-KMS configuration can only support 1 [customer
2564
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
2565
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
2566
+ # specification results in an HTTP `400 Bad Request` error.
2567
+ #
2568
+ #
2569
+ #
2570
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
2571
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
1030
2572
  # @option options [String] :ssekms_encryption_context
1031
- # Specifies the Amazon Web Services KMS Encryption Context to use for
1032
- # object encryption. The value of this header is a base64-encoded UTF-8
1033
- # string holding JSON with the encryption context key-value pairs.
2573
+ # Specifies the Amazon Web Services KMS Encryption Context as an
2574
+ # additional encryption context to use for object encryption. The value
2575
+ # of this header is a Base64 encoded string of a UTF-8 encoded JSON,
2576
+ # which contains the encryption context as key-value pairs. This value
2577
+ # is stored as object metadata and automatically gets passed on to
2578
+ # Amazon Web Services KMS for future `GetObject` operations on this
2579
+ # object.
2580
+ #
2581
+ # **General purpose buckets** - This value must be explicitly added
2582
+ # during `CopyObject` operations if you want an additional encryption
2583
+ # context for your object. For more information, see [Encryption
2584
+ # context][1] in the *Amazon S3 User Guide*.
2585
+ #
2586
+ # **Directory buckets** - You can optionally provide an explicit
2587
+ # encryption context value. The value must match the default encryption
2588
+ # context - the bucket Amazon Resource Name (ARN). An additional
2589
+ # encryption context value is not supported.
2590
+ #
2591
+ #
2592
+ #
2593
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
1034
2594
  # @option options [Boolean] :bucket_key_enabled
1035
2595
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1036
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
1037
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1038
- # for object encryption with SSE-KMS.
2596
+ # encryption with server-side encryption using Key Management Service
2597
+ # (KMS) keys (SSE-KMS).
2598
+ #
2599
+ # **General purpose buckets** - Setting this header to `true` causes
2600
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
2601
+ # Also, specifying this header with a PUT action doesn't affect
2602
+ # bucket-level settings for S3 Bucket Key.
1039
2603
  #
1040
- # Specifying this header with a PUT action doesn’t affect bucket-level
1041
- # settings for S3 Bucket Key.
2604
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
2605
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
2606
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
2607
+ # from general purpose buckets to directory buckets, from directory
2608
+ # buckets to general purpose buckets, or between directory buckets,
2609
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
2610
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
2611
+ # makes a call to KMS every time a copy request is made for a
2612
+ # KMS-encrypted object.
2613
+ #
2614
+ #
2615
+ #
2616
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
2617
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
2618
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
2619
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
1042
2620
  # @option options [String] :request_payer
1043
2621
  # Confirms that the requester knows that they will be charged for the
1044
2622
  # request. Bucket owners need not specify this parameter in their
1045
- # requests. For information about downloading objects from requester
1046
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
2623
+ # requests. If either the source or destination S3 bucket has Requester
2624
+ # Pays enabled, the requester will pay for corresponding charges to copy
2625
+ # the object. For information about downloading objects from Requester
2626
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1047
2627
  # in the *Amazon S3 User Guide*.
1048
2628
  #
2629
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2630
+ #
2631
+ # </note>
2632
+ #
1049
2633
  #
1050
2634
  #
1051
2635
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1052
2636
  # @option options [String] :tagging
1053
2637
  # The tag-set for the object. The tag-set must be encoded as URL Query
1054
2638
  # parameters. (For example, "Key1=Value1")
2639
+ #
2640
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2641
+ #
2642
+ # </note>
1055
2643
  # @option options [String] :object_lock_mode
1056
2644
  # The Object Lock mode that you want to apply to this object.
2645
+ #
2646
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2647
+ #
2648
+ # </note>
1057
2649
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
1058
2650
  # The date and time when you want this object's Object Lock to expire.
1059
2651
  # Must be formatted as a timestamp parameter.
2652
+ #
2653
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2654
+ #
2655
+ # </note>
1060
2656
  # @option options [String] :object_lock_legal_hold_status
1061
2657
  # Specifies whether a legal hold will be applied to this object. For
1062
- # more information about S3 Object Lock, see [Object Lock][1].
2658
+ # more information about S3 Object Lock, see [Object Lock][1] in the
2659
+ # *Amazon S3 User Guide*.
2660
+ #
2661
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2662
+ #
2663
+ # </note>
1063
2664
  #
1064
2665
  #
1065
2666
  #
1066
2667
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1067
2668
  # @option options [String] :expected_bucket_owner
1068
- # The account ID of the expected bucket owner. If the bucket is owned by
1069
- # a different account, the request will fail with an HTTP `403 (Access
1070
- # Denied)` error.
2669
+ # The account ID of the expected bucket owner. If the account ID that
2670
+ # you provide does not match the actual owner of the bucket, the request
2671
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1071
2672
  # @return [Types::PutObjectOutput]
1072
2673
  def put(options = {})
1073
2674
  options = options.merge(
1074
2675
  bucket: @bucket_name,
1075
2676
  key: @key
1076
2677
  )
1077
- resp = @client.put_object(options)
2678
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2679
+ @client.put_object(options)
2680
+ end
1078
2681
  resp.data
1079
2682
  end
1080
2683
 
@@ -1128,7 +2731,7 @@ module Aws::S3
1128
2731
  # bucket_name: "BucketName", # required
1129
2732
  # prefix: "LocationPrefix", # required
1130
2733
  # encryption: {
1131
- # encryption_type: "AES256", # required, accepts AES256, aws:kms
2734
+ # encryption_type: "AES256", # required, accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
1132
2735
  # kms_key_id: "SSEKMSKeyId",
1133
2736
  # kms_context: "KMSContext",
1134
2737
  # },
@@ -1159,11 +2762,12 @@ module Aws::S3
1159
2762
  # value: "MetadataValue",
1160
2763
  # },
1161
2764
  # ],
1162
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
2765
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS
1163
2766
  # },
1164
2767
  # },
1165
2768
  # },
1166
2769
  # request_payer: "requester", # accepts requester
2770
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1167
2771
  # expected_bucket_owner: "AccountId",
1168
2772
  # })
1169
2773
  # @param [Hash] options ({})
@@ -1174,24 +2778,47 @@ module Aws::S3
1174
2778
  # @option options [String] :request_payer
1175
2779
  # Confirms that the requester knows that they will be charged for the
1176
2780
  # request. Bucket owners need not specify this parameter in their
1177
- # requests. For information about downloading objects from requester
1178
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
2781
+ # requests. If either the source or destination S3 bucket has Requester
2782
+ # Pays enabled, the requester will pay for corresponding charges to copy
2783
+ # the object. For information about downloading objects from Requester
2784
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1179
2785
  # in the *Amazon S3 User Guide*.
1180
2786
  #
2787
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2788
+ #
2789
+ # </note>
2790
+ #
1181
2791
  #
1182
2792
  #
1183
2793
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2794
+ # @option options [String] :checksum_algorithm
2795
+ # Indicates the algorithm used to create the checksum for the object
2796
+ # when you use the SDK. This header will not provide any additional
2797
+ # functionality if you don't use the SDK. When you send this header,
2798
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
2799
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
2800
+ # status code `400 Bad Request`. For more information, see [Checking
2801
+ # object integrity][1] in the *Amazon S3 User Guide*.
2802
+ #
2803
+ # If you provide an individual checksum, Amazon S3 ignores any provided
2804
+ # `ChecksumAlgorithm` parameter.
2805
+ #
2806
+ #
2807
+ #
2808
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1184
2809
  # @option options [String] :expected_bucket_owner
1185
- # The account ID of the expected bucket owner. If the bucket is owned by
1186
- # a different account, the request will fail with an HTTP `403 (Access
1187
- # Denied)` error.
2810
+ # The account ID of the expected bucket owner. If the account ID that
2811
+ # you provide does not match the actual owner of the bucket, the request
2812
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1188
2813
  # @return [Types::RestoreObjectOutput]
1189
2814
  def restore_object(options = {})
1190
2815
  options = options.merge(
1191
2816
  bucket: @bucket_name,
1192
2817
  key: @key
1193
2818
  )
1194
- resp = @client.restore_object(options)
2819
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2820
+ @client.restore_object(options)
2821
+ end
1195
2822
  resp.data
1196
2823
  end
1197
2824
 
@@ -1317,6 +2944,7 @@ module Aws::S3
1317
2944
  # request_payer: "requester", # accepts requester
1318
2945
  # bypass_governance_retention: false,
1319
2946
  # expected_bucket_owner: "AccountId",
2947
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1320
2948
  # })
1321
2949
  # @param options ({})
1322
2950
  # @option options [String] :mfa
@@ -1324,24 +2952,86 @@ module Aws::S3
1324
2952
  # space, and the value that is displayed on your authentication device.
1325
2953
  # Required to permanently delete a versioned object if versioning is
1326
2954
  # configured with MFA delete enabled.
2955
+ #
2956
+ # When performing the `DeleteObjects` operation on an MFA delete enabled
2957
+ # bucket, which attempts to delete the specified versioned objects, you
2958
+ # must include an MFA token. If you don't provide an MFA token, the
2959
+ # entire request will fail, even if there are non-versioned objects that
2960
+ # you are trying to delete. If you provide an invalid token, whether
2961
+ # there are versioned object keys in the request or not, the entire
2962
+ # Multi-Object Delete request will fail. For information about MFA
2963
+ # Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
2964
+ #
2965
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2966
+ #
2967
+ # </note>
2968
+ #
2969
+ #
2970
+ #
2971
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
1327
2972
  # @option options [String] :request_payer
1328
2973
  # Confirms that the requester knows that they will be charged for the
1329
2974
  # request. Bucket owners need not specify this parameter in their
1330
- # requests. For information about downloading objects from requester
1331
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
2975
+ # requests. If either the source or destination S3 bucket has Requester
2976
+ # Pays enabled, the requester will pay for corresponding charges to copy
2977
+ # the object. For information about downloading objects from Requester
2978
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1332
2979
  # in the *Amazon S3 User Guide*.
1333
2980
  #
2981
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2982
+ #
2983
+ # </note>
2984
+ #
1334
2985
  #
1335
2986
  #
1336
2987
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1337
2988
  # @option options [Boolean] :bypass_governance_retention
1338
2989
  # Specifies whether you want to delete this object even if it has a
1339
2990
  # Governance-type Object Lock in place. To use this header, you must
1340
- # have the `s3:PutBucketPublicAccessBlock` permission.
2991
+ # have the `s3:BypassGovernanceRetention` permission.
2992
+ #
2993
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2994
+ #
2995
+ # </note>
1341
2996
  # @option options [String] :expected_bucket_owner
1342
- # The account ID of the expected bucket owner. If the bucket is owned by
1343
- # a different account, the request will fail with an HTTP `403 (Access
1344
- # Denied)` error.
2997
+ # The account ID of the expected bucket owner. If the account ID that
2998
+ # you provide does not match the actual owner of the bucket, the request
2999
+ # fails with the HTTP status code `403 Forbidden` (access denied).
3000
+ # @option options [String] :checksum_algorithm
3001
+ # Indicates the algorithm used to create the checksum for the object
3002
+ # when you use the SDK. This header will not provide any additional
3003
+ # functionality if you don't use the SDK. When you send this header,
3004
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
3005
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
3006
+ # with the HTTP status code `400 Bad Request`.
3007
+ #
3008
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
3009
+ # the supported algorithm from the following list:
3010
+ #
3011
+ # * `CRC32`
3012
+ #
3013
+ # * `CRC32C`
3014
+ #
3015
+ # * `CRC64NVME`
3016
+ #
3017
+ # * `SHA1`
3018
+ #
3019
+ # * `SHA256`
3020
+ #
3021
+ # For more information, see [Checking object integrity][1] in the
3022
+ # *Amazon S3 User Guide*.
3023
+ #
3024
+ # If the individual checksum value you provide through
3025
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
3026
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
3027
+ # request with a `BadDigest` error.
3028
+ #
3029
+ # If you provide an individual checksum, Amazon S3 ignores any provided
3030
+ # `ChecksumAlgorithm` parameter.
3031
+ #
3032
+ #
3033
+ #
3034
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1345
3035
  # @return [void]
1346
3036
  def batch_delete!(options = {})
1347
3037
  batch_enum.each do |batch|
@@ -1354,7 +3044,9 @@ module Aws::S3
1354
3044
  key: item.key
1355
3045
  }
1356
3046
  end
1357
- batch[0].client.delete_objects(params)
3047
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
3048
+ batch[0].client.delete_objects(params)
3049
+ end
1358
3050
  end
1359
3051
  nil
1360
3052
  end
@@ -1364,3 +3056,6 @@ module Aws::S3
1364
3056
  end
1365
3057
  end
1366
3058
  end
3059
+
3060
+ # Load customizations if they exist
3061
+ require 'aws-sdk-s3/customizations/object_summary'