aws-sdk-s3 1.136.0 → 1.176.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -69,6 +69,10 @@ module Aws::S3
69
69
  # of encryption. If an object is larger than 16 MB, the Amazon Web
70
70
  # Services Management Console will upload or copy that object as a
71
71
  # Multipart Upload, and therefore the ETag will not be an MD5 digest.
72
+ #
73
+ # <note markdown="1"> **Directory buckets** - MD5 is not supported by directory buckets.
74
+ #
75
+ # </note>
72
76
  # @return [String]
73
77
  def etag
74
78
  data[:etag]
@@ -87,12 +91,22 @@ module Aws::S3
87
91
  end
88
92
 
89
93
  # The class of storage used to store the object.
94
+ #
95
+ # <note markdown="1"> **Directory buckets** - Only the S3 Express One Zone storage class is
96
+ # supported by directory buckets to store objects.
97
+ #
98
+ # </note>
90
99
  # @return [String]
91
100
  def storage_class
92
101
  data[:storage_class]
93
102
  end
94
103
 
95
104
  # The owner of the object
105
+ #
106
+ # <note markdown="1"> **Directory buckets** - The bucket owner is returned as the object
107
+ # owner.
108
+ #
109
+ # </note>
96
110
  # @return [Types::Owner]
97
111
  def owner
98
112
  data[:owner]
@@ -104,6 +118,12 @@ module Aws::S3
104
118
  # archived objects, see [ Working with archived objects][1] in the
105
119
  # *Amazon S3 User Guide*.
106
120
  #
121
+ # <note markdown="1"> This functionality is not supported for directory buckets. Only the S3
122
+ # Express One Zone storage class is supported by directory buckets to
123
+ # store objects.
124
+ #
125
+ # </note>
126
+ #
107
127
  #
108
128
  #
109
129
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
@@ -166,7 +186,7 @@ module Aws::S3
166
186
  options, params = separate_params_and_options(options)
167
187
  waiter = Waiters::ObjectExists.new(options)
168
188
  yield_waiter_and_warn(waiter, &block) if block_given?
169
- Aws::Plugins::UserAgent.feature('resource') do
189
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
170
190
  waiter.wait(params.merge(bucket: @bucket_name,
171
191
  key: @key))
172
192
  end
@@ -187,7 +207,7 @@ module Aws::S3
187
207
  options, params = separate_params_and_options(options)
188
208
  waiter = Waiters::ObjectNotExists.new(options)
189
209
  yield_waiter_and_warn(waiter, &block) if block_given?
190
- Aws::Plugins::UserAgent.feature('resource') do
210
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
191
211
  waiter.wait(params.merge(bucket: @bucket_name,
192
212
  key: @key))
193
213
  end
@@ -292,7 +312,7 @@ module Aws::S3
292
312
  :retry
293
313
  end
294
314
  end
295
- Aws::Plugins::UserAgent.feature('resource') do
315
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
296
316
  Aws::Waiters::Waiter.new(options).wait({})
297
317
  end
298
318
  end
@@ -325,7 +345,7 @@ module Aws::S3
325
345
  # metadata_directive: "COPY", # accepts COPY, REPLACE
326
346
  # tagging_directive: "COPY", # accepts COPY, REPLACE
327
347
  # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
328
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
348
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
329
349
  # website_redirect_location: "WebsiteRedirectLocation",
330
350
  # sse_customer_algorithm: "SSECustomerAlgorithm",
331
351
  # sse_customer_key: "SSECustomerKey",
@@ -346,40 +366,98 @@ module Aws::S3
346
366
  # })
347
367
  # @param [Hash] options ({})
348
368
  # @option options [String] :acl
349
- # The canned ACL to apply to the object.
369
+ # The canned access control list (ACL) to apply to the object.
370
+ #
371
+ # When you copy an object, the ACL metadata is not preserved and is set
372
+ # to `private` by default. Only the owner has full access control. To
373
+ # override the default ACL setting, specify a new ACL when you generate
374
+ # a copy request. For more information, see [Using ACLs][1].
375
+ #
376
+ # If the destination bucket that you're copying objects to uses the
377
+ # bucket owner enforced setting for S3 Object Ownership, ACLs are
378
+ # disabled and no longer affect permissions. Buckets that use this
379
+ # setting only accept `PUT` requests that don't specify an ACL or `PUT`
380
+ # requests that specify bucket owner full control ACLs, such as the
381
+ # `bucket-owner-full-control` canned ACL or an equivalent form of this
382
+ # ACL expressed in the XML format. For more information, see
383
+ # [Controlling ownership of objects and disabling ACLs][2] in the
384
+ # *Amazon S3 User Guide*.
385
+ #
386
+ # <note markdown="1"> * If your destination bucket uses the bucket owner enforced setting
387
+ # for Object Ownership, all objects written to the bucket by any
388
+ # account will be owned by the bucket owner.
350
389
  #
351
- # This action is not supported by Amazon S3 on Outposts.
390
+ # * This functionality is not supported for directory buckets.
391
+ #
392
+ # * This functionality is not supported for Amazon S3 on Outposts.
393
+ #
394
+ # </note>
395
+ #
396
+ #
397
+ #
398
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
399
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
352
400
  # @option options [String] :cache_control
353
- # Specifies caching behavior along the request/reply chain.
401
+ # Specifies the caching behavior along the request/reply chain.
354
402
  # @option options [String] :checksum_algorithm
355
- # Indicates the algorithm you want Amazon S3 to use to create the
403
+ # Indicates the algorithm that you want Amazon S3 to use to create the
356
404
  # checksum for the object. For more information, see [Checking object
357
405
  # integrity][1] in the *Amazon S3 User Guide*.
358
406
  #
407
+ # When you copy an object, if the source object has a checksum, that
408
+ # checksum value will be copied to the new object by default. If the
409
+ # `CopyObject` request does not include this `x-amz-checksum-algorithm`
410
+ # header, the checksum algorithm will be copied from the source object
411
+ # to the destination object (if it's present on the source object). You
412
+ # can optionally specify a different checksum algorithm to use with the
413
+ # `x-amz-checksum-algorithm` header. Unrecognized or unsupported values
414
+ # will respond with the HTTP status code `400 Bad Request`.
415
+ #
416
+ # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
417
+ # is the default checksum algorithm that's used for performance.
418
+ #
419
+ # </note>
420
+ #
359
421
  #
360
422
  #
361
423
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
362
424
  # @option options [String] :content_disposition
363
- # Specifies presentational information for the object.
425
+ # Specifies presentational information for the object. Indicates whether
426
+ # an object should be displayed in a web browser or downloaded as a
427
+ # file. It allows specifying the desired filename for the downloaded
428
+ # file.
364
429
  # @option options [String] :content_encoding
365
430
  # Specifies what content encodings have been applied to the object and
366
431
  # thus what decoding mechanisms must be applied to obtain the media-type
367
432
  # referenced by the Content-Type header field.
433
+ #
434
+ # <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
435
+ # this header field.
436
+ #
437
+ # </note>
368
438
  # @option options [String] :content_language
369
439
  # The language the content is in.
370
440
  # @option options [String] :content_type
371
- # A standard MIME type describing the format of the object data.
441
+ # A standard MIME type that describes the format of the object data.
372
442
  # @option options [required, String] :copy_source
373
- # Specifies the source object for the copy operation. You specify the
374
- # value in one of two formats, depending on whether you want to access
375
- # the source object through an [access point][1]:
443
+ # Specifies the source object for the copy operation. The source object
444
+ # can be up to 5 GB. If the source object is an object that was uploaded
445
+ # by using a multipart upload, the object copy will be a single part
446
+ # object after the source object is copied to the destination bucket.
447
+ #
448
+ # You specify the value of the copy source in one of two formats,
449
+ # depending on whether you want to access the source object through an
450
+ # [access point][1]:
376
451
  #
377
452
  # * For objects not accessed through an access point, specify the name
378
453
  # of the source bucket and the key of the source object, separated by
379
454
  # a slash (/). For example, to copy the object `reports/january.pdf`
380
- # from the bucket `awsexamplebucket`, use
455
+ # from the general purpose bucket `awsexamplebucket`, use
381
456
  # `awsexamplebucket/reports/january.pdf`. The value must be
382
- # URL-encoded.
457
+ # URL-encoded. To copy the object `reports/january.pdf` from the
458
+ # directory bucket `awsexamplebucket--use1-az5--x-s3`, use
459
+ # `awsexamplebucket--use1-az5--x-s3/reports/january.pdf`. The value
460
+ # must be URL-encoded.
383
461
  #
384
462
  # * For objects accessed through access points, specify the Amazon
385
463
  # Resource Name (ARN) of the object as accessed through the access
@@ -391,9 +469,11 @@ module Aws::S3
391
469
  # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
392
470
  # The value must be URL encoded.
393
471
  #
394
- # <note markdown="1"> Amazon S3 supports copy operations using access points only when the
395
- # source and destination buckets are in the same Amazon Web Services
396
- # Region.
472
+ # <note markdown="1"> * Amazon S3 supports copy operations using Access points only when
473
+ # the source and destination buckets are in the same Amazon Web
474
+ # Services Region.
475
+ #
476
+ # * Access points are not supported by directory buckets.
397
477
  #
398
478
  # </note>
399
479
  #
@@ -406,159 +486,567 @@ module Aws::S3
406
486
  # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
407
487
  # The value must be URL-encoded.
408
488
  #
409
- # To copy a specific version of an object, append
410
- # `?versionId=<version-id>` to the value (for example,
489
+ # If your source bucket versioning is enabled, the `x-amz-copy-source`
490
+ # header by default identifies the current version of an object to copy.
491
+ # If the current version is a delete marker, Amazon S3 behaves as if the
492
+ # object was deleted. To copy a different version, use the `versionId`
493
+ # query parameter. Specifically, append `?versionId=<version-id>` to the
494
+ # value (for example,
411
495
  # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
412
496
  # If you don't specify a version ID, Amazon S3 copies the latest
413
497
  # version of the source object.
414
498
  #
499
+ # If you enable versioning on the destination bucket, Amazon S3
500
+ # generates a unique version ID for the copied object. This version ID
501
+ # is different from the version ID of the source object. Amazon S3
502
+ # returns the version ID of the copied object in the `x-amz-version-id`
503
+ # response header in the response.
504
+ #
505
+ # If you do not enable versioning or suspend it on the destination
506
+ # bucket, the version ID that Amazon S3 generates in the
507
+ # `x-amz-version-id` response header is always null.
508
+ #
509
+ # <note markdown="1"> **Directory buckets** - S3 Versioning isn't enabled and supported for
510
+ # directory buckets.
511
+ #
512
+ # </note>
513
+ #
415
514
  #
416
515
  #
417
516
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
418
517
  # @option options [String] :copy_source_if_match
419
518
  # Copies the object if its entity tag (ETag) matches the specified tag.
519
+ #
520
+ # If both the `x-amz-copy-source-if-match` and
521
+ # `x-amz-copy-source-if-unmodified-since` headers are present in the
522
+ # request and evaluate as follows, Amazon S3 returns `200 OK` and copies
523
+ # the data:
524
+ #
525
+ # * `x-amz-copy-source-if-match` condition evaluates to true
526
+ #
527
+ # * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
420
528
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
421
529
  # Copies the object if it has been modified since the specified time.
530
+ #
531
+ # If both the `x-amz-copy-source-if-none-match` and
532
+ # `x-amz-copy-source-if-modified-since` headers are present in the
533
+ # request and evaluate as follows, Amazon S3 returns the `412
534
+ # Precondition Failed` response code:
535
+ #
536
+ # * `x-amz-copy-source-if-none-match` condition evaluates to false
537
+ #
538
+ # * `x-amz-copy-source-if-modified-since` condition evaluates to true
422
539
  # @option options [String] :copy_source_if_none_match
423
540
  # Copies the object if its entity tag (ETag) is different than the
424
541
  # specified ETag.
542
+ #
543
+ # If both the `x-amz-copy-source-if-none-match` and
544
+ # `x-amz-copy-source-if-modified-since` headers are present in the
545
+ # request and evaluate as follows, Amazon S3 returns the `412
546
+ # Precondition Failed` response code:
547
+ #
548
+ # * `x-amz-copy-source-if-none-match` condition evaluates to false
549
+ #
550
+ # * `x-amz-copy-source-if-modified-since` condition evaluates to true
425
551
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
426
552
  # Copies the object if it hasn't been modified since the specified
427
553
  # time.
554
+ #
555
+ # If both the `x-amz-copy-source-if-match` and
556
+ # `x-amz-copy-source-if-unmodified-since` headers are present in the
557
+ # request and evaluate as follows, Amazon S3 returns `200 OK` and copies
558
+ # the data:
559
+ #
560
+ # * `x-amz-copy-source-if-match` condition evaluates to true
561
+ #
562
+ # * `x-amz-copy-source-if-unmodified-since` condition evaluates to false
428
563
  # @option options [Time,DateTime,Date,Integer,String] :expires
429
564
  # The date and time at which the object is no longer cacheable.
430
565
  # @option options [String] :grant_full_control
431
566
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
432
567
  # object.
