aws-sdk-s3 1.136.0 → 1.208.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 (119) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +452 -1
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  6. data/lib/aws-sdk-s3/bucket.rb +728 -145
  7. data/lib/aws-sdk-s3/bucket_acl.rb +19 -18
  8. data/lib/aws-sdk-s3/bucket_cors.rb +22 -21
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +23 -18
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +76 -19
  11. data/lib/aws-sdk-s3/bucket_logging.rb +21 -14
  12. data/lib/aws-sdk-s3/bucket_notification.rb +6 -6
  13. data/lib/aws-sdk-s3/bucket_policy.rb +65 -20
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +15 -15
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +19 -19
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +74 -41
  18. data/lib/aws-sdk-s3/bucket_website.rb +19 -19
  19. data/lib/aws-sdk-s3/client.rb +9951 -3365
  20. data/lib/aws-sdk-s3/client_api.rb +758 -164
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
  22. data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
  23. data/lib/aws-sdk-s3/customizations/object.rb +87 -91
  24. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  25. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  26. data/lib/aws-sdk-s3/customizations.rb +28 -31
  27. data/lib/aws-sdk-s3/default_executor.rb +103 -0
  28. data/lib/aws-sdk-s3/encryption/client.rb +4 -4
  29. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +2 -0
  30. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +2 -0
  31. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +4 -2
  32. data/lib/aws-sdk-s3/encryptionV2/client.rb +100 -25
  33. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +7 -162
  34. data/lib/aws-sdk-s3/encryptionV2/decryption.rb +205 -0
  35. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +17 -0
  36. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +2 -0
  37. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +2 -0
  38. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -2
  39. data/lib/aws-sdk-s3/encryptionV2/utils.rb +5 -0
  40. data/lib/aws-sdk-s3/encryptionV3/client.rb +885 -0
  41. data/lib/aws-sdk-s3/encryptionV3/decrypt_handler.rb +98 -0
  42. data/lib/aws-sdk-s3/encryptionV3/decryption.rb +244 -0
  43. data/lib/aws-sdk-s3/encryptionV3/default_cipher_provider.rb +159 -0
  44. data/lib/aws-sdk-s3/encryptionV3/default_key_provider.rb +35 -0
  45. data/lib/aws-sdk-s3/encryptionV3/encrypt_handler.rb +98 -0
  46. data/lib/aws-sdk-s3/encryptionV3/errors.rb +47 -0
  47. data/lib/aws-sdk-s3/encryptionV3/io_auth_decrypter.rb +60 -0
  48. data/lib/aws-sdk-s3/encryptionV3/io_decrypter.rb +35 -0
  49. data/lib/aws-sdk-s3/encryptionV3/io_encrypter.rb +84 -0
  50. data/lib/aws-sdk-s3/encryptionV3/key_provider.rb +28 -0
  51. data/lib/aws-sdk-s3/encryptionV3/kms_cipher_provider.rb +159 -0
  52. data/lib/aws-sdk-s3/encryptionV3/materials.rb +58 -0
  53. data/lib/aws-sdk-s3/encryptionV3/utils.rb +321 -0
  54. data/lib/aws-sdk-s3/encryption_v2.rb +1 -0
  55. data/lib/aws-sdk-s3/encryption_v3.rb +24 -0
  56. data/lib/aws-sdk-s3/endpoint_parameters.rb +65 -30
  57. data/lib/aws-sdk-s3/endpoint_provider.rb +604 -227
  58. data/lib/aws-sdk-s3/endpoints.rb +655 -1261
  59. data/lib/aws-sdk-s3/errors.rb +58 -0
  60. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  61. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  62. data/lib/aws-sdk-s3/file_downloader.rb +192 -147
  63. data/lib/aws-sdk-s3/file_uploader.rb +10 -14
  64. data/lib/aws-sdk-s3/legacy_signer.rb +2 -1
  65. data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
  66. data/lib/aws-sdk-s3/multipart_file_uploader.rb +106 -103
  67. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +99 -109
  68. data/lib/aws-sdk-s3/multipart_upload.rb +185 -38
  69. data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
  70. data/lib/aws-sdk-s3/multipart_upload_part.rb +205 -68
  71. data/lib/aws-sdk-s3/object.rb +2052 -315
  72. data/lib/aws-sdk-s3/object_acl.rb +46 -28
  73. data/lib/aws-sdk-s3/object_copier.rb +1 -1
  74. data/lib/aws-sdk-s3/object_multipart_copier.rb +12 -9
  75. data/lib/aws-sdk-s3/object_summary.rb +1778 -262
  76. data/lib/aws-sdk-s3/object_version.rb +400 -68
  77. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  78. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  79. data/lib/aws-sdk-s3/plugins/endpoints.rb +32 -208
  80. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
  81. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
  82. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  83. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -70
  84. data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
  85. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +5 -7
  86. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
  87. data/lib/aws-sdk-s3/presigner.rb +9 -7
  88. data/lib/aws-sdk-s3/resource.rb +127 -22
  89. data/lib/aws-sdk-s3/transfer_manager.rb +303 -0
  90. data/lib/aws-sdk-s3/types.rb +8065 -1783
  91. data/lib/aws-sdk-s3.rb +35 -31
  92. data/sig/bucket.rbs +231 -0
  93. data/sig/bucket_acl.rbs +78 -0
  94. data/sig/bucket_cors.rbs +69 -0
  95. data/sig/bucket_lifecycle.rbs +88 -0
  96. data/sig/bucket_lifecycle_configuration.rbs +115 -0
  97. data/sig/bucket_logging.rbs +76 -0
  98. data/sig/bucket_notification.rbs +114 -0
  99. data/sig/bucket_policy.rbs +59 -0
  100. data/sig/bucket_request_payment.rbs +54 -0
  101. data/sig/bucket_tagging.rbs +65 -0
  102. data/sig/bucket_versioning.rbs +77 -0
  103. data/sig/bucket_website.rbs +93 -0
  104. data/sig/client.rbs +2612 -0
  105. data/sig/customizations/bucket.rbs +19 -0
  106. data/sig/customizations/object.rbs +38 -0
  107. data/sig/customizations/object_summary.rbs +35 -0
  108. data/sig/errors.rbs +44 -0
  109. data/sig/multipart_upload.rbs +120 -0
  110. data/sig/multipart_upload_part.rbs +109 -0
  111. data/sig/object.rbs +464 -0
  112. data/sig/object_acl.rbs +86 -0
  113. data/sig/object_summary.rbs +347 -0
  114. data/sig/object_version.rbs +143 -0
  115. data/sig/resource.rbs +141 -0
  116. data/sig/types.rbs +2899 -0
  117. data/sig/waiters.rbs +95 -0
  118. metadata +61 -12
  119. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
