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
@@ -45,6 +45,10 @@ module Aws::S3
45
45
  # Specifies whether the object retrieved was (true) or was not (false) a
46
46
  # Delete Marker. If false, this response header does not appear in the
47
47
  # response.
48
+ #
49
+ # <note markdown="1"> This functionality is not supported for directory buckets.
50
+ #
51
+ # </note>
48
52
  # @return [Boolean]
49
53
  def delete_marker
50
54
  data[:delete_marker]
@@ -56,10 +60,21 @@ module Aws::S3
56
60
  data[:accept_ranges]
57
61
  end
58
62
 
59
- # If the object expiration is configured (see PUT Bucket lifecycle), the
60
- # response includes this header. It includes the expiry-date and rule-id
61
- # key-value pairs providing object expiration information. The value of
62
- # the rule-id is URL encoded.
63
+ # If the object expiration is configured (see [
64
+ # `PutBucketLifecycleConfiguration` ][1]), the response includes this
65
+ # header. It includes the `expiry-date` and `rule-id` key-value pairs
66
+ # providing object expiration information. The value of the `rule-id` is
67
+ # URL-encoded.
68
+ #
69
+ # <note markdown="1"> Object expiration information is not returned in directory buckets and
70
+ # this header returns the value "`NotImplemented`" in all responses
71
+ # for directory buckets.
72
+ #
73
+ # </note>
74
+ #
75
+ #
76
+ #
77
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
63
78
  # @return [String]
64
79
  def expiration
65
80
  data[:expiration]
@@ -82,6 +97,13 @@ module Aws::S3
82
97
  # For more information about archiving objects, see [Transitioning
83
98
  # Objects: General Considerations][2].
84
99
  #
100
+ # <note markdown="1"> This functionality is not supported for directory buckets. Directory
101
+ # buckets only support `EXPRESS_ONEZONE` (the S3 Express One Zone
102
+ # storage class) in Availability Zones and `ONEZONE_IA` (the S3 One
103
+ # Zone-Infrequent Access storage class) in Dedicated Local Zones.
104
+ #
105
+ # </note>
106
+ #
85
107
  #
86
108
  #
87
109
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
@@ -92,12 +114,16 @@ module Aws::S3
92
114
  end
93
115
 
94
116
  # The archive state of the head object.
117
+ #
118
+ # <note markdown="1"> This functionality is not supported for directory buckets.
119
+ #
120
+ # </note>
95
121
  # @return [String]
96
122
  def archive_status
97
123
  data[:archive_status]
98
124
  end
99
125
 
100
- # Creation date of the object.
126
+ # Date and time when the object was last modified.
101
127
  # @return [Time]
102
128
  def last_modified
103
129
  data[:last_modified]
@@ -109,8 +135,103 @@ module Aws::S3
109
135
  data[:content_length]
110
136
  end
111
137
 
112
- # An ETag is an opaque identifier assigned by a web server to a specific
113
- # version of a resource found at a URL.
138
+ # The Base64 encoded, 32-bit `CRC32 checksum` of the object. This
139
+ # checksum is only present if the checksum was uploaded with the object.
140
+ # When you use an API operation on an object that was uploaded using
141
+ # multipart uploads, this value may not be a direct checksum value of
142
+ # the full object. Instead, it's a calculation based on the checksum
143
+ # values of each individual part. For more information about how
144
+ # checksums are calculated with multipart uploads, see [ Checking object
145
+ # integrity][1] in the *Amazon S3 User Guide*.
146
+ #
147
+ #
148
+ #
149
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
150
+ # @return [String]
151
+ def checksum_crc32
152
+ data[:checksum_crc32]
153
+ end
154
+
155
+ # The Base64 encoded, 32-bit `CRC32C` checksum of the object. This
156
+ # checksum is only present if the checksum was uploaded with the object.
157
+ # When you use an API operation on an object that was uploaded using
158
+ # multipart uploads, this value may not be a direct checksum value of
159
+ # the full object. Instead, it's a calculation based on the checksum
160
+ # values of each individual part. For more information about how
161
+ # checksums are calculated with multipart uploads, see [ Checking object
162
+ # integrity][1] in the *Amazon S3 User Guide*.
163
+ #
164
+ #
165
+ #
166
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
167
+ # @return [String]
168
+ def checksum_crc32c
169
+ data[:checksum_crc32c]
170
+ end
171
+
172
+ # The Base64 encoded, 64-bit `CRC64NVME` checksum of the object. For
173
+ # more information, see [Checking object integrity in the Amazon S3 User
174
+ # Guide][1].
175
+ #
176
+ #
177
+ #
178
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
179
+ # @return [String]
180
+ def checksum_crc64nvme
181
+ data[:checksum_crc64nvme]
182
+ end
183
+
184
+ # The Base64 encoded, 160-bit `SHA1` digest of the object. This checksum
185
+ # is only present if the checksum was uploaded with the object. When you
186
+ # use the API operation on an object that was uploaded using multipart
187
+ # uploads, this value may not be a direct checksum value of the full
188
+ # object. Instead, it's a calculation based on the checksum values of
189
+ # each individual part. For more information about how checksums are
190
+ # calculated with multipart uploads, see [ Checking object integrity][1]
191
+ # in the *Amazon S3 User Guide*.
192
+ #
193
+ #
194
+ #
195
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
196
+ # @return [String]
197
+ def checksum_sha1
198
+ data[:checksum_sha1]
199
+ end
200
+
201
+ # The Base64 encoded, 256-bit `SHA256` digest of the object. This
202
+ # checksum is only present if the checksum was uploaded with the object.
203
+ # When you use an API operation on an object that was uploaded using
204
+ # multipart uploads, this value may not be a direct checksum value of
205
+ # the full object. Instead, it's a calculation based on the checksum
206
+ # values of each individual part. For more information about how
207
+ # checksums are calculated with multipart uploads, see [ Checking object
208
+ # integrity][1] in the *Amazon S3 User Guide*.
209
+ #
210
+ #
211
+ #
212
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
213
+ # @return [String]
214
+ def checksum_sha256
215
+ data[:checksum_sha256]
216
+ end
217
+
218
+ # The checksum type, which determines how part-level checksums are
219
+ # combined to create an object-level checksum for multipart objects. You
220
+ # can use this header response to verify that the checksum type that is
221
+ # received is the same checksum type that was specified in
222
+ # `CreateMultipartUpload` request. For more information, see [Checking
223
+ # object integrity in the Amazon S3 User Guide][1].
224
+ #
225
+ #
226
+ #
227
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
228
+ # @return [String]
229
+ def checksum_type
230
+ data[:checksum_type]
231
+ end
232
+
233
+ # An entity tag (ETag) is an opaque identifier assigned by a web server
234
+ # to a specific version of a resource found at a URL.
114
235
  # @return [String]
115
236
  def etag
116
237
  data[:etag]
@@ -121,12 +242,20 @@ module Aws::S3
121
242
  # API like SOAP that supports more flexible metadata than the REST API.
122
243
  # For example, using SOAP, you can create metadata whose values are not
123
244
  # legal HTTP headers.
245
+ #
246
+ # <note markdown="1"> This functionality is not supported for directory buckets.
247
+ #
248
+ # </note>
124
249
  # @return [Integer]
125
250
  def missing_meta
126
251
  data[:missing_meta]
127
252
  end
128
253
 
129
- # Version of the object.
254
+ # Version ID of the object.
255
+ #
256
+ # <note markdown="1"> This functionality is not supported for directory buckets.
257
+ #
258
+ # </note>
130
259
  # @return [String]
131
260
  def version_id
132
261
  data[:version_id]
@@ -144,7 +273,7 @@ module Aws::S3
144
273
  data[:content_disposition]
145
274
  end
146
275
 
147
- # Specifies what content encodings have been applied to the object and
276
+ # Indicates what content encodings have been applied to the object and
148
277
  # thus what decoding mechanisms must be applied to obtain the media-type
149
278
  # referenced by the Content-Type header field.
150
279
  # @return [String]
@@ -164,6 +293,13 @@ module Aws::S3
164
293
  data[:content_type]
165
294
  end
166
295
 
296
+ # The portion of the object returned in the response for a `GET`
297
+ # request.
298
+ # @return [String]
299
+ def content_range
300
+ data[:content_range]
301
+ end
302
+
167
303
  # The date and time at which the object is no longer cacheable.
168
304
  # @return [Time]
169
305
  def expires
@@ -178,16 +314,22 @@ module Aws::S3
178
314
  # If the bucket is configured as a website, redirects requests for this
179
315
  # object to another object in the same bucket or to an external URL.
180
316
  # Amazon S3 stores the value of this header in the object metadata.
317
+ #
318
+ # <note markdown="1"> This functionality is not supported for directory buckets.
319
+ #
320
+ # </note>
181
321
  # @return [String]
182
322
  def website_redirect_location
183
323
  data[:website_redirect_location]
184
324
  end
185
325
 
186
- # If the object is stored using server-side encryption either with an
187
- # Amazon Web Services KMS key or an Amazon S3-managed encryption key,
188
- # the response includes this header with the value of the server-side
189
- # encryption algorithm used when storing this object in Amazon S3 (for
190
- # example, AES256, aws:kms).
326
+ # The server-side encryption algorithm used when you store this object
327
+ # in Amazon S3 or Amazon FSx.
328
+ #
329
+ # <note markdown="1"> When accessing data stored in Amazon FSx file systems using S3 access
330
+ # points, the only valid server side encryption option is `aws:fsx`.
331
+ #
332
+ # </note>
191
333
  # @return [String]
192
334
  def server_side_encryption
193
335
  data[:server_side_encryption]
@@ -200,32 +342,39 @@ module Aws::S3
200
342
  end
201
343
 
202
344
  # If server-side encryption with a customer-provided encryption key was
203
- # requested, the response will include this header confirming the
204
- # encryption algorithm used.
345
+ # requested, the response will include this header to confirm the
346
+ # encryption algorithm that's used.
347
+ #
348
+ # <note markdown="1"> This functionality is not supported for directory buckets.
349
+ #
350
+ # </note>
205
351
  # @return [String]
206
352
  def sse_customer_algorithm
207
353
  data[:sse_customer_algorithm]
208
354
  end
209
355
 
210
356
  # If server-side encryption with a customer-provided encryption key was
211
- # requested, the response will include this header to provide round-trip
212
- # message integrity verification of the customer-provided encryption
213
- # key.
357
+ # requested, the response will include this header to provide the
358
+ # round-trip message integrity verification of the customer-provided
359
+ # encryption key.
360
+ #
361
+ # <note markdown="1"> This functionality is not supported for directory buckets.
362
+ #
363
+ # </note>
214
364
  # @return [String]
215
365
  def sse_customer_key_md5
216
366
  data[:sse_customer_key_md5]
217
367
  end
218
368
 
219
- # If present, specifies the ID of the Amazon Web Services Key Management
220
- # Service (Amazon Web Services KMS) symmetric customer managed key that
221
- # was used for the object.
369
+ # If present, indicates the ID of the KMS key that was used for object
370
+ # encryption.
222
371
  # @return [String]
223
372
  def ssekms_key_id
224
373
  data[:ssekms_key_id]
225
374
  end
226
375
 
227
376
  # Indicates whether the object uses an S3 Bucket Key for server-side
228
- # encryption with Amazon Web Services KMS (SSE-KMS).
377
+ # encryption with Key Management Service (KMS) keys (SSE-KMS).
229
378
  # @return [Boolean]
230
379
  def bucket_key_enabled
231
380
  data[:bucket_key_enabled]
@@ -237,6 +386,13 @@ module Aws::S3
237
386
  #
238
387
  # For more information, see [Storage Classes][1].
239
388
  #
389
+ # <note markdown="1"> <b>Directory buckets </b> - Directory buckets only support
390
+ # `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
391
+ # Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent Access
392
+ # storage class) in Dedicated Local Zones.
393
+ #
394
+ # </note>
395
+ #
240
396
  #
241
397
  #
242
398
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
@@ -246,7 +402,17 @@ module Aws::S3
246
402
  end
247
403
 
248
404
  # If present, indicates that the requester was successfully charged for
249
- # the request.
405
+ # the request. For more information, see [Using Requester Pays buckets
406
+ # for storage transfers and usage][1] in the *Amazon Simple Storage
407
+ # Service user guide*.
408
+ #
409
+ # <note markdown="1"> This functionality is not supported for directory buckets.
410
+ #
411
+ # </note>
412
+ #
413
+ #
414
+ #
415
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html
250
416
  # @return [String]
251
417
  def request_charged
252
418
  data[:request_charged]
@@ -261,7 +427,7 @@ module Aws::S3
261
427
  # metadata (`HeadObject`) from these buckets, Amazon S3 will return the
262
428
  # `x-amz-replication-status` header in the response as follows:
263
429
  #
264
- # * If requesting an object from the source bucket Amazon S3 will
430
+ # * **If requesting an object from the source bucket**, Amazon S3 will
265
431
  # return the `x-amz-replication-status` header if the object in your
266
432
  # request is eligible for replication.
267
433
  #
@@ -274,12 +440,12 @@ module Aws::S3
274
440
  # value PENDING, COMPLETED or FAILED indicating object replication
275
441
  # status.
276
442
  #
277
- # * If requesting an object from a destination bucket Amazon S3 will
278
- # return the `x-amz-replication-status` header with value REPLICA if
279
- # the object in your request is a replica that Amazon S3 created and
280
- # there is no replica modification replication in progress.
443
+ # * **If requesting an object from a destination bucket**, Amazon S3
444
+ # will return the `x-amz-replication-status` header with value REPLICA
445
+ # if the object in your request is a replica that Amazon S3 created
446
+ # and there is no replica modification replication in progress.
281
447
  #
282
- # * When replicating objects to multiple destination buckets the
448
+ # * **When replicating objects to multiple destination buckets**, the
283
449
  # `x-amz-replication-status` header acts differently. The header of
284
450
  # the source object will only return a value of COMPLETED when
285
451
  # replication is successful to all destinations. The header will
@@ -289,6 +455,10 @@ module Aws::S3
289
455
  #
290
456
  # For more information, see [Replication][1].
291
457
  #
458
+ # <note markdown="1"> This functionality is not supported for directory buckets.
459
+ #
460
+ # </note>
461
+ #
292
462
  #
293
463
  #
294
464
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
@@ -297,17 +467,41 @@ module Aws::S3
297
467
  data[:replication_status]
298
468
  end
299
469
 
300
- # The count of parts this object has.
470
+ # The count of parts this object has. This value is only returned if you
471
+ # specify `partNumber` in your request and the object was uploaded as a
472
+ # multipart upload.
301
473
  # @return [Integer]
302
474
  def parts_count
303
475
  data[:parts_count]
304
476
  end
305
477
 
478
+ # The number of tags, if any, on the object, when you have the relevant
479
+ # permission to read object tags.
480
+ #
481
+ # You can use [GetObjectTagging][1] to retrieve the tag set associated
482
+ # with an object.
483
+ #
484
+ # <note markdown="1"> This functionality is not supported for directory buckets.
485
+ #
486
+ # </note>
487
+ #
488
+ #
489
+ #
490
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
491
+ # @return [Integer]
492
+ def tag_count
493
+ data[:tag_count]
494
+ end
495
+
306
496
  # The Object Lock mode, if any, that's in effect for this object. This
307
497
  # header is only returned if the requester has the
308
498
  # `s3:GetObjectRetention` permission. For more information about S3
309
499
  # Object Lock, see [Object Lock][1].
310
500
  #
501
+ # <note markdown="1"> This functionality is not supported for directory buckets.
502
+ #
503
+ # </note>
504
+ #
311
505
  #
312
506
  #
313
507
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
@@ -319,6 +513,10 @@ module Aws::S3
319
513
  # The date and time when the Object Lock retention period expires. This
320
514
  # header is only returned if the requester has the
321
515
  # `s3:GetObjectRetention` permission.
516
+ #
517
+ # <note markdown="1"> This functionality is not supported for directory buckets.
518
+ #
519
+ # </note>
322
520
  # @return [Time]
323
521
  def object_lock_retain_until_date
324
522
  data[:object_lock_retain_until_date]
@@ -330,6 +528,10 @@ module Aws::S3
330
528
  # specified version of this object has never had a legal hold applied.
331
529
  # For more information about S3 Object Lock, see [Object Lock][1].
332
530
  #
531
+ # <note markdown="1"> This functionality is not supported for directory buckets.
532
+ #
533
+ # </note>
534
+ #
333
535
  #
334
536
  #
335
537
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
@@ -352,10 +554,12 @@ module Aws::S3
352
554
  #
353
555
  # @return [self]
354
556
  def load