433
568
  #
434
- # This action is not supported by Amazon S3 on Outposts.
569
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
570
+ #
571
+ # * This functionality is not supported for Amazon S3 on Outposts.
572
+ #
573
+ # </note>
435
574
  # @option options [String] :grant_read
436
575
  # Allows grantee to read the object data and its metadata.
437
576
  #
438
- # This action is not supported by Amazon S3 on Outposts.
577
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
578
+ #
579
+ # * This functionality is not supported for Amazon S3 on Outposts.
580
+ #
581
+ # </note>
439
582
  # @option options [String] :grant_read_acp
440
583
  # Allows grantee to read the object ACL.
441
584
  #
442
- # This action is not supported by Amazon S3 on Outposts.
585
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
586
+ #
587
+ # * This functionality is not supported for Amazon S3 on Outposts.
588
+ #
589
+ # </note>
443
590
  # @option options [String] :grant_write_acp
444
591
  # Allows grantee to write the ACL for the applicable object.
445
592
  #
446
- # This action is not supported by Amazon S3 on Outposts.
593
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
594
+ #
595
+ # * This functionality is not supported for Amazon S3 on Outposts.
596
+ #
597
+ # </note>
447
598
  # @option options [Hash<String,String>] :metadata
448
599
  # A map of metadata to store with the object in S3.
449
600
  # @option options [String] :metadata_directive
450
601
  # Specifies whether the metadata is copied from the source object or
451
- # replaced with metadata provided in the request.
602
+ # replaced with metadata that's provided in the request. When copying
603
+ # an object, you can preserve all metadata (the default) or specify new
604
+ # metadata. If this header isn’t specified, `COPY` is the default
605
+ # behavior.
606
+ #
607
+ # **General purpose bucket** - For general purpose buckets, when you
608
+ # grant permissions, you can use the `s3:x-amz-metadata-directive`
609
+ # condition key to enforce certain metadata behavior when objects are
610
+ # uploaded. For more information, see [Amazon S3 condition key
611
+ # examples][1] in the *Amazon S3 User Guide*.
612
+ #
613
+ # <note markdown="1"> `x-amz-website-redirect-location` is unique to each object and is not
614
+ # copied when using the `x-amz-metadata-directive` header. To copy the
615
+ # value, you must specify `x-amz-website-redirect-location` in the
616
+ # request header.
617
+ #
618
+ # </note>
619
+ #
620
+ #
621
+ #
622
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html
452
623
  # @option options [String] :tagging_directive
453
- # Specifies whether the object tag-set are copied from the source object
454
- # or replaced with tag-set provided in the request.
624
+ # Specifies whether the object tag-set is copied from the source object
625
+ # or replaced with the tag-set that's provided in the request.
626
+ #
627
+ # The default value is `COPY`.
628
+ #
629
+ # <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
630
+ # operation, only the empty tag-set is supported. Any requests that
631
+ # attempt to write non-empty tags into directory buckets will receive a
632
+ # `501 Not Implemented` status code. When the destination bucket is a
633
+ # directory bucket, you will receive a `501 Not Implemented` response in
634
+ # any of the following situations:
635
+ #
636
+ # * When you attempt to `COPY` the tag-set from an S3 source object that
637
+ # has non-empty tags.
638
+ #
639
+ # * When you attempt to `REPLACE` the tag-set of a source object and set
640
+ # a non-empty value to `x-amz-tagging`.
641
+ #
642
+ # * When you don't set the `x-amz-tagging-directive` header and the
643
+ # source object has non-empty tags. This is because the default value
644
+ # of `x-amz-tagging-directive` is `COPY`.
645
+ #
646
+ # Because only the empty tag-set is supported for directory buckets in a
647
+ # `CopyObject` operation, the following situations are allowed:
648
+ #
649
+ # * When you attempt to `COPY` the tag-set from a directory bucket
650
+ # source object that has no tags to a general purpose bucket. It
651
+ # copies an empty tag-set to the destination object.
652
+ #
653
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
654
+ # source object and set the `x-amz-tagging` value of the directory
655
+ # bucket destination object to empty.
656
+ #
657
+ # * When you attempt to `REPLACE` the tag-set of a general purpose
658
+ # bucket source object that has non-empty tags and set the
659
+ # `x-amz-tagging` value of the directory bucket destination object to
660
+ # empty.
661
+ #
662
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
663
+ # source object and don't set the `x-amz-tagging` value of the
664
+ # directory bucket destination object. This is because the default
665
+ # value of `x-amz-tagging` is the empty value.
666
+ #
667
+ # </note>
455
668
  # @option options [String] :server_side_encryption
456
669
  # The server-side encryption algorithm used when storing this object in
457
- # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
670
+ # Amazon S3. Unrecognized or unsupported values won’t write a
671
+ # destination object and will receive a `400 Bad Request` response.
672
+ #
673
+ # Amazon S3 automatically encrypts all new objects that are copied to an
674
+ # S3 bucket. When copying an object, if you don't specify encryption
675
+ # information in your copy request, the encryption setting of the target
676
+ # object is set to the default encryption configuration of the
677
+ # destination bucket. By default, all buckets have a base level of
678
+ # encryption configuration that uses server-side encryption with Amazon
679
+ # S3 managed keys (SSE-S3). If the destination bucket has a different
680
+ # default encryption configuration, Amazon S3 uses the corresponding
681
+ # encryption key to encrypt the target object copy.
682
+ #
683
+ # With server-side encryption, Amazon S3 encrypts your data as it writes
684
+ # your data to disks in its data centers and decrypts the data when you
685
+ # access it. For more information about server-side encryption, see
686
+ # [Using Server-Side Encryption][1] in the *Amazon S3 User Guide*.
687
+ #
688
+ # <b>General purpose buckets </b>
689
+ #
690
+ # * For general purpose buckets, there are the following supported
691
+ # options for server-side encryption: server-side encryption with Key
692
+ # Management Service (KMS) keys (SSE-KMS), dual-layer server-side
693
+ # encryption with Amazon Web Services KMS keys (DSSE-KMS), and
694
+ # server-side encryption with customer-provided encryption keys
695
+ # (SSE-C). Amazon S3 uses the corresponding KMS key, or a
696
+ # customer-provided key to encrypt the target object copy.
697
+ #
698
+ # * When you perform a `CopyObject` operation, if you want to use a
699
+ # different type of encryption setting for the target object, you can
700
+ # specify appropriate encryption-related headers to encrypt the target
701
+ # object with an Amazon S3 managed key, a KMS key, or a
702
+ # customer-provided key. If the encryption setting in your request is
703
+ # different from the default encryption configuration of the
704
+ # destination bucket, the encryption setting in your request takes
705
+ # precedence.
706
+ #
707
+ # <b>Directory buckets </b>
708
+ #
709
+ # * For directory buckets, there are only two supported options for
710
+ # server-side encryption: server-side encryption with Amazon S3
711
+ # managed keys (SSE-S3) (`AES256`) and server-side encryption with KMS
712
+ # keys (SSE-KMS) (`aws:kms`). We recommend that the bucket's default
713
+ # encryption uses the desired encryption configuration and you don't
714
+ # override the bucket default encryption in your `CreateSession`
715
+ # requests or `PUT` object requests. Then, new objects are
716
+ # automatically encrypted with the desired encryption settings. For
717
+ # more information, see [Protecting data with server-side
718
+ # encryption][2] in the *Amazon S3 User Guide*. For more information
719
+ # about the encryption overriding behaviors in directory buckets, see
720
+ # [Specifying server-side encryption with KMS for new object
721
+ # uploads][3].
722
+ #
723
+ # * To encrypt new object copies to a directory bucket with SSE-KMS, we
724
+ # recommend you specify SSE-KMS as the directory bucket's default
725
+ # encryption configuration with a KMS key (specifically, a [customer
726
+ # managed key][4]). The [Amazon Web Services managed key][5]
727
+ # (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
728
+ # support 1 [customer managed key][4] per directory bucket for the
729
+ # lifetime of the bucket. After you specify a customer managed key for
730
+ # SSE-KMS, you can't override the customer managed key for the
731
+ # bucket's SSE-KMS configuration. Then, when you perform a
732
+ # `CopyObject` operation and want to specify server-side encryption
733
+ # settings for new object copies with SSE-KMS in the
734
+ # encryption-related request headers, you must ensure the encryption
735
+ # key is the same customer managed key that you specified for the
736
+ # directory bucket's default encryption configuration.
737
+ #
738
+ #
739
+ #
740
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html
741
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
742
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
743
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
744
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
458
745
  # @option options [String] :storage_class
459
746
  # If the `x-amz-storage-class` header is not used, the copied object
460
- # will be stored in the STANDARD Storage Class by default. The STANDARD
461
- # storage class provides high durability and high availability.
462
- # Depending on performance needs, you can specify a different Storage
463
- # Class. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For
464
- # more information, see [Storage Classes][1] in the *Amazon S3 User
465
- # Guide*.
747
+ # will be stored in the `STANDARD` Storage Class by default. The
748
+ # `STANDARD` storage class provides high durability and high
749
+ # availability. Depending on performance needs, you can specify a
750
+ # different Storage Class.
751
+ #
752
+ # <note markdown="1"> * <b>Directory buckets </b> - For directory buckets, only the S3
753
+ # Express One Zone storage class is supported to store newly created
754
+ # objects. Unsupported storage class values won't write a destination
755
+ # object and will respond with the HTTP status code `400 Bad Request`.
756
+ #
757
+ # * <b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the
758
+ # `OUTPOSTS` Storage Class.
759
+ #
760
+ # </note>
761
+ #
762
+ # You can use the `CopyObject` action to change the storage class of an
763
+ # object that is already stored in Amazon S3 by using the
764
+ # `x-amz-storage-class` header. For more information, see [Storage
765
+ # Classes][1] in the *Amazon S3 User Guide*.
766
+ #
767
+ # Before using an object as a source object for the copy operation, you
768
+ # must restore a copy of it if it meets any of the following conditions:
769
+ #
770
+ # * The storage class of the source object is `GLACIER` or
771
+ # `DEEP_ARCHIVE`.
772
+ #
773
+ # * The storage class of the source object is `INTELLIGENT_TIERING` and
774
+ # it's [S3 Intelligent-Tiering access tier][2] is `Archive Access` or
775
+ # `Deep Archive Access`.
776
+ #
777
+ # For more information, see [RestoreObject][3] and [Copying Objects][4]
778
+ # in the *Amazon S3 User Guide*.
466
779
  #
467
780
  #
468
781
  #
469
782
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
783
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition
784
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
785
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html
470
786
  # @option options [String] :website_redirect_location
471
- # If the bucket is configured as a website, redirects requests for this
472
- # object to another object in the same bucket or to an external URL.
473
- # Amazon S3 stores the value of this header in the object metadata. This
474
- # value is unique to each object and is not copied when using the
475
- # `x-amz-metadata-directive` header. Instead, you may opt to provide
476
- # this header in combination with the directive.
787
+ # If the destination bucket is configured as a website, redirects
788
+ # requests for this object copy to another object in the same bucket or
789
+ # to an external URL. Amazon S3 stores the value of this header in the
790
+ # object metadata. This value is unique to each object and is not copied
791
+ # when using the `x-amz-metadata-directive` header. Instead, you may opt
792
+ # to provide this header in combination with the
793
+ # `x-amz-metadata-directive` header.
794
+ #
795
+ # <note markdown="1"> This functionality is not supported for directory buckets.
796
+ #
797
+ # </note>
477
798
  # @option options [String] :sse_customer_algorithm
478
- # Specifies the algorithm to use to when encrypting the object (for
479
- # example, AES256).
799
+ # Specifies the algorithm to use when encrypting the object (for
800
+ # example, `AES256`).
801
+ #
802
+ # When you perform a `CopyObject` operation, if you want to use a
803
+ # different type of encryption setting for the target object, you can
804
+ # specify appropriate encryption-related headers to encrypt the target
805
+ # object with an Amazon S3 managed key, a KMS key, or a
806
+ # customer-provided key. If the encryption setting in your request is
807
+ # different from the default encryption configuration of the destination
808
+ # bucket, the encryption setting in your request takes precedence.
809
+ #
810
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
811
+ # directory bucket.
812
+ #
813
+ # </note>
480
814
  # @option options [String] :sse_customer_key
481
815
  # Specifies the customer-provided encryption key for Amazon S3 to use in
482
816
  # encrypting data. This value is used to store the object and then it is
483
- # discarded; Amazon S3 does not store the encryption key. The key must
817
+ # discarded. Amazon S3 does not store the encryption key. The key must
484
818
  # be appropriate for use with the algorithm specified in the
485
819
  # `x-amz-server-side-encryption-customer-algorithm` header.
820
+ #
821
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
822
+ # directory bucket.
823
+ #
824
+ # </note>
486
825
  # @option options [String] :sse_customer_key_md5
487
826
  # Specifies the 128-bit MD5 digest of the encryption key according to
488
827
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
489
828
  # ensure that the encryption key was transmitted without error.
829
+ #
830
+ # <note markdown="1"> This functionality is not supported when the destination bucket is a
831
+ # directory bucket.
832
+ #
833
+ # </note>
490
834
  # @option options [String] :ssekms_key_id