@@ -62,6 +62,18 @@ module Aws::S3
62
62
  data[:checksum_algorithm]
63
63
  end
64
64
 
65
+ # The checksum type that is used to calculate the object’s checksum
66
+ # value. For more information, see [Checking object integrity][1] in the
67
+ # *Amazon S3 User Guide*.
68
+ #
69
+ #
70
+ #
71
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
72
+ # @return [String]
73
+ def checksum_type
74
+ data[:checksum_type]
75
+ end
76
+
65
77
  # Size in bytes of the object.
66
78
  # @return [Integer]
67
79
  def size
@@ -93,7 +105,7 @@ module Aws::S3
93
105
  data[:is_latest]
94
106
  end
95
107
 
96
- # Date and time the object was last modified.
108
+ # Date and time when the object was last modified.
97
109
  # @return [Time]
98
110
  def last_modified
99
111
  data[:last_modified]
@@ -243,7 +255,7 @@ module Aws::S3
243
255
  :retry
244
256
  end
245
257
  end
246
- Aws::Plugins::UserAgent.feature('resource') do
258
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
247
259
  Aws::Waiters::Waiter.new(options).wait({})
248
260
  end
249
261
  end
@@ -257,6 +269,9 @@ module Aws::S3
257
269
  # request_payer: "requester", # accepts requester
258
270
  # bypass_governance_retention: false,
259
271
  # expected_bucket_owner: "AccountId",
272
+ # if_match: "IfMatch",
273
+ # if_match_last_modified_time: Time.now,
274
+ # if_match_size: 1,
260
275
  # })
261
276
  # @param [Hash] options ({})
262
277
  # @option options [String] :mfa
@@ -264,14 +279,22 @@ module Aws::S3
264
279
  # space, and the value that is displayed on your authentication device.
265
280
  # Required to permanently delete a versioned object if versioning is
266
281
  # configured with MFA delete enabled.
282
+ #
283
+ # <note markdown="1"> This functionality is not supported for directory buckets.
284
+ #
285
+ # </note>
267
286
  # @option options [String] :request_payer