355
- resp = @client.head_object(
557
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
558
+ @client.head_object(
356
559
  bucket: @bucket_name,
357
560
  key: @key
358
561
  )
562
+ end
359
563
  @data = resp.data
360
564
  self
361
565
  end
@@ -400,8 +604,10 @@ module Aws::S3
400
604
  options, params = separate_params_and_options(options)
401
605
  waiter = Waiters::ObjectExists.new(options)
402
606
  yield_waiter_and_warn(waiter, &block) if block_given?
403
- waiter.wait(params.merge(bucket: @bucket_name,
607
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
608
+ waiter.wait(params.merge(bucket: @bucket_name,
404
609
  key: @key))
610
+ end
405
611
  Object.new({
406
612
  bucket_name: @bucket_name,
407
613
  key: @key,
@@ -419,8 +625,10 @@ module Aws::S3
419
625
  options, params = separate_params_and_options(options)
420
626
  waiter = Waiters::ObjectNotExists.new(options)
421
627
  yield_waiter_and_warn(waiter, &block) if block_given?
422
- waiter.wait(params.merge(bucket: @bucket_name,
628
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
629
+ waiter.wait(params.merge(bucket: @bucket_name,
423
630
  key: @key))
631
+ end
424
632
  Object.new({
425
633
  bucket_name: @bucket_name,
426
634
  key: @key,
@@ -522,7 +730,9 @@ module Aws::S3
522
730
  :retry
523
731
  end
524
732
  end
525
- Aws::Waiters::Waiter.new(options).wait({})
733
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
734
+ Aws::Waiters::Waiter.new(options).wait({})
735
+ end
526
736
  end
527
737
 
528
738
  # @!group Actions
@@ -532,6 +742,7 @@ module Aws::S3
532
742
  # object.copy_from({
533
743
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
534
744
  # cache_control: "CacheControl",
745
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
535
746
  # content_disposition: "ContentDisposition",
536
747
  # content_encoding: "ContentEncoding",
537
748
  # content_language: "ContentLanguage",
@@ -546,13 +757,15 @@ module Aws::S3
546
757
  # grant_read: "GrantRead",
547
758
  # grant_read_acp: "GrantReadACP",
548
759
  # grant_write_acp: "GrantWriteACP",
760
+ # if_match: "IfMatch",
761
+ # if_none_match: "IfNoneMatch",
549
762
  # metadata: {
550
763
  # "MetadataKey" => "MetadataValue",
551
764
  # },
552
765
  # metadata_directive: "COPY", # accepts COPY, REPLACE
553
766
  # tagging_directive: "COPY", # accepts COPY, REPLACE
554
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
555
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
767
+ # server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
768
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS
556
769
  # website_redirect_location: "WebsiteRedirectLocation",
557
770
  # sse_customer_algorithm: "SSECustomerAlgorithm",
558
771
  # sse_customer_key: "SSECustomerKey",
@@ -573,32 +786,98 @@ module Aws::S3
573
786
  # })
574
787
  # @param [Hash] options ({})
575
788
  # @option options [String] :acl
576
- # The canned ACL to apply to the object.
789
+ # The canned access control list (ACL) to apply to the object.
790
+ #
791
+ # When you copy an object, the ACL metadata is not preserved and is set
792
+ # to `private` by default. Only the owner has full access control. To
793
+ # override the default ACL setting, specify a new ACL when you generate
794
+ # a copy request. For more information, see [Using ACLs][1].
795
+ #
796
+ # If the destination bucket that you're copying objects to uses the
797
+ # bucket owner enforced setting for S3 Object Ownership, ACLs are
798
+ # disabled and no longer affect permissions. Buckets that use this
799
+ # setting only accept `PUT` requests that don't specify an ACL or `PUT`
800
+ # requests that specify bucket owner full control ACLs, such as the
801
+ # `bucket-owner-full-control` canned ACL or an equivalent form of this
802
+ # ACL expressed in the XML format. For more information, see
803
+ # [Controlling ownership of objects and disabling ACLs][2] in the
804
+ # *Amazon S3 User Guide*.
805
+ #
806
+ # <note markdown="1"> * If your destination bucket uses the bucket owner enforced setting
807
+ # for Object Ownership, all objects written to the bucket by any
808
+ # account will be owned by the bucket owner.
809
+ #
810
+ # * This functionality is not supported for directory buckets.
811
+ #
812
+ # * This functionality is not supported for Amazon S3 on Outposts.
577
813
  #
578
- # This action is not supported by Amazon S3 on Outposts.
814
+ # </note>
815
+ #
816
+ #
817
+ #
818
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
819
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
579
820
  # @option options [String] :cache_control
580
- # Specifies caching behavior along the request/reply chain.
821
+ # Specifies the caching behavior along the request/reply chain.
822
+ # @option options [String] :checksum_algorithm
823
+ # Indicates the algorithm that you want Amazon S3 to use to create the
824
+ # checksum for the object. For more information, see [Checking object
825
+ # integrity][1] in the *Amazon S3 User Guide*.
826
+ #
827
+ # When you copy an object, if the source object has a checksum, that
828
+ # checksum value will be copied to the new object by default. If the
829
+ # `CopyObject` request does not include this `x-amz-checksum-algorithm`
830
+ # header, the checksum algorithm will be copied from the source object
831
+ # to the destination object (if it's present on the source object). You
832
+ # can optionally specify a different checksum algorithm to use with the
833
+ # `x-amz-checksum-algorithm` header. Unrecognized or unsupported values
834
+ # will respond with the HTTP status code `400 Bad Request`.
835
+ #
836
+ # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
837
+ # is the default checksum algorithm that's used for performance.
838
+ #
839
+ # </note>
840
+ #
841
+ #
842
+ #
843
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
581
844
  # @option options [String] :content_disposition
582
- # Specifies presentational information for the object.
845
+ # Specifies presentational information for the object. Indicates whether
846
+ # an object should be displayed in a web browser or downloaded as a
847
+ # file. It allows specifying the desired filename for the downloaded
848
+ # file.
583
849
  # @option options [String] :content_encoding
584
850
  # Specifies what content encodings have been applied to the object and
585
851
  # thus what decoding mechanisms must be applied to obtain the media-type
586
852
  # referenced by the Content-Type header field.
853
+ #
854
+ # <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
855
+ # this header field.
856
+ #
857
+ # </note>
587
858
  # @option options [String] :content_language
588
859
  # The language the content is in.
589
860
  # @option options [String] :content_type
590
- # A standard MIME type describing the format of the object data.
861
+ # A standard MIME type that describes the format of the object data.
591
862
  # @option options [required, String] :copy_source
592
- # Specifies the source object for the copy operation. You specify the
593
- # value in one of two formats, depending on whether you want to access
594
- # the source object through an [access point][1]\:
863
+ # Specifies the source object for the copy operation. The source object
864
+ # can be up to 5 GB. If the source object is an object that was uploaded
865
+ # by using a multipart upload, the object copy will be a single part
866
+ # object after the source object is copied to the destination bucket.
867
+ #
868
+ # You specify the value of the copy source in one of two formats,
869
+ # depending on whether you want to access the source object through an
870
+ # [access point][1]:
595
871
  #
596
872
  # * For objects not accessed through an access point, specify the name
597
873
  # of the source bucket and the key of the source object, separated by
598
874
  # a slash (/). For example, to copy the object `reports/january.pdf`
599
- # from the bucket `awsexamplebucket`, use
600
- # `awsexamplebucket/reports/january.pdf`. The value must be URL
601
- # encoded.
875
+ # from the general purpose bucket `awsexamplebucket`, use
876
+ # `awsexamplebucket/reports/january.pdf`. The value must be
877
+ # URL-encoded. To copy the object `reports/january.pdf` from the
878
+ # directory bucket `awsexamplebucket--use1-az5--x-s3`, use
879
+ # `awsexamplebucket--use1-az5--x-s3/reports/january.pdf`. The value
880
+ # must be URL-encoded.
602
881
  #
603
882
  # * For objects accessed through access points, specify the Amazon
604
883
  # Resource Name (ARN) of the object as accessed through the access
@@ -610,9 +889,11 @@ module Aws::S3
610
889
  # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
611
890
  # The value must be URL encoded.
612
891
  #
613
- # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
614
- # source and destination buckets are in the same Amazon Web Services
615
- # Region.
892
+ # <note markdown="1"> * Amazon S3 supports copy operations using Access points only when
893
+ # the source and destination buckets are in the same Amazon Web
894
+ # Services Region.
895
+ #
896
+ # * Access points are not supported by directory buckets.
616
897
  #
617
898
  # </note>
618
899
  #
@@ -623,156 +904,607 @@ module Aws::S3
623
904
  # outpost `my-outpost` owned by account `123456789012` in Region
624
905
  # `us-west-2`, use the URL encoding of
625
906
  # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
626
- # The value must be URL encoded.
627
- #
628
- # To copy a specific version of an object, append
629
- # `?versionId=<version-id>` to the value (for example,
907
+ # The value must be URL-encoded.
908
+ #
909
+ # If your source bucket versioning is enabled, the `x-amz-copy-source`
910
+ # header by default identifies the current version of an object to copy.
911
+ # If the current version is a delete marker, Amazon S3 behaves as if the
912
+ # object was deleted. To copy a different version, use the `versionId`
913
+ # query parameter. Specifically, append `?versionId=<version-id>` to the
914
+ # value (for example,
630
915
  # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
631
916
  # If you don't specify a version ID, Amazon S3 copies the latest
632
917
  # version of the source object.
633
918
  #
919
+ # If you enable versioning on the destination bucket, Amazon S3
920
+ # generates a unique version ID for the copied object. This version ID
921
+ # is different from the version ID of the source object. Amazon S3
922
+ # returns the version ID of the copied object in the `x-amz-version-id`
923
+ # response header in the response.
924
+ #
925
+ # If you do not enable versioning or suspend it on the destination
926
+ # bucket, the version ID that Amazon S3 generates in the
927
+ # `x-amz-version-id` response header is always null.
928
+ #
929
+ # <note markdown="1"> **Directory buckets** - S3 Versioning isn't enabled and supported for
930
+ # directory buckets.
931
+ #
932
+ # </note>
933
+ #
634
934
  #
635
935
  #
636
936
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
637
937
  # @option options [String] :copy_source_if_match
638
938
  # Copies the object if its entity tag (ETag) matches the specified tag.
939
+ #
940
+ # If both the `x-amz-copy-source-if-match` and
941
+ # `x-amz-copy-source-if-unmodified-since` headers are present in the
942
+ # request and evaluate as follows, Amazon S3 returns `200 OK` and copies
943
+ # the data:
944
+ #
945
+ # * `x-amz-copy-source-if-match` condition evaluates to true
946
+ #
947
+ # * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
639
948
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
640
949
  # Copies the object if it has been modified since the specified time.
950
+ #
951
+ # If both the `x-amz-copy-source-if-none-match` and
952
+ # `x-amz-copy-source-if-modified-since` headers are present in the
953
+ # request and evaluate as follows, Amazon S3 returns the `412
954
+ # Precondition Failed` response code:
955
+ #
956
+ # * `x-amz-copy-source-if-none-match` condition evaluates to false
957
+ #
958
+ # * `x-amz-copy-source-if-modified-since` condition evaluates to true
641
959
  # @option options [String] :copy_source_if_none_match
642
960
  # Copies the object if its entity tag (ETag) is different than the
643
961
  # specified ETag.
962
+ #
963
+ # If both the `x-amz-copy-source-if-none-match` and
964
+ # `x-amz-copy-source-if-modified-since` headers are present in the
965
+ # request and evaluate as follows, Amazon S3 returns the `412
966
+ # Precondition Failed` response code:
967
+ #
968
+ # * `x-amz-copy-source-if-none-match` condition evaluates to false
969
+ #
970
+ # * `x-amz-copy-source-if-modified-since` condition evaluates to true
644
971
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
645
972
  # Copies the object if it hasn't been modified since the specified
646
973
  # time.
974
+ #
975
+ # If both the `x-amz-copy-source-if-match` and
976
+ # `x-amz-copy-source-if-unmodified-since` headers are present in the
977
+ # request and evaluate as follows, Amazon S3 returns `200 OK` and copies
978
+ # the data:
979
+ #
980
+ # * `x-amz-copy-source-if-match` condition evaluates to true
981
+ #
982
+ # * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
647
983
  # @option options [Time,DateTime,Date,Integer,String] :expires
648
984
  # The date and time at which the object is no longer cacheable.
649
985
  # @option options [String] :grant_full_control
650
986
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
651
987
  # object.
652
988
  #
653
- # This action is not supported by Amazon S3 on Outposts.
989
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
990
+ #
991
+ # * This functionality is not supported for Amazon S3 on Outposts.
992
+ #
993
+ # </note>
654
994
  # @option options [String] :grant_read
655
995
  # Allows grantee to read the object data and its metadata.
656
996
  #
657
- # This action is not supported by Amazon S3 on Outposts.
997
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
998
+ #
999
+ # * This functionality is not supported for Amazon S3 on Outposts.
1000
+ #
1001
+ # </note>
658
1002
  # @option options [String] :grant_read_acp
659
1003
  # Allows grantee to read the object ACL.
660
1004
  #
661
- # This action is not supported by Amazon S3 on Outposts.
1005
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1006
+ #
1007
+ # * This functionality is not supported for Amazon S3 on Outposts.
1008
+ #
1009
+ # </note>
662
1010
  # @option options [String] :grant_write_acp
663
1011
  # Allows grantee to write the ACL for the applicable object.
664
1012
  #
665
- # This action is not supported by Amazon S3 on Outposts.
1013
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1014
+ #
1015
+ # * This functionality is not supported for Amazon S3 on Outposts.
1016
+ #
1017
+ # </note>
1018
+ # @option options [String] :if_match
1019
+ # Copies the object if the entity tag (ETag) of the destination object
1020
+ # matches the specified tag. If the ETag values do not match, the
1021
+ # operation returns a `412 Precondition Failed` error. If a concurrent
1022
+ # operation occurs during the upload S3 returns a `409
1023
+ # ConditionalRequestConflict` response. On a 409 failure you should
1024
+ # fetch the object's ETag and retry the upload.
1025
+ #
1026
+ # Expects the ETag value as a string.
1027
+ #
1028
+ # For more information about conditional requests, see [RFC 7232][1].
1029
+ #
1030
+ #
1031
+ #
1032
+ # [1]: https://tools.ietf.org/html/rfc7232
1033
+ # @option options [String] :if_none_match
1034
+ # Copies the object only if the object key name at the destination does
1035
+ # not already exist in the bucket specified. Otherwise, Amazon S3
1036
+ # returns a `412 Precondition Failed` error. If a concurrent operation
1037
+ # occurs during the upload S3 returns a `409 ConditionalRequestConflict`
1038
+ # response. On a 409 failure you should retry the upload.
1039
+ #
1040
+ # Expects the '*' (asterisk) character.
1041
+ #
1042
+ # For more information about conditional requests, see [RFC 7232][1].
1043
+ #
1044
+ #
1045
+ #
1046
+ # [1]: https://tools.ietf.org/html/rfc7232
666
1047
  # @option options [Hash<String,String>] :metadata
667
1048
  # A map of metadata to store with the object in S3.
668
1049
  # @option options [String] :metadata_directive
669
1050
  # Specifies whether the metadata is copied from the source object or
670
- # replaced with metadata provided in the request.
1051
+ # replaced with metadata that's provided in the request. When copying
1052
+ # an object, you can preserve all metadata (the default) or specify new
1053
+ # metadata. If this header isn’t specified, `COPY` is the default
1054
+ # behavior.
1055
+ #
1056
+ # **General purpose bucket** - For general purpose buckets, when you
1057
+ # grant permissions, you can use the `s3:x-amz-metadata-directive`
1058
+ # condition key to enforce certain metadata behavior when objects are
1059
+ # uploaded. For more information, see [Amazon S3 condition key
1060
+ # examples][1] in the *Amazon S3 User Guide*.
1061
+ #
1062
+ # <note markdown="1"> `x-amz-website-redirect-location` is unique to each object and is not
1063
+ # copied when using the `x-amz-metadata-directive` header. To copy the
1064
+ # value, you must specify `x-amz-website-redirect-location` in the
1065
+ # request header.
1066
+ #
1067
+ # </note>
1068
+ #
1069
+ #
1070
+ #
1071
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html
671
1072
  # @option options [String] :tagging_directive
672
- # Specifies whether the object tag-set are copied from the source object
673
- # or replaced with tag-set provided in the request.
1073
+ # Specifies whether the object tag-set is copied from the source object
1074
+ # or replaced with the tag-set that's provided in the request.
1075
+ #
1076
+ # The default value is `COPY`.
1077
+ #
1078
+ # <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
1079
+ # operation, only the empty tag-set is supported. Any requests that
1080
+ # attempt to write non-empty tags into directory buckets will receive a
1081
+ # `501 Not Implemented` status code. When the destination bucket is a
1082
+ # directory bucket, you will receive a `501 Not Implemented` response in
1083
+ # any of the following situations:
1084
+ #
1085
+ # * When you attempt to `COPY` the tag-set from an S3 source object that
1086
+ # has non-empty tags.
1087
+ #
1088
+ # * When you attempt to `REPLACE` the tag-set of a source object and set
1089
+ # a non-empty value to `x-amz-tagging`.
1090
+ #
1091
+ # * When you don't set the `x-amz-tagging-directive` header and the
1092
+ # source object has non-empty tags. This is because the default value
1093
+ # of `x-amz-tagging-directive` is `COPY`.
1094
+ #
1095
+ # Because only the empty tag-set is supported for directory buckets in a
1096
+ # `CopyObject` operation, the following situations are allowed:
1097
+ #
1098
+ # * When you attempt to `COPY` the tag-set from a directory bucket
1099
+ # source object that has no tags to a general purpose bucket. It
1100
+ # copies an empty tag-set to the destination object.
1101
+ #
1102
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
1103
+ # source object and set the `x-amz-tagging` value of the directory
1104
+ # bucket destination object to empty.
1105
+ #
1106
+ # * When you attempt to `REPLACE` the tag-set of a general purpose
1107
+ # bucket source object that has non-empty tags and set the
1108
+ # `x-amz-tagging` value of the directory bucket destination object to
1109
+ # empty.
1110
+ #
1111
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
1112
+ # source object and don't set the `x-amz-tagging` value of the
1113
+ # directory bucket destination object. This is because the default
1114
+ # value of `x-amz-tagging` is the empty value.
1115
+ #
1116
+ # </note>
674
1117
  # @option options [String] :server_side_encryption
675
1118
  # The server-side encryption algorithm used when storing this object in
676
- # Amazon S3 (for example, AES256, aws:kms).
1119
+ # Amazon S3. Unrecognized or unsupported values won’t write a
1120
+ # destination object and will receive a `400 Bad Request` response.
1121
+ #
1122
+ # Amazon S3 automatically encrypts all new objects that are copied to an
1123
+ # S3 bucket. When copying an object, if you don't specify encryption
1124
+ # information in your copy request, the encryption setting of the target
1125
+ # object is set to the default encryption configuration of the
1126
+ # destination bucket. By default, all buckets have a base level of
1127
+ # encryption configuration that uses server-side encryption with Amazon
1128
+ # S3 managed keys (SSE-S3). If the destination bucket has a different
1129
+ # default encryption configuration, Amazon S3 uses the corresponding
1130
+ # encryption key to encrypt the target object copy.
1131
+ #
1132
+ # With server-side encryption, Amazon S3 encrypts your data as it writes
1133
+ # your data to disks in its data centers and decrypts the data when you
1134
+ # access it. For more information about server-side encryption, see
1135
+ # [Using Server-Side Encryption][1] in the *Amazon S3 User Guide*.
1136
+ #
1137
+ # <b>General purpose buckets </b>
1138
+ #
1139
+ # * For general purpose buckets, there are the following supported
1140
+ # options for server-side encryption: server-side encryption with Key
1141
+ # Management Service (KMS) keys (SSE-KMS), dual-layer server-side
1142
+ # encryption with Amazon Web Services KMS keys (DSSE-KMS), and
1143
+ # server-side encryption with customer-provided encryption keys
1144
+ # (SSE-C). Amazon S3 uses the corresponding KMS key, or a
1145
+ # customer-provided key to encrypt the target object copy.
1146
+ #
1147
+ # * When you perform a `CopyObject` operation, if you want to use a
1148
+ # different type of encryption setting for the target object, you can
1149
+ # specify appropriate encryption-related headers to encrypt the target
1150
+ # object with an Amazon S3 managed key, a KMS key, or a
1151
+ # customer-provided key. If the encryption setting in your request is
1152
+ # different from the default encryption configuration of the
1153
+ # destination bucket, the encryption setting in your request takes
1154
+ # precedence.
1155
+ #
1156
+ # <b>Directory buckets </b>
1157
+ #
1158
+ # * For directory buckets, there are only two supported options for
1159
+ # server-side encryption: server-side encryption with Amazon S3
1160
+ # managed keys (SSE-S3) (`AES256`) and server-side encryption with KMS
1161
+ # keys (SSE-KMS) (`aws:kms`). We recommend that the bucket's default
1162
+ # encryption uses the desired encryption configuration and you don't
1163
+ # override the bucket default encryption in your `CreateSession`
1164
+ # requests or `PUT` object requests. Then, new objects are
1165
+ # automatically encrypted with the desired encryption settings. For
1166
+ # more information, see [Protecting data with server-side
1167
+ # encryption][2] in the *Amazon S3 User Guide*. For more information
1168
+ # about the encryption overriding behaviors in directory buckets, see
1169
+ # [Specifying server-side encryption with KMS for new object
1170
+ # uploads][3].
1171
+ #
1172
+ # * To encrypt new object copies to a directory bucket with SSE-KMS, we
1173
+ # recommend you specify SSE-KMS as the directory bucket's default
1174
+ # encryption configuration with a KMS key (specifically, a [customer
1175
+ # managed key][4]). The [Amazon Web Services managed key][5]
1176
+ # (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
1177
+ # support 1 [customer managed key][4] per directory bucket for the
1178
+ # lifetime of the bucket. After you specify a customer managed key for
1179
+ # SSE-KMS, you can't override the customer managed key for the
1180
+ # bucket's SSE-KMS configuration. Then, when you perform a
1181
+ # `CopyObject` operation and want to specify server-side encryption
1182
+ # settings for new object copies with SSE-KMS in the
1183
+ # encryption-related request headers, you must ensure the encryption
1184
+ # key is the same customer managed key that you specified for the
1185
+ # directory bucket's default encryption configuration.
1186
+ #
1187
+ # * <b>S3 access points for Amazon FSx </b> - When accessing data stored
1188
+ # in Amazon FSx file systems using S3 access points, the only valid
1189
+ # server side encryption option is `aws:fsx`. All Amazon FSx file
1190
+ # systems have encryption configured by default and are encrypted at
1191
+ # rest. Data is automatically encrypted before being written to the
1192
+ # file system, and automatically decrypted as it is read. These
1193
+ # processes are handled transparently by Amazon FSx.
1194
+ #
1195
+ #
1196
+ #
1197
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html
1198
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
1199
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
1200
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
1201
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
677
1202
  # @option options [String] :storage_class
678
- # By default, Amazon S3 uses the STANDARD Storage Class to store newly
679
- # created objects. The STANDARD storage class provides high durability
680
- # and high availability. Depending on performance needs, you can specify
681
- # a different Storage Class. Amazon S3 on Outposts only uses the
682
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1203
+ # If the `x-amz-storage-class` header is not used, the copied object
1204
+ # will be stored in the `STANDARD` Storage Class by default. The
1205
+ # `STANDARD` storage class provides high durability and high
1206
+ # availability. Depending on performance needs, you can specify a
1207
+ # different Storage Class.
1208
+ #
1209
+ # <note markdown="1"> * <b>Directory buckets </b> - Directory buckets only support
1210
+ # `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
1211
+ # Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent
1212
+ # Access storage class) in Dedicated Local Zones. Unsupported storage
1213
+ # class values won't write a destination object and will respond with
1214
+ # the HTTP status code `400 Bad Request`.
1215
+ #
1216
+ # * <b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the
1217
+ # `OUTPOSTS` Storage Class.
1218
+ #
1219
+ # </note>
1220
+ #
1221
+ # You can use the `CopyObject` action to change the storage class of an
1222
+ # object that is already stored in Amazon S3 by using the
1223
+ # `x-amz-storage-class` header. For more information, see [Storage
1224
+ # Classes][1] in the *Amazon S3 User Guide*.
1225
+ #
1226
+ # Before using an object as a source object for the copy operation, you
1227
+ # must restore a copy of it if it meets any of the following conditions:
1228
+ #
1229
+ # * The storage class of the source object is `GLACIER` or
1230
+ # `DEEP_ARCHIVE`.
1231
+ #
1232
+ # * The storage class of the source object is `INTELLIGENT_TIERING` and
1233
+ # it's [S3 Intelligent-Tiering access tier][2] is `Archive Access` or
1234
+ # `Deep Archive Access`.
1235
+ #
1236
+ # For more information, see [RestoreObject][3] and [Copying Objects][4]
683
1237
  # in the *Amazon S3 User Guide*.
684
1238
  #
685
1239
  #
686
1240
  #
687
1241
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
1242
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition
1243
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
1244
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html
688
1245
  # @option options [String] :website_redirect_location
689
- # If the bucket is configured as a website, redirects requests for this
690
- # object to another object in the same bucket or to an external URL.
691
- # Amazon S3 stores the value of this header in the object metadata.
1246
+ # If the destination bucket is configured as a website, redirects
1247
+ # requests for this object copy to another object in the same bucket or
1248
+ # to an external URL. Amazon S3 stores the value of this header in the
1249
+ # object metadata. This value is unique to each object and is not copied
1250
+ # when using the `x-amz-metadata-directive` header. Instead, you may opt
1251
+ # to provide this header in combination with the
1252
+ # `x-amz-metadata-directive` header.
1253
+ #
1254
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1255
+ #
1256
+ # </note>
692
1257
  # @option options [String] :sse_customer_algorithm
693
- # Specifies the algorithm to use to when encrypting the object (for
694
- # example, AES256).
1258
+ # Specifies the algorithm to use when encrypting the object (for
1259
+ # example, `AES256`).
1260
+ #
1261
+ # When you perform a `CopyObject` operation, if you want to use a
1262
+ # different type of encryption setting for the target object, you can
1263
+ # specify appropriate encryption-related headers to encrypt the target
1264
+ # object with an Amazon S3 managed key, a KMS key, or a
1265
+ # customer-provided key. If the encryption setting in your request is
1266
+ # different from the default encryption configuration of the destination
1267
+ # bucket, the encryption setting in your request takes precedence.
1268
+ #
1269
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
1270
+ # directory bucket.
1271
+ #
1272
+ # </note>
695
1273
  # @option options [String] :sse_customer_key
696
1274
  # Specifies the customer-provided encryption key for Amazon S3 to use in
697
1275
  # encrypting data. This value is used to store the object and then it is
698
- # discarded; Amazon S3 does not store the encryption key. The key must
1276
+ # discarded. Amazon S3 does not store the encryption key. The key must
699
1277
  # be appropriate for use with the algorithm specified in the
700
1278
  # `x-amz-server-side-encryption-customer-algorithm` header.
1279
+ #
1280
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
1281
+ # directory bucket.
1282
+ #
1283
+ # </note>
701
1284
  # @option options [String] :sse_customer_key_md5
702
1285
  # Specifies the 128-bit MD5 digest of the encryption key according to
703
1286
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
704
1287
  # ensure that the encryption key was transmitted without error.
1288
+ #
1289
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
1290
+ # directory bucket.
1291
+ #
1292
+ # </note>
705
1293
  # @option options [String] :ssekms_key_id
706
- # Specifies the Amazon Web Services KMS key ID to use for object
707
- # encryption. All GET and PUT requests for an object protected by Amazon
708
- # Web Services KMS will fail if not made via SSL or using SigV4. For
709
- # information about configuring using any of the officially supported
710
- # Amazon Web Services SDKs and Amazon Web Services CLI, see [Specifying
711
- # the Signature Version in Request Authentication][1] in the *Amazon S3
712
- # User Guide*.
1294
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
1295
+ # object encryption. All GET and PUT requests for an object protected by
1296
+ # KMS will fail if they're not made via SSL or using SigV4. For
1297
+ # information about configuring any of the officially supported Amazon
1298
+ # Web Services SDKs and Amazon Web Services CLI, see [Specifying the
1299
+ # Signature Version in Request Authentication][1] in the *Amazon S3 User
1300
+ # Guide*.
1301
+ #
1302
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
1303
+ # recommended to specify the `x-amz-server-side-encryption` header to
1304
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
1305
+ # header implicitly uses the bucket's default KMS customer managed key
1306
+ # ID. If you want to explicitly set the `
1307
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
1308
+ # bucket's default customer managed key (using key ID or ARN, not
1309
+ # alias). Your SSE-KMS configuration can only support 1 [customer
1310
+ # managed key][2] per directory bucket's lifetime. The [Amazon Web
1311
+ # Services managed key][3] (`aws/s3`) isn't supported. Incorrect key
1312
+ # specification results in an HTTP `400 Bad Request` error.
713
1313
  #
714
1314
  #
715
1315
  #
716
1316
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1317
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
1318
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
717
1319
  # @option options [String] :ssekms_encryption_context
718
- # Specifies the Amazon Web Services KMS Encryption Context to use for
719
- # object encryption. The value of this header is a base64-encoded UTF-8
720
- # string holding JSON with the encryption context key-value pairs.
1320
+ # Specifies the Amazon Web Services KMS Encryption Context as an
1321
+ # additional encryption context to use for the destination object
1322
+ # encryption. The value of this header is a base64-encoded UTF-8 string
1323
+ # holding JSON with the encryption context key-value pairs.
1324
+ #
1325
+ # **General purpose buckets** - This value must be explicitly added to
1326
+ # specify encryption context for `CopyObject` requests if you want an
1327
+ # additional encryption context for your destination object. The
1328
+ # additional encryption context of the source object won't be copied to
1329
+ # the destination object. For more information, see [Encryption
1330
+ # context][1] in the *Amazon S3 User Guide*.
1331
+ #
1332
+ # **Directory buckets** - You can optionally provide an explicit
1333
+ # encryption context value. The value must match the default encryption
1334
+ # context - the bucket Amazon Resource Name (ARN). An additional
1335
+ # encryption context value is not supported.
1336
+ #
1337
+ #
1338
+ #
1339
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
721
1340
  # @option options [Boolean] :bucket_key_enabled
722
1341
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
723
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
1342
+ # encryption with server-side encryption using Key Management Service
1343
+ # (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable
1344
+ # an S3 Bucket Key for the object.
1345
+ #
724
1346
  # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
725
- # for object encryption with SSE-KMS.
1347
+ # for object encryption with SSE-KMS. Specifying this header with a COPY
1348
+ # action doesn’t affect bucket-level settings for S3 Bucket Key.
1349
+ #
1350
+ # For more information, see [Amazon S3 Bucket Keys][1] in the *Amazon S3
1351
+ # User Guide*.
1352
+ #
1353
+ # <note markdown="1"> **Directory buckets** - S3 Bucket Keys aren't supported, when you
1354
+ # copy SSE-KMS encrypted objects from general purpose buckets to
1355
+ # directory buckets, from directory buckets to general purpose buckets,
1356
+ # or between directory buckets, through [CopyObject][2]. In this case,
1357
+ # Amazon S3 makes a call to KMS every time a copy request is made for a
1358
+ # KMS-encrypted object.
1359
+ #
1360
+ # </note>
1361
+ #
726
1362
  #
727
- # Specifying this header with a COPY action doesn’t affect bucket-level
728
- # settings for S3 Bucket Key.
1363
+ #
1364
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
1365
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
729
1366
  # @option options [String] :copy_source_sse_customer_algorithm
730
1367
  # Specifies the algorithm to use when decrypting the source object (for
731
- # example, AES256).
1368
+ # example, `AES256`).
1369
+ #
1370
+ # If the source object for the copy is stored in Amazon S3 using SSE-C,
1371
+ # you must provide the necessary encryption information in your request
1372
+ # so that Amazon S3 can decrypt the object for copying.
1373
+ #
1374
+ # <note markdown="1"> This functionality is not supported when the source object is in a
1375
+ # directory bucket.
1376
+ #
1377
+ # </note>
732
1378
  # @option options [String] :copy_source_sse_customer_key
733
1379
  # Specifies the customer-provided encryption key for Amazon S3 to use to
734
1380
  # decrypt the source object. The encryption key provided in this header
735
- # must be one that was used when the source object was created.
1381
+ # must be the same one that was used when the source object was created.
1382
+ #
1383
+ # If the source object for the copy is stored in Amazon S3 using SSE-C,
1384
+ # you must provide the necessary encryption information in your request
1385
+ # so that Amazon S3 can decrypt the object for copying.
1386
+ #
1387
+ # <note markdown="1"> This functionality is not supported when the source object is in a
1388
+ # directory bucket.
1389
+ #
1390
+ # </note>
736
1391
  # @option options [String] :copy_source_sse_customer_key_md5
737
1392
  # Specifies the 128-bit MD5 digest of the encryption key according to
738
1393
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
739
1394
  # ensure that the encryption key was transmitted without error.
1395
+ #
1396
+ # If the source object for the copy is stored in Amazon S3 using SSE-C,
1397
+ # you must provide the necessary encryption information in your request
1398
+ # so that Amazon S3 can decrypt the object for copying.
1399
+ #
1400
+ # <note markdown="1"> This functionality is not supported when the source object is in a
1401
+ # directory bucket.
1402
+ #
1403
+ # </note>
740
1404
  # @option options [String] :request_payer
741
1405
  # Confirms that the requester knows that they will be charged for the
742
1406
  # request. Bucket owners need not specify this parameter in their
743
- # requests. For information about downloading objects from requester
744
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1407
+ # requests. If either the source or destination S3 bucket has Requester
1408
+ # Pays enabled, the requester will pay for corresponding charges to copy
1409
+ # the object. For information about downloading objects from Requester
1410
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
745
1411
  # in the *Amazon S3 User Guide*.
746
1412
  #
1413
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1414
+ #
1415
+ # </note>
1416
+ #
747
1417
  #
748
1418
  #
749
1419
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
750
1420
  # @option options [String] :tagging
751
- # The tag-set for the object destination object this value must be used
752
- # in conjunction with the `TaggingDirective`. The tag-set must be
753
- # encoded as URL Query parameters.
1421
+ # The tag-set for the object copy in the destination bucket. This value
1422
+ # must be used in conjunction with the `x-amz-tagging-directive` if you
1423
+ # choose `REPLACE` for the `x-amz-tagging-directive`. If you choose
1424
+ # `COPY` for the `x-amz-tagging-directive`, you don't need to set the
1425
+ # `x-amz-tagging` header, because the tag-set will be copied from the
1426
+ # source object directly. The tag-set must be encoded as URL Query
1427
+ # parameters.
1428
+ #
1429
+ # The default value is the empty value.
1430
+ #
1431
+ # <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
1432
+ # operation, only the empty tag-set is supported. Any requests that
1433
+ # attempt to write non-empty tags into directory buckets will receive a
1434
+ # `501 Not Implemented` status code. When the destination bucket is a
1435
+ # directory bucket, you will receive a `501 Not Implemented` response in
1436
+ # any of the following situations:
1437
+ #
1438
+ # * When you attempt to `COPY` the tag-set from an S3 source object that
1439
+ # has non-empty tags.
1440
+ #
1441
+ # * When you attempt to `REPLACE` the tag-set of a source object and set
1442
+ # a non-empty value to `x-amz-tagging`.
1443
+ #
1444
+ # * When you don't set the `x-amz-tagging-directive` header and the
1445
+ # source object has non-empty tags. This is because the default value
1446
+ # of `x-amz-tagging-directive` is `COPY`.
1447
+ #
1448
+ # Because only the empty tag-set is supported for directory buckets in a
1449
+ # `CopyObject` operation, the following situations are allowed:
1450
+ #
1451
+ # * When you attempt to `COPY` the tag-set from a directory bucket
1452
+ # source object that has no tags to a general purpose bucket. It
1453
+ # copies an empty tag-set to the destination object.
1454
+ #
1455
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
1456
+ # source object and set the `x-amz-tagging` value of the directory
1457
+ # bucket destination object to empty.
1458
+ #
1459
+ # * When you attempt to `REPLACE` the tag-set of a general purpose
1460
+ # bucket source object that has non-empty tags and set the
1461
+ # `x-amz-tagging` value of the directory bucket destination object to
1462
+ # empty.
1463
+ #
1464
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
1465
+ # source object and don't set the `x-amz-tagging` value of the
1466
+ # directory bucket destination object. This is because the default
1467
+ # value of `x-amz-tagging` is the empty value.
1468
+ #
1469
+ # </note>
754
1470
  # @option options [String] :object_lock_mode
755
- # The Object Lock mode that you want to apply to the copied object.
1471
+ # The Object Lock mode that you want to apply to the object copy.
1472
+ #
1473
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1474
+ #
1475
+ # </note>
756
1476
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
757
- # The date and time when you want the copied object's Object Lock to
1477
+ # The date and time when you want the Object Lock of the object copy to
758
1478
  # expire.
1479
+ #
1480
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1481
+ #
1482
+ # </note>
759
1483
  # @option options [String] :object_lock_legal_hold_status
760
- # Specifies whether you want to apply a Legal Hold to the copied object.
1484
+ # Specifies whether you want to apply a legal hold to the object copy.
1485
+ #
1486
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1487
+ #
1488
+ # </note>
761
1489
  # @option options [String] :expected_bucket_owner
762
1490
  # The account ID of the expected destination bucket owner. If the
763
- # destination bucket is owned by a different account, the request will
764
- # fail with an HTTP `403 (Access Denied)` error.
1491
+ # account ID that you provide does not match the actual owner of the
1492
+ # destination bucket, the request fails with the HTTP status code `403
1493
+ # Forbidden` (access denied).
765
1494
  # @option options [String] :expected_source_bucket_owner
766
- # The account ID of the expected source bucket owner. If the source
767
- # bucket is owned by a different account, the request will fail with an
768
- # HTTP `403 (Access Denied)` error.
1495
+ # The account ID of the expected source bucket owner. If the account ID
1496
+ # that you provide does not match the actual owner of the source bucket,
1497
+ # the request fails with the HTTP status code `403 Forbidden` (access
1498
+ # denied).
769
1499
  # @return [Types::CopyObjectOutput]
770
1500
  def copy_from(options = {})
771
1501
  options = options.merge(
772
1502
  bucket: @bucket_name,
773
1503
  key: @key
774
1504
  )
775
- resp = @client.copy_object(options)
1505
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1506
+ @client.copy_object(options)
1507
+ end
776
1508
  resp.data
777
1509
  end
778
1510
 
@@ -784,6 +1516,9 @@ module Aws::S3
784
1516
  # request_payer: "requester", # accepts requester
785
1517
  # bypass_governance_retention: false,
786
1518
  # expected_bucket_owner: "AccountId",
1519
+ # if_match: "IfMatch",
1520
+ # if_match_last_modified_time: Time.now,
1521
+ # if_match_size: 1,
787
1522
  # })
788
1523
  # @param [Hash] options ({})
789
1524
  # @option options [String] :mfa
@@ -791,33 +1526,92 @@ module Aws::S3
791
1526
  # space, and the value that is displayed on your authentication device.
792
1527
  # Required to permanently delete a versioned object if versioning is
793
1528
  # configured with MFA delete enabled.
1529
+ #
1530
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1531
+ #
1532
+ # </note>
794
1533
  # @option options [String] :version_id
795
- # VersionId used to reference a specific version of the object.
1534
+ # Version ID used to reference a specific version of the object.
1535
+ #
1536
+ # <note markdown="1"> For directory buckets in this API operation, only the `null` value of
1537
+ # the version ID is supported.
1538
+ #
1539
+ # </note>
796
1540
  # @option options [String] :request_payer
797
1541
  # Confirms that the requester knows that they will be charged for the
798
1542
  # request. Bucket owners need not specify this parameter in their
799
- # requests. For information about downloading objects from requester
800
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1543
+ # requests. If either the source or destination S3 bucket has Requester
1544
+ # Pays enabled, the requester will pay for corresponding charges to copy
1545
+ # the object. For information about downloading objects from Requester
1546
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
801
1547
  # in the *Amazon S3 User Guide*.
802
1548
  #
1549
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1550
+ #
1551
+ # </note>
1552
+ #
803
1553
  #
804
1554
  #
805
1555
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
806
1556
  # @option options [Boolean] :bypass_governance_retention
807
1557
  # Indicates whether S3 Object Lock should bypass Governance-mode
808
1558
  # restrictions to process this operation. To use this header, you must
809
- # have the `s3:PutBucketPublicAccessBlock` permission.
1559
+ # have the `s3:BypassGovernanceRetention` permission.
1560
+ #
1561
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1562
+ #
1563
+ # </note>
810
1564
  # @option options [String] :expected_bucket_owner
811
- # The account ID of the expected bucket owner. If the bucket is owned by
812
- # a different account, the request will fail with an HTTP `403 (Access
813
- # Denied)` error.
1565
+ # The account ID of the expected bucket owner. If the account ID that
1566
+ # you provide does not match the actual owner of the bucket, the request
1567
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1568
+ # @option options [String] :if_match
1569
+ # Deletes the object if the ETag (entity tag) value provided during the
1570
+ # delete operation matches the ETag of the object in S3. If the ETag
1571
+ # values do not match, the operation returns a `412 Precondition Failed`
1572
+ # error.
1573
+ #
1574
+ # Expects the ETag value as a string. `If-Match` does accept a string
1575
+ # value of an '*' (asterisk) character to denote a match of any ETag.
1576
+ #
1577
+ # For more information about conditional requests, see [RFC 7232][1].
1578
+ #
1579
+ #
1580
+ #
1581
+ # [1]: https://tools.ietf.org/html/rfc7232
1582
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
1583
+ # If present, the object is deleted only if its modification times
1584
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
1585
+ # match, the operation returns a `412 Precondition Failed` error. If the
1586
+ # `Timestamp` matches or if the object doesn’t exist, the operation
1587
+ # returns a `204 Success (No Content)` response.
1588
+ #
1589
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1590
+ #
1591
+ # </note>
1592
+ # @option options [Integer] :if_match_size
1593
+ # If present, the object is deleted only if its size matches the
1594
+ # provided size in bytes. If the `Size` value does not match, the
1595
+ # operation returns a `412 Precondition Failed` error. If the `Size`
1596
+ # matches or if the object doesn’t exist, the operation returns a `204
1597
+ # Success (No Content)` response.
1598
+ #
1599
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1600
+ #
1601
+ # </note>
1602
+ #
1603
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
1604
+ # `x-amz-if-match-size` conditional headers in conjunction with
1605
+ # each-other or individually.
814
1606
  # @return [Types::DeleteObjectOutput]
815
1607
  def delete(options = {})
816
1608
  options = options.merge(
817
1609
  bucket: @bucket_name,
818
1610
  key: @key
819
1611
  )
820
- resp = @client.delete_object(options)
1612
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1613
+ @client.delete_object(options)
1614
+ end
821
1615
  resp.data
822
1616
  end
823
1617
 
@@ -842,24 +1636,71 @@ module Aws::S3
842
1636
  # request_payer: "requester", # accepts requester
843
1637
  # part_number: 1,
844
1638
  # expected_bucket_owner: "AccountId",
1639
+ # checksum_mode: "ENABLED", # accepts ENABLED
845
1640
  # })
846
1641
  # @param [Hash] options ({})
847
1642
  # @option options [String] :if_match
848
1643
  # Return the object only if its entity tag (ETag) is the same as the one
849
- # specified, otherwise return a 412 (precondition failed).
1644
+ # specified in this header; otherwise, return a `412 Precondition
1645
+ # Failed` error.
1646
+ #
1647
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
1648
+ # present in the request as follows: `If-Match` condition evaluates to
1649
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
1650
+ # then, S3 returns `200 OK` and the data requested.
1651
+ #
1652
+ # For more information about conditional requests, see [RFC 7232][1].
1653
+ #
1654
+ #
1655
+ #
1656
+ # [1]: https://tools.ietf.org/html/rfc7232
850
1657
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
851
1658
  # Return the object only if it has been modified since the specified
852
- # time, otherwise return a 304 (not modified).
1659
+ # time; otherwise, return a `304 Not Modified` error.
1660
+ #
1661
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
1662
+ # present in the request as follows:` If-None-Match` condition evaluates
1663
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
1664
+ # then, S3 returns `304 Not Modified` status code.
1665
+ #
1666
+ # For more information about conditional requests, see [RFC 7232][1].
1667
+ #
1668
+ #
1669
+ #
1670
+ # [1]: https://tools.ietf.org/html/rfc7232
853
1671
  # @option options [String] :if_none_match
854
1672
  # Return the object only if its entity tag (ETag) is different from the
855
- # one specified, otherwise return a 304 (not modified).
1673
+ # one specified in this header; otherwise, return a `304 Not Modified`
1674
+ # error.
1675
+ #
1676
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
1677
+ # present in the request as follows:` If-None-Match` condition evaluates
1678
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
1679
+ # then, S3 returns `304 Not Modified` HTTP status code.
1680
+ #
1681
+ # For more information about conditional requests, see [RFC 7232][1].
1682
+ #
1683
+ #
1684
+ #
1685
+ # [1]: https://tools.ietf.org/html/rfc7232
856
1686
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
857
1687
  # Return the object only if it has not been modified since the specified
858
- # time, otherwise return a 412 (precondition failed).
1688
+ # time; otherwise, return a `412 Precondition Failed` error.
1689
+ #
1690
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
1691
+ # present in the request as follows: `If-Match` condition evaluates to
1692
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
1693
+ # then, S3 returns `200 OK` and the data requested.
1694
+ #
1695
+ # For more information about conditional requests, see [RFC 7232][1].
1696
+ #
1697
+ #
1698
+ #
1699
+ # [1]: https://tools.ietf.org/html/rfc7232
859
1700
  # @option options [String] :range
860
- # Downloads the specified range bytes of an object. For more information
1701
+ # Downloads the specified byte range of an object. For more information
861
1702
  # about the HTTP Range header, see
862
- # [https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
1703
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
863
1704
  #
864
1705
  # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
865
1706
  # `GET` request.
@@ -868,11 +1709,11 @@ module Aws::S3
868
1709
  #
869
1710
  #
870
1711
  #
871
- # [1]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
1712
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
872
1713
  # @option options [String] :response_cache_control
873
1714
  # Sets the `Cache-Control` header of the response.
874
1715
  # @option options [String] :response_content_disposition
875
- # Sets the `Content-Disposition` header of the response
1716
+ # Sets the `Content-Disposition` header of the response.
876
1717
  # @option options [String] :response_content_encoding
877
1718
  # Sets the `Content-Encoding` header of the response.
878
1719
  # @option options [String] :response_content_language
@@ -882,27 +1723,128 @@ module Aws::S3
882
1723
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
883
1724
  # Sets the `Expires` header of the response.
884
1725
  # @option options [String] :version_id
885
- # VersionId used to reference a specific version of the object.
1726
+ # Version ID used to reference a specific version of the object.
1727
+ #
1728
+ # By default, the `GetObject` operation returns the current version of
1729
+ # an object. To return a different version, use the `versionId`
1730
+ # subresource.
1731
+ #
1732
+ # <note markdown="1"> * If you include a `versionId` in your request header, you must have
1733
+ # the `s3:GetObjectVersion` permission to access a specific version of
1734
+ # an object. The `s3:GetObject` permission is not required in this
1735
+ # scenario.
1736
+ #
1737
+ # * If you request the current version of an object without a specific
1738
+ # `versionId` in the request header, only the `s3:GetObject`
1739
+ # permission is required. The `s3:GetObjectVersion` permission is not
1740
+ # required in this scenario.
1741
+ #
1742
+ # * **Directory buckets** - S3 Versioning isn't enabled and supported
1743
+ # for directory buckets. For this API operation, only the `null` value
1744
+ # of the version ID is supported by directory buckets. You can only
1745
+ # specify `null` to the `versionId` query parameter in the request.
1746
+ #
1747
+ # </note>
1748
+ #
1749
+ # For more information about versioning, see [PutBucketVersioning][1].
1750
+ #
1751
+ #
1752
+ #
1753
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html
886
1754
  # @option options [String] :sse_customer_algorithm
887
- # Specifies the algorithm to use to when decrypting the object (for
888
- # example, AES256).
1755
+ # Specifies the algorithm to use when decrypting the object (for
1756
+ # example, `AES256`).
1757
+ #
1758
+ # If you encrypt an object by using server-side encryption with
1759
+ # customer-provided encryption keys (SSE-C) when you store the object in
1760
+ # Amazon S3, then when you GET the object, you must use the following
1761
+ # headers:
1762
+ #
1763
+ # * `x-amz-server-side-encryption-customer-algorithm`
1764
+ #
1765
+ # * `x-amz-server-side-encryption-customer-key`
1766
+ #
1767
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1768
+ #
1769
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1770
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1771
+ #
1772
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1773
+ #
1774
+ # </note>
1775
+ #
1776
+ #
1777
+ #
1778
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
889
1779
  # @option options [String] :sse_customer_key
890
- # Specifies the customer-provided encryption key for Amazon S3 used to
891
- # encrypt the data. This value is used to decrypt the object when
892
- # recovering it and must match the one used when storing the data. The
893
- # key must be appropriate for use with the algorithm specified in the
1780
+ # Specifies the customer-provided encryption key that you originally
1781
+ # provided for Amazon S3 to encrypt the data before storing it. This
1782
+ # value is used to decrypt the object when recovering it and must match
1783
+ # the one used when storing the data. The key must be appropriate for
1784
+ # use with the algorithm specified in the
894
1785
  # `x-amz-server-side-encryption-customer-algorithm` header.
1786
+ #
1787
+ # If you encrypt an object by using server-side encryption with
1788
+ # customer-provided encryption keys (SSE-C) when you store the object in
1789
+ # Amazon S3, then when you GET the object, you must use the following
1790
+ # headers:
1791
+ #
1792
+ # * `x-amz-server-side-encryption-customer-algorithm`
1793
+ #
1794
+ # * `x-amz-server-side-encryption-customer-key`
1795
+ #
1796
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1797
+ #
1798
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1799
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1800
+ #
1801
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1802
+ #
1803
+ # </note>
1804
+ #
1805
+ #
1806
+ #
1807
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
895
1808
  # @option options [String] :sse_customer_key_md5
896
- # Specifies the 128-bit MD5 digest of the encryption key according to
897
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
898
- # ensure that the encryption key was transmitted without error.
1809
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
1810
+ # key according to RFC 1321. Amazon S3 uses this header for a message
1811
+ # integrity check to ensure that the encryption key was transmitted
1812
+ # without error.
1813
+ #
1814
+ # If you encrypt an object by using server-side encryption with
1815
+ # customer-provided encryption keys (SSE-C) when you store the object in
1816
+ # Amazon S3, then when you GET the object, you must use the following
1817
+ # headers:
1818
+ #
1819
+ # * `x-amz-server-side-encryption-customer-algorithm`
1820
+ #
1821
+ # * `x-amz-server-side-encryption-customer-key`
1822
+ #
1823
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1824
+ #
1825
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1826
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1827
+ #
1828
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1829
+ #
1830
+ # </note>
1831
+ #
1832
+ #
1833
+ #
1834
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
899
1835
  # @option options [String] :request_payer
900
1836
  # Confirms that the requester knows that they will be charged for the
901
1837
  # request. Bucket owners need not specify this parameter in their
902
- # requests. For information about downloading objects from requester
903
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1838
+ # requests. If either the source or destination S3 bucket has Requester
1839
+ # Pays enabled, the requester will pay for corresponding charges to copy
1840
+ # the object. For information about downloading objects from Requester
1841
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
904
1842
  # in the *Amazon S3 User Guide*.
905
1843
  #
1844
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1845
+ #
1846
+ # </note>
1847
+ #
906
1848
  #
907
1849
  #
908
1850
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
@@ -912,16 +1854,20 @@ module Aws::S3
912
1854
  # for the part specified. Useful for downloading just a part of an
913
1855
  # object.
914
1856
  # @option options [String] :expected_bucket_owner
915
- # The account ID of the expected bucket owner. If the bucket is owned by
916
- # a different account, the request will fail with an HTTP `403 (Access
917
- # Denied)` error.
1857
+ # The account ID of the expected bucket owner. If the account ID that
1858
+ # you provide does not match the actual owner of the bucket, the request
1859
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1860
+ # @option options [String] :checksum_mode
1861
+ # To retrieve the checksum, this mode must be enabled.
918
1862
  # @return [Types::GetObjectOutput]
919
1863
  def get(options = {}, &block)
920
1864
  options = options.merge(
921
1865
  bucket: @bucket_name,
922
1866
  key: @key
923
1867
  )
924
- resp = @client.get_object(options, &block)
1868
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1869
+ @client.get_object(options, &block)
1870
+ end
925
1871
  resp.data
926
1872
  end
927
1873
 
@@ -942,8 +1888,8 @@ module Aws::S3
942
1888
  # metadata: {
943
1889
  # "MetadataKey" => "MetadataValue",
944
1890
  # },
945
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
946
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
1891
+ # server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
1892
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS
947
1893
  # website_redirect_location: "WebsiteRedirectLocation",
948
1894
  # sse_customer_algorithm: "SSECustomerAlgorithm",
949
1895
  # sse_customer_key: "SSECustomerKey",
@@ -957,12 +1903,34 @@ module Aws::S3
957
1903
  # object_lock_retain_until_date: Time.now,
958
1904
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
959
1905
  # expected_bucket_owner: "AccountId",
1906
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1907
+ # checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
960
1908
  # })
961
1909
  # @param [Hash] options ({})
962
1910
  # @option options [String] :acl
963
- # The canned ACL to apply to the object.
1911
+ # The canned ACL to apply to the object. Amazon S3 supports a set of
1912
+ # predefined ACLs, known as *canned ACLs*. Each canned ACL has a
1913
+ # predefined set of grantees and permissions. For more information, see
1914
+ # [Canned ACL][1] in the *Amazon S3 User Guide*.
1915
+ #
1916
+ # By default, all objects are private. Only the owner has full access
1917
+ # control. When uploading an object, you can grant access permissions to
1918
+ # individual Amazon Web Services accounts or to predefined groups
1919
+ # defined by Amazon S3. These permissions are then added to the access
1920
+ # control list (ACL) on the new object. For more information, see [Using
1921
+ # ACLs][2]. One way to grant the permissions using the request headers
1922
+ # is to specify a canned ACL with the `x-amz-acl` request header.
1923
+ #
1924
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1925
+ #
1926
+ # * This functionality is not supported for Amazon S3 on Outposts.
1927
+ #
1928
+ # </note>
1929
+ #
964
1930
  #
965
- # This action is not supported by Amazon S3 on Outposts.
1931
+ #
1932
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
1933
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
966
1934
  # @option options [String] :cache_control
967
1935
  # Specifies caching behavior along the request/reply chain.
968
1936
  # @option options [String] :content_disposition
@@ -971,41 +1939,343 @@ module Aws::S3
971
1939
  # Specifies what content encodings have been applied to the object and
972
1940
  # thus what decoding mechanisms must be applied to obtain the media-type
973
1941
  # referenced by the Content-Type header field.
1942
+ #
1943
+ # <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
1944
+ # this header field.
1945
+ #
1946
+ # </note>
974
1947
  # @option options [String] :content_language
975
- # The language the content is in.
1948
+ # The language that the content is in.
976
1949
  # @option options [String] :content_type
977
1950
  # A standard MIME type describing the format of the object data.
978
1951
  # @option options [Time,DateTime,Date,Integer,String] :expires
979
1952
  # The date and time at which the object is no longer cacheable.
980
1953
  # @option options [String] :grant_full_control
981
- # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
982
- # object.
1954
+ # Specify access permissions explicitly to give the grantee READ,
1955
+ # READ\_ACP, and WRITE\_ACP permissions on the object.
1956
+ #
1957
+ # By default, all objects are private. Only the owner has full access
1958
+ # control. When uploading an object, you can use this header to
1959
+ # explicitly grant access permissions to specific Amazon Web Services
1960
+ # accounts or groups. This header maps to specific permissions that
1961
+ # Amazon S3 supports in an ACL. For more information, see [Access
1962
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1963
+ #
1964
+ # You specify each grantee as a type=value pair, where the type is one
1965
+ # of the following:
1966
+ #
1967
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1968
+ # Web Services account
1969
+ #
1970
+ # * `uri` – if you are granting permissions to a predefined group
1971
+ #
1972
+ # * `emailAddress` – if the value specified is the email address of an
1973
+ # Amazon Web Services account
1974
+ #
1975
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1976
+ # following Amazon Web Services Regions:
1977
+ #
1978
+ # * US East (N. Virginia)
1979
+ #
1980
+ # * US West (N. California)
1981
+ #
1982
+ # * US West (Oregon)
1983
+ #
1984
+ # * Asia Pacific (Singapore)
1985
+ #
1986
+ # * Asia Pacific (Sydney)
1987
+ #
1988
+ # * Asia Pacific (Tokyo)
1989
+ #
1990
+ # * Europe (Ireland)
983
1991
  #
984
- # This action is not supported by Amazon S3 on Outposts.
1992
+ # * South America (São Paulo)
1993
+ #
1994
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1995
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1996
+ # Reference.
1997
+ #
1998
+ # </note>
1999
+ #
2000
+ # For example, the following `x-amz-grant-read` header grants the Amazon
2001
+ # Web Services accounts identified by account IDs permissions to read
2002
+ # object data and its metadata:
2003
+ #
2004
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
2005
+ #
2006
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2007
+ #
2008
+ # * This functionality is not supported for Amazon S3 on Outposts.
2009
+ #
2010
+ # </note>
2011
+ #
2012
+ #
2013
+ #
2014
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
2015
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
985
2016
  # @option options [String] :grant_read
986
- # Allows grantee to read the object data and its metadata.
2017
+ # Specify access permissions explicitly to allow grantee to read the
2018
+ # object data and its metadata.
2019
+ #
2020
+ # By default, all objects are private. Only the owner has full access
2021
+ # control. When uploading an object, you can use this header to
2022
+ # explicitly grant access permissions to specific Amazon Web Services
2023
+ # accounts or groups. This header maps to specific permissions that
2024
+ # Amazon S3 supports in an ACL. For more information, see [Access
2025
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
2026
+ #
2027
+ # You specify each grantee as a type=value pair, where the type is one
2028
+ # of the following:
2029
+ #
2030
+ # * `id` – if the value specified is the canonical user ID of an Amazon
2031
+ # Web Services account
2032
+ #
2033
+ # * `uri` – if you are granting permissions to a predefined group
2034
+ #
2035
+ # * `emailAddress` – if the value specified is the email address of an
2036
+ # Amazon Web Services account
2037
+ #
2038
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
2039
+ # following Amazon Web Services Regions:
2040
+ #
2041
+ # * US East (N. Virginia)
2042
+ #
2043
+ # * US West (N. California)
2044
+ #
2045
+ # * US West (Oregon)
2046
+ #
2047
+ # * Asia Pacific (Singapore)
2048
+ #
2049
+ # * Asia Pacific (Sydney)
2050
+ #
2051
+ # * Asia Pacific (Tokyo)
2052
+ #
2053
+ # * Europe (Ireland)
2054
+ #
2055
+ # * South America (São Paulo)
2056
+ #
2057
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
2058
+ # [Regions and Endpoints][2] in the Amazon Web Services General
2059
+ # Reference.
2060
+ #
2061
+ # </note>
2062
+ #
2063
+ # For example, the following `x-amz-grant-read` header grants the Amazon
2064
+ # Web Services accounts identified by account IDs permissions to read
2065
+ # object data and its metadata:
2066
+ #
2067
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
987
2068
  #
988
- # This action is not supported by Amazon S3 on Outposts.
2069
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2070
+ #
2071
+ # * This functionality is not supported for Amazon S3 on Outposts.
2072
+ #
2073
+ # </note>
2074
+ #
2075
+ #
2076
+ #
2077
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
2078
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
989
2079
  # @option options [String] :grant_read_acp
990
- # Allows grantee to read the object ACL.
2080
+ # Specify access permissions explicitly to allows grantee to read the
2081
+ # object ACL.
2082
+ #
2083
+ # By default, all objects are private. Only the owner has full access
2084
+ # control. When uploading an object, you can use this header to
2085
+ # explicitly grant access permissions to specific Amazon Web Services
2086
+ # accounts or groups. This header maps to specific permissions that
2087
+ # Amazon S3 supports in an ACL. For more information, see [Access
2088
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
2089
+ #
2090
+ # You specify each grantee as a type=value pair, where the type is one
2091
+ # of the following:
2092
+ #
2093
+ # * `id` – if the value specified is the canonical user ID of an Amazon
2094
+ # Web Services account
2095
+ #
2096
+ # * `uri` – if you are granting permissions to a predefined group
2097
+ #
2098
+ # * `emailAddress` – if the value specified is the email address of an
2099
+ # Amazon Web Services account
2100
+ #
2101
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
2102
+ # following Amazon Web Services Regions:
2103
+ #
2104
+ # * US East (N. Virginia)
2105
+ #
2106
+ # * US West (N. California)
2107
+ #
2108
+ # * US West (Oregon)
2109
+ #
2110
+ # * Asia Pacific (Singapore)
2111
+ #
2112
+ # * Asia Pacific (Sydney)
2113
+ #
2114
+ # * Asia Pacific (Tokyo)
2115
+ #
2116
+ # * Europe (Ireland)
2117
+ #
2118
+ # * South America (São Paulo)
2119
+ #
2120
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
2121
+ # [Regions and Endpoints][2] in the Amazon Web Services General
2122
+ # Reference.
2123
+ #
2124
+ # </note>
2125
+ #
2126
+ # For example, the following `x-amz-grant-read` header grants the Amazon
2127
+ # Web Services accounts identified by account IDs permissions to read
2128
+ # object data and its metadata:
2129
+ #
2130
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
2131
+ #
2132
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2133
+ #
2134
+ # * This functionality is not supported for Amazon S3 on Outposts.
2135
+ #
2136
+ # </note>
2137
+ #
2138
+ #
991
2139
  #
992
- # This action is not supported by Amazon S3 on Outposts.
2140
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
2141
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
993
2142
  # @option options [String] :grant_write_acp
994
- # Allows grantee to write the ACL for the applicable object.
2143
+ # Specify access permissions explicitly to allows grantee to allow
2144
+ # grantee to write the ACL for the applicable object.
2145
+ #
2146
+ # By default, all objects are private. Only the owner has full access
2147
+ # control. When uploading an object, you can use this header to
2148
+ # explicitly grant access permissions to specific Amazon Web Services
2149
+ # accounts or groups. This header maps to specific permissions that
2150
+ # Amazon S3 supports in an ACL. For more information, see [Access
2151
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
2152
+ #
2153
+ # You specify each grantee as a type=value pair, where the type is one
2154
+ # of the following:
2155
+ #
2156
+ # * `id` – if the value specified is the canonical user ID of an Amazon
2157
+ # Web Services account
2158
+ #
2159
+ # * `uri` – if you are granting permissions to a predefined group
2160
+ #
2161
+ # * `emailAddress` – if the value specified is the email address of an
2162
+ # Amazon Web Services account
2163
+ #
2164
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
2165
+ # following Amazon Web Services Regions:
2166
+ #
2167
+ # * US East (N. Virginia)
2168
+ #
2169
+ # * US West (N. California)
2170
+ #
2171
+ # * US West (Oregon)
2172
+ #
2173
+ # * Asia Pacific (Singapore)
2174
+ #
2175
+ # * Asia Pacific (Sydney)
2176
+ #
2177
+ # * Asia Pacific (Tokyo)
2178
+ #
2179
+ # * Europe (Ireland)
2180
+ #
2181
+ # * South America (São Paulo)
2182
+ #
2183
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
2184
+ # [Regions and Endpoints][2] in the Amazon Web Services General
2185
+ # Reference.
995
2186
  #
996
- # This action is not supported by Amazon S3 on Outposts.
2187
+ # </note>
2188
+ #
2189
+ # For example, the following `x-amz-grant-read` header grants the Amazon
2190
+ # Web Services accounts identified by account IDs permissions to read
2191
+ # object data and its metadata:
2192
+ #
2193
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
2194
+ #
2195
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2196
+ #
2197
+ # * This functionality is not supported for Amazon S3 on Outposts.
2198
+ #
2199
+ # </note>
2200
+ #
2201
+ #
2202
+ #
2203
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
2204
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
997
2205
  # @option options [Hash<String,String>] :metadata
998
2206
  # A map of metadata to store with the object in S3.
999
2207
  # @option options [String] :server_side_encryption
1000
- # The server-side encryption algorithm used when storing this object in
1001
- # Amazon S3 (for example, AES256, aws:kms).
2208
+ # The server-side encryption algorithm used when you store this object
2209
+ # in Amazon S3 or Amazon FSx.
2210
+ #
2211
+ # * <b>Directory buckets </b> - For directory buckets, there are only
2212
+ # two supported options for server-side encryption: server-side
2213
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
2214
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
2215
+ # recommend that the bucket's default encryption uses the desired
2216
+ # encryption configuration and you don't override the bucket default
2217
+ # encryption in your `CreateSession` requests or `PUT` object
2218
+ # requests. Then, new objects are automatically encrypted with the
2219
+ # desired encryption settings. For more information, see [Protecting
2220
+ # data with server-side encryption][1] in the *Amazon S3 User Guide*.
2221
+ # For more information about the encryption overriding behaviors in
2222
+ # directory buckets, see [Specifying server-side encryption with KMS
2223
+ # for new object uploads][2].
2224
+ #
2225
+ # In the Zonal endpoint API calls (except [CopyObject][3] and
2226
+ # [UploadPartCopy][4]) using the REST API, the encryption request
2227
+ # headers must match the encryption settings that are specified in the
2228
+ # `CreateSession` request. You can't override the values of the
2229
+ # encryption settings (`x-amz-server-side-encryption`,
2230
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
2231
+ # `x-amz-server-side-encryption-context`, and
2232
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
2233
+ # specified in the `CreateSession` request. You don't need to
2234
+ # explicitly specify these encryption settings values in Zonal
2235
+ # endpoint API calls, and Amazon S3 will use the encryption settings
2236
+ # values from the `CreateSession` request to protect new objects in
2237
+ # the directory bucket.
2238
+ #
2239
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
2240
+ # `CreateSession`, the session token refreshes automatically to avoid
2241
+ # service interruptions when a session expires. The CLI or the Amazon
2242
+ # Web Services SDKs use the bucket's default encryption configuration
2243
+ # for the `CreateSession` request. It's not supported to override the
2244
+ # encryption settings values in the `CreateSession` request. So in the
2245
+ # Zonal endpoint API calls (except [CopyObject][3] and
2246
+ # [UploadPartCopy][4]), the encryption request headers must match the
2247
+ # default encryption configuration of the directory bucket.
2248
+ #
2249
+ # </note>
2250
+ #
2251
+ # * <b>S3 access points for Amazon FSx </b> - When accessing data stored
2252
+ # in Amazon FSx file systems using S3 access points, the only valid
2253
+ # server side encryption option is `aws:fsx`. All Amazon FSx file
2254
+ # systems have encryption configured by default and are encrypted at
2255
+ # rest. Data is automatically encrypted before being written to the
2256
+ # file system, and automatically decrypted as it is read. These
2257
+ # processes are handled transparently by Amazon FSx.
2258
+ #
2259
+ #
2260
+ #
2261
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
2262
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
2263
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
2264
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
1002
2265
  # @option options [String] :storage_class
1003
2266
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1004
2267
  # created objects. The STANDARD storage class provides high durability
1005
2268
  # and high availability. Depending on performance needs, you can specify
1006
- # a different Storage Class. Amazon S3 on Outposts only uses the
1007
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1008
- # in the *Amazon S3 User Guide*.
2269
+ # a different Storage Class. For more information, see [Storage
2270
+ # Classes][1] in the *Amazon S3 User Guide*.
2271
+ #
2272
+ # <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
2273
+ # Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
2274
+ # One Zone-Infrequent Access storage class) in Dedicated Local Zones.
2275
+ #
2276
+ # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
2277
+ #
2278
+ # </note>
1009
2279
  #
1010
2280
  #
1011
2281
  #
@@ -1014,75 +2284,174 @@ module Aws::S3
1014
2284
  # If the bucket is configured as a website, redirects requests for this
1015
2285
  # object to another object in the same bucket or to an external URL.
1016
2286
  # Amazon S3 stores the value of this header in the object metadata.
2287
+ #
2288
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2289
+ #
2290
+ # </note>
1017
2291
  # @option options [String] :sse_customer_algorithm
1018
- # Specifies the algorithm to use to when encrypting the object (for
2292
+ # Specifies the algorithm to use when encrypting the object (for
1019
2293
  # example, AES256).
2294
+ #
2295
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2296
+ #
2297
+ # </note>
1020
2298
  # @option options [String] :sse_customer_key
1021
2299
  # Specifies the customer-provided encryption key for Amazon S3 to use in
1022
2300
  # encrypting data. This value is used to store the object and then it is
1023
2301
  # discarded; Amazon S3 does not store the encryption key. The key must
1024
2302
  # be appropriate for use with the algorithm specified in the
1025
2303
  # `x-amz-server-side-encryption-customer-algorithm` header.
1026
- # @option options [String] :sse_customer_key_md5
1027
- # Specifies the 128-bit MD5 digest of the encryption key according to
1028
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
1029
- # ensure that the encryption key was transmitted without error.
1030
- # @option options [String] :ssekms_key_id
1031
- # Specifies the ID of the symmetric customer managed key to use for
1032
- # object encryption. All GET and PUT requests for an object protected by
1033
- # Amazon Web Services KMS will fail if not made via SSL or using SigV4.
1034
- # For information about configuring using any of the officially
1035
- # supported Amazon Web Services SDKs and Amazon Web Services CLI, see
1036
- # [Specifying the Signature Version in Request Authentication][1] in the
1037
- # *Amazon S3 User Guide*.
1038
2304
  #
2305
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2306
+ #
2307
+ # </note>
2308
+ # @option options [String] :sse_customer_key_md5
2309
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
2310
+ # key according to RFC 1321. Amazon S3 uses this header for a message
2311
+ # integrity check to ensure that the encryption key was transmitted
2312
+ # without error.
1039
2313
  #
2314
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1040
2315
  #
1041
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
2316
+ # </note>
2317
+ # @option options [String] :ssekms_key_id
2318
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
2319
+ # object encryption. If the KMS key doesn't exist in the same account
2320
+ # that's issuing the command, you must use the full Key ARN not the Key
2321
+ # ID.
2322
+ #
2323
+ # **General purpose buckets** - If you specify
2324
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
2325
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
2326
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
2327
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
2328
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
2329
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
2330
+ #
2331
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
2332
+ # recommended to specify the `x-amz-server-side-encryption` header to
2333
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
2334
+ # header implicitly uses the bucket's default KMS customer managed key
2335
+ # ID. If you want to explicitly set the `
2336
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
2337
+ # bucket's default customer managed key (using key ID or ARN, not
2338
+ # alias). Your SSE-KMS configuration can only support 1 [customer
2339
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
2340
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
2341
+ # specification results in an HTTP `400 Bad Request` error.
2342
+ #
2343
+ #
2344
+ #
2345
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
2346
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
1042
2347
  # @option options [String] :ssekms_encryption_context
1043
2348
  # Specifies the Amazon Web Services KMS Encryption Context to use for
1044
- # object encryption. The value of this header is a base64-encoded UTF-8
1045
- # string holding JSON with the encryption context key-value pairs.
2349
+ # object encryption. The value of this header is a Base64 encoded string
2350
+ # of a UTF-8 encoded JSON, which contains the encryption context as
2351
+ # key-value pairs.
2352
+ #
2353
+ # **Directory buckets** - You can optionally provide an explicit
2354
+ # encryption context value. The value must match the default encryption
2355
+ # context - the bucket Amazon Resource Name (ARN). An additional
2356
+ # encryption context value is not supported.
1046
2357
  # @option options [Boolean] :bucket_key_enabled
1047
2358
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1048
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
1049
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1050
- # for object encryption with SSE-KMS.
2359
+ # encryption with server-side encryption using Key Management Service
2360
+ # (KMS) keys (SSE-KMS).
1051
2361
  #
1052
- # Specifying this header with an object action doesn’t affect
2362
+ # **General purpose buckets** - Setting this header to `true` causes
2363
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
2364
+ # Also, specifying this header with a PUT action doesn't affect
1053
2365
  # bucket-level settings for S3 Bucket Key.
2366
+ #
2367
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
2368
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
2369
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
2370
+ # from general purpose buckets to directory buckets, from directory
2371
+ # buckets to general purpose buckets, or between directory buckets,
2372
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
2373
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
2374
+ # makes a call to KMS every time a copy request is made for a
2375
+ # KMS-encrypted object.
2376
+ #
2377
+ #
2378
+ #
2379
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
2380
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
2381
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
2382
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
1054
2383
  # @option options [String] :request_payer
1055
2384
  # Confirms that the requester knows that they will be charged for the
1056
2385
  # request. Bucket owners need not specify this parameter in their
1057
- # requests. For information about downloading objects from requester
1058
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
2386
+ # requests. If either the source or destination S3 bucket has Requester
2387
+ # Pays enabled, the requester will pay for corresponding charges to copy
2388
+ # the object. For information about downloading objects from Requester
2389
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1059
2390
  # in the *Amazon S3 User Guide*.
1060
2391
  #
2392
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2393
+ #
2394
+ # </note>
2395
+ #
1061
2396
  #
1062
2397
  #
1063
2398
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1064
2399
  # @option options [String] :tagging
1065
2400
  # The tag-set for the object. The tag-set must be encoded as URL Query
1066
2401
  # parameters.
2402
+ #
2403
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2404
+ #
2405
+ # </note>
1067
2406
  # @option options [String] :object_lock_mode
1068
2407
  # Specifies the Object Lock mode that you want to apply to the uploaded
1069
2408
  # object.
2409
+ #
2410
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2411
+ #
2412
+ # </note>
1070
2413
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
1071
2414
  # Specifies the date and time when you want the Object Lock to expire.
2415
+ #
2416
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2417
+ #
2418
+ # </note>
1072
2419
  # @option options [String] :object_lock_legal_hold_status
1073
- # Specifies whether you want to apply a Legal Hold to the uploaded
2420
+ # Specifies whether you want to apply a legal hold to the uploaded
1074
2421
  # object.
2422
+ #
2423
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2424
+ #
2425
+ # </note>
1075
2426
  # @option options [String] :expected_bucket_owner
1076
- # The account ID of the expected bucket owner. If the bucket is owned by
1077
- # a different account, the request will fail with an HTTP `403 (Access
1078
- # Denied)` error.
2427
+ # The account ID of the expected bucket owner. If the account ID that
2428
+ # you provide does not match the actual owner of the bucket, the request
2429
+ # fails with the HTTP status code `403 Forbidden` (access denied).
2430
+ # @option options [String] :checksum_algorithm
2431
+ # Indicates the algorithm that you want Amazon S3 to use to create the
2432
+ # checksum for the object. For more information, see [Checking object
2433
+ # integrity][1] in the *Amazon S3 User Guide*.
2434
+ #
2435
+ #
2436
+ #
2437
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2438
+ # @option options [String] :checksum_type
2439
+ # Indicates the checksum type that you want Amazon S3 to use to
2440
+ # calculate the object’s checksum value. For more information, see
2441
+ # [Checking object integrity in the Amazon S3 User Guide][1].
2442
+ #
2443
+ #
2444
+ #
2445
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1079
2446
  # @return [MultipartUpload]
1080
2447
  def initiate_multipart_upload(options = {})
1081
2448
  options = options.merge(
1082
2449
  bucket: @bucket_name,
1083
2450
  key: @key
1084
2451
  )
1085
- resp = @client.create_multipart_upload(options)
2452
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2453
+ @client.create_multipart_upload(options)
2454
+ end
1086
2455
  MultipartUpload.new(
1087
2456
  bucket_name: @bucket_name,
1088
2457
  object_key: @key,
@@ -1103,16 +2472,25 @@ module Aws::S3
1103
2472
  # content_length: 1,
1104
2473
  # content_md5: "ContentMD5",
1105
2474
  # content_type: "ContentType",
2475
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
2476
+ # checksum_crc32: "ChecksumCRC32",
2477
+ # checksum_crc32c: "ChecksumCRC32C",
2478
+ # checksum_crc64nvme: "ChecksumCRC64NVME",
2479
+ # checksum_sha1: "ChecksumSHA1",
2480
+ # checksum_sha256: "ChecksumSHA256",
1106
2481
  # expires: Time.now,
2482
+ # if_match: "IfMatch",
2483
+ # if_none_match: "IfNoneMatch",
1107
2484
  # grant_full_control: "GrantFullControl",
1108
2485
  # grant_read: "GrantRead",
1109
2486
  # grant_read_acp: "GrantReadACP",
1110
2487
  # grant_write_acp: "GrantWriteACP",
2488
+ # write_offset_bytes: 1,
1111
2489
  # metadata: {
1112
2490
  # "MetadataKey" => "MetadataValue",
1113
2491
  # },
1114
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
1115
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
2492
+ # server_side_encryption: "AES256", # accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
2493
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS
1116
2494
  # website_redirect_location: "WebsiteRedirectLocation",
1117
2495
  # sse_customer_algorithm: "SSECustomerAlgorithm",
1118
2496
  # sse_customer_key: "SSECustomerKey",
@@ -1130,13 +2508,41 @@ module Aws::S3
1130
2508
  # @param [Hash] options ({})
1131
2509
  # @option options [String] :acl
1132
2510
  # The canned ACL to apply to the object. For more information, see
1133
- # [Canned ACL][1].
2511
+ # [Canned ACL][1] in the *Amazon S3 User Guide*.
2512
+ #
2513
+ # When adding a new object, you can use headers to grant ACL-based
2514
+ # permissions to individual Amazon Web Services accounts or to
2515
+ # predefined groups defined by Amazon S3. These permissions are then
2516
+ # added to the ACL on the object. By default, all objects are private.
2517
+ # Only the owner has full access control. For more information, see
2518
+ # [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
2519
+ # REST API][3] in the *Amazon S3 User Guide*.
2520
+ #
2521
+ # If the bucket that you're uploading objects to uses the bucket owner
2522
+ # enforced setting for S3 Object Ownership, ACLs are disabled and no
2523
+ # longer affect permissions. Buckets that use this setting only accept
2524
+ # PUT requests that don't specify an ACL or PUT requests that specify
2525
+ # bucket owner full control ACLs, such as the
2526
+ # `bucket-owner-full-control` canned ACL or an equivalent form of this
2527
+ # ACL expressed in the XML format. PUT requests that contain other ACLs
2528
+ # (for example, custom grants to certain Amazon Web Services accounts)
2529
+ # fail and return a `400` error with the error code
2530
+ # `AccessControlListNotSupported`. For more information, see [
2531
+ # Controlling ownership of objects and disabling ACLs][4] in the *Amazon
2532
+ # S3 User Guide*.
2533
+ #
2534
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2535
+ #
2536
+ # * This functionality is not supported for Amazon S3 on Outposts.
1134
2537
  #
1135
- # This action is not supported by Amazon S3 on Outposts.
2538
+ # </note>
1136
2539
  #
1137
2540
  #
1138
2541
  #
1139
2542
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
2543
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
2544
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
2545
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
1140
2546
  # @option options [String, StringIO, File] :body
1141
2547
  # Object data.
1142
2548
  # @option options [String] :cache_control
@@ -1150,32 +2556,32 @@ module Aws::S3
1150
2556
  # @option options [String] :content_disposition
1151
2557
  # Specifies presentational information for the object. For more
1152
2558
  # information, see
1153
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
2559
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
1154
2560
  #
1155
2561
  #
1156
2562
  #
1157
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
2563
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
1158
2564
  # @option options [String] :content_encoding
1159
2565
  # Specifies what content encodings have been applied to the object and
1160
2566
  # thus what decoding mechanisms must be applied to obtain the media-type
1161
2567
  # referenced by the Content-Type header field. For more information, see
1162
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
2568
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
1163
2569
  #
1164
2570
  #
1165
2571
  #
1166
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
2572
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
1167
2573
  # @option options [String] :content_language
1168
2574
  # The language the content is in.
1169
2575
  # @option options [Integer] :content_length
1170
2576
  # Size of the body in bytes. This parameter is useful when the size of
1171
2577
  # the body cannot be determined automatically. For more information, see
1172
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
2578
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
1173
2579
  #
1174
2580
  #
1175
2581
  #
1176
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
2582
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
1177
2583
  # @option options [String] :content_md5
1178
- # The base64-encoded 128-bit MD5 digest of the message (without the
2584
+ # The Base64 encoded 128-bit `MD5` digest of the message (without the
1179
2585
  # headers) according to RFC 1864. This header can be used as a message
1180
2586
  # integrity check to verify that the data is the same data that was
1181
2587
  # originally sent. Although it is optional, we recommend using the
@@ -1183,54 +2589,300 @@ module Aws::S3
1183
2589
  # information about REST request authentication, see [REST
1184
2590
  # Authentication][1].
1185
2591
  #
2592
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2593
+ # for any request to upload an object with a retention period configured
2594
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2595
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2596
+ # Guide*.
2597
+ #
2598
+ # </note>
2599
+ #
2600
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2601
+ #
2602
+ # </note>
2603
+ #
1186
2604
  #
1187
2605
  #
1188
2606
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
2607
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
1189
2608
  # @option options [String] :content_type
1190
2609
  # A standard MIME type describing the format of the contents. For more
1191
2610
  # information, see
1192
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
2611
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
2612
+ #
2613
+ #
1193
2614
  #
2615
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
2616
+ # @option options [String] :checksum_algorithm
2617
+ # Indicates the algorithm used to create the checksum for the object
2618
+ # when you use the SDK. This header will not provide any additional
2619
+ # functionality if you don't use the SDK. When you send this header,
2620
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
2621
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
2622
+ # with the HTTP status code `400 Bad Request`.
2623
+ #
2624
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
2625
+ # the supported algorithm from the following list:
2626
+ #
2627
+ # * `CRC32`
2628
+ #
2629
+ # * `CRC32C`
2630
+ #
2631
+ # * `CRC64NVME`
2632
+ #
2633
+ # * `SHA1`
2634
+ #
2635
+ # * `SHA256`
2636
+ #
2637
+ # For more information, see [Checking object integrity][1] in the
2638
+ # *Amazon S3 User Guide*.
2639
+ #
2640
+ # If the individual checksum value you provide through
2641
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2642
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
2643
+ # request with a `BadDigest` error.
2644
+ #
2645
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2646
+ # for any request to upload an object with a retention period configured
2647
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2648
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2649
+ # Guide*.
2650
+ #
2651
+ # </note>
2652
+ #
2653
+ # For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2654
+ # is the default checksum algorithm that's used for performance.
2655
+ #
2656
+ #
2657
+ #
2658
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2659
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2660
+ # @option options [String] :checksum_crc32
2661
+ # This header can be used as a data integrity check to verify that the
2662
+ # data received is the same data that was originally sent. This header
2663
+ # specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
2664
+ # For more information, see [Checking object integrity][1] in the
2665
+ # *Amazon S3 User Guide*.
2666
+ #
2667
+ #
2668
+ #
2669
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2670
+ # @option options [String] :checksum_crc32c
2671
+ # This header can be used as a data integrity check to verify that the
2672
+ # data received is the same data that was originally sent. This header
2673
+ # specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
2674
+ # For more information, see [Checking object integrity][1] in the
2675
+ # *Amazon S3 User Guide*.
2676
+ #
2677
+ #
2678
+ #
2679
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2680
+ # @option options [String] :checksum_crc64nvme
2681
+ # This header can be used as a data integrity check to verify that the
2682
+ # data received is the same data that was originally sent. This header
2683
+ # specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
2684
+ # object. The `CRC64NVME` checksum is always a full object checksum. For
2685
+ # more information, see [Checking object integrity in the Amazon S3 User
2686
+ # Guide][1].
2687
+ #
2688
+ #
2689
+ #
2690
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2691
+ # @option options [String] :checksum_sha1
2692
+ # This header can be used as a data integrity check to verify that the
2693
+ # data received is the same data that was originally sent. This header
2694
+ # specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
2695
+ # more information, see [Checking object integrity][1] in the *Amazon S3
2696
+ # User Guide*.
2697
+ #
2698
+ #
2699
+ #
2700
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2701
+ # @option options [String] :checksum_sha256
2702
+ # This header can be used as a data integrity check to verify that the
2703
+ # data received is the same data that was originally sent. This header
2704
+ # specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
2705
+ # For more information, see [Checking object integrity][1] in the
2706
+ # *Amazon S3 User Guide*.
1194
2707
  #
1195
2708
  #
1196
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
2709
+ #
2710
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1197
2711
  # @option options [Time,DateTime,Date,Integer,String] :expires
1198
2712
  # The date and time at which the object is no longer cacheable. For more
1199
2713
  # information, see
1200
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
2714
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
2715
+ #
2716
+ #
2717
+ #
2718
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2719
+ # @option options [String] :if_match
2720
+ # Uploads the object only if the ETag (entity tag) value provided during
2721
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
2722
+ # values do not match, the operation returns a `412 Precondition Failed`
2723
+ # error.
2724
+ #
2725
+ # If a conflicting operation occurs during the upload S3 returns a `409
2726
+ # ConditionalRequestConflict` response. On a 409 failure you should
2727
+ # fetch the object's ETag and retry the upload.
2728
+ #
2729
+ # Expects the ETag value as a string.
2730
+ #
2731
+ # For more information about conditional requests, see [RFC 7232][1], or
2732
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
1201
2733
  #
1202
2734
  #
1203
2735
  #
1204
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
2736
+ # [1]: https://tools.ietf.org/html/rfc7232
2737
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
2738
+ # @option options [String] :if_none_match
2739
+ # Uploads the object only if the object key name does not already exist
2740
+ # in the bucket specified. Otherwise, Amazon S3 returns a `412
2741
+ # Precondition Failed` error.
2742
+ #
2743
+ # If a conflicting operation occurs during the upload S3 returns a `409
2744
+ # ConditionalRequestConflict` response. On a 409 failure you should
2745
+ # retry the upload.
2746
+ #
2747
+ # Expects the '*' (asterisk) character.
2748
+ #
2749
+ # For more information about conditional requests, see [RFC 7232][1], or
2750
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2751
+ #
2752
+ #
2753
+ #
2754
+ # [1]: https://tools.ietf.org/html/rfc7232
2755
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
1205
2756
  # @option options [String] :grant_full_control
1206
2757
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
1207
2758
  # object.
1208
2759
  #
1209
- # This action is not supported by Amazon S3 on Outposts.
2760
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2761
+ #
2762
+ # * This functionality is not supported for Amazon S3 on Outposts.
2763
+ #
2764
+ # </note>
1210
2765
  # @option options [String] :grant_read
1211
2766
  # Allows grantee to read the object data and its metadata.
1212
2767
  #
1213
- # This action is not supported by Amazon S3 on Outposts.
2768
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2769
+ #
2770
+ # * This functionality is not supported for Amazon S3 on Outposts.
2771
+ #
2772
+ # </note>
1214
2773
  # @option options [String] :grant_read_acp
1215
2774
  # Allows grantee to read the object ACL.
1216
2775
  #
1217
- # This action is not supported by Amazon S3 on Outposts.
2776
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2777
+ #
2778
+ # * This functionality is not supported for Amazon S3 on Outposts.
2779
+ #
2780
+ # </note>
1218
2781
  # @option options [String] :grant_write_acp
1219
2782
  # Allows grantee to write the ACL for the applicable object.
1220
2783
  #
1221
- # This action is not supported by Amazon S3 on Outposts.
2784
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2785
+ #
2786
+ # * This functionality is not supported for Amazon S3 on Outposts.
2787
+ #
2788
+ # </note>
2789
+ # @option options [Integer] :write_offset_bytes
2790
+ # Specifies the offset for appending data to existing objects in bytes.
2791
+ # The offset must be equal to the size of the existing object being
2792
+ # appended to. If no object exists, setting this header to 0 will create
2793
+ # a new object.
2794
+ #
2795
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
2796
+ # Express One Zone storage class in directory buckets.
2797
+ #
2798
+ # </note>
1222
2799
  # @option options [Hash<String,String>] :metadata
1223
2800
  # A map of metadata to store with the object in S3.
1224
2801
  # @option options [String] :server_side_encryption
1225
- # The server-side encryption algorithm used when storing this object in
1226
- # Amazon S3 (for example, AES256, aws:kms).
2802
+ # The server-side encryption algorithm that was used when you store this
2803
+ # object in Amazon S3 or Amazon FSx.
2804
+ #
2805
+ # * <b>General purpose buckets </b> - You have four mutually exclusive
2806
+ # options to protect data using server-side encryption in Amazon S3,
2807
+ # depending on how you choose to manage the encryption keys.
2808
+ # Specifically, the encryption key options are Amazon S3 managed keys
2809
+ # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
2810
+ # customer-provided keys (SSE-C). Amazon S3 encrypts data with
2811
+ # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
2812
+ # default. You can optionally tell Amazon S3 to encrypt data at rest
2813
+ # by using server-side encryption with other key options. For more
2814
+ # information, see [Using Server-Side Encryption][1] in the *Amazon S3
2815
+ # User Guide*.
2816
+ #
2817
+ # * <b>Directory buckets </b> - For directory buckets, there are only
2818
+ # two supported options for server-side encryption: server-side
2819
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
2820
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
2821
+ # recommend that the bucket's default encryption uses the desired
2822
+ # encryption configuration and you don't override the bucket default
2823
+ # encryption in your `CreateSession` requests or `PUT` object
2824
+ # requests. Then, new objects are automatically encrypted with the
2825
+ # desired encryption settings. For more information, see [Protecting
2826
+ # data with server-side encryption][2] in the *Amazon S3 User Guide*.
2827
+ # For more information about the encryption overriding behaviors in
2828
+ # directory buckets, see [Specifying server-side encryption with KMS
2829
+ # for new object uploads][3].
2830
+ #
2831
+ # In the Zonal endpoint API calls (except [CopyObject][4] and
2832
+ # [UploadPartCopy][5]) using the REST API, the encryption request
2833
+ # headers must match the encryption settings that are specified in the
2834
+ # `CreateSession` request. You can't override the values of the
2835
+ # encryption settings (`x-amz-server-side-encryption`,
2836
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
2837
+ # `x-amz-server-side-encryption-context`, and
2838
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
2839
+ # specified in the `CreateSession` request. You don't need to
2840
+ # explicitly specify these encryption settings values in Zonal
2841
+ # endpoint API calls, and Amazon S3 will use the encryption settings
2842
+ # values from the `CreateSession` request to protect new objects in
2843
+ # the directory bucket.
2844
+ #
2845
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
2846
+ # `CreateSession`, the session token refreshes automatically to avoid
2847
+ # service interruptions when a session expires. The CLI or the Amazon
2848
+ # Web Services SDKs use the bucket's default encryption configuration
2849
+ # for the `CreateSession` request. It's not supported to override the
2850
+ # encryption settings values in the `CreateSession` request. So in the
2851
+ # Zonal endpoint API calls (except [CopyObject][4] and
2852
+ # [UploadPartCopy][5]), the encryption request headers must match the
2853
+ # default encryption configuration of the directory bucket.
2854
+ #
2855
+ # </note>
2856
+ #
2857
+ # * <b>S3 access points for Amazon FSx </b> - When accessing data stored
2858
+ # in Amazon FSx file systems using S3 access points, the only valid
2859
+ # server side encryption option is `aws:fsx`. All Amazon FSx file
2860
+ # systems have encryption configured by default and are encrypted at
2861
+ # rest. Data is automatically encrypted before being written to the
2862
+ # file system, and automatically decrypted as it is read. These
2863
+ # processes are handled transparently by Amazon FSx.
2864
+ #
2865
+ #
2866
+ #
2867
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
2868
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
2869
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
2870
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
2871
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
1227
2872
  # @option options [String] :storage_class
1228
2873
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1229
2874
  # created objects. The STANDARD storage class provides high durability
1230
2875
  # and high availability. Depending on performance needs, you can specify
1231
- # a different Storage Class. Amazon S3 on Outposts only uses the
1232
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1233
- # in the *Amazon S3 User Guide*.
2876
+ # a different Storage Class. For more information, see [Storage
2877
+ # Classes][1] in the *Amazon S3 User Guide*.
2878
+ #
2879
+ # <note markdown="1"> * Directory buckets only support `EXPRESS_ONEZONE` (the S3 Express One
2880
+ # Zone storage class) in Availability Zones and `ONEZONE_IA` (the S3
2881
+ # One Zone-Infrequent Access storage class) in Dedicated Local Zones.
2882
+ #
2883
+ # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
2884
+ #
2885
+ # </note>
1234
2886
  #
1235
2887
  #
1236
2888
  #
@@ -1239,7 +2891,8 @@ module Aws::S3
1239
2891
  # If the bucket is configured as a website, redirects requests for this
1240
2892
  # object to another object in the same bucket or to an external URL.
1241
2893
  # Amazon S3 stores the value of this header in the object metadata. For
1242
- # information about object metadata, see [Object Key and Metadata][1].
2894
+ # information about object metadata, see [Object Key and Metadata][1] in
2895
+ # the *Amazon S3 User Guide*.
1243
2896
  #
1244
2897
  # In the following example, the request header sets the redirect to an
1245
2898
  # object (anotherPage.html) in the same bucket:
@@ -1253,7 +2906,11 @@ module Aws::S3
1253
2906
  #
1254
2907
  # For more information about website hosting in Amazon S3, see [Hosting
1255
2908
  # Websites on Amazon S3][2] and [How to Configure Website Page
1256
- # Redirects][3].
2909
+ # Redirects][3] in the *Amazon S3 User Guide*.
2910
+ #
2911
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2912
+ #
2913
+ # </note>
1257
2914
  #
1258
2915
  #
1259
2916
  #
@@ -1261,76 +2918,169 @@ module Aws::S3
1261
2918
  # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
1262
2919
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
1263
2920
  # @option options [String] :sse_customer_algorithm
1264
- # Specifies the algorithm to use to when encrypting the object (for
1265
- # example, AES256).
2921
+ # Specifies the algorithm to use when encrypting the object (for
2922
+ # example, `AES256`).
2923
+ #
2924
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2925
+ #
2926
+ # </note>
1266
2927
  # @option options [String] :sse_customer_key
1267
2928
  # Specifies the customer-provided encryption key for Amazon S3 to use in
1268
2929
  # encrypting data. This value is used to store the object and then it is
1269
2930
  # discarded; Amazon S3 does not store the encryption key. The key must
1270
2931
  # be appropriate for use with the algorithm specified in the
1271
2932
  # `x-amz-server-side-encryption-customer-algorithm` header.
2933
+ #
2934
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2935
+ #
2936
+ # </note>
1272
2937
  # @option options [String] :sse_customer_key_md5
1273
2938
  # Specifies the 128-bit MD5 digest of the encryption key according to
1274
2939
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1275
2940
  # ensure that the encryption key was transmitted without error.
2941
+ #
2942
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2943
+ #
2944
+ # </note>
1276
2945
  # @option options [String] :ssekms_key_id
1277
- # If `x-amz-server-side-encryption` is present and has the value of
1278
- # `aws:kms`, this header specifies the ID of the Amazon Web Services Key
1279
- # Management Service (Amazon Web Services KMS) symmetrical customer
1280
- # managed key that was used for the object. If you specify
1281
- # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1282
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1283
- # Amazon Web Services managed key to protect the data. If the KMS key
1284
- # does not exist in the same account issuing the command, you must use
1285
- # the full ARN and not just the ID.
2946
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
2947
+ # object encryption. If the KMS key doesn't exist in the same account
2948
+ # that's issuing the command, you must use the full Key ARN not the Key
2949
+ # ID.
2950
+ #
2951
+ # **General purpose buckets** - If you specify
2952
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
2953
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
2954
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
2955
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
2956
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
2957
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
2958
+ #
2959
+ # **Directory buckets** - To encrypt data using SSE-KMS, it's
2960
+ # recommended to specify the `x-amz-server-side-encryption` header to
2961
+ # `aws:kms`. Then, the `x-amz-server-side-encryption-aws-kms-key-id`
2962
+ # header implicitly uses the bucket's default KMS customer managed key
2963
+ # ID. If you want to explicitly set the `
2964
+ # x-amz-server-side-encryption-aws-kms-key-id` header, it must match the
2965
+ # bucket's default customer managed key (using key ID or ARN, not
2966
+ # alias). Your SSE-KMS configuration can only support 1 [customer
2967
+ # managed key][1] per directory bucket's lifetime. The [Amazon Web
2968
+ # Services managed key][2] (`aws/s3`) isn't supported. Incorrect key
2969
+ # specification results in an HTTP `400 Bad Request` error.
2970
+ #
2971
+ #
2972
+ #
2973
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
2974
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
1286
2975
  # @option options [String] :ssekms_encryption_context
1287
- # Specifies the Amazon Web Services KMS Encryption Context to use for
1288
- # object encryption. The value of this header is a base64-encoded UTF-8
1289
- # string holding JSON with the encryption context key-value pairs.
2976
+ # Specifies the Amazon Web Services KMS Encryption Context as an
2977
+ # additional encryption context to use for object encryption. The value
2978
+ # of this header is a Base64 encoded string of a UTF-8 encoded JSON,
2979
+ # which contains the encryption context as key-value pairs. This value
2980
+ # is stored as object metadata and automatically gets passed on to
2981
+ # Amazon Web Services KMS for future `GetObject` operations on this
2982
+ # object.
2983
+ #
2984
+ # **General purpose buckets** - This value must be explicitly added
2985
+ # during `CopyObject` operations if you want an additional encryption
2986
+ # context for your object. For more information, see [Encryption
2987
+ # context][1] in the *Amazon S3 User Guide*.
2988
+ #
2989
+ # **Directory buckets** - You can optionally provide an explicit
2990
+ # encryption context value. The value must match the default encryption
2991
+ # context - the bucket Amazon Resource Name (ARN). An additional
2992
+ # encryption context value is not supported.
2993
+ #
2994
+ #
2995
+ #
2996
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
1290
2997
  # @option options [Boolean] :bucket_key_enabled
1291
2998
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1292
- # encryption with server-side encryption using AWS KMS (SSE-KMS).
1293
- # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1294
- # for object encryption with SSE-KMS.
2999
+ # encryption with server-side encryption using Key Management Service
3000
+ # (KMS) keys (SSE-KMS).
1295
3001
  #
1296
- # Specifying this header with a PUT action doesn’t affect bucket-level
1297
- # settings for S3 Bucket Key.
3002
+ # **General purpose buckets** - Setting this header to `true` causes
3003
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
3004
+ # Also, specifying this header with a PUT action doesn't affect
3005
+ # bucket-level settings for S3 Bucket Key.
3006
+ #
3007
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
3008
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
3009
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
3010
+ # from general purpose buckets to directory buckets, from directory
3011
+ # buckets to general purpose buckets, or between directory buckets,
3012
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
3013
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
3014
+ # makes a call to KMS every time a copy request is made for a
3015
+ # KMS-encrypted object.
3016
+ #
3017
+ #
3018
+ #
3019
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
3020
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
3021
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
3022
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
1298
3023
  # @option options [String] :request_payer
1299
3024
  # Confirms that the requester knows that they will be charged for the
1300
3025
  # request. Bucket owners need not specify this parameter in their
1301
- # requests. For information about downloading objects from requester
1302
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
3026
+ # requests. If either the source or destination S3 bucket has Requester
3027
+ # Pays enabled, the requester will pay for corresponding charges to copy
3028
+ # the object. For information about downloading objects from Requester
3029
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1303
3030
  # in the *Amazon S3 User Guide*.
1304
3031
  #
3032
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3033
+ #
3034
+ # </note>
3035
+ #
1305
3036
  #
1306
3037
  #
1307
3038
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1308
3039
  # @option options [String] :tagging
1309
3040
  # The tag-set for the object. The tag-set must be encoded as URL Query
1310
3041
  # parameters. (For example, "Key1=Value1")
3042
+ #
3043
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3044
+ #
3045
+ # </note>
1311
3046
  # @option options [String] :object_lock_mode
1312
3047
  # The Object Lock mode that you want to apply to this object.
3048
+ #
3049
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3050
+ #
3051
+ # </note>
1313
3052
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
1314
3053
  # The date and time when you want this object's Object Lock to expire.
1315
3054
  # Must be formatted as a timestamp parameter.
3055
+ #
3056
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3057
+ #
3058
+ # </note>
1316
3059
  # @option options [String] :object_lock_legal_hold_status
1317
3060
  # Specifies whether a legal hold will be applied to this object. For
1318
- # more information about S3 Object Lock, see [Object Lock][1].
3061
+ # more information about S3 Object Lock, see [Object Lock][1] in the
3062
+ # *Amazon S3 User Guide*.
3063
+ #
3064
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3065
+ #
3066
+ # </note>
1319
3067
  #
1320
3068
  #
1321
3069
  #
1322
3070
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1323
3071
  # @option options [String] :expected_bucket_owner
1324
- # The account ID of the expected bucket owner. If the bucket is owned by
1325
- # a different account, the request will fail with an HTTP `403 (Access
1326
- # Denied)` error.
3072
+ # The account ID of the expected bucket owner. If the account ID that
3073
+ # you provide does not match the actual owner of the bucket, the request
3074
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1327
3075
  # @return [Types::PutObjectOutput]
1328
3076
  def put(options = {})
1329
3077
  options = options.merge(
1330
3078
  bucket: @bucket_name,
1331
3079
  key: @key
1332
3080
  )
1333
- resp = @client.put_object(options)
3081
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
3082
+ @client.put_object(options)
3083
+ end
1334
3084
  resp.data
1335
3085
  end
1336
3086
 
@@ -1384,7 +3134,7 @@ module Aws::S3
1384
3134
  # bucket_name: "BucketName", # required
1385
3135
  # prefix: "LocationPrefix", # required
1386
3136
  # encryption: {
1387
- # encryption_type: "AES256", # required, accepts AES256, aws:kms
3137
+ # encryption_type: "AES256", # required, accepts AES256, aws:fsx, aws:kms, aws:kms:dsse
1388
3138
  # kms_key_id: "SSEKMSKeyId",
1389
3139
  # kms_context: "KMSContext",
1390
3140
  # },
@@ -1415,11 +3165,12 @@ module Aws::S3
1415
3165
  # value: "MetadataValue",
1416
3166
  # },
1417
3167
  # ],
1418
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
3168
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE, FSX_OPENZFS
1419
3169
  # },
1420
3170
  # },
1421
3171
  # },
1422
3172
  # request_payer: "requester", # accepts requester
3173
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1423
3174
  # expected_bucket_owner: "AccountId",
1424
3175
  # })
1425
3176
  # @param [Hash] options ({})
@@ -1430,24 +3181,47 @@ module Aws::S3
1430
3181
  # @option options [String] :request_payer
1431
3182
  # Confirms that the requester knows that they will be charged for the
1432
3183
  # request. Bucket owners need not specify this parameter in their
1433
- # requests. For information about downloading objects from requester
1434
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
3184
+ # requests. If either the source or destination S3 bucket has Requester
3185
+ # Pays enabled, the requester will pay for corresponding charges to copy
3186
+ # the object. For information about downloading objects from Requester
3187
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1435
3188
  # in the *Amazon S3 User Guide*.
1436
3189
  #
3190
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3191
+ #
3192
+ # </note>
3193
+ #
1437
3194
  #
1438
3195
  #
1439
3196
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
3197
+ # @option options [String] :checksum_algorithm
3198
+ # Indicates the algorithm used to create the checksum for the object
3199
+ # when you use the SDK. This header will not provide any additional
3200
+ # functionality if you don't use the SDK. When you send this header,
3201
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
3202
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
3203
+ # status code `400 Bad Request`. For more information, see [Checking
3204
+ # object integrity][1] in the *Amazon S3 User Guide*.
3205
+ #
3206
+ # If you provide an individual checksum, Amazon S3 ignores any provided
3207
+ # `ChecksumAlgorithm` parameter.
3208
+ #
3209
+ #
3210
+ #
3211
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1440
3212
  # @option options [String] :expected_bucket_owner
1441
- # The account ID of the expected bucket owner. If the bucket is owned by
1442
- # a different account, the request will fail with an HTTP `403 (Access
1443
- # Denied)` error.
3213
+ # The account ID of the expected bucket owner. If the account ID that
3214
+ # you provide does not match the actual owner of the bucket, the request
3215
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1444
3216
  # @return [Types::RestoreObjectOutput]
1445
3217
  def restore_object(options = {})
1446
3218
  options = options.merge(
1447
3219
  bucket: @bucket_name,
1448
3220
  key: @key
1449
3221
  )
1450
- resp = @client.restore_object(options)
3222
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
3223
+ @client.restore_object(options)
3224
+ end
1451
3225
  resp.data
1452
3226
  end
1453
3227
 
@@ -1459,6 +3233,12 @@ module Aws::S3
1459
3233
  # if_none_match: "IfNoneMatch",
1460
3234
  # if_unmodified_since: Time.now,
1461
3235
  # range: "Range",
3236
+ # response_cache_control: "ResponseCacheControl",
3237
+ # response_content_disposition: "ResponseContentDisposition",
3238
+ # response_content_encoding: "ResponseContentEncoding",
3239
+ # response_content_language: "ResponseContentLanguage",
3240
+ # response_content_type: "ResponseContentType",
3241
+ # response_expires: Time.now,
1462
3242
  # version_id: "ObjectVersionId",
1463
3243
  # sse_customer_algorithm: "SSECustomerAlgorithm",
1464
3244
  # sse_customer_key: "SSECustomerKey",
@@ -1466,55 +3246,143 @@ module Aws::S3
1466
3246
  # request_payer: "requester", # accepts requester
1467
3247
  # part_number: 1,
1468
3248
  # expected_bucket_owner: "AccountId",
3249
+ # checksum_mode: "ENABLED", # accepts ENABLED
1469
3250
  # })
1470
3251
  # @param [Hash] options ({})
1471
3252
  # @option options [String] :if_match
1472
3253
  # Return the object only if its entity tag (ETag) is the same as the one
1473
- # specified, otherwise return a 412 (precondition failed).
3254
+ # specified; otherwise, return a 412 (precondition failed) error.
3255
+ #
3256
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
3257
+ # present in the request as follows:
3258
+ #
3259
+ # * `If-Match` condition evaluates to `true`, and;
3260
+ #
3261
+ # * `If-Unmodified-Since` condition evaluates to `false`;
3262
+ #
3263
+ # Then Amazon S3 returns `200 OK` and the data requested.
3264
+ #
3265
+ # For more information about conditional requests, see [RFC 7232][1].
3266
+ #
3267
+ #
3268
+ #
3269
+ # [1]: https://tools.ietf.org/html/rfc7232
1474
3270
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
1475
3271
  # Return the object only if it has been modified since the specified
1476
- # time, otherwise return a 304 (not modified).
3272
+ # time; otherwise, return a 304 (not modified) error.
3273
+ #
3274
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
3275
+ # present in the request as follows:
3276
+ #
3277
+ # * `If-None-Match` condition evaluates to `false`, and;
3278
+ #
3279
+ # * `If-Modified-Since` condition evaluates to `true`;
3280
+ #
3281
+ # Then Amazon S3 returns the `304 Not Modified` response code.
3282
+ #
3283
+ # For more information about conditional requests, see [RFC 7232][1].
3284
+ #
3285
+ #
3286
+ #
3287
+ # [1]: https://tools.ietf.org/html/rfc7232
1477
3288
  # @option options [String] :if_none_match
1478
3289
  # Return the object only if its entity tag (ETag) is different from the
1479
- # one specified, otherwise return a 304 (not modified).
3290
+ # one specified; otherwise, return a 304 (not modified) error.
3291
+ #
3292
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
3293
+ # present in the request as follows:
3294
+ #
3295
+ # * `If-None-Match` condition evaluates to `false`, and;
3296
+ #
3297
+ # * `If-Modified-Since` condition evaluates to `true`;
3298
+ #
3299
+ # Then Amazon S3 returns the `304 Not Modified` response code.
3300
+ #
3301
+ # For more information about conditional requests, see [RFC 7232][1].
3302
+ #
3303
+ #
3304
+ #
3305
+ # [1]: https://tools.ietf.org/html/rfc7232
1480
3306
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
1481
3307
  # Return the object only if it has not been modified since the specified
1482
- # time, otherwise return a 412 (precondition failed).
1483
- # @option options [String] :range
1484
- # Downloads the specified range bytes of an object. For more information
1485
- # about the HTTP Range header, see
1486
- # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
3308
+ # time; otherwise, return a 412 (precondition failed) error.
1487
3309
  #
1488
- # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
1489
- # `GET` request.
3310
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
3311
+ # present in the request as follows:
1490
3312
  #
1491
- # </note>
3313
+ # * `If-Match` condition evaluates to `true`, and;
3314
+ #
3315
+ # * `If-Unmodified-Since` condition evaluates to `false`;
3316
+ #
3317
+ # Then Amazon S3 returns `200 OK` and the data requested.
1492
3318
  #
3319
+ # For more information about conditional requests, see [RFC 7232][1].
1493
3320
  #
1494
3321
  #
1495
- # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
3322
+ #
3323
+ # [1]: https://tools.ietf.org/html/rfc7232
3324
+ # @option options [String] :range
3325
+ # HeadObject returns only the metadata for an object. If the Range is
3326
+ # satisfiable, only the `ContentLength` is affected in the response. If
3327
+ # the Range is not satisfiable, S3 returns a `416 - Requested Range Not
3328
+ # Satisfiable` error.
3329
+ # @option options [String] :response_cache_control
3330
+ # Sets the `Cache-Control` header of the response.
3331
+ # @option options [String] :response_content_disposition
3332
+ # Sets the `Content-Disposition` header of the response.
3333
+ # @option options [String] :response_content_encoding
3334
+ # Sets the `Content-Encoding` header of the response.
3335
+ # @option options [String] :response_content_language
3336
+ # Sets the `Content-Language` header of the response.
3337
+ # @option options [String] :response_content_type
3338
+ # Sets the `Content-Type` header of the response.
3339
+ # @option options [Time,DateTime,Date,Integer,String] :response_expires
3340
+ # Sets the `Expires` header of the response.
1496
3341
  # @option options [String] :version_id
1497
- # VersionId used to reference a specific version of the object.
3342
+ # Version ID used to reference a specific version of the object.
3343
+ #
3344
+ # <note markdown="1"> For directory buckets in this API operation, only the `null` value of
3345
+ # the version ID is supported.
3346
+ #
3347
+ # </note>
1498
3348
  # @option options [String] :sse_customer_algorithm
1499
- # Specifies the algorithm to use to when encrypting the object (for
3349
+ # Specifies the algorithm to use when encrypting the object (for
1500
3350
  # example, AES256).
3351
+ #
3352
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3353
+ #
3354
+ # </note>
1501
3355
  # @option options [String] :sse_customer_key
1502
3356
  # Specifies the customer-provided encryption key for Amazon S3 to use in
1503
3357
  # encrypting data. This value is used to store the object and then it is
1504
3358
  # discarded; Amazon S3 does not store the encryption key. The key must
1505
3359
  # be appropriate for use with the algorithm specified in the
1506
3360
  # `x-amz-server-side-encryption-customer-algorithm` header.
3361
+ #
3362
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3363
+ #
3364
+ # </note>
1507
3365
  # @option options [String] :sse_customer_key_md5
1508
3366
  # Specifies the 128-bit MD5 digest of the encryption key according to
1509
3367
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1510
3368
  # ensure that the encryption key was transmitted without error.
3369
+ #
3370
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3371
+ #
3372
+ # </note>
1511
3373
  # @option options [String] :request_payer
1512
3374
  # Confirms that the requester knows that they will be charged for the
1513
3375
  # request. Bucket owners need not specify this parameter in their
1514
- # requests. For information about downloading objects from requester
1515
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
3376
+ # requests. If either the source or destination S3 bucket has Requester
3377
+ # Pays enabled, the requester will pay for corresponding charges to copy
3378
+ # the object. For information about downloading objects from Requester
3379
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1516
3380
  # in the *Amazon S3 User Guide*.
1517
3381
  #
3382
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3383
+ #
3384
+ # </note>
3385
+ #
1518
3386
  #
1519
3387
  #
1520
3388
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
@@ -1524,16 +3392,35 @@ module Aws::S3
1524
3392
  # for the part specified. Useful querying about the size of the part and
1525
3393
  # the number of parts in this object.
1526
3394
  # @option options [String] :expected_bucket_owner
1527
- # The account ID of the expected bucket owner. If the bucket is owned by
1528
- # a different account, the request will fail with an HTTP `403 (Access
1529
- # Denied)` error.
3395
+ # The account ID of the expected bucket owner. If the account ID that
3396
+ # you provide does not match the actual owner of the bucket, the request
3397
+ # fails with the HTTP status code `403 Forbidden` (access denied).
3398
+ # @option options [String] :checksum_mode
3399
+ # To retrieve the checksum, this parameter must be enabled.
3400
+ #
3401
+ # **General purpose buckets** - If you enable checksum mode and the
3402
+ # object is uploaded with a [checksum][1] and encrypted with an Key
3403
+ # Management Service (KMS) key, you must have permission to use the
3404
+ # `kms:Decrypt` action to retrieve the checksum.
3405
+ #
3406
+ # **Directory buckets** - If you enable `ChecksumMode` and the object is
3407
+ # encrypted with Amazon Web Services Key Management Service (Amazon Web
3408
+ # Services KMS), you must also have the `kms:GenerateDataKey` and
3409
+ # `kms:Decrypt` permissions in IAM identity-based policies and KMS key
3410
+ # policies for the KMS key to retrieve the checksum of the object.
3411
+ #
3412
+ #
3413
+ #
3414
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
1530
3415
  # @return [Types::HeadObjectOutput]
1531
3416
  def head(options = {})
1532
3417
  options = options.merge(
1533
3418
  bucket: @bucket_name,
1534
3419
  key: @key
1535
3420
  )
1536
- resp = @client.head_object(options)
3421
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
3422
+ @client.head_object(options)
3423
+ end
1537
3424
  resp.data
1538
3425
  end
1539
3426
 
@@ -1650,6 +3537,7 @@ module Aws::S3
1650
3537
  # request_payer: "requester", # accepts requester
1651
3538
  # bypass_governance_retention: false,
1652
3539
  # expected_bucket_owner: "AccountId",
3540
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
1653
3541
  # })
1654
3542
  # @param options ({})
1655
3543
  # @option options [String] :mfa
@@ -1657,24 +3545,86 @@ module Aws::S3
1657
3545
  # space, and the value that is displayed on your authentication device.
1658
3546
  # Required to permanently delete a versioned object if versioning is
1659
3547
  # configured with MFA delete enabled.
3548
+ #
3549
+ # When performing the `DeleteObjects` operation on an MFA delete enabled
3550
+ # bucket, which attempts to delete the specified versioned objects, you
3551
+ # must include an MFA token. If you don't provide an MFA token, the
3552
+ # entire request will fail, even if there are non-versioned objects that
3553
+ # you are trying to delete. If you provide an invalid token, whether
3554
+ # there are versioned object keys in the request or not, the entire
3555
+ # Multi-Object Delete request will fail. For information about MFA
3556
+ # Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
3557
+ #
3558
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3559
+ #
3560
+ # </note>
3561
+ #
3562
+ #
3563
+ #
3564
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
1660
3565
  # @option options [String] :request_payer
1661
3566
  # Confirms that the requester knows that they will be charged for the
1662
3567
  # request. Bucket owners need not specify this parameter in their
1663
- # requests. For information about downloading objects from requester
1664
- # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
3568
+ # requests. If either the source or destination S3 bucket has Requester
3569
+ # Pays enabled, the requester will pay for corresponding charges to copy
3570
+ # the object. For information about downloading objects from Requester
3571
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1665
3572
  # in the *Amazon S3 User Guide*.
1666
3573
  #
3574
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3575
+ #
3576
+ # </note>
3577
+ #
1667
3578
  #
1668
3579
  #
1669
3580
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1670
3581
  # @option options [Boolean] :bypass_governance_retention
1671
3582
  # Specifies whether you want to delete this object even if it has a
1672
3583
  # Governance-type Object Lock in place. To use this header, you must
1673
- # have the `s3:PutBucketPublicAccessBlock` permission.
3584
+ # have the `s3:BypassGovernanceRetention` permission.
3585
+ #
3586
+ # <note markdown="1"> This functionality is not supported for directory buckets.
3587
+ #
3588
+ # </note>
1674
3589
  # @option options [String] :expected_bucket_owner
1675
- # The account ID of the expected bucket owner. If the bucket is owned by
1676
- # a different account, the request will fail with an HTTP `403 (Access
1677
- # Denied)` error.
3590
+ # The account ID of the expected bucket owner. If the account ID that
3591
+ # you provide does not match the actual owner of the bucket, the request
3592
+ # fails with the HTTP status code `403 Forbidden` (access denied).
3593
+ # @option options [String] :checksum_algorithm
3594
+ # Indicates the algorithm used to create the checksum for the object
3595
+ # when you use the SDK. This header will not provide any additional
3596
+ # functionality if you don't use the SDK. When you send this header,
3597
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
3598
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
3599
+ # with the HTTP status code `400 Bad Request`.
3600
+ #
3601
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
3602
+ # the supported algorithm from the following list:
3603
+ #
3604
+ # * `CRC32`
3605
+ #
3606
+ # * `CRC32C`
3607
+ #
3608
+ # * `CRC64NVME`
3609
+ #
3610
+ # * `SHA1`
3611
+ #
3612
+ # * `SHA256`
3613
+ #
3614
+ # For more information, see [Checking object integrity][1] in the
3615
+ # *Amazon S3 User Guide*.
3616
+ #
3617
+ # If the individual checksum value you provide through
3618
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
3619
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
3620
+ # request with a `BadDigest` error.
3621
+ #
3622
+ # If you provide an individual checksum, Amazon S3 ignores any provided
3623
+ # `ChecksumAlgorithm` parameter.
3624
+ #
3625
+ #
3626
+ #
3627
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1678
3628
  # @return [void]
1679
3629
  def batch_delete!(options = {})
1680
3630
  batch_enum.each do |batch|
@@ -1687,7 +3637,9 @@ module Aws::S3
1687
3637
  key: item.key
1688
3638
  }
1689
3639
  end
1690
- batch[0].client.delete_objects(params)
3640
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
3641
+ batch[0].client.delete_objects(params)
3642
+ end
1691
3643
  end
1692
3644
  nil
1693
3645
  end
@@ -1697,3 +3649,6 @@ module Aws::S3
1697
3649
  end
1698
3650
  end
1699
3651
  end
3652
+
3653
+ # Load customizations if they exist
3654
+ require 'aws-sdk-s3/customizations/object'