491
- # Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object
492
- # encryption. All GET and PUT requests for an object protected by KMS
493
- # will fail if they're not made via SSL or using SigV4. For information
494
- # about configuring any of the officially supported Amazon Web Services
495
- # SDKs and Amazon Web Services CLI, see [Specifying the Signature
496
- # Version in Request Authentication][1] in the *Amazon S3 User Guide*.
835
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
836
+ # object encryption. All GET and PUT requests for an object protected by
837
+ # KMS will fail if they're not made via SSL or using SigV4. For
838
+ # information about configuring any of the officially supported Amazon
839
+ # Web Services SDKs and Amazon Web Services CLI, see [Specifying the
840
+ # Signature Version in Request Authentication][1] in the *Amazon S3 User
841
+ # Guide*.
842
+ #
843
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
844
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
845
+ # header is implicitly assigned the ID of the KMS symmetric encryption
846
+ # customer managed key that's configured for your directory bucket's
847
+ # default encryption setting. If you want to specify the `
848
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
849
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
850
+ # customer managed key that's configured for your directory bucket's
851
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
852
+ # Request` error. Only use the key ID or key ARN. The key alias format
853
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
854
+ # support 1 [customer managed key][2] per directory bucket for the
855
+ # lifetime of the bucket. The [Amazon Web Services managed key][3]
856
+ # (`aws/s3`) isn't supported.
497
857
  #
498
858
  #
499
859
  #
500
860
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
861
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
862
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
501
863
  # @option options [String] :ssekms_encryption_context
502
- # Specifies the Amazon Web Services KMS Encryption Context to use for
503
- # object encryption. The value of this header is a base64-encoded UTF-8
504
- # string holding JSON with the encryption context key-value pairs.
864
+ # Specifies the Amazon Web Services KMS Encryption Context as an
865
+ # additional encryption context to use for the destination object
866
+ # encryption. The value of this header is a base64-encoded UTF-8 string
867
+ # holding JSON with the encryption context key-value pairs.
868
+ #
869
+ # **General purpose buckets** - This value must be explicitly added to
870
+ # specify encryption context for `CopyObject` requests if you want an
871
+ # additional encryption context for your destination object. The
872
+ # additional encryption context of the source object won't be copied to
873
+ # the destination object. For more information, see [Encryption
874
+ # context][1] in the *Amazon S3 User Guide*.
875
+ #
876
+ # **Directory buckets** - You can optionally provide an explicit
877
+ # encryption context value. The value must match the default encryption
878
+ # context - the bucket Amazon Resource Name (ARN). An additional
879
+ # encryption context value is not supported.
880
+ #
881
+ #
882
+ #
883
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
505
884
  # @option options [Boolean] :bucket_key_enabled
506
885
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
507
886
  # encryption with server-side encryption using Key Management Service
508
- # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
509
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
887
+ # (KMS) keys (SSE-KMS). If a target object uses SSE-KMS, you can enable
888
+ # an S3 Bucket Key for the object.
889
+ #
890
+ # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
891
+ # for object encryption with SSE-KMS. Specifying this header with a COPY
892
+ # action doesn’t affect bucket-level settings for S3 Bucket Key.
893
+ #
894
+ # For more information, see [Amazon S3 Bucket Keys][1] in the *Amazon S3
895
+ # User Guide*.
896
+ #
897
+ # <note markdown="1"> **Directory buckets** - S3 Bucket Keys aren't supported, when you
898
+ # copy SSE-KMS encrypted objects from general purpose buckets to
899
+ # directory buckets, from directory buckets to general purpose buckets,
900
+ # or between directory buckets, through [CopyObject][2]. In this case,
901
+ # Amazon S3 makes a call to KMS every time a copy request is made for a
902
+ # KMS-encrypted object.
510
903
  #
511
- # Specifying this header with a COPY action doesn’t affect bucket-level
512
- # settings for S3 Bucket Key.
904
+ # </note>
905
+ #
906
+ #
907
+ #
908
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
909
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
513
910
  # @option options [String] :copy_source_sse_customer_algorithm
514
911
  # Specifies the algorithm to use when decrypting the source object (for
515
- # example, AES256).
912
+ # example, `AES256`).
913
+ #
914
+ # If the source object for the copy is stored in Amazon S3 using SSE-C,
915
+ # you must provide the necessary encryption information in your request
916
+ # so that Amazon S3 can decrypt the object for copying.
917
+ #
918
+ # <note markdown="1"> This functionality is not supported when the source object is in a
919
+ # directory bucket.
920
+ #
921
+ # </note>
516
922
  # @option options [String] :copy_source_sse_customer_key
517
923
  # Specifies the customer-provided encryption key for Amazon S3 to use to
518
924
  # decrypt the source object. The encryption key provided in this header
519
- # must be one that was used when the source object was created.
925
+ # must be the same one that was used when the source object was created.
926
+ #
927
+ # If the source object for the copy is stored in Amazon S3 using SSE-C,
928
+ # you must provide the necessary encryption information in your request
929
+ # so that Amazon S3 can decrypt the object for copying.
930
+ #
931
+ # <note markdown="1"> This functionality is not supported when the source object is in a
932
+ # directory bucket.
933
+ #
934
+ # </note>
520
935
  # @option options [String] :copy_source_sse_customer_key_md5
521
936
  # Specifies the 128-bit MD5 digest of the encryption key according to
522
937
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
523
938
  # ensure that the encryption key was transmitted without error.
939
+ #
940
+ # If the source object for the copy is stored in Amazon S3 using SSE-C,
941
+ # you must provide the necessary encryption information in your request
942
+ # so that Amazon S3 can decrypt the object for copying.
943
+ #
944
+ # <note markdown="1"> This functionality is not supported when the source object is in a
945
+ # directory bucket.
946
+ #
947
+ # </note>
524
948
  # @option options [String] :request_payer
525
949
  # Confirms that the requester knows that they will be charged for the
526
950
  # request. Bucket owners need not specify this parameter in their
527
- # requests. If either the source or destination Amazon S3 bucket has
528
- # Requester Pays enabled, the requester will pay for corresponding
529
- # charges to copy the object. For information about downloading objects
530
- # from Requester Pays buckets, see [Downloading Objects in Requester
531
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
951
+ # requests. If either the source or destination S3 bucket has Requester
952
+ # Pays enabled, the requester will pay for corresponding charges to copy
953
+ # the object. For information about downloading objects from Requester
954
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
955
+ # in the *Amazon S3 User Guide*.
956
+ #
957
+ # <note markdown="1"> This functionality is not supported for directory buckets.
958
+ #
959
+ # </note>
532
960
  #
533
961
  #
534
962
  #
535
963
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
536
964
  # @option options [String] :tagging
537
- # The tag-set for the object destination object this value must be used
538
- # in conjunction with the `TaggingDirective`. The tag-set must be
539
- # encoded as URL Query parameters.
965
+ # The tag-set for the object copy in the destination bucket. This value
966
+ # must be used in conjunction with the `x-amz-tagging-directive` if you
967
+ # choose `REPLACE` for the `x-amz-tagging-directive`. If you choose
968
+ # `COPY` for the `x-amz-tagging-directive`, you don't need to set the
969
+ # `x-amz-tagging` header, because the tag-set will be copied from the
970
+ # source object directly. The tag-set must be encoded as URL Query
971
+ # parameters.
972
+ #
973
+ # The default value is the empty value.
974
+ #
975
+ # <note markdown="1"> **Directory buckets** - For directory buckets in a `CopyObject`
976
+ # operation, only the empty tag-set is supported. Any requests that
977
+ # attempt to write non-empty tags into directory buckets will receive a
978
+ # `501 Not Implemented` status code. When the destination bucket is a
979
+ # directory bucket, you will receive a `501 Not Implemented` response in
980
+ # any of the following situations:
981
+ #
982
+ # * When you attempt to `COPY` the tag-set from an S3 source object that
983
+ # has non-empty tags.
984
+ #
985
+ # * When you attempt to `REPLACE` the tag-set of a source object and set
986
+ # a non-empty value to `x-amz-tagging`.
987
+ #
988
+ # * When you don't set the `x-amz-tagging-directive` header and the
989
+ # source object has non-empty tags. This is because the default value
990
+ # of `x-amz-tagging-directive` is `COPY`.
991
+ #
992
+ # Because only the empty tag-set is supported for directory buckets in a
993
+ # `CopyObject` operation, the following situations are allowed:
994
+ #
995
+ # * When you attempt to `COPY` the tag-set from a directory bucket
996
+ # source object that has no tags to a general purpose bucket. It
997
+ # copies an empty tag-set to the destination object.
998
+ #
999
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
1000
+ # source object and set the `x-amz-tagging` value of the directory
1001
+ # bucket destination object to empty.
1002
+ #
1003
+ # * When you attempt to `REPLACE` the tag-set of a general purpose
1004
+ # bucket source object that has non-empty tags and set the
1005
+ # `x-amz-tagging` value of the directory bucket destination object to
1006
+ # empty.
1007
+ #
1008
+ # * When you attempt to `REPLACE` the tag-set of a directory bucket
1009
+ # source object and don't set the `x-amz-tagging` value of the
1010
+ # directory bucket destination object. This is because the default
1011
+ # value of `x-amz-tagging` is the empty value.
1012
+ #
1013
+ # </note>
540
1014
  # @option options [String] :object_lock_mode
541
- # The Object Lock mode that you want to apply to the copied object.
1015
+ # The Object Lock mode that you want to apply to the object copy.
1016
+ #
1017
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1018
+ #
1019
+ # </note>
542
1020
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
543
- # The date and time when you want the copied object's Object Lock to
1021
+ # The date and time when you want the Object Lock of the object copy to
544
1022
  # expire.
1023
+ #
1024
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1025
+ #
1026
+ # </note>
545
1027
  # @option options [String] :object_lock_legal_hold_status
546
- # Specifies whether you want to apply a legal hold to the copied object.
1028
+ # Specifies whether you want to apply a legal hold to the object copy.
1029
+ #
1030
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1031
+ #
1032
+ # </note>
547
1033
  # @option options [String] :expected_bucket_owner
548
1034
  # The account ID of the expected destination bucket owner. If the
549
- # destination bucket is owned by a different account, the request fails
550
- # with the HTTP status code `403 Forbidden` (access denied).
1035
+ # account ID that you provide does not match the actual owner of the
1036
+ # destination bucket, the request fails with the HTTP status code `403
1037
+ # Forbidden` (access denied).
551
1038
  # @option options [String] :expected_source_bucket_owner
552
- # The account ID of the expected source bucket owner. If the source
553
- # bucket is owned by a different account, the request fails with the
554
- # HTTP status code `403 Forbidden` (access denied).
1039
+ # The account ID of the expected source bucket owner. If the account ID
1040
+ # that you provide does not match the actual owner of the source bucket,
1041
+ # the request fails with the HTTP status code `403 Forbidden` (access
1042
+ # denied).
555
1043
  # @return [Types::CopyObjectOutput]
556
1044
  def copy_from(options = {})
557
1045
  options = options.merge(
558
1046
  bucket: @bucket_name,
559
1047
  key: @key
560
1048
  )
561
- resp = Aws::Plugins::UserAgent.feature('resource') do
1049
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
562
1050
  @client.copy_object(options)
563
1051
  end
564
1052
  resp.data
@@ -572,6 +1060,9 @@ module Aws::S3
572
1060
  # request_payer: "requester", # accepts requester
573
1061
  # bypass_governance_retention: false,
574
1062
  # expected_bucket_owner: "AccountId",
1063
+ # if_match: "IfMatch",
1064
+ # if_match_last_modified_time: Time.now,
1065
+ # if_match_size: 1,
575
1066
  # })
576
1067
  # @param [Hash] options ({})
577
1068
  # @option options [String] :mfa
@@ -579,16 +1070,29 @@ module Aws::S3
579
1070
  # space, and the value that is displayed on your authentication device.
580
1071
  # Required to permanently delete a versioned object if versioning is
581
1072
  # configured with MFA delete enabled.
1073
+ #
1074
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1075
+ #
1076
+ # </note>
582
1077
  # @option options [String] :version_id
583
- # VersionId used to reference a specific version of the object.
1078
+ # Version ID used to reference a specific version of the object.
1079
+ #
1080
+ # <note markdown="1"> For directory buckets in this API operation, only the `null` value of
1081
+ # the version ID is supported.
1082
+ #
1083
+ # </note>
584
1084
  # @option options [String] :request_payer
585
1085
  # Confirms that the requester knows that they will be charged for the
586
1086
  # request. Bucket owners need not specify this parameter in their
587
- # requests. If either the source or destination Amazon S3 bucket has
588
- # Requester Pays enabled, the requester will pay for corresponding
589
- # charges to copy the object. For information about downloading objects
590
- # from Requester Pays buckets, see [Downloading Objects in Requester
591
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
1087
+ # requests. If either the source or destination S3 bucket has Requester
1088
+ # Pays enabled, the requester will pay for corresponding charges to copy
1089
+ # the object. For information about downloading objects from Requester
1090
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1091
+ # in the *Amazon S3 User Guide*.
1092
+ #
1093
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1094
+ #
1095
+ # </note>
592
1096
  #