268
287
  # Confirms that the requester knows that they will be charged for the
269
288
  # request. Bucket owners need not specify this parameter in their
270
- # requests. If either the source or destination Amazon S3 bucket has
271
- # Requester Pays enabled, the requester will pay for corresponding
272
- # charges to copy the object. For information about downloading objects
273
- # from Requester Pays buckets, see [Downloading Objects in Requester
274
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
289
+ # requests. If either the source or destination S3 bucket has Requester
290
+ # Pays enabled, the requester will pay for corresponding charges to copy
291
+ # the object. For information about downloading objects from Requester
292
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
293
+ # in the *Amazon S3 User Guide*.
294
+ #
295
+ # <note markdown="1"> This functionality is not supported for directory buckets.
296
+ #
297
+ # </note>
275
298
  #
276
299
  #
277
300
  #
@@ -280,10 +303,52 @@ module Aws::S3
280
303
  # Indicates whether S3 Object Lock should bypass Governance-mode
281
304
  # restrictions to process this operation. To use this header, you must
282
305
  # have the `s3:BypassGovernanceRetention` permission.
306
+ #
307
+ # <note markdown="1"> This functionality is not supported for directory buckets.
308
+ #
309
+ # </note>
283
310
  # @option options [String] :expected_bucket_owner
284
- # The account ID of the expected bucket owner. If the bucket is owned by
285
- # a different account, the request fails with the HTTP status code `403
286
- # Forbidden` (access denied).
311
+ # The account ID of the expected bucket owner. If the account ID that
312
+ # you provide does not match the actual owner of the bucket, the request
313
+ # fails with the HTTP status code `403 Forbidden` (access denied).
314
+ # @option options [String] :if_match
315
+ # Deletes the object if the ETag (entity tag) value provided during the
316
+ # delete operation matches the ETag of the object in S3. If the ETag
317
+ # values do not match, the operation returns a `412 Precondition Failed`
318
+ # error.
319
+ #
320
+ # Expects the ETag value as a string. `If-Match` does accept a string
321
+ # value of an '*' (asterisk) character to denote a match of any ETag.
322
+ #
323
+ # For more information about conditional requests, see [RFC 7232][1].
324
+ #
325
+ #
326
+ #
327
+ # [1]: https://tools.ietf.org/html/rfc7232
328
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
329
+ # If present, the object is deleted only if its modification times
330
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
331
+ # match, the operation returns a `412 Precondition Failed` error. If the
332
+ # `Timestamp` matches or if the object doesn’t exist, the operation
333
+ # returns a `204 Success (No Content)` response.
334
+ #
335
+ # <note markdown="1"> This functionality is only supported for directory buckets.
336
+ #
337
+ # </note>
338
+ # @option options [Integer] :if_match_size
339
+ # If present, the object is deleted only if its size matches the
340
+ # provided size in bytes. If the `Size` value does not match, the
341
+ # operation returns a `412 Precondition Failed` error. If the `Size`
342
+ # matches or if the object doesn’t exist, the operation returns a `204
343
+ # Success (No Content)` response.
344
+ #
345
+ # <note markdown="1"> This functionality is only supported for directory buckets.
346
+ #
347
+ # </note>
348
+ #
349
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
350
+ # `x-amz-if-match-size` conditional headers in conjunction with
351
+ # each-other or individually.
287
352
  # @return [Types::DeleteObjectOutput]
288
353
  def delete(options = {})
289
354
  options = options.merge(
@@ -291,7 +356,7 @@ module Aws::S3
291
356
  key: @object_key,
292
357
  version_id: @id
293
358
  )
294
- resp = Aws::Plugins::UserAgent.feature('resource') do
359
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
295
360
  @client.delete_object(options)
296
361
  end
297
362
  resp.data
@@ -322,18 +387,64 @@ module Aws::S3
322
387
  # @param [Hash] options ({})
323
388
  # @option options [String] :if_match
324
389
  # Return the object only if its entity tag (ETag) is the same as the one
325
- # specified; otherwise, return a 412 (precondition failed) error.
390
+ # specified in this header; otherwise, return a `412 Precondition
391
+ # Failed` error.
392
+ #
393
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
394
+ # present in the request as follows: `If-Match` condition evaluates to
395
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
396
+ # then, S3 returns `200 OK` and the data requested.
397
+ #
398
+ # For more information about conditional requests, see [RFC 7232][1].
399
+ #
400
+ #
401
+ #
402
+ # [1]: https://tools.ietf.org/html/rfc7232
326
403
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
327
404
  # Return the object only if it has been modified since the specified
