aws-sdk-s3 1.136.0 → 1.176.1

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