593
1097
  #
594
1098
  #
@@ -597,17 +1101,61 @@ module Aws::S3
597
1101
  # Indicates whether S3 Object Lock should bypass Governance-mode
598
1102
  # restrictions to process this operation. To use this header, you must
599
1103
  # have the `s3:BypassGovernanceRetention` permission.
1104
+ #
1105
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1106
+ #
1107
+ # </note>
600
1108
  # @option options [String] :expected_bucket_owner
601
- # The account ID of the expected bucket owner. If the bucket is owned by
602
- # a different account, the request fails with the HTTP status code `403
603
- # Forbidden` (access denied).
1109
+ # The account ID of the expected bucket owner. If the account ID that
1110
+ # you provide does not match the actual owner of the bucket, the request
1111
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1112
+ # @option options [String] :if_match
1113
+ # The `If-Match` header field makes the request method conditional on
1114
+ # ETags. If the ETag value does not match, the operation returns a `412
1115
+ # Precondition Failed` error. If the ETag matches or if the object
1116
+ # doesn't exist, the operation will return a `204 Success (No Content)
1117
+ # response`.
1118
+ #
1119
+ # For more information about conditional requests, see [RFC 7232][1].
1120
+ #
1121
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1122
+ #
1123
+ # </note>
1124
+ #
1125
+ #
1126
+ #
1127
+ # [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
1128
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
1129
+ # If present, the object is deleted only if its modification times
1130
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
1131
+ # match, the operation returns a `412 Precondition Failed` error. If the
1132
+ # `Timestamp` matches or if the object doesn’t exist, the operation
1133
+ # returns a `204 Success (No Content)` response.
1134
+ #
1135
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1136
+ #
1137
+ # </note>
1138
+ # @option options [Integer] :if_match_size
1139
+ # If present, the object is deleted only if its size matches the
1140
+ # provided size in bytes. If the `Size` value does not match, the
1141
+ # operation returns a `412 Precondition Failed` error. If the `Size`
1142
+ # matches or if the object doesn’t exist, the operation returns a `204
1143
+ # Success (No Content)` response.
1144
+ #
1145
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1146
+ #
1147
+ # </note>
1148
+ #
1149
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
1150
+ # `x-amz-if-match-size` conditional headers in conjunction with
1151
+ # each-other or individually.
604
1152
  # @return [Types::DeleteObjectOutput]
605
1153
  def delete(options = {})
606
1154
  options = options.merge(
607
1155
  bucket: @bucket_name,
608
1156
  key: @key
609
1157
  )
610
- resp = Aws::Plugins::UserAgent.feature('resource') do
1158
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
611
1159
  @client.delete_object(options)
612
1160
  end
613
1161
  resp.data
@@ -639,18 +1187,64 @@ module Aws::S3
639
1187
  # @param [Hash] options ({})
640
1188
  # @option options [String] :if_match
641
1189
  # Return the object only if its entity tag (ETag) is the same as the one
642
- # specified; otherwise, return a 412 (precondition failed) error.
1190
+ # specified in this header; otherwise, return a `412 Precondition
1191
+ # Failed` error.
1192
+ #
1193
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
1194
+ # present in the request as follows: `If-Match` condition evaluates to
1195
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
1196
+ # then, S3 returns `200 OK` and the data requested.
1197
+ #
1198
+ # For more information about conditional requests, see [RFC 7232][1].
1199
+ #
1200
+ #
1201
+ #
1202
+ # [1]: https://tools.ietf.org/html/rfc7232
643
1203
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
644
1204
  # Return the object only if it has been modified since the specified
645
- # time; otherwise, return a 304 (not modified) error.
1205
+ # time; otherwise, return a `304 Not Modified` error.
1206
+ #
1207
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
1208
+ # present in the request as follows:` If-None-Match` condition evaluates
1209
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
1210
+ # then, S3 returns `304 Not Modified` status code.
1211
+ #
1212
+ # For more information about conditional requests, see [RFC 7232][1].
1213
+ #
1214
+ #
1215
+ #
1216
+ # [1]: https://tools.ietf.org/html/rfc7232
646
1217
  # @option options [String] :if_none_match
647
1218
  # Return the object only if its entity tag (ETag) is different from the
648
- # one specified; otherwise, return a 304 (not modified) error.
1219
+ # one specified in this header; otherwise, return a `304 Not Modified`
1220
+ # error.
1221
+ #
1222
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
1223
+ # present in the request as follows:` If-None-Match` condition evaluates
1224
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
1225
+ # then, S3 returns `304 Not Modified` HTTP status code.
1226
+ #
1227
+ # For more information about conditional requests, see [RFC 7232][1].
1228
+ #
1229
+ #
1230
+ #
1231
+ # [1]: https://tools.ietf.org/html/rfc7232
649
1232
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
650
1233
  # Return the object only if it has not been modified since the specified
651
- # time; otherwise, return a 412 (precondition failed) error.
1234
+ # time; otherwise, return a `412 Precondition Failed` error.
1235
+ #
1236
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
1237
+ # present in the request as follows: `If-Match` condition evaluates to
1238
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
1239
+ # then, S3 returns `200 OK` and the data requested.
1240
+ #
1241
+ # For more information about conditional requests, see [RFC 7232][1].
1242
+ #
1243
+ #
1244
+ #
1245
+ # [1]: https://tools.ietf.org/html/rfc7232
652
1246
  # @option options [String] :range
653
- # Downloads the specified range bytes of an object. For more information
1247
+ # Downloads the specified byte range of an object. For more information
654
1248
  # about the HTTP Range header, see
655
1249
  # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
656
1250
  #
@@ -665,7 +1259,7 @@ module Aws::S3
665
1259
  # @option options [String] :response_cache_control
666
1260
  # Sets the `Cache-Control` header of the response.
667
1261
  # @option options [String] :response_content_disposition
668
- # Sets the `Content-Disposition` header of the response
1262
+ # Sets the `Content-Disposition` header of the response.
669
1263
  # @option options [String] :response_content_encoding
670
1264
  # Sets the `Content-Encoding` header of the response.
671
1265
  # @option options [String] :response_content_language
@@ -675,28 +1269,127 @@ module Aws::S3
675
1269
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
676
1270
  # Sets the `Expires` header of the response.
677
1271
  # @option options [String] :version_id
678
- # VersionId used to reference a specific version of the object.
1272
+ # Version ID used to reference a specific version of the object.
1273
+ #
1274
+ # By default, the `GetObject` operation returns the current version of
1275
+ # an object. To return a different version, use the `versionId`
1276
+ # subresource.
1277
+ #
1278
+ # <note markdown="1"> * If you include a `versionId` in your request header, you must have
1279
+ # the `s3:GetObjectVersion` permission to access a specific version of
1280
+ # an object. The `s3:GetObject` permission is not required in this
1281
+ # scenario.
1282
+ #
1283
+ # * If you request the current version of an object without a specific
1284
+ # `versionId` in the request header, only the `s3:GetObject`
1285
+ # permission is required. The `s3:GetObjectVersion` permission is not
1286
+ # required in this scenario.
1287
+ #
1288
+ # * **Directory buckets** - S3 Versioning isn't enabled and supported
1289
+ # for directory buckets. For this API operation, only the `null` value
1290
+ # of the version ID is supported by directory buckets. You can only
1291
+ # specify `null` to the `versionId` query parameter in the request.
1292
+ #
1293
+ # </note>
1294
+ #
1295
+ # For more information about versioning, see [PutBucketVersioning][1].
1296
+ #
1297
+ #
1298
+ #
1299
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html
679
1300
  # @option options [String] :sse_customer_algorithm
680
- # Specifies the algorithm to use to when decrypting the object (for
681
- # example, AES256).
1301
+ # Specifies the algorithm to use when decrypting the object (for
1302
+ # example, `AES256`).
1303
+ #
1304
+ # If you encrypt an object by using server-side encryption with
1305
+ # customer-provided encryption keys (SSE-C) when you store the object in
1306
+ # Amazon S3, then when you GET the object, you must use the following
1307
+ # headers:
1308
+ #
1309
+ # * `x-amz-server-side-encryption-customer-algorithm`
1310
+ #
1311
+ # * `x-amz-server-side-encryption-customer-key`
1312
+ #
1313
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1314
+ #
1315
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1316
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1317
+ #
1318
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1319
+ #
1320
+ # </note>
1321
+ #
1322
+ #
1323
+ #
1324
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
682
1325
  # @option options [String] :sse_customer_key
683
- # Specifies the customer-provided encryption key for Amazon S3 used to
684
- # encrypt the data. This value is used to decrypt the object when
685
- # recovering it and must match the one used when storing the data. The
686
- # key must be appropriate for use with the algorithm specified in the
1326
+ # Specifies the customer-provided encryption key that you originally
1327
+ # provided for Amazon S3 to encrypt the data before storing it. This
1328
+ # value is used to decrypt the object when recovering it and must match
1329
+ # the one used when storing the data. The key must be appropriate for
1330
+ # use with the algorithm specified in the
687
1331
  # `x-amz-server-side-encryption-customer-algorithm` header.
1332
+ #
1333
+ # If you encrypt an object by using server-side encryption with
1334
+ # customer-provided encryption keys (SSE-C) when you store the object in
1335
+ # Amazon S3, then when you GET the object, you must use the following
1336
+ # headers:
1337
+ #
1338
+ # * `x-amz-server-side-encryption-customer-algorithm`
1339
+ #
1340
+ # * `x-amz-server-side-encryption-customer-key`
1341
+ #
1342
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1343
+ #
1344
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1345
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1346
+ #
1347
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1348
+ #
1349
+ # </note>
1350
+ #
1351
+ #
1352
+ #
1353
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
688
1354
  # @option options [String] :sse_customer_key_md5
689
- # Specifies the 128-bit MD5 digest of the encryption key according to
690
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
691
- # ensure that the encryption key was transmitted without error.
1355
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
1356
+ # key according to RFC 1321. Amazon S3 uses this header for a message
1357
+ # integrity check to ensure that the encryption key was transmitted
1358
+ # without error.
1359
+ #
1360
+ # If you encrypt an object by using server-side encryption with
1361
+ # customer-provided encryption keys (SSE-C) when you store the object in
1362
+ # Amazon S3, then when you GET the object, you must use the following
1363
+ # headers:
1364
+ #
1365
+ # * `x-amz-server-side-encryption-customer-algorithm`
1366
+ #
1367
+ # * `x-amz-server-side-encryption-customer-key`
1368
+ #
1369
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1370
+ #
1371
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1372
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1373
+ #
1374
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1375
+ #
1376
+ # </note>
1377
+ #
1378
+ #
1379
+ #
1380
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
692
1381
  # @option options [String] :request_payer
693
1382
  # Confirms that the requester knows that they will be charged for the
694
1383
  # request. Bucket owners need not specify this parameter in their
695
- # requests. If either the source or destination Amazon S3 bucket has
696
- # Requester Pays enabled, the requester will pay for corresponding
697
- # charges to copy the object. For information about downloading objects
698
- # from Requester Pays buckets, see [Downloading Objects in Requester
699
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
1384
+ # requests. If either the source or destination S3 bucket has Requester
1385
+ # Pays enabled, the requester will pay for corresponding charges to copy
1386
+ # the object. For information about downloading objects from Requester
1387
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1388
+ # in the *Amazon S3 User Guide*.
1389
+ #
1390
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1391
+ #
1392
+ # </note>
700
1393
  #
701
1394
  #
702
1395
  #
@@ -707,18 +1400,27 @@ module Aws::S3
707
1400
  # for the part specified. Useful for downloading just a part of an
708
1401
  # object.
709
1402
  # @option options [String] :expected_bucket_owner
710
- # The account ID of the expected bucket owner. If the bucket is owned by
711
- # a different account, the request fails with the HTTP status code `403
712
- # Forbidden` (access denied).
1403
+ # The account ID of the expected bucket owner. If the account ID that
1404
+ # you provide does not match the actual owner of the bucket, the request
1405
+ # fails with the HTTP status code `403 Forbidden` (access denied).
713
1406
  # @option options [String] :checksum_mode
714
1407
  # To retrieve the checksum, this mode must be enabled.
1408
+ #
1409
+ # **General purpose buckets** - In addition, if you enable checksum mode
1410
+ # and the object is uploaded with a [checksum][1] and encrypted with an
1411
+ # Key Management Service (KMS) key, you must have permission to use the
1412
+ # `kms:Decrypt` action to retrieve the checksum.
1413
+ #
1414
+ #
1415
+ #
1416
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
715
1417
  # @return [Types::GetObjectOutput]
716
1418
  def get(options = {}, &block)
717
1419
  options = options.merge(
718
1420
  bucket: @bucket_name,
719
1421
  key: @key
720
1422
  )
721
- resp = Aws::Plugins::UserAgent.feature('resource') do
1423
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
722
1424
  @client.get_object(options, &block)
723
1425
  end
724
1426
  resp.data
@@ -742,7 +1444,7 @@ module Aws::S3
742
1444
  # "MetadataKey" => "MetadataValue",