328
- # time; otherwise, return a 304 (not modified) error.
405
+ # time; otherwise, return a `304 Not Modified` error.
406
+ #
407
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
408
+ # present in the request as follows:` If-None-Match` condition evaluates
409
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
410
+ # then, S3 returns `304 Not Modified` status code.
411
+ #
412
+ # For more information about conditional requests, see [RFC 7232][1].
413
+ #
414
+ #
415
+ #
416
+ # [1]: https://tools.ietf.org/html/rfc7232
329
417
  # @option options [String] :if_none_match
330
418
  # Return the object only if its entity tag (ETag) is different from the
331
- # one specified; otherwise, return a 304 (not modified) error.
419
+ # one specified in this header; otherwise, return a `304 Not Modified`
420
+ # error.
421
+ #
422
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
423
+ # present in the request as follows:` If-None-Match` condition evaluates
424
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
425
+ # then, S3 returns `304 Not Modified` HTTP status code.
426
+ #
427
+ # For more information about conditional requests, see [RFC 7232][1].
428
+ #
429
+ #
430
+ #
431
+ # [1]: https://tools.ietf.org/html/rfc7232
332
432
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
333
433
  # Return the object only if it has not been modified since the specified
334
- # time; otherwise, return a 412 (precondition failed) error.
434
+ # time; otherwise, return a `412 Precondition Failed` error.
435
+ #
436
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
437
+ # present in the request as follows: `If-Match` condition evaluates to
438
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
439
+ # then, S3 returns `200 OK` and the data requested.
440
+ #
441
+ # For more information about conditional requests, see [RFC 7232][1].
442
+ #
443
+ #
444
+ #
445
+ # [1]: https://tools.ietf.org/html/rfc7232
335
446
  # @option options [String] :range
336
- # Downloads the specified range bytes of an object. For more information
447
+ # Downloads the specified byte range of an object. For more information
337
448
  # about the HTTP Range header, see
338
449
  # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
339
450
  #
@@ -348,7 +459,7 @@ module Aws::S3
348
459
  # @option options [String] :response_cache_control
349
460
  # Sets the `Cache-Control` header of the response.
350
461
  # @option options [String] :response_content_disposition
351
- # Sets the `Content-Disposition` header of the response
462
+ # Sets the `Content-Disposition` header of the response.
352
463
  # @option options [String] :response_content_encoding
353
464
  # Sets the `Content-Encoding` header of the response.
354
465
  # @option options [String] :response_content_language
@@ -358,26 +469,98 @@ module Aws::S3
358
469
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
359
470
  # Sets the `Expires` header of the response.
360
471
  # @option options [String] :sse_customer_algorithm
361
- # Specifies the algorithm to use to when decrypting the object (for
362
- # example, AES256).
472
+ # Specifies the algorithm to use when decrypting the object (for
473
+ # example, `AES256`).
474
+ #
475
+ # If you encrypt an object by using server-side encryption with
476
+ # customer-provided encryption keys (SSE-C) when you store the object in
477
+ # Amazon S3, then when you GET the object, you must use the following
478
+ # headers:
479
+ #
480
+ # * `x-amz-server-side-encryption-customer-algorithm`
481
+ #
482
+ # * `x-amz-server-side-encryption-customer-key`
483
+ #
484
+ # * `x-amz-server-side-encryption-customer-key-MD5`
485
+ #
486
+ # For more information about SSE-C, see [Server-Side Encryption (Using
487
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
488
+ #
489
+ # <note markdown="1"> This functionality is not supported for directory buckets.
490
+ #
491
+ # </note>
492
+ #
493
+ #
494
+ #
495
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
363
496
  # @option options [String] :sse_customer_key
364
- # Specifies the customer-provided encryption key for Amazon S3 used to
365
- # encrypt the data. This value is used to decrypt the object when
366
- # recovering it and must match the one used when storing the data. The
367
- # key must be appropriate for use with the algorithm specified in the
497
+ # Specifies the customer-provided encryption key that you originally
498
+ # provided for Amazon S3 to encrypt the data before storing it. This
499
+ # value is used to decrypt the object when recovering it and must match
500
+ # the one used when storing the data. The key must be appropriate for
501
+ # use with the algorithm specified in the
368
502
  # `x-amz-server-side-encryption-customer-algorithm` header.
503
+ #
504
+ # If you encrypt an object by using server-side encryption with
505
+ # customer-provided encryption keys (SSE-C) when you store the object in
506
+ # Amazon S3, then when you GET the object, you must use the following
507
+ # headers:
508
+ #
509
+ # * `x-amz-server-side-encryption-customer-algorithm`
510
+ #
511
+ # * `x-amz-server-side-encryption-customer-key`
512
+ #
513
+ # * `x-amz-server-side-encryption-customer-key-MD5`
514
+ #
515
+ # For more information about SSE-C, see [Server-Side Encryption (Using
516
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
517
+ #
518
+ # <note markdown="1"> This functionality is not supported for directory buckets.
519
+ #
520
+ # </note>
521
+ #
522
+ #
523
+ #
524
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
369
525
  # @option options [String] :sse_customer_key_md5
370
- # Specifies the 128-bit MD5 digest of the encryption key according to
371
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
372
- # ensure that the encryption key was transmitted without error.
526
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
527
+ # key according to RFC 1321. Amazon S3 uses this header for a message
528
+ # integrity check to ensure that the encryption key was transmitted
529
+ # without error.
530
+ #
531
+ # If you encrypt an object by using server-side encryption with
532
+ # customer-provided encryption keys (SSE-C) when you store the object in
533
+ # Amazon S3, then when you GET the object, you must use the following
534
+ # headers:
535
+ #
536
+ # * `x-amz-server-side-encryption-customer-algorithm`
537
+ #
538
+ # * `x-amz-server-side-encryption-customer-key`
539
+ #
540
+ # * `x-amz-server-side-encryption-customer-key-MD5`
541
+ #
542
+ # For more information about SSE-C, see [Server-Side Encryption (Using
543
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
544
+ #
545
+ # <note markdown="1"> This functionality is not supported for directory buckets.
546
+ #
547
+ # </note>
548
+ #
549
+ #
550
+ #
551
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
373
552
  # @option options [String] :request_payer
374
553
  # Confirms that the requester knows that they will be charged for the
375
554
  # request. Bucket owners need not specify this parameter in their
376
- # requests. If either the source or destination Amazon S3 bucket has
377
- # Requester Pays enabled, the requester will pay for corresponding
378
- # charges to copy the object. For information about downloading objects
379
- # from Requester Pays buckets, see [Downloading Objects in Requester
380
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
555
+ # requests. If either the source or destination S3 bucket has Requester
556
+ # Pays enabled, the requester will pay for corresponding charges to copy
557
+ # the object. For information about downloading objects from Requester
558
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
559
+ # in the *Amazon S3 User Guide*.
560
+ #
561
+ # <note markdown="1"> This functionality is not supported for directory buckets.
562
+ #
563
+ # </note>
381
564
  #
382
565
  #
383
566
  #
@@ -388,9 +571,9 @@ module Aws::S3
388
571
  # for the part specified. Useful for downloading just a part of an
389
572
  # object.
390
573
  # @option options [String] :expected_bucket_owner
391
- # The account ID of the expected bucket owner. If the bucket is owned by
392
- # a different account, the request fails with the HTTP status code `403
393
- # Forbidden` (access denied).
574
+ # The account ID of the expected bucket owner. If the account ID that
575
+ # you provide does not match the actual owner of the bucket, the request
576
+ # fails with the HTTP status code `403 Forbidden` (access denied).
394
577
  # @option options [String] :checksum_mode
395
578
  # To retrieve the checksum, this mode must be enabled.
396
579
  # @return [Types::GetObjectOutput]
@@ -400,7 +583,7 @@ module Aws::S3
400
583
  key: @object_key,
401
584
  version_id: @id
402
585
  )
403
- resp = Aws::Plugins::UserAgent.feature('resource') do
586
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
404
587
  @client.get_object(options, &block)
405
588
  end
406
589
  resp.data
@@ -414,6 +597,12 @@ module Aws::S3
414
597
  # if_none_match: "IfNoneMatch",
415
598
  # if_unmodified_since: Time.now,
416
599
  # range: "Range",
600
+ # response_cache_control: "ResponseCacheControl",
601
+ # response_content_disposition: "ResponseContentDisposition",
602
+ # response_content_encoding: "ResponseContentEncoding",
603
+ # response_content_language: "ResponseContentLanguage",
604
+ # response_content_type: "ResponseContentType",
605
+ # response_expires: Time.now,
417
606
  # sse_customer_algorithm: "SSECustomerAlgorithm",