743
1445
  # },
744
1446
  # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
745
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
1447
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
746
1448
  # website_redirect_location: "WebsiteRedirectLocation",
747
1449
  # sse_customer_algorithm: "SSECustomerAlgorithm",
748
1450
  # sse_customer_key: "SSECustomerKey",
@@ -760,9 +1462,29 @@ module Aws::S3
760
1462
  # })
761
1463
  # @param [Hash] options ({})
762
1464
  # @option options [String] :acl
763
- # The canned ACL to apply to the object.
1465
+ # The canned ACL to apply to the object. Amazon S3 supports a set of
1466
+ # predefined ACLs, known as *canned ACLs*. Each canned ACL has a
1467
+ # predefined set of grantees and permissions. For more information, see
1468
+ # [Canned ACL][1] in the *Amazon S3 User Guide*.
1469
+ #
1470
+ # By default, all objects are private. Only the owner has full access
1471
+ # control. When uploading an object, you can grant access permissions to
1472
+ # individual Amazon Web Services accounts or to predefined groups
1473
+ # defined by Amazon S3. These permissions are then added to the access
1474
+ # control list (ACL) on the new object. For more information, see [Using
1475
+ # ACLs][2]. One way to grant the permissions using the request headers
1476
+ # is to specify a canned ACL with the `x-amz-acl` request header.
764
1477
  #
765
- # This action is not supported by Amazon S3 on Outposts.
1478
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1479
+ #
1480
+ # * This functionality is not supported for Amazon S3 on Outposts.
1481
+ #
1482
+ # </note>
1483
+ #
1484
+ #
1485
+ #
1486
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
1487
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
766
1488
  # @option options [String] :cache_control
767
1489
  # Specifies caching behavior along the request/reply chain.
768
1490
  # @option options [String] :content_disposition
@@ -771,41 +1493,334 @@ module Aws::S3
771
1493
  # Specifies what content encodings have been applied to the object and
772
1494
  # thus what decoding mechanisms must be applied to obtain the media-type
773
1495
  # referenced by the Content-Type header field.
1496
+ #
1497
+ # <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
1498
+ # this header field.
1499
+ #
1500
+ # </note>
774
1501
  # @option options [String] :content_language
775
- # The language the content is in.
1502
+ # The language that the content is in.
776
1503
  # @option options [String] :content_type
777
1504
  # A standard MIME type describing the format of the object data.
778
1505
  # @option options [Time,DateTime,Date,Integer,String] :expires
779
1506
  # The date and time at which the object is no longer cacheable.
780
1507
  # @option options [String] :grant_full_control
781
- # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
782
- # object.
1508
+ # Specify access permissions explicitly to give the grantee READ,
1509
+ # READ\_ACP, and WRITE\_ACP permissions on the object.
1510
+ #
1511
+ # By default, all objects are private. Only the owner has full access
1512
+ # control. When uploading an object, you can use this header to
1513
+ # explicitly grant access permissions to specific Amazon Web Services
1514
+ # accounts or groups. This header maps to specific permissions that
1515
+ # Amazon S3 supports in an ACL. For more information, see [Access
1516
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1517
+ #
1518
+ # You specify each grantee as a type=value pair, where the type is one
1519
+ # of the following:
1520
+ #
1521
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1522
+ # Web Services account
1523
+ #
1524
+ # * `uri` – if you are granting permissions to a predefined group
1525
+ #
1526
+ # * `emailAddress` – if the value specified is the email address of an
1527
+ # Amazon Web Services account
1528
+ #
1529
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1530
+ # following Amazon Web Services Regions:
1531
+ #
1532
+ # * US East (N. Virginia)
1533
+ #
1534
+ # * US West (N. California)
1535
+ #
1536
+ # * US West (Oregon)
1537
+ #
1538
+ # * Asia Pacific (Singapore)
1539
+ #
1540
+ # * Asia Pacific (Sydney)
1541
+ #
1542
+ # * Asia Pacific (Tokyo)
1543
+ #
1544
+ # * Europe (Ireland)
1545
+ #
1546
+ # * South America (São Paulo)
1547
+ #
1548
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1549
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1550
+ # Reference.
1551
+ #
1552
+ # </note>
1553
+ #
1554
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1555
+ # Web Services accounts identified by account IDs permissions to read
1556
+ # object data and its metadata:
1557
+ #
1558
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1559
+ #
1560
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1561
+ #
1562
+ # * This functionality is not supported for Amazon S3 on Outposts.
1563
+ #
1564
+ # </note>
1565
+ #
1566
+ #
1567
+ #
1568
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1569
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
1570
+ # @option options [String] :grant_read
1571
+ # Specify access permissions explicitly to allow grantee to read the
1572
+ # object data and its metadata.
1573
+ #
1574
+ # By default, all objects are private. Only the owner has full access
1575
+ # control. When uploading an object, you can use this header to
1576
+ # explicitly grant access permissions to specific Amazon Web Services
1577
+ # accounts or groups. This header maps to specific permissions that
1578
+ # Amazon S3 supports in an ACL. For more information, see [Access
1579
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1580
+ #
1581
+ # You specify each grantee as a type=value pair, where the type is one
1582
+ # of the following:
1583
+ #
1584
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1585
+ # Web Services account
1586
+ #
1587
+ # * `uri` – if you are granting permissions to a predefined group
1588
+ #
1589
+ # * `emailAddress` – if the value specified is the email address of an
1590
+ # Amazon Web Services account
1591
+ #
1592
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1593
+ # following Amazon Web Services Regions:
1594
+ #
1595
+ # * US East (N. Virginia)
1596
+ #
1597
+ # * US West (N. California)
1598
+ #
1599
+ # * US West (Oregon)
1600
+ #
1601
+ # * Asia Pacific (Singapore)
1602
+ #
1603
+ # * Asia Pacific (Sydney)
1604
+ #
1605
+ # * Asia Pacific (Tokyo)
1606
+ #
1607
+ # * Europe (Ireland)
1608
+ #
1609
+ # * South America (São Paulo)
1610
+ #
1611
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1612
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1613
+ # Reference.
1614
+ #
1615
+ # </note>
1616
+ #
1617
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1618
+ # Web Services accounts identified by account IDs permissions to read
1619
+ # object data and its metadata:
1620
+ #
1621
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1622
+ #
1623
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1624
+ #
1625
+ # * This functionality is not supported for Amazon S3 on Outposts.
1626
+ #
1627
+ # </note>
783
1628
  #
784
- # This action is not supported by Amazon S3 on Outposts.
785
- # @option options [String] :grant_read
786
- # Allows grantee to read the object data and its metadata.
787
1629
  #
788
- # This action is not supported by Amazon S3 on Outposts.
1630
+ #
1631
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1632
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
789
1633
  # @option options [String] :grant_read_acp
790
- # Allows grantee to read the object ACL.
1634
+ # Specify access permissions explicitly to allows grantee to read the
1635
+ # object ACL.
1636
+ #
1637
+ # By default, all objects are private. Only the owner has full access
1638
+ # control. When uploading an object, you can use this header to
1639
+ # explicitly grant access permissions to specific Amazon Web Services
1640
+ # accounts or groups. This header maps to specific permissions that
1641
+ # Amazon S3 supports in an ACL. For more information, see [Access
1642
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1643
+ #
1644
+ # You specify each grantee as a type=value pair, where the type is one
1645
+ # of the following:
1646
+ #
1647
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1648
+ # Web Services account
1649
+ #
1650
+ # * `uri` – if you are granting permissions to a predefined group
1651
+ #
1652
+ # * `emailAddress` – if the value specified is the email address of an
1653
+ # Amazon Web Services account
1654
+ #
1655
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1656
+ # following Amazon Web Services Regions:
1657
+ #
1658
+ # * US East (N. Virginia)
1659
+ #
1660
+ # * US West (N. California)
1661
+ #
1662
+ # * US West (Oregon)
1663
+ #
1664
+ # * Asia Pacific (Singapore)
1665
+ #
1666
+ # * Asia Pacific (Sydney)
1667
+ #
1668
+ # * Asia Pacific (Tokyo)
1669
+ #
1670
+ # * Europe (Ireland)
1671
+ #
1672
+ # * South America (São Paulo)
791
1673
  #
792
- # This action is not supported by Amazon S3 on Outposts.
1674
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1675
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1676
+ # Reference.
1677
+ #
1678
+ # </note>
1679
+ #
1680
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1681
+ # Web Services accounts identified by account IDs permissions to read
1682
+ # object data and its metadata:
1683
+ #
1684
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1685
+ #
1686
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1687
+ #
1688
+ # * This functionality is not supported for Amazon S3 on Outposts.
1689
+ #
1690
+ # </note>
1691
+ #
1692
+ #
1693
+ #
1694
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1695
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
793
1696
  # @option options [String] :grant_write_acp
794
- # Allows grantee to write the ACL for the applicable object.
1697
+ # Specify access permissions explicitly to allows grantee to allow
1698
+ # grantee to write the ACL for the applicable object.
1699
+ #
1700
+ # By default, all objects are private. Only the owner has full access
1701
+ # control. When uploading an object, you can use this header to
1702
+ # explicitly grant access permissions to specific Amazon Web Services
1703
+ # accounts or groups. This header maps to specific permissions that
1704
+ # Amazon S3 supports in an ACL. For more information, see [Access
1705
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1706
+ #
1707
+ # You specify each grantee as a type=value pair, where the type is one
1708
+ # of the following:
1709
+ #
1710
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1711
+ # Web Services account
1712
+ #
1713
+ # * `uri` – if you are granting permissions to a predefined group
1714
+ #
1715
+ # * `emailAddress` – if the value specified is the email address of an
1716
+ # Amazon Web Services account
1717
+ #
1718
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1719
+ # following Amazon Web Services Regions:
1720
+ #
1721
+ # * US East (N. Virginia)
1722
+ #
1723
+ # * US West (N. California)
1724
+ #
1725
+ # * US West (Oregon)
1726
+ #
1727
+ # * Asia Pacific (Singapore)
1728
+ #
1729
+ # * Asia Pacific (Sydney)
1730
+ #
1731
+ # * Asia Pacific (Tokyo)
1732
+ #
1733
+ # * Europe (Ireland)
1734
+ #
1735
+ # * South America (São Paulo)
1736
+ #
1737
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1738
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1739
+ # Reference.
1740
+ #
1741
+ # </note>
1742
+ #
1743
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1744
+ # Web Services accounts identified by account IDs permissions to read
1745
+ # object data and its metadata:
1746
+ #
1747
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1748
+ #
1749
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
795
1750
  #
796
- # This action is not supported by Amazon S3 on Outposts.
1751
+ # * This functionality is not supported for Amazon S3 on Outposts.
1752
+ #
1753
+ # </note>
1754
+ #
1755
+ #
1756
+ #
1757
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1758
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
797
1759
  # @option options [Hash<String,String>] :metadata
798
1760
  # A map of metadata to store with the object in S3.
799
1761
  # @option options [String] :server_side_encryption
800
- # The server-side encryption algorithm used when storing this object in
801
- # Amazon S3 (for example, `AES256`, `aws:kms`).
1762
+ # The server-side encryption algorithm used when you store this object
1763
+ # in Amazon S3 (for example, `AES256`, `aws:kms`).
1764
+ #
1765
+ # * <b>Directory buckets </b> - For directory buckets, there are only
1766
+ # two supported options for server-side encryption: server-side
1767
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
1768
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
1769
+ # recommend that the bucket's default encryption uses the desired
1770
+ # encryption configuration and you don't override the bucket default
1771
+ # encryption in your `CreateSession` requests or `PUT` object
1772
+ # requests. Then, new objects are automatically encrypted with the
1773
+ # desired encryption settings. For more information, see [Protecting
1774
+ # data with server-side encryption][1] in the *Amazon S3 User Guide*.
1775
+ # For more information about the encryption overriding behaviors in
1776
+ # directory buckets, see [Specifying server-side encryption with KMS
1777
+ # for new object uploads][2].
1778
+ #
1779
+ # In the Zonal endpoint API calls (except [CopyObject][3] and
1780
+ # [UploadPartCopy][4]) using the REST API, the encryption request
1781
+ # headers must match the encryption settings that are specified in the
1782
+ # `CreateSession` request. You can't override the values of the
1783
+ # encryption settings (`x-amz-server-side-encryption`,
1784
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
1785
+ # `x-amz-server-side-encryption-context`, and
1786
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
1787
+ # specified in the `CreateSession` request. You don't need to
1788
+ # explicitly specify these encryption settings values in Zonal
1789
+ # endpoint API calls, and Amazon S3 will use the encryption settings
1790
+ # values from the `CreateSession` request to protect new objects in
1791
+ # the directory bucket.
1792
+ #
1793
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
1794
+ # `CreateSession`, the session token refreshes automatically to avoid
1795
+ # service interruptions when a session expires. The CLI or the Amazon
1796
+ # Web Services SDKs use the bucket's default encryption configuration
1797
+ # for the `CreateSession` request. It's not supported to override the
1798
+ # encryption settings values in the `CreateSession` request. So in the
1799
+ # Zonal endpoint API calls (except [CopyObject][3] and
1800
+ # [UploadPartCopy][4]), the encryption request headers must match the
1801
+ # default encryption configuration of the directory bucket.
1802
+ #
1803
+ # </note>
1804
+ #
1805
+ #
1806
+ #
1807
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
1808
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
1809
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
1810
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
802
1811
  # @option options [String] :storage_class