418
607
  # sse_customer_key: "SSECustomerKey",
419
608
  # sse_customer_key_md5: "SSECustomerKeyMD5",
@@ -426,41 +615,129 @@ module Aws::S3
426
615
  # @option options [String] :if_match
427
616
  # Return the object only if its entity tag (ETag) is the same as the one
428
617
  # specified; otherwise, return a 412 (precondition failed) error.
618
+ #
619
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
620
+ # present in the request as follows:
621
+ #
622
+ # * `If-Match` condition evaluates to `true`, and;
623
+ #
624
+ # * `If-Unmodified-Since` condition evaluates to `false`;
625
+ #
626
+ # Then Amazon S3 returns `200 OK` and the data requested.
627
+ #
628
+ # For more information about conditional requests, see [RFC 7232][1].
629
+ #
630
+ #
631
+ #
632
+ # [1]: https://tools.ietf.org/html/rfc7232
429
633
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
430
634
  # Return the object only if it has been modified since the specified
431
635
  # time; otherwise, return a 304 (not modified) error.
636
+ #
637
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
638
+ # present in the request as follows:
639
+ #
640
+ # * `If-None-Match` condition evaluates to `false`, and;
641
+ #
642
+ # * `If-Modified-Since` condition evaluates to `true`;
643
+ #
644
+ # Then Amazon S3 returns the `304 Not Modified` response code.
645
+ #
646
+ # For more information about conditional requests, see [RFC 7232][1].
647
+ #
648
+ #
649
+ #
650
+ # [1]: https://tools.ietf.org/html/rfc7232
432
651
  # @option options [String] :if_none_match
433
652
  # Return the object only if its entity tag (ETag) is different from the
434
653
  # one specified; otherwise, return a 304 (not modified) error.
654
+ #
655
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
656
+ # present in the request as follows:
657
+ #
658
+ # * `If-None-Match` condition evaluates to `false`, and;
659
+ #
660
+ # * `If-Modified-Since` condition evaluates to `true`;
661
+ #
662
+ # Then Amazon S3 returns the `304 Not Modified` response code.
663
+ #
664
+ # For more information about conditional requests, see [RFC 7232][1].
665
+ #
666
+ #
667
+ #
668
+ # [1]: https://tools.ietf.org/html/rfc7232
435
669
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
436
670
  # Return the object only if it has not been modified since the specified
437
671
  # time; otherwise, return a 412 (precondition failed) error.
672
+ #
673
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
674
+ # present in the request as follows:
675
+ #
676
+ # * `If-Match` condition evaluates to `true`, and;
677
+ #
678
+ # * `If-Unmodified-Since` condition evaluates to `false`;
679
+ #
680
+ # Then Amazon S3 returns `200 OK` and the data requested.
681
+ #
682
+ # For more information about conditional requests, see [RFC 7232][1].
683
+ #
684
+ #
685
+ #
686
+ # [1]: https://tools.ietf.org/html/rfc7232
438
687
  # @option options [String] :range
439
688
  # HeadObject returns only the metadata for an object. If the Range is
440
689
  # satisfiable, only the `ContentLength` is affected in the response. If
441
690
  # the Range is not satisfiable, S3 returns a `416 - Requested Range Not
442
691
  # Satisfiable` error.
692
+ # @option options [String] :response_cache_control
693
+ # Sets the `Cache-Control` header of the response.
694
+ # @option options [String] :response_content_disposition
695
+ # Sets the `Content-Disposition` header of the response.
696
+ # @option options [String] :response_content_encoding
697
+ # Sets the `Content-Encoding` header of the response.
698
+ # @option options [String] :response_content_language
699
+ # Sets the `Content-Language` header of the response.
700
+ # @option options [String] :response_content_type
701
+ # Sets the `Content-Type` header of the response.
702
+ # @option options [Time,DateTime,Date,Integer,String] :response_expires
703
+ # Sets the `Expires` header of the response.
443
704
  # @option options [String] :sse_customer_algorithm
444
- # Specifies the algorithm to use to when encrypting the object (for
705
+ # Specifies the algorithm to use when encrypting the object (for
445
706
  # example, AES256).
707
+ #
708
+ # <note markdown="1"> This functionality is not supported for directory buckets.
709
+ #
710
+ # </note>
446
711
  # @option options [String] :sse_customer_key
447
712
  # Specifies the customer-provided encryption key for Amazon S3 to use in
448
713
  # encrypting data. This value is used to store the object and then it is
449
714
  # discarded; Amazon S3 does not store the encryption key. The key must
450
715
  # be appropriate for use with the algorithm specified in the
451
716
  # `x-amz-server-side-encryption-customer-algorithm` header.
717
+ #
718
+ # <note markdown="1"> This functionality is not supported for directory buckets.
719
+ #
720
+ # </note>
452
721
  # @option options [String] :sse_customer_key_md5
453
722
  # Specifies the 128-bit MD5 digest of the encryption key according to
454
723
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
455
724
  # ensure that the encryption key was transmitted without error.
725
+ #
726
+ # <note markdown="1"> This functionality is not supported for directory buckets.
727
+ #
728
+ # </note>
456
729
  # @option options [String] :request_payer
457
730
  # Confirms that the requester knows that they will be charged for the
458
731
  # request. Bucket owners need not specify this parameter in their
459
- # requests. If either the source or destination Amazon S3 bucket has
460
- # Requester Pays enabled, the requester will pay for corresponding
461
- # charges to copy the object. For information about downloading objects
462
- # from Requester Pays buckets, see [Downloading Objects in Requester
463
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
732
+ # requests. If either the source or destination S3 bucket has Requester
733
+ # Pays enabled, the requester will pay for corresponding charges to copy
734
+ # the object. For information about downloading objects from Requester
735
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
736
+ # in the *Amazon S3 User Guide*.
737
+ #
738
+ # <note markdown="1"> This functionality is not supported for directory buckets.
739
+ #
740
+ # </note>
464
741
  #
465
742
  #
466
743
  #
@@ -471,16 +748,26 @@ module Aws::S3
471
748
  # for the part specified. Useful querying about the size of the part and
472
749
  # the number of parts in this object.
473
750
  # @option options [String] :expected_bucket_owner
474
- # The account ID of the expected bucket owner. If the bucket is owned by
475
- # a different account, the request fails with the HTTP status code `403
476
- # Forbidden` (access denied).
751
+ # The account ID of the expected bucket owner. If the account ID that
752
+ # you provide does not match the actual owner of the bucket, the request
753
+ # fails with the HTTP status code `403 Forbidden` (access denied).
477
754
  # @option options [String] :checksum_mode
478
755
  # To retrieve the checksum, this parameter must be enabled.
479
756
  #
480
- # In addition, if you enable `ChecksumMode` and the object is encrypted
481
- # with Amazon Web Services Key Management Service (Amazon Web Services
482
- # KMS), you must have permission to use the `kms:Decrypt` action for the
483
- # request to succeed.
757
+ # **General purpose buckets** - If you enable checksum mode and the
758
+ # object is uploaded with a [checksum][1] and encrypted with an Key
759
+ # Management Service (KMS) key, you must have permission to use the
760
+ # `kms:Decrypt` action to retrieve the checksum.
761
+ #
762
+ # **Directory buckets** - If you enable `ChecksumMode` and the object is
763
+ # encrypted with Amazon Web Services Key Management Service (Amazon Web
764
+ # Services KMS), you must also have the `kms:GenerateDataKey` and
765
+ # `kms:Decrypt` permissions in IAM identity-based policies and KMS key
766
+ # policies for the KMS key to retrieve the checksum of the object.
767
+ #
768
+ #
769
+ #
770
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
484
771
  # @return [Types::HeadObjectOutput]
485
772
  def head(options = {})
486
773
  options = options.merge(
@@ -488,7 +775,7 @@ module Aws::S3
488
775
  key: @object_key,
489
776
  version_id: @id
490
777
  )
491
- resp = Aws::Plugins::UserAgent.feature('resource') do
778
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
492
779
  @client.head_object(options)
493
780
  end
494
781
  resp.data
@@ -562,7 +849,7 @@ module Aws::S3
562
849
  # request_payer: "requester", # accepts requester
563
850
  # bypass_governance_retention: false,
564
851
  # expected_bucket_owner: "AccountId",
565
- # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
852
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
566
853
  # })
567
854
  # @param options ({})
568
855
  # @option options [String] :mfa
@@ -570,14 +857,35 @@ module Aws::S3
570
857
  # space, and the value that is displayed on your authentication device.
571
858
  # Required to permanently delete a versioned object if versioning is
572
859
  # configured with MFA delete enabled.