803
1812
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
804
1813
  # created objects. The STANDARD storage class provides high durability
805
1814
  # and high availability. Depending on performance needs, you can specify
806
- # a different Storage Class. Amazon S3 on Outposts only uses the
807
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
808
- # in the *Amazon S3 User Guide*.
1815
+ # a different Storage Class. For more information, see [Storage
1816
+ # Classes][1] in the *Amazon S3 User Guide*.
1817
+ #
1818
+ # <note markdown="1"> * For directory buckets, only the S3 Express One Zone storage class is
1819
+ # supported to store newly created objects.
1820
+ #
1821
+ # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
1822
+ #
1823
+ # </note>
809
1824
  #
810
1825
  #
811
1826
  #
@@ -814,51 +1829,117 @@ module Aws::S3
814
1829
  # If the bucket is configured as a website, redirects requests for this
815
1830
  # object to another object in the same bucket or to an external URL.
816
1831
  # Amazon S3 stores the value of this header in the object metadata.
1832
+ #
1833
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1834
+ #
1835
+ # </note>
817
1836
  # @option options [String] :sse_customer_algorithm
818
- # Specifies the algorithm to use to when encrypting the object (for
1837
+ # Specifies the algorithm to use when encrypting the object (for
819
1838
  # example, AES256).
1839
+ #
1840
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1841
+ #
1842
+ # </note>
820
1843
  # @option options [String] :sse_customer_key
821
1844
  # Specifies the customer-provided encryption key for Amazon S3 to use in
822
1845
  # encrypting data. This value is used to store the object and then it is
823
1846
  # discarded; Amazon S3 does not store the encryption key. The key must
824
1847
  # be appropriate for use with the algorithm specified in the
825
1848
  # `x-amz-server-side-encryption-customer-algorithm` header.
826
- # @option options [String] :sse_customer_key_md5
827
- # Specifies the 128-bit MD5 digest of the encryption key according to
828
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
829
- # ensure that the encryption key was transmitted without error.
830
- # @option options [String] :ssekms_key_id
831
- # Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric
832
- # encryption customer managed key to use for object encryption. All GET
833
- # and PUT requests for an object protected by KMS will fail if they're
834
- # not made via SSL or using SigV4. For information about configuring any
835
- # of the officially supported Amazon Web Services SDKs and Amazon Web
836
- # Services CLI, see [Specifying the Signature Version in Request
837
- # Authentication][1] in the *Amazon S3 User Guide*.
838
1849
  #
1850
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1851
+ #
1852
+ # </note>
1853
+ # @option options [String] :sse_customer_key_md5
1854
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
1855
+ # key according to RFC 1321. Amazon S3 uses this header for a message
1856
+ # integrity check to ensure that the encryption key was transmitted
1857
+ # without error.
839
1858
  #
1859
+ # <note markdown="1"> This functionality is not supported for directory buckets.
840
1860
  #
841
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1861
+ # </note>
1862
+ # @option options [String] :ssekms_key_id
1863
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
1864
+ # object encryption. If the KMS key doesn't exist in the same account
1865
+ # that's issuing the command, you must use the full Key ARN not the Key
1866
+ # ID.
1867
+ #
1868
+ # **General purpose buckets** - If you specify
1869
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
1870
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
1871
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
1872
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
1873
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1874
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
1875
+ #
1876
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
1877
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
1878
+ # header is implicitly assigned the ID of the KMS symmetric encryption
1879
+ # customer managed key that's configured for your directory bucket's
1880
+ # default encryption setting. If you want to specify the `
1881
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
1882
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
1883
+ # customer managed key that's configured for your directory bucket's
1884
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
1885
+ # Request` error. Only use the key ID or key ARN. The key alias format
1886
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
1887
+ # support 1 [customer managed key][1] per directory bucket for the
1888
+ # lifetime of the bucket. The [Amazon Web Services managed key][2]
1889
+ # (`aws/s3`) isn't supported.
1890
+ #
1891
+ #
1892
+ #
1893
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
1894
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
842
1895
  # @option options [String] :ssekms_encryption_context
843
1896
  # Specifies the Amazon Web Services KMS Encryption Context to use for
844
- # object encryption. The value of this header is a base64-encoded UTF-8
845
- # string holding JSON with the encryption context key-value pairs.
1897
+ # object encryption. The value of this header is a Base64-encoded string
1898
+ # of a UTF-8 encoded JSON, which contains the encryption context as
1899
+ # key-value pairs.
1900
+ #
1901
+ # **Directory buckets** - You can optionally provide an explicit
1902
+ # encryption context value. The value must match the default encryption
1903
+ # context - the bucket Amazon Resource Name (ARN). An additional
1904
+ # encryption context value is not supported.
846
1905
  # @option options [Boolean] :bucket_key_enabled
847
1906
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
848
1907
  # encryption with server-side encryption using Key Management Service
849
- # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
850
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
1908
+ # (KMS) keys (SSE-KMS).
851
1909
  #
852
- # Specifying this header with an object action doesn’t affect
1910
+ # **General purpose buckets** - Setting this header to `true` causes
1911
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
1912
+ # Also, specifying this header with a PUT action doesn't affect
853
1913
  # bucket-level settings for S3 Bucket Key.
1914
+ #
1915
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
1916
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
1917
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
1918
+ # from general purpose buckets to directory buckets, from directory
1919
+ # buckets to general purpose buckets, or between directory buckets,
1920
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
1921
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
1922
+ # makes a call to KMS every time a copy request is made for a
1923
+ # KMS-encrypted object.
1924
+ #
1925
+ #
1926
+ #
1927
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
1928
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
1929
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
1930
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
854
1931
  # @option options [String] :request_payer
855
1932
  # Confirms that the requester knows that they will be charged for the
856
1933
  # request. Bucket owners need not specify this parameter in their
857
- # requests. If either the source or destination Amazon S3 bucket has
858
- # Requester Pays enabled, the requester will pay for corresponding
859
- # charges to copy the object. For information about downloading objects
860
- # from Requester Pays buckets, see [Downloading Objects in Requester
861
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
1934
+ # requests. If either the source or destination S3 bucket has Requester
1935
+ # Pays enabled, the requester will pay for corresponding charges to copy
1936
+ # the object. For information about downloading objects from Requester
1937
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1938
+ # in the *Amazon S3 User Guide*.
1939
+ #
1940
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1941
+ #
1942
+ # </note>
862
1943
  #
863
1944
  #
864
1945
  #
@@ -866,20 +1947,36 @@ module Aws::S3
866
1947
  # @option options [String] :tagging
867
1948
  # The tag-set for the object. The tag-set must be encoded as URL Query
868
1949
  # parameters.
1950
+ #
1951
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1952
+ #
1953
+ # </note>
869
1954
  # @option options [String] :object_lock_mode
870
1955
  # Specifies the Object Lock mode that you want to apply to the uploaded
871
1956
  # object.
1957
+ #
1958
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1959
+ #
1960
+ # </note>
872
1961
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
873
1962
  # Specifies the date and time when you want the Object Lock to expire.
1963
+ #
1964
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1965
+ #
1966
+ # </note>
874
1967
  # @option options [String] :object_lock_legal_hold_status
875
1968
  # Specifies whether you want to apply a legal hold to the uploaded
876
1969
  # object.
1970
+ #
1971
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1972
+ #
1973
+ # </note>
877
1974
  # @option options [String] :expected_bucket_owner
878
- # The account ID of the expected bucket owner. If the bucket is owned by
879
- # a different account, the request fails with the HTTP status code `403
880
- # Forbidden` (access denied).
1975
+ # The account ID of the expected bucket owner. If the account ID that
1976
+ # you provide does not match the actual owner of the bucket, the request
1977
+ # fails with the HTTP status code `403 Forbidden` (access denied).
881
1978
  # @option options [String] :checksum_algorithm
882
- # Indicates the algorithm you want Amazon S3 to use to create the
1979
+ # Indicates the algorithm that you want Amazon S3 to use to create the
883
1980
  # checksum for the object. For more information, see [Checking object
884
1981
  # integrity][1] in the *Amazon S3 User Guide*.
885
1982
  #
@@ -892,7 +1989,7 @@ module Aws::S3
892
1989
  bucket: @bucket_name,
893
1990
  key: @key
894
1991
  )
895
- resp = Aws::Plugins::UserAgent.feature('resource') do
1992
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
896
1993
  @client.create_multipart_upload(options)
897
1994
  end