860
+ #
861
+ # When performing the `DeleteObjects` operation on an MFA delete enabled
862
+ # bucket, which attempts to delete the specified versioned objects, you
863
+ # must include an MFA token. If you don't provide an MFA token, the
864
+ # entire request will fail, even if there are non-versioned objects that
865
+ # you are trying to delete. If you provide an invalid token, whether
866
+ # there are versioned object keys in the request or not, the entire
867
+ # Multi-Object Delete request will fail. For information about MFA
868
+ # Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
869
+ #
870
+ # <note markdown="1"> This functionality is not supported for directory buckets.
871
+ #
872
+ # </note>
873
+ #
874
+ #
875
+ #
876
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
573
877
  # @option options [String] :request_payer
574
878
  # Confirms that the requester knows that they will be charged for the
575
879
  # request. Bucket owners need not specify this parameter in their
576
- # requests. If either the source or destination Amazon S3 bucket has
577
- # Requester Pays enabled, the requester will pay for corresponding
578
- # charges to copy the object. For information about downloading objects
579
- # from Requester Pays buckets, see [Downloading Objects in Requester
580
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
880
+ # requests. If either the source or destination S3 bucket has Requester
881
+ # Pays enabled, the requester will pay for corresponding charges to copy
882
+ # the object. For information about downloading objects from Requester
883
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
884
+ # in the *Amazon S3 User Guide*.
885
+ #
886
+ # <note markdown="1"> This functionality is not supported for directory buckets.
887
+ #
888
+ # </note>
581
889
  #
582
890
  #
583
891
  #
@@ -586,25 +894,46 @@ module Aws::S3
586
894
  # Specifies whether you want to delete this object even if it has a
587
895
  # Governance-type Object Lock in place. To use this header, you must
588
896
  # have the `s3:BypassGovernanceRetention` permission.
897
+ #
898
+ # <note markdown="1"> This functionality is not supported for directory buckets.
899
+ #
900
+ # </note>
589
901
  # @option options [String] :expected_bucket_owner
590
- # The account ID of the expected bucket owner. If the bucket is owned by
591
- # a different account, the request fails with the HTTP status code `403
592
- # Forbidden` (access denied).
902
+ # The account ID of the expected bucket owner. If the account ID that
903
+ # you provide does not match the actual owner of the bucket, the request
904
+ # fails with the HTTP status code `403 Forbidden` (access denied).
593
905
  # @option options [String] :checksum_algorithm
594
906
  # Indicates the algorithm used to create the checksum for the object
595
- # when using the SDK. This header will not provide any additional
596
- # functionality if not using the SDK. When sending this header, there
597
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
598
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
599
- # `400 Bad Request`. For more information, see [Checking object
600
- # integrity][1] in the *Amazon S3 User Guide*.
907
+ # when you use the SDK. This header will not provide any additional
908
+ # functionality if you don't use the SDK. When you send this header,
909
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
910
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
911
+ # with the HTTP status code `400 Bad Request`.
912
+ #
913
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
914
+ # the supported algorithm from the following list:
915
+ #
916
+ # * `CRC32`
917
+ #
918
+ # * `CRC32C`
919
+ #
920
+ # * `CRC64NVME`
921
+ #
922
+ # * `SHA1`
923
+ #
924
+ # * `SHA256`
925
+ #
926
+ # For more information, see [Checking object integrity][1] in the
927
+ # *Amazon S3 User Guide*.
928
+ #
929
+ # If the individual checksum value you provide through
930
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
931
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
932
+ # request with a `BadDigest` error.
601
933
  #
602
934
  # If you provide an individual checksum, Amazon S3 ignores any provided
603
935
  # `ChecksumAlgorithm` parameter.
604
936
  #
605
- # This checksum algorithm must be the same for all parts and it match
606
- # the checksum value supplied in the `CreateMultipartUpload` request.
607
- #
608
937
  #
609
938
  #
610
939
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -621,7 +950,7 @@ module Aws::S3
621
950
  version_id: item.id
622
951
  }
623
952
  end
624
- Aws::Plugins::UserAgent.feature('resource') do
953
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
625
954
  batch[0].client.delete_objects(params)
626
955
  end
627
956
  end
@@ -633,3 +962,6 @@ module Aws::S3
633
962
  end
634
963
  end
635
964
  end
965
+
966
+ # Load customizations if they exist
967
+ require 'aws-sdk-s3/customizations/object_version'