898
1995
  MultipartUpload.new(
@@ -921,15 +2018,18 @@ module Aws::S3
921
2018
  # checksum_sha1: "ChecksumSHA1",
922
2019
  # checksum_sha256: "ChecksumSHA256",
923
2020
  # expires: Time.now,
2021
+ # if_match: "IfMatch",
2022
+ # if_none_match: "IfNoneMatch",
924
2023
  # grant_full_control: "GrantFullControl",
925
2024
  # grant_read: "GrantRead",
926
2025
  # grant_read_acp: "GrantReadACP",
927
2026
  # grant_write_acp: "GrantWriteACP",
2027
+ # write_offset_bytes: 1,
928
2028
  # metadata: {
929
2029
  # "MetadataKey" => "MetadataValue",
930
2030
  # },
931
2031
  # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
932
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
2032
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
933
2033
  # website_redirect_location: "WebsiteRedirectLocation",
934
2034
  # sse_customer_algorithm: "SSECustomerAlgorithm",
935
2035
  # sse_customer_key: "SSECustomerKey",
@@ -947,13 +2047,41 @@ module Aws::S3
947
2047
  # @param [Hash] options ({})
948
2048
  # @option options [String] :acl
949
2049
  # The canned ACL to apply to the object. For more information, see
950
- # [Canned ACL][1].
2050
+ # [Canned ACL][1] in the *Amazon S3 User Guide*.
2051
+ #
2052
+ # When adding a new object, you can use headers to grant ACL-based
2053
+ # permissions to individual Amazon Web Services accounts or to
2054
+ # predefined groups defined by Amazon S3. These permissions are then
2055
+ # added to the ACL on the object. By default, all objects are private.
2056
+ # Only the owner has full access control. For more information, see
2057
+ # [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
2058
+ # REST API][3] in the *Amazon S3 User Guide*.
2059
+ #
2060
+ # If the bucket that you're uploading objects to uses the bucket owner
2061
+ # enforced setting for S3 Object Ownership, ACLs are disabled and no
2062
+ # longer affect permissions. Buckets that use this setting only accept
2063
+ # PUT requests that don't specify an ACL or PUT requests that specify
2064
+ # bucket owner full control ACLs, such as the
2065
+ # `bucket-owner-full-control` canned ACL or an equivalent form of this
2066
+ # ACL expressed in the XML format. PUT requests that contain other ACLs
2067
+ # (for example, custom grants to certain Amazon Web Services accounts)
2068
+ # fail and return a `400` error with the error code
2069
+ # `AccessControlListNotSupported`. For more information, see [
2070
+ # Controlling ownership of objects and disabling ACLs][4] in the *Amazon
2071
+ # S3 User Guide*.
2072
+ #
2073
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2074
+ #
2075
+ # * This functionality is not supported for Amazon S3 on Outposts.
951
2076
  #
952
- # This action is not supported by Amazon S3 on Outposts.
2077
+ # </note>
953
2078
  #
954
2079
  #
955
2080
  #
956
2081
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
2082
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
2083
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
2084
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
957
2085
  # @option options [String, StringIO, File] :body
958
2086
  # Object data.
959
2087
  # @option options [String] :cache_control
@@ -1000,9 +2128,22 @@ module Aws::S3
1000
2128
  # information about REST request authentication, see [REST
1001
2129
  # Authentication][1].
1002
2130
  #
2131
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2132
+ # for any request to upload an object with a retention period configured
2133
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2134
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2135
+ # Guide*.
2136
+ #
2137
+ # </note>
2138
+ #
2139
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2140
+ #
2141
+ # </note>
2142
+ #
1003
2143
  #
1004
2144
  #
1005
2145
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
2146
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
1006
2147
  # @option options [String] :content_type
1007
2148
  # A standard MIME type describing the format of the contents. For more
1008
2149
  # information, see
@@ -1013,25 +2154,53 @@ module Aws::S3
1013
2154
  # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
1014
2155
  # @option options [String] :checksum_algorithm
1015
2156
  # Indicates the algorithm used to create the checksum for the object
1016
- # when using the SDK. This header will not provide any additional
1017
- # functionality if not using the SDK. When sending this header, there
1018
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1019
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1020
- # `400 Bad Request`. For more information, see [Checking object
1021
- # integrity][1] in the *Amazon S3 User Guide*.
2157
+ # when you use the SDK. This header will not provide any additional
2158
+ # functionality if you don't use the SDK. When you send this header,
2159
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
2160
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
2161
+ # with the HTTP status code `400 Bad Request`.
1022
2162
  #
1023
- # If you provide an individual checksum, Amazon S3 ignores any provided
1024
- # `ChecksumAlgorithm` parameter.
2163
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
2164
+ # the supported algorithm from the following list:
2165
+ #
2166
+ # * `CRC32`
2167
+ #
2168
+ # * `CRC32C`
2169
+ #
2170
+ # * `SHA1`
2171
+ #
2172
+ # * `SHA256`
2173
+ #
2174
+ # For more information, see [Checking object integrity][1] in the
2175
+ # *Amazon S3 User Guide*.
2176
+ #
2177
+ # If the individual checksum value you provide through
2178
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2179
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
2180
+ # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2181
+ # that matches the provided value in `x-amz-checksum-algorithm `.
2182
+ #
2183
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2184
+ # for any request to upload an object with a retention period configured
2185
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2186
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2187
+ # Guide*.
2188
+ #
2189
+ # </note>
2190
+ #
2191
+ # For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2192
+ # is the default checksum algorithm that's used for performance.
1025
2193
  #
1026
2194
  #
1027
2195
  #
1028
2196
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2197
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
1029
2198
  # @option options [String] :checksum_crc32
1030
2199
  # This header can be used as a data integrity check to verify that the
1031
2200
  # data received is the same data that was originally sent. This header
1032
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
1033
- # more information, see [Checking object integrity][1] in the *Amazon S3
1034
- # User Guide*.
2201
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
2202
+ # For more information, see [Checking object integrity][1] in the
2203
+ # *Amazon S3 User Guide*.
1035
2204
  #
1036
2205
  #
1037
2206
  #
@@ -1039,7 +2208,7 @@ module Aws::S3
1039
2208
  # @option options [String] :checksum_crc32c
1040
2209
  # This header can be used as a data integrity check to verify that the
1041
2210
  # data received is the same data that was originally sent. This header
1042
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
2211
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
1043
2212
  # For more information, see [Checking object integrity][1] in the
1044
2213
  # *Amazon S3 User Guide*.
1045
2214
  #
@@ -1074,35 +2243,165 @@ module Aws::S3
1074
2243
  #
1075
2244
  #
1076
2245
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2246
+ # @option options [String] :if_match
2247
+ # Uploads the object only if the ETag (entity tag) value provided during
2248
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
2249
+ # values do not match, the operation returns a `412 Precondition Failed`
2250
+ # error.
2251
+ #
2252
+ # If a conflicting operation occurs during the upload S3 returns a `409
2253
+ # ConditionalRequestConflict` response. On a 409 failure you should
2254
+ # fetch the object's ETag and retry the upload.
2255
+ #
2256
+ # Expects the ETag value as a string.
2257
+ #
2258
+ # For more information about conditional requests, see [RFC 7232][1], or
2259
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2260
+ #
2261
+ #
2262
+ #
2263
+ # [1]: https://tools.ietf.org/html/rfc7232
2264
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
2265
+ # @option options [String] :if_none_match
2266
+ # Uploads the object only if the object key name does not already exist
2267
+ # in the bucket specified. Otherwise, Amazon S3 returns a `412
2268
+ # Precondition Failed` error.
2269
+ #
2270
+ # If a conflicting operation occurs during the upload S3 returns a `409
2271
+ # ConditionalRequestConflict` response. On a 409 failure you should
2272
+ # retry the upload.
2273
+ #
2274
+ # Expects the '*' (asterisk) character.
2275
+ #
2276
+ # For more information about conditional requests, see [RFC 7232][1], or
2277
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2278
+ #
2279
+ #
2280
+ #
2281
+ # [1]: https://tools.ietf.org/html/rfc7232
2282
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
1077
2283
  # @option options [String] :grant_full_control
1078
2284
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
1079
2285
  # object.
1080
2286
  #
1081
- # This action is not supported by Amazon S3 on Outposts.
2287
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2288
+ #
2289
+ # * This functionality is not supported for Amazon S3 on Outposts.
2290
+ #
2291
+ # </note>
1082
2292
  # @option options [String] :grant_read
1083
2293
  # Allows grantee to read the object data and its metadata.
1084
2294
  #
1085
- # This action is not supported by Amazon S3 on Outposts.
2295
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2296
+ #
2297
+ # * This functionality is not supported for Amazon S3 on Outposts.
2298
+ #
2299
+ # </note>
1086
2300
  # @option options [String] :grant_read_acp
1087
2301
  # Allows grantee to read the object ACL.
1088
2302
  #
1089
- # This action is not supported by Amazon S3 on Outposts.
2303
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2304
+ #
2305
+ # * This functionality is not supported for Amazon S3 on Outposts.
2306
+ #
2307
+ # </note>
1090
2308
  # @option options [String] :grant_write_acp
1091
2309
  # Allows grantee to write the ACL for the applicable object.
1092
2310
  #
1093
- # This action is not supported by Amazon S3 on Outposts.
2311
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2312
+ #
2313
+ # * This functionality is not supported for Amazon S3 on Outposts.
2314
+ #
2315
+ # </note>
2316
+ # @option options [Integer] :write_offset_bytes
2317
+ # Specifies the offset for appending data to existing objects in bytes.
2318
+ # The offset must be equal to the size of the existing object being
2319
+ # appended to. If no object exists, setting this header to 0 will create
2320
+ # a new object.
2321
+ #
2322
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
2323
+ # Express One Zone storage class in directory buckets.
2324
+ #
2325
+ # </note>
1094
2326
  # @option options [Hash<String,String>] :metadata
1095
2327
  # A map of metadata to store with the object in S3.
1096
2328
  # @option options [String] :server_side_encryption
1097
- # The server-side encryption algorithm used when storing this object in
1098
- # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
2329
+ # The server-side encryption algorithm that was used when you store this
2330
+ # object in Amazon S3 (for example, `AES256`, `aws:kms`,
2331
+ # `aws:kms:dsse`).
2332
+ #
2333
+ # * <b>General purpose buckets </b> - You have four mutually exclusive
2334
+ # options to protect data using server-side encryption in Amazon S3,
2335
+ # depending on how you choose to manage the encryption keys.
2336
+ # Specifically, the encryption key options are Amazon S3 managed keys
2337
+ # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
2338
+ # customer-provided keys (SSE-C). Amazon S3 encrypts data with
2339
+ # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
2340
+ # default. You can optionally tell Amazon S3 to encrypt data at rest
2341
+ # by using server-side encryption with other key options. For more
2342
+ # information, see [Using Server-Side Encryption][1] in the *Amazon S3
2343
+ # User Guide*.
2344
+ #
2345
+ # * <b>Directory buckets </b> - For directory buckets, there are only
2346
+ # two supported options for server-side encryption: server-side
2347
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
2348
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
2349
+ # recommend that the bucket's default encryption uses the desired
2350
+ # encryption configuration and you don't override the bucket default
2351
+ # encryption in your `CreateSession` requests or `PUT` object
2352
+ # requests. Then, new objects are automatically encrypted with the
2353
+ # desired encryption settings. For more information, see [Protecting
2354
+ # data with server-side encryption][2] in the *Amazon S3 User Guide*.
2355
+ # For more information about the encryption overriding behaviors in
2356
+ # directory buckets, see [Specifying server-side encryption with KMS
2357
+ # for new object uploads][3].
2358
+ #
2359
+ # In the Zonal endpoint API calls (except [CopyObject][4] and
2360
+ # [UploadPartCopy][5]) using the REST API, the encryption request
2361
+ # headers must match the encryption settings that are specified in the
2362
+ # `CreateSession` request. You can't override the values of the
2363
+ # encryption settings (`x-amz-server-side-encryption`,
2364
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
2365
+ # `x-amz-server-side-encryption-context`, and
2366
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
2367
+ # specified in the `CreateSession` request. You don't need to
2368
+ # explicitly specify these encryption settings values in Zonal
2369
+ # endpoint API calls, and Amazon S3 will use the encryption settings
2370
+ # values from the `CreateSession` request to protect new objects in
2371
+ # the directory bucket.
2372
+ #
2373
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
2374
+ # `CreateSession`, the session token refreshes automatically to avoid
2375
+ # service interruptions when a session expires. The CLI or the Amazon
2376
+ # Web Services SDKs use the bucket's default encryption configuration
2377
+ # for the `CreateSession` request. It's not supported to override the
2378
+ # encryption settings values in the `CreateSession` request. So in the
2379
+ # Zonal endpoint API calls (except [CopyObject][4] and
2380
+ # [UploadPartCopy][5]), the encryption request headers must match the
2381
+ # default encryption configuration of the directory bucket.
2382
+ #
2383
+ # </note>
2384
+ #
2385
+ #
2386
+ #
2387
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
2388
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
2389
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
2390
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
2391
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
1099
2392
  # @option options [String] :storage_class
1100
2393
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1101
2394
  # created objects. The STANDARD storage class provides high durability
1102
2395
  # and high availability. Depending on performance needs, you can specify
1103
- # a different Storage Class. Amazon S3 on Outposts only uses the
1104
- # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1105
- # in the *Amazon S3 User Guide*.
2396
+ # a different Storage Class. For more information, see [Storage
2397
+ # Classes][1] in the *Amazon S3 User Guide*.
2398
+ #
2399
+ # <note markdown="1"> * For directory buckets, only the S3 Express One Zone storage class is
2400
+ # supported to store newly created objects.
2401
+ #
2402
+ # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
2403
+ #
2404
+ # </note>
1106
2405
  #
1107
2406
  #
1108
2407
  #
@@ -1111,7 +2410,8 @@ module Aws::S3
1111
2410
  # If the bucket is configured as a website, redirects requests for this
1112
2411
  # object to another object in the same bucket or to an external URL.
1113
2412
  # Amazon S3 stores the value of this header in the object metadata. For
1114
- # information about object metadata, see [Object Key and Metadata][1].
2413
+ # information about object metadata, see [Object Key and Metadata][1] in
2414
+ # the *Amazon S3 User Guide*.
1115
2415
  #
1116
2416
  # In the following example, the request header sets the redirect to an
1117
2417
  # object (anotherPage.html) in the same bucket:
@@ -1125,7 +2425,11 @@ module Aws::S3
1125
2425
  #
1126
2426
  # For more information about website hosting in Amazon S3, see [Hosting
1127
2427
  # Websites on Amazon S3][2] and [How to Configure Website Page
1128
- # Redirects][3].
2428
+ # Redirects][3] in the *Amazon S3 User Guide*.
2429
+ #
2430
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2431
+ #
2432
+ # </note>
1129
2433
  #
1130
2434
  #
1131
2435
  #
@@ -1133,52 +2437,123 @@ module Aws::S3
1133
2437
  # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
1134
2438
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
1135
2439
  # @option options [String] :sse_customer_algorithm
1136
- # Specifies the algorithm to use to when encrypting the object (for
1137
- # example, AES256).
2440
+ # Specifies the algorithm to use when encrypting the object (for
2441
+ # example, `AES256`).
2442
+ #
2443
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2444
+ #
2445
+ # </note>
1138
2446
  # @option options [String] :sse_customer_key
1139
2447
  # Specifies the customer-provided encryption key for Amazon S3 to use in
1140
2448
  # encrypting data. This value is used to store the object and then it is
1141
2449
  # discarded; Amazon S3 does not store the encryption key. The key must
1142
2450
  # be appropriate for use with the algorithm specified in the
1143
2451
  # `x-amz-server-side-encryption-customer-algorithm` header.
2452
+ #
2453
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2454
+ #
2455
+ # </note>
1144
2456
  # @option options [String] :sse_customer_key_md5
1145
2457
  # Specifies the 128-bit MD5 digest of the encryption key according to
1146
2458
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
1147
2459
  # ensure that the encryption key was transmitted without error.
2460
+ #
2461
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2462
+ #
2463
+ # </note>
1148
2464
  # @option options [String] :ssekms_key_id
1149
- # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
1150
- # `aws:kms:dsse`, this header specifies the ID (Key ID, Key ARN, or Key
1151
- # Alias) of the Key Management Service (KMS) symmetric encryption
1152
- # customer managed key that was used for the object. If you specify
1153
- # `x-amz-server-side-encryption:aws:kms` or
1154
- # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
1155
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1156
- # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
1157
- # KMS key does not exist in the same account that's issuing the
1158
- # command, you must use the full ARN and not just the ID.
2465
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
2466
+ # object encryption. If the KMS key doesn't exist in the same account
2467
+ # that's issuing the command, you must use the full Key ARN not the Key
2468
+ # ID.
2469
+ #
2470
+ # **General purpose buckets** - If you specify
2471
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
2472
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
2473
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
2474
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
2475
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
2476
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
2477
+ #
2478
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
2479
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
2480
+ # header is implicitly assigned the ID of the KMS symmetric encryption
2481
+ # customer managed key that's configured for your directory bucket's
2482
+ # default encryption setting. If you want to specify the `
2483
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
2484
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
2485
+ # customer managed key that's configured for your directory bucket's
2486
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
2487
+ # Request` error. Only use the key ID or key ARN. The key alias format
2488
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
2489
+ # support 1 [customer managed key][1] per directory bucket for the
2490
+ # lifetime of the bucket. The [Amazon Web Services managed key][2]
2491
+ # (`aws/s3`) isn't supported.
2492
+ #
2493
+ #
2494
+ #
2495
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
2496
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
1159
2497
  # @option options [String] :ssekms_encryption_context
1160
- # Specifies the Amazon Web Services KMS Encryption Context to use for
1161
- # object encryption. The value of this header is a base64-encoded UTF-8
1162
- # string holding JSON with the encryption context key-value pairs. This
1163
- # value is stored as object metadata and automatically gets passed on to
1164
- # Amazon Web Services KMS for future `GetObject` or `CopyObject`
1165
- # operations on this object.
2498
+ # Specifies the Amazon Web Services KMS Encryption Context as an
2499
+ # additional encryption context to use for object encryption. The value
2500
+ # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
2501
+ # which contains the encryption context as key-value pairs. This value
2502
+ # is stored as object metadata and automatically gets passed on to
2503
+ # Amazon Web Services KMS for future `GetObject` operations on this
2504
+ # object.
2505
+ #
2506
+ # **General purpose buckets** - This value must be explicitly added
2507
+ # during `CopyObject` operations if you want an additional encryption
2508
+ # context for your object. For more information, see [Encryption
2509
+ # context][1] in the *Amazon S3 User Guide*.
2510
+ #
2511
+ # **Directory buckets** - You can optionally provide an explicit
2512
+ # encryption context value. The value must match the default encryption
2513
+ # context - the bucket Amazon Resource Name (ARN). An additional
2514
+ # encryption context value is not supported.
2515
+ #
2516
+ #
2517
+ #
2518
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
1166
2519
  # @option options [Boolean] :bucket_key_enabled
1167
2520
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1168
2521
  # encryption with server-side encryption using Key Management Service
1169
- # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
1170
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
2522
+ # (KMS) keys (SSE-KMS).
1171
2523
  #
1172
- # Specifying this header with a PUT action doesn’t affect bucket-level
1173
- # settings for S3 Bucket Key.
2524
+ # **General purpose buckets** - Setting this header to `true` causes
2525
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
2526
+ # Also, specifying this header with a PUT action doesn't affect
2527
+ # bucket-level settings for S3 Bucket Key.
2528
+ #
2529
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
2530
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
2531
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
2532
+ # from general purpose buckets to directory buckets, from directory
2533
+ # buckets to general purpose buckets, or between directory buckets,
2534
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
2535
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
2536
+ # makes a call to KMS every time a copy request is made for a
2537
+ # KMS-encrypted object.
2538
+ #
2539
+ #
2540
+ #
2541
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
2542
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
2543
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
2544
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
1174
2545
  # @option options [String] :request_payer
1175
2546
  # Confirms that the requester knows that they will be charged for the
1176
2547
  # request. Bucket owners need not specify this parameter in their
1177
- # requests. If either the source or destination Amazon S3 bucket has
1178
- # Requester Pays enabled, the requester will pay for corresponding
1179
- # charges to copy the object. For information about downloading objects
1180
- # from Requester Pays buckets, see [Downloading Objects in Requester
1181
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
2548
+ # requests. If either the source or destination S3 bucket has Requester
2549
+ # Pays enabled, the requester will pay for corresponding charges to copy
2550
+ # the object. For information about downloading objects from Requester
2551
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
2552
+ # in the *Amazon S3 User Guide*.
2553
+ #
2554
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2555
+ #
2556
+ # </note>
1182
2557
  #
1183
2558
  #
1184
2559
  #
@@ -1186,29 +2561,46 @@ module Aws::S3
1186
2561
  # @option options [String] :tagging
1187
2562
  # The tag-set for the object. The tag-set must be encoded as URL Query
1188
2563
  # parameters. (For example, "Key1=Value1")
2564
+ #
2565
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2566
+ #
2567
+ # </note>
1189
2568
  # @option options [String] :object_lock_mode
1190
2569
  # The Object Lock mode that you want to apply to this object.
2570
+ #
2571
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2572
+ #
2573
+ # </note>
1191
2574
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
1192
2575
  # The date and time when you want this object's Object Lock to expire.
1193
2576
  # Must be formatted as a timestamp parameter.
2577
+ #
2578
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2579
+ #
2580
+ # </note>
1194
2581
  # @option options [String] :object_lock_legal_hold_status
1195
2582
  # Specifies whether a legal hold will be applied to this object. For
1196
- # more information about S3 Object Lock, see [Object Lock][1].
2583
+ # more information about S3 Object Lock, see [Object Lock][1] in the
2584
+ # *Amazon S3 User Guide*.
2585
+ #
2586
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2587
+ #
2588
+ # </note>
1197
2589
  #
1198
2590
  #
1199
2591
  #
1200
2592
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1201
2593
  # @option options [String] :expected_bucket_owner
1202
- # The account ID of the expected bucket owner. If the bucket is owned by
1203
- # a different account, the request fails with the HTTP status code `403
1204
- # Forbidden` (access denied).
2594
+ # The account ID of the expected bucket owner. If the account ID that
2595
+ # you provide does not match the actual owner of the bucket, the request
2596
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1205
2597
  # @return [Types::PutObjectOutput]
1206
2598
  def put(options = {})
1207
2599
  options = options.merge(
1208
2600
  bucket: @bucket_name,
1209
2601
  key: @key
1210
2602
  )
1211
- resp = Aws::Plugins::UserAgent.feature('resource') do
2603
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1212
2604
  @client.put_object(options)
1213
2605
  end
1214
2606
  resp.data
@@ -1295,7 +2687,7 @@ module Aws::S3
1295
2687
  # value: "MetadataValue",
1296
2688
  # },
1297
2689
  # ],
1298
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
2690
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
1299
2691
  # },
1300
2692
  # },
1301
2693
  # },
@@ -1311,23 +2703,27 @@ module Aws::S3
1311
2703
  # @option options [String] :request_payer
1312
2704
  # Confirms that the requester knows that they will be charged for the
1313
2705
  # request. Bucket owners need not specify this parameter in their
1314
- # requests. If either the source or destination Amazon S3 bucket has
1315
- # Requester Pays enabled, the requester will pay for corresponding
1316
- # charges to copy the object. For information about downloading objects
1317
- # from Requester Pays buckets, see [Downloading Objects in Requester
1318
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
2706
+ # requests. If either the source or destination S3 bucket has Requester
2707
+ # Pays enabled, the requester will pay for corresponding charges to copy
2708
+ # the object. For information about downloading objects from Requester
2709
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
2710
+ # in the *Amazon S3 User Guide*.
2711
+ #
2712
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2713
+ #
2714
+ # </note>
1319
2715
  #
1320
2716
  #
1321
2717
  #
1322
2718
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1323
2719
  # @option options [String] :checksum_algorithm
1324
2720
  # Indicates the algorithm used to create the checksum for the object
1325
- # when using the SDK. This header will not provide any additional
1326
- # functionality if not using the SDK. When sending this header, there
1327
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1328
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1329
- # `400 Bad Request`. For more information, see [Checking object
1330
- # integrity][1] in the *Amazon S3 User Guide*.
2721
+ # when you use the SDK. This header will not provide any additional
2722
+ # functionality if you don't use the SDK. When you send this header,
2723
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
2724
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
2725
+ # status code `400 Bad Request`. For more information, see [Checking
2726
+ # object integrity][1] in the *Amazon S3 User Guide*.
1331
2727
  #
1332
2728
  # If you provide an individual checksum, Amazon S3 ignores any provided
1333
2729
  # `ChecksumAlgorithm` parameter.
@@ -1336,16 +2732,16 @@ module Aws::S3
1336
2732
  #
1337
2733
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1338
2734
  # @option options [String] :expected_bucket_owner
1339
- # The account ID of the expected bucket owner. If the bucket is owned by
1340
- # a different account, the request fails with the HTTP status code `403
1341
- # Forbidden` (access denied).
2735
+ # The account ID of the expected bucket owner. If the account ID that
2736
+ # you provide does not match the actual owner of the bucket, the request
2737
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1342
2738
  # @return [Types::RestoreObjectOutput]
1343
2739
  def restore_object(options = {})
1344
2740
  options = options.merge(
1345
2741
  bucket: @bucket_name,
1346
2742
  key: @key
1347
2743
  )
1348
- resp = Aws::Plugins::UserAgent.feature('resource') do
2744
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1349
2745
  @client.restore_object(options)
1350
2746
  end
1351
2747
  resp.data
@@ -1481,14 +2877,35 @@ module Aws::S3
1481
2877
  # space, and the value that is displayed on your authentication device.
1482
2878
  # Required to permanently delete a versioned object if versioning is
1483
2879
  # configured with MFA delete enabled.
2880
+ #
2881
+ # When performing the `DeleteObjects` operation on an MFA delete enabled
2882
+ # bucket, which attempts to delete the specified versioned objects, you
2883
+ # must include an MFA token. If you don't provide an MFA token, the
2884
+ # entire request will fail, even if there are non-versioned objects that
2885
+ # you are trying to delete. If you provide an invalid token, whether
2886
+ # there are versioned object keys in the request or not, the entire
2887
+ # Multi-Object Delete request will fail. For information about MFA
2888
+ # Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
2889
+ #
2890
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2891
+ #
2892
+ # </note>
2893
+ #
2894
+ #
2895
+ #
2896
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
1484
2897
  # @option options [String] :request_payer
1485
2898
  # Confirms that the requester knows that they will be charged for the
1486
2899
  # request. Bucket owners need not specify this parameter in their
1487
- # requests. If either the source or destination Amazon S3 bucket has
1488
- # Requester Pays enabled, the requester will pay for corresponding
1489
- # charges to copy the object. For information about downloading objects
1490
- # from Requester Pays buckets, see [Downloading Objects in Requester
1491
- # Pays Buckets][1] in the *Amazon S3 User Guide*.
2900
+ # requests. If either the source or destination S3 bucket has Requester
2901
+ # Pays enabled, the requester will pay for corresponding charges to copy
2902
+ # the object. For information about downloading objects from Requester
2903
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
2904
+ # in the *Amazon S3 User Guide*.
2905
+ #
2906
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2907
+ #
2908
+ # </note>
1492
2909
  #
1493
2910
  #
1494
2911
  #
@@ -1497,25 +2914,45 @@ module Aws::S3
1497
2914
  # Specifies whether you want to delete this object even if it has a
1498
2915
  # Governance-type Object Lock in place. To use this header, you must
1499
2916
  # have the `s3:BypassGovernanceRetention` permission.
2917
+ #
2918
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2919
+ #
2920
+ # </note>
1500
2921
  # @option options [String] :expected_bucket_owner
1501
- # The account ID of the expected bucket owner. If the bucket is owned by
1502
- # a different account, the request fails with the HTTP status code `403
1503
- # Forbidden` (access denied).
2922
+ # The account ID of the expected bucket owner. If the account ID that
2923
+ # you provide does not match the actual owner of the bucket, the request
2924
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1504
2925
  # @option options [String] :checksum_algorithm
1505
2926
  # Indicates the algorithm used to create the checksum for the object
1506
- # when using the SDK. This header will not provide any additional
1507
- # functionality if not using the SDK. When sending this header, there
1508
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
1509
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
1510
- # `400 Bad Request`. For more information, see [Checking object
1511
- # integrity][1] in the *Amazon S3 User Guide*.
2927
+ # when you use the SDK. This header will not provide any additional
2928
+ # functionality if you don't use the SDK. When you send this header,
2929
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
2930
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
2931
+ # with the HTTP status code `400 Bad Request`.
2932
+ #
2933
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
2934
+ # the supported algorithm from the following list:
2935
+ #
2936
+ # * `CRC32`
2937
+ #
2938
+ # * `CRC32C`
2939
+ #
2940
+ # * `SHA1`
2941
+ #
2942
+ # * `SHA256`
2943
+ #
2944
+ # For more information, see [Checking object integrity][1] in the
2945
+ # *Amazon S3 User Guide*.
2946
+ #
2947
+ # If the individual checksum value you provide through
2948
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2949
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
2950
+ # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2951
+ # that matches the provided value in `x-amz-checksum-algorithm `.
1512
2952
  #
1513
2953
  # If you provide an individual checksum, Amazon S3 ignores any provided
1514
2954
  # `ChecksumAlgorithm` parameter.
1515
2955
  #
1516
- # This checksum algorithm must be the same for all parts and it match
1517
- # the checksum value supplied in the `CreateMultipartUpload` request.
1518
- #
1519
2956
  #
1520
2957
  #
1521
2958
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -1531,7 +2968,7 @@ module Aws::S3
1531
2968
  key: item.key
1532
2969
  }
1533
2970
  end
1534
- Aws::Plugins::UserAgent.feature('resource') do
2971
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1535
2972
  batch[0].client.delete_objects(params)
1536
2973
  end
1537
2974
  end
@@ -1543,3 +2980,6 @@ module Aws::S3
1543
2980
  end
1544
2981
  end
1545
2982
  end
2983
+
2984
+ # Load customizations if they exist
2985
+ require 'aws-sdk-s3/customizations/object_summary'