aws-sdk-s3 1.48.0 → 1.169.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1270 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  6. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  7. data/lib/aws-sdk-s3/bucket.rb +959 -106
  8. data/lib/aws-sdk-s3/bucket_acl.rb +64 -18
  9. data/lib/aws-sdk-s3/bucket_cors.rb +79 -18
  10. data/lib/aws-sdk-s3/bucket_lifecycle.rb +66 -20
  11. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +106 -21
  12. data/lib/aws-sdk-s3/bucket_logging.rb +68 -16
  13. data/lib/aws-sdk-s3/bucket_notification.rb +52 -20
  14. data/lib/aws-sdk-s3/bucket_policy.rb +107 -17
  15. data/lib/aws-sdk-s3/bucket_region_cache.rb +11 -5
  16. data/lib/aws-sdk-s3/bucket_request_payment.rb +60 -15
  17. data/lib/aws-sdk-s3/bucket_tagging.rb +71 -18
  18. data/lib/aws-sdk-s3/bucket_versioning.rb +133 -17
  19. data/lib/aws-sdk-s3/bucket_website.rb +78 -21
  20. data/lib/aws-sdk-s3/client.rb +13765 -1019
  21. data/lib/aws-sdk-s3/client_api.rb +1137 -197
  22. data/lib/aws-sdk-s3/customizations/bucket.rb +56 -37
  23. data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
  24. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  25. data/lib/aws-sdk-s3/customizations/object.rb +288 -68
  26. data/lib/aws-sdk-s3/customizations/object_summary.rb +10 -0
  27. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  28. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  29. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  30. data/lib/aws-sdk-s3/customizations.rb +27 -28
  31. data/lib/aws-sdk-s3/encryption/client.rb +28 -7
  32. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
  33. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  34. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  35. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  36. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  37. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
  38. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  39. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  40. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  41. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +46 -11
  42. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  43. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  44. data/lib/aws-sdk-s3/encryption.rb +4 -0
  45. data/lib/aws-sdk-s3/encryptionV2/client.rb +570 -0
  46. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +223 -0
  47. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  48. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  49. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
  50. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  51. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  52. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  53. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  54. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  55. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +173 -0
  56. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  57. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  58. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  59. data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
  60. data/lib/aws-sdk-s3/endpoint_provider.rb +592 -0
  61. data/lib/aws-sdk-s3/endpoints.rb +1392 -0
  62. data/lib/aws-sdk-s3/errors.rb +126 -1
  63. data/lib/aws-sdk-s3/event_streams.rb +8 -1
  64. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  65. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  66. data/lib/aws-sdk-s3/file_downloader.rb +176 -44
  67. data/lib/aws-sdk-s3/file_part.rb +11 -6
  68. data/lib/aws-sdk-s3/file_uploader.rb +39 -18
  69. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  70. data/lib/aws-sdk-s3/multipart_file_uploader.rb +82 -23
  71. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +61 -21
  72. data/lib/aws-sdk-s3/multipart_upload.rb +265 -32
  73. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  74. data/lib/aws-sdk-s3/multipart_upload_part.rb +367 -45
  75. data/lib/aws-sdk-s3/object.rb +2475 -228
  76. data/lib/aws-sdk-s3/object_acl.rb +103 -25
  77. data/lib/aws-sdk-s3/object_copier.rb +9 -5
  78. data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -22
  79. data/lib/aws-sdk-s3/object_summary.rb +2075 -203
  80. data/lib/aws-sdk-s3/object_version.rb +492 -80
  81. data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
  82. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  83. data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
  84. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +7 -43
  85. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +20 -3
  86. data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
  87. data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
  88. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
  89. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
  90. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
  91. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +60 -15
  92. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
  93. data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
  94. data/lib/aws-sdk-s3/plugins/md5s.rb +35 -30
  95. data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
  96. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  97. data/lib/aws-sdk-s3/plugins/s3_signer.rb +63 -94
  98. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  99. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  100. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
  101. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  102. data/lib/aws-sdk-s3/presigned_post.rb +160 -99
  103. data/lib/aws-sdk-s3/presigner.rb +138 -59
  104. data/lib/aws-sdk-s3/resource.rb +155 -17
  105. data/lib/aws-sdk-s3/types.rb +12229 -4377
  106. data/lib/aws-sdk-s3/waiters.rb +67 -1
  107. data/lib/aws-sdk-s3.rb +46 -32
  108. data/sig/bucket.rbs +216 -0
  109. data/sig/bucket_acl.rbs +78 -0
  110. data/sig/bucket_cors.rbs +69 -0
  111. data/sig/bucket_lifecycle.rbs +88 -0
  112. data/sig/bucket_lifecycle_configuration.rbs +115 -0
  113. data/sig/bucket_logging.rbs +76 -0
  114. data/sig/bucket_notification.rbs +114 -0
  115. data/sig/bucket_policy.rbs +59 -0
  116. data/sig/bucket_request_payment.rbs +54 -0
  117. data/sig/bucket_tagging.rbs +65 -0
  118. data/sig/bucket_versioning.rbs +77 -0
  119. data/sig/bucket_website.rbs +93 -0
  120. data/sig/client.rbs +2406 -0
  121. data/sig/customizations/bucket.rbs +19 -0
  122. data/sig/customizations/object.rbs +38 -0
  123. data/sig/customizations/object_summary.rbs +35 -0
  124. data/sig/errors.rbs +34 -0
  125. data/sig/multipart_upload.rbs +111 -0
  126. data/sig/multipart_upload_part.rbs +105 -0
  127. data/sig/object.rbs +443 -0
  128. data/sig/object_acl.rbs +86 -0
  129. data/sig/object_summary.rbs +335 -0
  130. data/sig/object_version.rbs +137 -0
  131. data/sig/resource.rbs +132 -0
  132. data/sig/types.rbs +2596 -0
  133. data/sig/waiters.rbs +95 -0
  134. metadata +74 -15
@@ -1,11 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
8
10
  module Aws::S3
11
+
9
12
  class ObjectSummary
10
13
 
11
14
  extend Aws::Deprecations
@@ -24,6 +27,7 @@ module Aws::S3
24
27
  @key = extract_key(args, options)
25
28
  @data = options.delete(:data)
26
29
  @client = options.delete(:client) || Client.new(options)
30
+ @waiter_block_warned = false
27
31
  end
28
32
 
29
33
  # @!group Read-Only Attributes
@@ -38,36 +42,96 @@ module Aws::S3
38
42
  @key
39
43
  end
40
44
 
41
-
45
+ # Creation date of the object.
42
46
  # @return [Time]
43
47
  def last_modified
44
48
  data[:last_modified]
45
49
  end
46
50
 
47
-
51
+ # The entity tag is a hash of the object. The ETag reflects changes only
52
+ # to the contents of an object, not its metadata. The ETag may or may
53
+ # not be an MD5 digest of the object data. Whether or not it is depends
54
+ # on how the object was created and how it is encrypted as described
55
+ # below:
56
+ #
57
+ # * Objects created by the PUT Object, POST Object, or Copy operation,
58
+ # or through the Amazon Web Services Management Console, and are
59
+ # encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest
60
+ # of their object data.
61
+ #
62
+ # * Objects created by the PUT Object, POST Object, or Copy operation,
63
+ # or through the Amazon Web Services Management Console, and are
64
+ # encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest
65
+ # of their object data.
66
+ #
67
+ # * If an object is created by either the Multipart Upload or Part Copy
68
+ # operation, the ETag is not an MD5 digest, regardless of the method
69
+ # of encryption. If an object is larger than 16 MB, the Amazon Web
70
+ # Services Management Console will upload or copy that object as a
71
+ # Multipart Upload, and therefore the ETag will not be an MD5 digest.
72
+ #
73
+ # <note markdown="1"> **Directory buckets** - MD5 is not supported by directory buckets.
74
+ #
75
+ # </note>
48
76
  # @return [String]
49
77
  def etag
50
78
  data[:etag]
51
79
  end
52
80
 
53
-
81
+ # The algorithm that was used to create a checksum of the object.
82
+ # @return [Array<String>]
83
+ def checksum_algorithm
84
+ data[:checksum_algorithm]
85
+ end
86
+
87
+ # Size in bytes of the object
54
88
  # @return [Integer]
55
89
  def size
56
90
  data[:size]
57
91
  end
58
92
 
59
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>
60
99
  # @return [String]
61
100
  def storage_class
62
101
  data[:storage_class]
63
102
  end
64
103
 
65
-
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>
66
110
  # @return [Types::Owner]
67
111
  def owner
68
112
  data[:owner]
69
113
  end
70
114
 
115
+ # Specifies the restoration status of an object. Objects in certain
116
+ # storage classes must be restored before they can be retrieved. For
117
+ # more information about these storage classes and how to work with
118
+ # archived objects, see [ Working with archived objects][1] in the
119
+ # *Amazon S3 User Guide*.
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
+ #
127
+ #
128
+ #
129
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
130
+ # @return [Types::RestoreStatus]
131
+ def restore_status
132
+ data[:restore_status]
133
+ end
134
+
71
135
  # @!endgroup
72
136
 
73
137
  # @return [Client]
@@ -122,8 +186,10 @@ module Aws::S3
122
186
  options, params = separate_params_and_options(options)
123
187
  waiter = Waiters::ObjectExists.new(options)
124
188
  yield_waiter_and_warn(waiter, &block) if block_given?
125
- waiter.wait(params.merge(bucket: @bucket_name,
189
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
190
+ waiter.wait(params.merge(bucket: @bucket_name,
126
191
  key: @key))
192
+ end
127
193
  ObjectSummary.new({
128
194
  bucket_name: @bucket_name,
129
195
  key: @key,
@@ -141,8 +207,10 @@ module Aws::S3
141
207
  options, params = separate_params_and_options(options)
142
208
  waiter = Waiters::ObjectNotExists.new(options)
143
209
  yield_waiter_and_warn(waiter, &block) if block_given?
144
- waiter.wait(params.merge(bucket: @bucket_name,
210
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
211
+ waiter.wait(params.merge(bucket: @bucket_name,
145
212
  key: @key))
213
+ end
146
214
  ObjectSummary.new({
147
215
  bucket_name: @bucket_name,
148
216
  key: @key,
@@ -155,7 +223,8 @@ module Aws::S3
155
223
  # Waiter polls an API operation until a resource enters a desired
156
224
  # state.
157
225
  #
158
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
226
+ # @note The waiting operation is performed on a copy. The original resource
227
+ # remains unchanged.
159
228
  #
160
229
  # ## Basic Usage
161
230
  #
@@ -168,13 +237,15 @@ module Aws::S3
168
237
  #
169
238
  # ## Example
170
239
  #
171
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
240
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
241
+ # instance.state.name == 'running'
242
+ # end
172
243
  #
173
244
  # ## Configuration
174
245
  #
175
246
  # You can configure the maximum number of polling attempts, and the
176
- # delay (in seconds) between each polling attempt. The waiting condition is set
177
- # by passing a block to {#wait_until}:
247
+ # delay (in seconds) between each polling attempt. The waiting condition is
248
+ # set by passing a block to {#wait_until}:
178
249
  #
179
250
  # # poll for ~25 seconds
180
251
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -205,17 +276,16 @@ module Aws::S3
205
276
  # # resource did not enter the desired state in time
206
277
  # end
207
278
  #
279
+ # @yieldparam [Resource] resource to be used in the waiting condition.
208
280
  #
209
- # @yield param [Resource] resource to be used in the waiting condition
210
- #
211
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
212
- # because the waiter has entered a state that it will not transition
213
- # out of, preventing success.
281
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
282
+ # terminates because the waiter has entered a state that it will not
283
+ # transition out of, preventing success.
214
284
  #
215
285
  # yet successful.
216
286
  #
217
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
218
- # while polling for a resource that is not expected.
287
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
288
+ # encountered while polling for a resource that is not expected.
219
289
  #
220
290
  # @raise [NotImplementedError] Raised when the resource does not
221
291
  #
@@ -242,7 +312,9 @@ module Aws::S3
242
312
  :retry
243
313
  end
244
314
  end
245
- Aws::Waiters::Waiter.new(options).wait({})
315
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
316
+ Aws::Waiters::Waiter.new(options).wait({})
317
+ end
246
318
  end
247
319
 
248
320
  # @!group Actions
@@ -252,6 +324,7 @@ module Aws::S3
252
324
  # object_summary.copy_from({
253
325
  # acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
254
326
  # cache_control: "CacheControl",
327
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
255
328
  # content_disposition: "ContentDisposition",
256
329
  # content_encoding: "ContentEncoding",
257
330
  # content_language: "ContentLanguage",
@@ -271,14 +344,15 @@ module Aws::S3
271
344
  # },
272
345
  # metadata_directive: "COPY", # accepts COPY, REPLACE
273
346
  # tagging_directive: "COPY", # accepts COPY, REPLACE
274
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
275
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
347
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
348
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
276
349
  # website_redirect_location: "WebsiteRedirectLocation",
277
350
  # sse_customer_algorithm: "SSECustomerAlgorithm",
278
351
  # sse_customer_key: "SSECustomerKey",
279
352
  # sse_customer_key_md5: "SSECustomerKeyMD5",
280
353
  # ssekms_key_id: "SSEKMSKeyId",
281
354
  # ssekms_encryption_context: "SSEKMSEncryptionContext",
355
+ # bucket_key_enabled: false,
282
356
  # copy_source_sse_customer_algorithm: "CopySourceSSECustomerAlgorithm",
283
357
  # copy_source_sse_customer_key: "CopySourceSSECustomerKey",
284
358
  # copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
@@ -287,121 +361,694 @@ module Aws::S3
287
361
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
288
362
  # object_lock_retain_until_date: Time.now,
289
363
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
364
+ # expected_bucket_owner: "AccountId",
365
+ # expected_source_bucket_owner: "AccountId",
290
366
  # })
291
367
  # @param [Hash] options ({})
292
368
  # @option options [String] :acl
293
- # 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.
389
+ #
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
294
400
  # @option options [String] :cache_control
295
- # Specifies caching behavior along the request/reply chain.
401
+ # Specifies the caching behavior along the request/reply chain.
402
+ # @option options [String] :checksum_algorithm
403
+ # Indicates the algorithm that you want Amazon S3 to use to create the
404
+ # checksum for the object. For more information, see [Checking object
405
+ # integrity][1] in the *Amazon S3 User Guide*.
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
+ #
421
+ #
422
+ #
423
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
296
424
  # @option options [String] :content_disposition
297
- # 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.
298
429
  # @option options [String] :content_encoding
299
430
  # Specifies what content encodings have been applied to the object and
300
431
  # thus what decoding mechanisms must be applied to obtain the media-type
301
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>
302
438
  # @option options [String] :content_language
303
439
  # The language the content is in.
304
440
  # @option options [String] :content_type
305
- # A standard MIME type describing the format of the object data.
441
+ # A standard MIME type that describes the format of the object data.
306
442
  # @option options [required, String] :copy_source
307
- # The name of the source bucket and key name of the source object,
308
- # separated by a slash (/). Must be URL-encoded.
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]:
451
+ #
452
+ # * For objects not accessed through an access point, specify the name
453
+ # of the source bucket and the key of the source object, separated by
454
+ # a slash (/). For example, to copy the object `reports/january.pdf`
455
+ # from the general purpose bucket `awsexamplebucket`, use
456
+ # `awsexamplebucket/reports/january.pdf`. The value must be
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.
461
+ #
462
+ # * For objects accessed through access points, specify the Amazon
463
+ # Resource Name (ARN) of the object as accessed through the access
464
+ # point, in the format
465
+ # `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
466
+ # For example, to copy the object `reports/january.pdf` through access
467
+ # point `my-access-point` owned by account `123456789012` in Region
468
+ # `us-west-2`, use the URL encoding of
469
+ # `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
470
+ # The value must be URL encoded.
471
+ #
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.
477
+ #
478
+ # </note>
479
+ #
480
+ # Alternatively, for objects accessed through Amazon S3 on Outposts,
481
+ # specify the ARN of the object as accessed in the format
482
+ # `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
483
+ # For example, to copy the object `reports/january.pdf` through
484
+ # outpost `my-outpost` owned by account `123456789012` in Region
485
+ # `us-west-2`, use the URL encoding of
486
+ # `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
487
+ # The value must be URL-encoded.
488
+ #
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,
495
+ # `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
496
+ # If you don't specify a version ID, Amazon S3 copies the latest
497
+ # version of the source object.
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
+ #
514
+ #
515
+ #
516
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
309
517
  # @option options [String] :copy_source_if_match
310
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
311
528
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
312
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
313
539
  # @option options [String] :copy_source_if_none_match
314
540
  # Copies the object if its entity tag (ETag) is different than the
315
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
316
551
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_unmodified_since
317
552
  # Copies the object if it hasn't been modified since the specified
318
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
319
563
  # @option options [Time,DateTime,Date,Integer,String] :expires
320
564
  # The date and time at which the object is no longer cacheable.
321
565
  # @option options [String] :grant_full_control
322
566
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
323
567
  # object.
568
+ #
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>
324
574
  # @option options [String] :grant_read
325
575
  # Allows grantee to read the object data and its metadata.
576
+ #
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>
326
582
  # @option options [String] :grant_read_acp
327
583
  # Allows grantee to read the object ACL.
584
+ #
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>
328
590
  # @option options [String] :grant_write_acp
329
591
  # Allows grantee to write the ACL for the applicable object.
592
+ #
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>
330
598
  # @option options [Hash<String,String>] :metadata
331
599
  # A map of metadata to store with the object in S3.
332
600
  # @option options [String] :metadata_directive
333
601
  # Specifies whether the metadata is copied from the source object or
334
- # 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
335
623
  # @option options [String] :tagging_directive
336
- # Specifies whether the object tag-set are copied from the source object
337
- # 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>
338
668
  # @option options [String] :server_side_encryption
339
- # The Server-side encryption algorithm used when storing this object in
340
- # S3 (e.g., AES256, aws:kms).
669
+ # The server-side encryption algorithm used when storing this object in
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
341
745
  # @option options [String] :storage_class
342
- # The type of storage to use for the object. Defaults to 'STANDARD'.
746
+ # If the `x-amz-storage-class` header is not used, the copied object
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*.
779
+ #
780
+ #
781
+ #
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
343
786
  # @option options [String] :website_redirect_location
344
- # If the bucket is configured as a website, redirects requests for this
345
- # object to another object in the same bucket or to an external URL.
346
- # Amazon S3 stores the value of this header in the object metadata.
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>
347
798
  # @option options [String] :sse_customer_algorithm
348
- # Specifies the algorithm to use to when encrypting the object (e.g.,
349
- # 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>
350
814
  # @option options [String] :sse_customer_key
351
815
  # Specifies the customer-provided encryption key for Amazon S3 to use in
352
816
  # encrypting data. This value is used to store the object and then it is
353
- # discarded; Amazon does not store the encryption key. The key must be
354
- # appropriate for use with the algorithm specified in the
355
- # x-amz-server-side​-encryption​-customer-algorithm header.
817
+ # discarded. Amazon S3 does not store the encryption key. The key must
818
+ # be appropriate for use with the algorithm specified in the
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>
356
825
  # @option options [String] :sse_customer_key_md5
357
826
  # Specifies the 128-bit MD5 digest of the encryption key according to
358
827
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
359
- # ensure the encryption key was transmitted without error.
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>
360
834
  # @option options [String] :ssekms_key_id
361
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
362
- # PUT requests for an object protected by AWS KMS will fail if not made
363
- # via SSL or using SigV4. Documentation on configuring any of the
364
- # officially supported AWS SDKs and CLI can be found at
365
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
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.
857
+ #
858
+ #
859
+ #
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
366
863
  # @option options [String] :ssekms_encryption_context
367
- # Specifies the AWS KMS Encryption Context to use for object encryption.
368
- # The value of this header is a base64-encoded UTF-8 string holding JSON
369
- # 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
884
+ # @option options [Boolean] :bucket_key_enabled
885
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
886
+ # encryption with server-side encryption using Key Management Service
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.
903
+ #
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
370
910
  # @option options [String] :copy_source_sse_customer_algorithm
371
- # Specifies the algorithm to use when decrypting the source object
372
- # (e.g., AES256).
911
+ # Specifies the algorithm to use when decrypting the source object (for
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>
373
922
  # @option options [String] :copy_source_sse_customer_key
374
923
  # Specifies the customer-provided encryption key for Amazon S3 to use to
375
924
  # decrypt the source object. The encryption key provided in this header
376
- # 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>
377
935
  # @option options [String] :copy_source_sse_customer_key_md5
378
936
  # Specifies the 128-bit MD5 digest of the encryption key according to
379
937
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
380
- # ensure the encryption key was transmitted without error.
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>
381
948
  # @option options [String] :request_payer
382
- # Confirms that the requester knows that she or he will be charged for
383
- # the request. Bucket owners need not specify this parameter in their
384
- # requests. Documentation on downloading objects from requester pays
385
- # buckets can be found at
386
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
949
+ # Confirms that the requester knows that they will be charged for the
950
+ # request. Bucket owners need not specify this parameter in their
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>
960
+ #
961
+ #
962
+ #
963
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
387
964
  # @option options [String] :tagging
388
- # The tag-set for the object destination object this value must be used
389
- # in conjunction with the TaggingDirective. The tag-set must be encoded
390
- # 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>
391
1014
  # @option options [String] :object_lock_mode
392
- # 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>
393
1020
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
394
- # 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
395
1022
  # expire.
1023
+ #
1024
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1025
+ #
1026
+ # </note>
396
1027
  # @option options [String] :object_lock_legal_hold_status
397
- # 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>
1033
+ # @option options [String] :expected_bucket_owner
1034
+ # The account ID of the expected destination bucket owner. If the
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).
1038
+ # @option options [String] :expected_source_bucket_owner
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).
398
1043
  # @return [Types::CopyObjectOutput]
399
1044
  def copy_from(options = {})
400
1045
  options = options.merge(
401
1046
  bucket: @bucket_name,
402
1047
  key: @key
403
1048
  )
404
- resp = @client.copy_object(options)
1049
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1050
+ @client.copy_object(options)
1051
+ end
405
1052
  resp.data
406
1053
  end
407
1054
 
@@ -412,29 +1059,62 @@ module Aws::S3
412
1059
  # version_id: "ObjectVersionId",
413
1060
  # request_payer: "requester", # accepts requester
414
1061
  # bypass_governance_retention: false,
1062
+ # expected_bucket_owner: "AccountId",
415
1063
  # })
416
1064
  # @param [Hash] options ({})
417
1065
  # @option options [String] :mfa
418
1066
  # The concatenation of the authentication device's serial number, a
419
1067
  # space, and the value that is displayed on your authentication device.
1068
+ # Required to permanently delete a versioned object if versioning is
1069
+ # configured with MFA delete enabled.
1070
+ #
1071
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1072
+ #
1073
+ # </note>
420
1074
  # @option options [String] :version_id
421
- # VersionId used to reference a specific version of the object.
1075
+ # Version ID used to reference a specific version of the object.
1076
+ #
1077
+ # <note markdown="1"> For directory buckets in this API operation, only the `null` value of
1078
+ # the version ID is supported.
1079
+ #
1080
+ # </note>
422
1081
  # @option options [String] :request_payer
423
- # Confirms that the requester knows that she or he will be charged for
424
- # the request. Bucket owners need not specify this parameter in their
425
- # requests. Documentation on downloading objects from requester pays
426
- # buckets can be found at
427
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1082
+ # Confirms that the requester knows that they will be charged for the
1083
+ # request. Bucket owners need not specify this parameter in their
1084
+ # requests. If either the source or destination S3 bucket has Requester
1085
+ # Pays enabled, the requester will pay for corresponding charges to copy
1086
+ # the object. For information about downloading objects from Requester
1087
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1088
+ # in the *Amazon S3 User Guide*.
1089
+ #
1090
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1091
+ #
1092
+ # </note>
1093
+ #
1094
+ #
1095
+ #
1096
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
428
1097
  # @option options [Boolean] :bypass_governance_retention
429
- # Indicates whether Amazon S3 object lock should bypass governance-mode
430
- # restrictions to process this operation.
1098
+ # Indicates whether S3 Object Lock should bypass Governance-mode
1099
+ # restrictions to process this operation. To use this header, you must
1100
+ # have the `s3:BypassGovernanceRetention` permission.
1101
+ #
1102
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1103
+ #
1104
+ # </note>
1105
+ # @option options [String] :expected_bucket_owner
1106
+ # The account ID of the expected bucket owner. If the account ID that
1107
+ # you provide does not match the actual owner of the bucket, the request
1108
+ # fails with the HTTP status code `403 Forbidden` (access denied).
431
1109
  # @return [Types::DeleteObjectOutput]
432
1110
  def delete(options = {})
433
1111
  options = options.merge(
434
1112
  bucket: @bucket_name,
435
1113
  key: @key
436
1114
  )
437
- resp = @client.delete_object(options)
1115
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1116
+ @client.delete_object(options)
1117
+ end
438
1118
  resp.data
439
1119
  end
440
1120
 
@@ -458,69 +1138,248 @@ module Aws::S3
458
1138
  # sse_customer_key_md5: "SSECustomerKeyMD5",
459
1139
  # request_payer: "requester", # accepts requester
460
1140
  # part_number: 1,
1141
+ # expected_bucket_owner: "AccountId",
1142
+ # checksum_mode: "ENABLED", # accepts ENABLED
461
1143
  # })
462
1144
  # @param [Hash] options ({})
463
1145
  # @option options [String] :if_match
464
1146
  # Return the object only if its entity tag (ETag) is the same as the one
465
- # specified, otherwise return a 412 (precondition failed).
1147
+ # specified in this header; otherwise, return a `412 Precondition
1148
+ # Failed` error.
1149
+ #
1150
+ # If both of the `If-Match` and `If-Unmodified-Since` headers are
1151
+ # present in the request as follows: `If-Match` condition evaluates to
1152
+ # `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
1153
+ # then, S3 returns `200 OK` and the data requested.
1154
+ #
1155
+ # For more information about conditional requests, see [RFC 7232][1].
1156
+ #
1157
+ #
1158
+ #
1159
+ # [1]: https://tools.ietf.org/html/rfc7232
466
1160
  # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
467
1161
  # Return the object only if it has been modified since the specified
468
- # time, otherwise return a 304 (not modified).
1162
+ # time; otherwise, return a `304 Not Modified` error.
1163
+ #
1164
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
1165
+ # present in the request as follows:` If-None-Match` condition evaluates
1166
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
1167
+ # then, S3 returns `304 Not Modified` status code.
1168
+ #
1169
+ # For more information about conditional requests, see [RFC 7232][1].
1170
+ #
1171
+ #
1172
+ #
1173
+ # [1]: https://tools.ietf.org/html/rfc7232
469
1174
  # @option options [String] :if_none_match
470
1175
  # Return the object only if its entity tag (ETag) is different from the
471
- # one specified, otherwise return a 304 (not modified).
1176
+ # one specified in this header; otherwise, return a `304 Not Modified`
1177
+ # error.
1178
+ #
1179
+ # If both of the `If-None-Match` and `If-Modified-Since` headers are
1180
+ # present in the request as follows:` If-None-Match` condition evaluates
1181
+ # to `false`, and; `If-Modified-Since` condition evaluates to `true`;
1182
+ # then, S3 returns `304 Not Modified` HTTP status code.
1183
+ #
1184
+ # For more information about conditional requests, see [RFC 7232][1].
1185
+ #
1186
+ #
1187
+ #
1188
+ # [1]: https://tools.ietf.org/html/rfc7232
472
1189
  # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
473
1190
  # Return the object only if it has not been modified since the specified
474
- # time, otherwise return a 412 (precondition failed).
1191
+ # time; otherwise, return a `412 Precondition 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
475
1203
  # @option options [String] :range
476
- # Downloads the specified range bytes of an object. For more information
477
- # about the HTTP Range header, go to
478
- # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
1204
+ # Downloads the specified byte range of an object. For more information
1205
+ # about the HTTP Range header, see
1206
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
1207
+ #
1208
+ # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
1209
+ # `GET` request.
1210
+ #
1211
+ # </note>
1212
+ #
1213
+ #
1214
+ #
1215
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
479
1216
  # @option options [String] :response_cache_control
480
- # Sets the Cache-Control header of the response.
1217
+ # Sets the `Cache-Control` header of the response.
481
1218
  # @option options [String] :response_content_disposition
482
- # Sets the Content-Disposition header of the response
1219
+ # Sets the `Content-Disposition` header of the response.
483
1220
  # @option options [String] :response_content_encoding
484
- # Sets the Content-Encoding header of the response.
1221
+ # Sets the `Content-Encoding` header of the response.
485
1222
  # @option options [String] :response_content_language
486
- # Sets the Content-Language header of the response.
1223
+ # Sets the `Content-Language` header of the response.
487
1224
  # @option options [String] :response_content_type
488
- # Sets the Content-Type header of the response.
1225
+ # Sets the `Content-Type` header of the response.
489
1226
  # @option options [Time,DateTime,Date,Integer,String] :response_expires
490
- # Sets the Expires header of the response.
1227
+ # Sets the `Expires` header of the response.
491
1228
  # @option options [String] :version_id
492
- # VersionId used to reference a specific version of the object.
1229
+ # Version ID used to reference a specific version of the object.
1230
+ #
1231
+ # By default, the `GetObject` operation returns the current version of
1232
+ # an object. To return a different version, use the `versionId`
1233
+ # subresource.
1234
+ #
1235
+ # <note markdown="1"> * If you include a `versionId` in your request header, you must have
1236
+ # the `s3:GetObjectVersion` permission to access a specific version of
1237
+ # an object. The `s3:GetObject` permission is not required in this
1238
+ # scenario.
1239
+ #
1240
+ # * If you request the current version of an object without a specific
1241
+ # `versionId` in the request header, only the `s3:GetObject`
1242
+ # permission is required. The `s3:GetObjectVersion` permission is not
1243
+ # required in this scenario.
1244
+ #
1245
+ # * **Directory buckets** - S3 Versioning isn't enabled and supported
1246
+ # for directory buckets. For this API operation, only the `null` value
1247
+ # of the version ID is supported by directory buckets. You can only
1248
+ # specify `null` to the `versionId` query parameter in the request.
1249
+ #
1250
+ # </note>
1251
+ #
1252
+ # For more information about versioning, see [PutBucketVersioning][1].
1253
+ #
1254
+ #
1255
+ #
1256
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html
493
1257
  # @option options [String] :sse_customer_algorithm
494
- # Specifies the algorithm to use to when encrypting the object (e.g.,
495
- # AES256).
1258
+ # Specifies the algorithm to use when decrypting the object (for
1259
+ # example, `AES256`).
1260
+ #
1261
+ # If you encrypt an object by using server-side encryption with
1262
+ # customer-provided encryption keys (SSE-C) when you store the object in
1263
+ # Amazon S3, then when you GET the object, you must use the following
1264
+ # headers:
1265
+ #
1266
+ # * `x-amz-server-side-encryption-customer-algorithm`
1267
+ #
1268
+ # * `x-amz-server-side-encryption-customer-key`
1269
+ #
1270
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1271
+ #
1272
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1273
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1274
+ #
1275
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1276
+ #
1277
+ # </note>
1278
+ #
1279
+ #
1280
+ #
1281
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
496
1282
  # @option options [String] :sse_customer_key
497
- # Specifies the customer-provided encryption key for Amazon S3 to use in
498
- # encrypting data. This value is used to store the object and then it is
499
- # discarded; Amazon does not store the encryption key. The key must be
500
- # appropriate for use with the algorithm specified in the
501
- # x-amz-server-side​-encryption​-customer-algorithm header.
1283
+ # Specifies the customer-provided encryption key that you originally
1284
+ # provided for Amazon S3 to encrypt the data before storing it. This
1285
+ # value is used to decrypt the object when recovering it and must match
1286
+ # the one used when storing the data. The key must be appropriate for
1287
+ # use with the algorithm specified in the
1288
+ # `x-amz-server-side-encryption-customer-algorithm` header.
1289
+ #
1290
+ # If you encrypt an object by using server-side encryption with
1291
+ # customer-provided encryption keys (SSE-C) when you store the object in
1292
+ # Amazon S3, then when you GET the object, you must use the following
1293
+ # headers:
1294
+ #
1295
+ # * `x-amz-server-side-encryption-customer-algorithm`
1296
+ #
1297
+ # * `x-amz-server-side-encryption-customer-key`
1298
+ #
1299
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1300
+ #
1301
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1302
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1303
+ #
1304
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1305
+ #
1306
+ # </note>
1307
+ #
1308
+ #
1309
+ #
1310
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
502
1311
  # @option options [String] :sse_customer_key_md5
503
- # Specifies the 128-bit MD5 digest of the encryption key according to
504
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
505
- # ensure the encryption key was transmitted without error.
506
- # @option options [String] :request_payer
507
- # Confirms that the requester knows that she or he will be charged for
508
- # the request. Bucket owners need not specify this parameter in their
509
- # requests. Documentation on downloading objects from requester pays
510
- # buckets can be found at
511
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1312
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
1313
+ # key according to RFC 1321. Amazon S3 uses this header for a message
1314
+ # integrity check to ensure that the encryption key was transmitted
1315
+ # without error.
1316
+ #
1317
+ # If you encrypt an object by using server-side encryption with
1318
+ # customer-provided encryption keys (SSE-C) when you store the object in
1319
+ # Amazon S3, then when you GET the object, you must use the following
1320
+ # headers:
1321
+ #
1322
+ # * `x-amz-server-side-encryption-customer-algorithm`
1323
+ #
1324
+ # * `x-amz-server-side-encryption-customer-key`
1325
+ #
1326
+ # * `x-amz-server-side-encryption-customer-key-MD5`
1327
+ #
1328
+ # For more information about SSE-C, see [Server-Side Encryption (Using
1329
+ # Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
1330
+ #
1331
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1332
+ #
1333
+ # </note>
1334
+ #
1335
+ #
1336
+ #
1337
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
1338
+ # @option options [String] :request_payer
1339
+ # Confirms that the requester knows that they will be charged for the
1340
+ # request. Bucket owners need not specify this parameter in their
1341
+ # requests. If either the source or destination S3 bucket has Requester
1342
+ # Pays enabled, the requester will pay for corresponding charges to copy
1343
+ # the object. For information about downloading objects from Requester
1344
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1345
+ # 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/ObjectsinRequesterPaysBuckets.html
512
1354
  # @option options [Integer] :part_number
513
1355
  # Part number of the object being read. This is a positive integer
514
1356
  # between 1 and 10,000. Effectively performs a 'ranged' GET request
515
1357
  # for the part specified. Useful for downloading just a part of an
516
1358
  # object.
1359
+ # @option options [String] :expected_bucket_owner
1360
+ # The account ID of the expected bucket owner. If the account ID that
1361
+ # you provide does not match the actual owner of the bucket, the request
1362
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1363
+ # @option options [String] :checksum_mode
1364
+ # To retrieve the checksum, this mode must be enabled.
1365
+ #
1366
+ # **General purpose buckets** - In addition, if you enable checksum mode
1367
+ # and the object is uploaded with a [checksum][1] and encrypted with an
1368
+ # Key Management Service (KMS) key, you must have permission to use the
1369
+ # `kms:Decrypt` action to retrieve the checksum.
1370
+ #
1371
+ #
1372
+ #
1373
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
517
1374
  # @return [Types::GetObjectOutput]
518
1375
  def get(options = {}, &block)
519
1376
  options = options.merge(
520
1377
  bucket: @bucket_name,
521
1378
  key: @key
522
1379
  )
523
- resp = @client.get_object(options, &block)
1380
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1381
+ @client.get_object(options, &block)
1382
+ end
524
1383
  resp.data
525
1384
  end
526
1385
 
@@ -541,23 +1400,48 @@ module Aws::S3
541
1400
  # metadata: {
542
1401
  # "MetadataKey" => "MetadataValue",
543
1402
  # },
544
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
545
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
1403
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
1404
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
546
1405
  # website_redirect_location: "WebsiteRedirectLocation",
547
1406
  # sse_customer_algorithm: "SSECustomerAlgorithm",
548
1407
  # sse_customer_key: "SSECustomerKey",
549
1408
  # sse_customer_key_md5: "SSECustomerKeyMD5",
550
1409
  # ssekms_key_id: "SSEKMSKeyId",
551
1410
  # ssekms_encryption_context: "SSEKMSEncryptionContext",
1411
+ # bucket_key_enabled: false,
552
1412
  # request_payer: "requester", # accepts requester
553
1413
  # tagging: "TaggingHeader",
554
1414
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
555
1415
  # object_lock_retain_until_date: Time.now,
556
1416
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
1417
+ # expected_bucket_owner: "AccountId",
1418
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
557
1419
  # })
558
1420
  # @param [Hash] options ({})
559
1421
  # @option options [String] :acl
560
- # The canned ACL to apply to the object.
1422
+ # The canned ACL to apply to the object. Amazon S3 supports a set of
1423
+ # predefined ACLs, known as *canned ACLs*. Each canned ACL has a
1424
+ # predefined set of grantees and permissions. For more information, see
1425
+ # [Canned ACL][1] in the *Amazon S3 User Guide*.
1426
+ #
1427
+ # By default, all objects are private. Only the owner has full access
1428
+ # control. When uploading an object, you can grant access permissions to
1429
+ # individual Amazon Web Services accounts or to predefined groups
1430
+ # defined by Amazon S3. These permissions are then added to the access
1431
+ # control list (ACL) on the new object. For more information, see [Using
1432
+ # ACLs][2]. One way to grant the permissions using the request headers
1433
+ # is to specify a canned ACL with the `x-amz-acl` request header.
1434
+ #
1435
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1436
+ #
1437
+ # * This functionality is not supported for Amazon S3 on Outposts.
1438
+ #
1439
+ # </note>
1440
+ #
1441
+ #
1442
+ #
1443
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
1444
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html
561
1445
  # @option options [String] :cache_control
562
1446
  # Specifies caching behavior along the request/reply chain.
563
1447
  # @option options [String] :content_disposition
@@ -566,79 +1450,505 @@ module Aws::S3
566
1450
  # Specifies what content encodings have been applied to the object and
567
1451
  # thus what decoding mechanisms must be applied to obtain the media-type
568
1452
  # referenced by the Content-Type header field.
1453
+ #
1454
+ # <note markdown="1"> For directory buckets, only the `aws-chunked` value is supported in
1455
+ # this header field.
1456
+ #
1457
+ # </note>
569
1458
  # @option options [String] :content_language
570
- # The language the content is in.
1459
+ # The language that the content is in.
571
1460
  # @option options [String] :content_type
572
1461
  # A standard MIME type describing the format of the object data.
573
1462
  # @option options [Time,DateTime,Date,Integer,String] :expires
574
1463
  # The date and time at which the object is no longer cacheable.
575
1464
  # @option options [String] :grant_full_control
576
- # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
577
- # object.
1465
+ # Specify access permissions explicitly to give the grantee READ,
1466
+ # READ\_ACP, and WRITE\_ACP permissions on the object.
1467
+ #
1468
+ # By default, all objects are private. Only the owner has full access
1469
+ # control. When uploading an object, you can use this header to
1470
+ # explicitly grant access permissions to specific Amazon Web Services
1471
+ # accounts or groups. This header maps to specific permissions that
1472
+ # Amazon S3 supports in an ACL. For more information, see [Access
1473
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1474
+ #
1475
+ # You specify each grantee as a type=value pair, where the type is one
1476
+ # of the following:
1477
+ #
1478
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1479
+ # Web Services account
1480
+ #
1481
+ # * `uri` – if you are granting permissions to a predefined group
1482
+ #
1483
+ # * `emailAddress` – if the value specified is the email address of an
1484
+ # Amazon Web Services account
1485
+ #
1486
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1487
+ # following Amazon Web Services Regions:
1488
+ #
1489
+ # * US East (N. Virginia)
1490
+ #
1491
+ # * US West (N. California)
1492
+ #
1493
+ # * US West (Oregon)
1494
+ #
1495
+ # * Asia Pacific (Singapore)
1496
+ #
1497
+ # * Asia Pacific (Sydney)
1498
+ #
1499
+ # * Asia Pacific (Tokyo)
1500
+ #
1501
+ # * Europe (Ireland)
1502
+ #
1503
+ # * South America (São Paulo)
1504
+ #
1505
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1506
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1507
+ # Reference.
1508
+ #
1509
+ # </note>
1510
+ #
1511
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1512
+ # Web Services accounts identified by account IDs permissions to read
1513
+ # object data and its metadata:
1514
+ #
1515
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1516
+ #
1517
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1518
+ #
1519
+ # * This functionality is not supported for Amazon S3 on Outposts.
1520
+ #
1521
+ # </note>
1522
+ #
1523
+ #
1524
+ #
1525
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1526
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
578
1527
  # @option options [String] :grant_read
579
- # Allows grantee to read the object data and its metadata.
1528
+ # Specify access permissions explicitly to allow grantee to read the
1529
+ # object data and its metadata.
1530
+ #
1531
+ # By default, all objects are private. Only the owner has full access
1532
+ # control. When uploading an object, you can use this header to
1533
+ # explicitly grant access permissions to specific Amazon Web Services
1534
+ # accounts or groups. This header maps to specific permissions that
1535
+ # Amazon S3 supports in an ACL. For more information, see [Access
1536
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1537
+ #
1538
+ # You specify each grantee as a type=value pair, where the type is one
1539
+ # of the following:
1540
+ #
1541
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1542
+ # Web Services account
1543
+ #
1544
+ # * `uri` – if you are granting permissions to a predefined group
1545
+ #
1546
+ # * `emailAddress` – if the value specified is the email address of an
1547
+ # Amazon Web Services account
1548
+ #
1549
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1550
+ # following Amazon Web Services Regions:
1551
+ #
1552
+ # * US East (N. Virginia)
1553
+ #
1554
+ # * US West (N. California)
1555
+ #
1556
+ # * US West (Oregon)
1557
+ #
1558
+ # * Asia Pacific (Singapore)
1559
+ #
1560
+ # * Asia Pacific (Sydney)
1561
+ #
1562
+ # * Asia Pacific (Tokyo)
1563
+ #
1564
+ # * Europe (Ireland)
1565
+ #
1566
+ # * South America (São Paulo)
1567
+ #
1568
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1569
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1570
+ # Reference.
1571
+ #
1572
+ # </note>
1573
+ #
1574
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1575
+ # Web Services accounts identified by account IDs permissions to read
1576
+ # object data and its metadata:
1577
+ #
1578
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1579
+ #
1580
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1581
+ #
1582
+ # * This functionality is not supported for Amazon S3 on Outposts.
1583
+ #
1584
+ # </note>
1585
+ #
1586
+ #
1587
+ #
1588
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1589
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
580
1590
  # @option options [String] :grant_read_acp
581
- # Allows grantee to read the object ACL.
1591
+ # Specify access permissions explicitly to allows grantee to read the
1592
+ # object ACL.
1593
+ #
1594
+ # By default, all objects are private. Only the owner has full access
1595
+ # control. When uploading an object, you can use this header to
1596
+ # explicitly grant access permissions to specific Amazon Web Services
1597
+ # accounts or groups. This header maps to specific permissions that
1598
+ # Amazon S3 supports in an ACL. For more information, see [Access
1599
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1600
+ #
1601
+ # You specify each grantee as a type=value pair, where the type is one
1602
+ # of the following:
1603
+ #
1604
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1605
+ # Web Services account
1606
+ #
1607
+ # * `uri` – if you are granting permissions to a predefined group
1608
+ #
1609
+ # * `emailAddress` – if the value specified is the email address of an
1610
+ # Amazon Web Services account
1611
+ #
1612
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1613
+ # following Amazon Web Services Regions:
1614
+ #
1615
+ # * US East (N. Virginia)
1616
+ #
1617
+ # * US West (N. California)
1618
+ #
1619
+ # * US West (Oregon)
1620
+ #
1621
+ # * Asia Pacific (Singapore)
1622
+ #
1623
+ # * Asia Pacific (Sydney)
1624
+ #
1625
+ # * Asia Pacific (Tokyo)
1626
+ #
1627
+ # * Europe (Ireland)
1628
+ #
1629
+ # * South America (São Paulo)
1630
+ #
1631
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1632
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1633
+ # Reference.
1634
+ #
1635
+ # </note>
1636
+ #
1637
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1638
+ # Web Services accounts identified by account IDs permissions to read
1639
+ # object data and its metadata:
1640
+ #
1641
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1642
+ #
1643
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1644
+ #
1645
+ # * This functionality is not supported for Amazon S3 on Outposts.
1646
+ #
1647
+ # </note>
1648
+ #
1649
+ #
1650
+ #
1651
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1652
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
582
1653
  # @option options [String] :grant_write_acp
583
- # Allows grantee to write the ACL for the applicable object.
1654
+ # Specify access permissions explicitly to allows grantee to allow
1655
+ # grantee to write the ACL for the applicable object.
1656
+ #
1657
+ # By default, all objects are private. Only the owner has full access
1658
+ # control. When uploading an object, you can use this header to
1659
+ # explicitly grant access permissions to specific Amazon Web Services
1660
+ # accounts or groups. This header maps to specific permissions that
1661
+ # Amazon S3 supports in an ACL. For more information, see [Access
1662
+ # Control List (ACL) Overview][1] in the *Amazon S3 User Guide*.
1663
+ #
1664
+ # You specify each grantee as a type=value pair, where the type is one
1665
+ # of the following:
1666
+ #
1667
+ # * `id` – if the value specified is the canonical user ID of an Amazon
1668
+ # Web Services account
1669
+ #
1670
+ # * `uri` – if you are granting permissions to a predefined group
1671
+ #
1672
+ # * `emailAddress` – if the value specified is the email address of an
1673
+ # Amazon Web Services account
1674
+ #
1675
+ # <note markdown="1"> Using email addresses to specify a grantee is only supported in the
1676
+ # following Amazon Web Services Regions:
1677
+ #
1678
+ # * US East (N. Virginia)
1679
+ #
1680
+ # * US West (N. California)
1681
+ #
1682
+ # * US West (Oregon)
1683
+ #
1684
+ # * Asia Pacific (Singapore)
1685
+ #
1686
+ # * Asia Pacific (Sydney)
1687
+ #
1688
+ # * Asia Pacific (Tokyo)
1689
+ #
1690
+ # * Europe (Ireland)
1691
+ #
1692
+ # * South America (São Paulo)
1693
+ #
1694
+ # For a list of all the Amazon S3 supported Regions and endpoints, see
1695
+ # [Regions and Endpoints][2] in the Amazon Web Services General
1696
+ # Reference.
1697
+ #
1698
+ # </note>
1699
+ #
1700
+ # For example, the following `x-amz-grant-read` header grants the Amazon
1701
+ # Web Services accounts identified by account IDs permissions to read
1702
+ # object data and its metadata:
1703
+ #
1704
+ # `x-amz-grant-read: id="11112222333", id="444455556666" `
1705
+ #
1706
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
1707
+ #
1708
+ # * This functionality is not supported for Amazon S3 on Outposts.
1709
+ #
1710
+ # </note>
1711
+ #
1712
+ #
1713
+ #
1714
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
1715
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
584
1716
  # @option options [Hash<String,String>] :metadata
585
1717
  # A map of metadata to store with the object in S3.
586
1718
  # @option options [String] :server_side_encryption
587
- # The Server-side encryption algorithm used when storing this object in
588
- # S3 (e.g., AES256, aws:kms).
1719
+ # The server-side encryption algorithm used when you store this object
1720
+ # in Amazon S3 (for example, `AES256`, `aws:kms`).
1721
+ #
1722
+ # * <b>Directory buckets </b> - For directory buckets, there are only
1723
+ # two supported options for server-side encryption: server-side
1724
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
1725
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
1726
+ # recommend that the bucket's default encryption uses the desired
1727
+ # encryption configuration and you don't override the bucket default
1728
+ # encryption in your `CreateSession` requests or `PUT` object
1729
+ # requests. Then, new objects are automatically encrypted with the
1730
+ # desired encryption settings. For more information, see [Protecting
1731
+ # data with server-side encryption][1] in the *Amazon S3 User Guide*.
1732
+ # For more information about the encryption overriding behaviors in
1733
+ # directory buckets, see [Specifying server-side encryption with KMS
1734
+ # for new object uploads][2].
1735
+ #
1736
+ # In the Zonal endpoint API calls (except [CopyObject][3] and
1737
+ # [UploadPartCopy][4]) using the REST API, the encryption request
1738
+ # headers must match the encryption settings that are specified in the
1739
+ # `CreateSession` request. You can't override the values of the
1740
+ # encryption settings (`x-amz-server-side-encryption`,
1741
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
1742
+ # `x-amz-server-side-encryption-context`, and
1743
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
1744
+ # specified in the `CreateSession` request. You don't need to
1745
+ # explicitly specify these encryption settings values in Zonal
1746
+ # endpoint API calls, and Amazon S3 will use the encryption settings
1747
+ # values from the `CreateSession` request to protect new objects in
1748
+ # the directory bucket.
1749
+ #
1750
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
1751
+ # `CreateSession`, the session token refreshes automatically to avoid
1752
+ # service interruptions when a session expires. The CLI or the Amazon
1753
+ # Web Services SDKs use the bucket's default encryption configuration
1754
+ # for the `CreateSession` request. It's not supported to override the
1755
+ # encryption settings values in the `CreateSession` request. So in the
1756
+ # Zonal endpoint API calls (except [CopyObject][3] and
1757
+ # [UploadPartCopy][4]), the encryption request headers must match the
1758
+ # default encryption configuration of the directory bucket.
1759
+ #
1760
+ # </note>
1761
+ #
1762
+ #
1763
+ #
1764
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
1765
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
1766
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
1767
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
589
1768
  # @option options [String] :storage_class
590
- # The type of storage to use for the object. Defaults to 'STANDARD'.
1769
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
1770
+ # created objects. The STANDARD storage class provides high durability
1771
+ # and high availability. Depending on performance needs, you can specify
1772
+ # a different Storage Class. For more information, see [Storage
1773
+ # Classes][1] in the *Amazon S3 User Guide*.
1774
+ #
1775
+ # <note markdown="1"> * For directory buckets, only the S3 Express One Zone storage class is
1776
+ # supported to store newly created objects.
1777
+ #
1778
+ # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
1779
+ #
1780
+ # </note>
1781
+ #
1782
+ #
1783
+ #
1784
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
591
1785
  # @option options [String] :website_redirect_location
592
1786
  # If the bucket is configured as a website, redirects requests for this
593
1787
  # object to another object in the same bucket or to an external URL.
594
1788
  # Amazon S3 stores the value of this header in the object metadata.
1789
+ #
1790
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1791
+ #
1792
+ # </note>
595
1793
  # @option options [String] :sse_customer_algorithm
596
- # Specifies the algorithm to use to when encrypting the object (e.g.,
597
- # AES256).
1794
+ # Specifies the algorithm to use when encrypting the object (for
1795
+ # example, AES256).
1796
+ #
1797
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1798
+ #
1799
+ # </note>
598
1800
  # @option options [String] :sse_customer_key
599
1801
  # Specifies the customer-provided encryption key for Amazon S3 to use in
600
1802
  # encrypting data. This value is used to store the object and then it is
601
- # discarded; Amazon does not store the encryption key. The key must be
602
- # appropriate for use with the algorithm specified in the
603
- # x-amz-server-side​-encryption​-customer-algorithm header.
1803
+ # discarded; Amazon S3 does not store the encryption key. The key must
1804
+ # be appropriate for use with the algorithm specified in the
1805
+ # `x-amz-server-side-encryption-customer-algorithm` header.
1806
+ #
1807
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1808
+ #
1809
+ # </note>
604
1810
  # @option options [String] :sse_customer_key_md5
605
- # Specifies the 128-bit MD5 digest of the encryption key according to
606
- # RFC 1321. Amazon S3 uses this header for a message integrity check to
607
- # ensure the encryption key was transmitted without error.
1811
+ # Specifies the 128-bit MD5 digest of the customer-provided encryption
1812
+ # key according to RFC 1321. Amazon S3 uses this header for a message
1813
+ # integrity check to ensure that the encryption key was transmitted
1814
+ # without error.
1815
+ #
1816
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1817
+ #
1818
+ # </note>
608
1819
  # @option options [String] :ssekms_key_id
609
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
610
- # PUT requests for an object protected by AWS KMS will fail if not made
611
- # via SSL or using SigV4. Documentation on configuring any of the
612
- # officially supported AWS SDKs and CLI can be found at
613
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1820
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
1821
+ # object encryption. If the KMS key doesn't exist in the same account
1822
+ # that's issuing the command, you must use the full Key ARN not the Key
1823
+ # ID.
1824
+ #
1825
+ # **General purpose buckets** - If you specify
1826
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
1827
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
1828
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
1829
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
1830
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
1831
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
1832
+ #
1833
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
1834
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
1835
+ # header is implicitly assigned the ID of the KMS symmetric encryption
1836
+ # customer managed key that's configured for your directory bucket's
1837
+ # default encryption setting. If you want to specify the `
1838
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
1839
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
1840
+ # customer managed key that's configured for your directory bucket's
1841
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
1842
+ # Request` error. Only use the key ID or key ARN. The key alias format
1843
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
1844
+ # support 1 [customer managed key][1] per directory bucket for the
1845
+ # lifetime of the bucket. The [Amazon Web Services managed key][2]
1846
+ # (`aws/s3`) isn't supported.
1847
+ #
1848
+ #
1849
+ #
1850
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
1851
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
614
1852
  # @option options [String] :ssekms_encryption_context
615
- # Specifies the AWS KMS Encryption Context to use for object encryption.
616
- # The value of this header is a base64-encoded UTF-8 string holding JSON
617
- # with the encryption context key-value pairs.
1853
+ # Specifies the Amazon Web Services KMS Encryption Context to use for
1854
+ # object encryption. The value of this header is a Base64-encoded string
1855
+ # of a UTF-8 encoded JSON, which contains the encryption context as
1856
+ # key-value pairs.
1857
+ #
1858
+ # **Directory buckets** - You can optionally provide an explicit
1859
+ # encryption context value. The value must match the default encryption
1860
+ # context - the bucket Amazon Resource Name (ARN). An additional
1861
+ # encryption context value is not supported.
1862
+ # @option options [Boolean] :bucket_key_enabled
1863
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
1864
+ # encryption with server-side encryption using Key Management Service
1865
+ # (KMS) keys (SSE-KMS).
1866
+ #
1867
+ # **General purpose buckets** - Setting this header to `true` causes
1868
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
1869
+ # Also, specifying this header with a PUT action doesn't affect
1870
+ # bucket-level settings for S3 Bucket Key.
1871
+ #
1872
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
1873
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
1874
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
1875
+ # from general purpose buckets to directory buckets, from directory
1876
+ # buckets to general purpose buckets, or between directory buckets,
1877
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
1878
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
1879
+ # makes a call to KMS every time a copy request is made for a
1880
+ # KMS-encrypted object.
1881
+ #
1882
+ #
1883
+ #
1884
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
1885
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
1886
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
1887
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
618
1888
  # @option options [String] :request_payer
619
- # Confirms that the requester knows that she or he will be charged for
620
- # the request. Bucket owners need not specify this parameter in their
621
- # requests. Documentation on downloading objects from requester pays
622
- # buckets can be found at
623
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1889
+ # Confirms that the requester knows that they will be charged for the
1890
+ # request. Bucket owners need not specify this parameter in their
1891
+ # requests. If either the source or destination S3 bucket has Requester
1892
+ # Pays enabled, the requester will pay for corresponding charges to copy
1893
+ # the object. For information about downloading objects from Requester
1894
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
1895
+ # in the *Amazon S3 User Guide*.
1896
+ #
1897
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1898
+ #
1899
+ # </note>
1900
+ #
1901
+ #
1902
+ #
1903
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
624
1904
  # @option options [String] :tagging
625
1905
  # The tag-set for the object. The tag-set must be encoded as URL Query
626
- # parameters
1906
+ # parameters.
1907
+ #
1908
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1909
+ #
1910
+ # </note>
627
1911
  # @option options [String] :object_lock_mode
628
- # Specifies the object lock mode that you want to apply to the uploaded
1912
+ # Specifies the Object Lock mode that you want to apply to the uploaded
629
1913
  # object.
1914
+ #
1915
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1916
+ #
1917
+ # </note>
630
1918
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
631
- # Specifies the date and time when you want the object lock to expire.
1919
+ # Specifies the date and time when you want the Object Lock to expire.
1920
+ #
1921
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1922
+ #
1923
+ # </note>
632
1924
  # @option options [String] :object_lock_legal_hold_status
633
- # Specifies whether you want to apply a Legal Hold to the uploaded
1925
+ # Specifies whether you want to apply a legal hold to the uploaded
634
1926
  # object.
1927
+ #
1928
+ # <note markdown="1"> This functionality is not supported for directory buckets.
1929
+ #
1930
+ # </note>
1931
+ # @option options [String] :expected_bucket_owner
1932
+ # The account ID of the expected bucket owner. If the account ID that
1933
+ # you provide does not match the actual owner of the bucket, the request
1934
+ # fails with the HTTP status code `403 Forbidden` (access denied).
1935
+ # @option options [String] :checksum_algorithm
1936
+ # Indicates the algorithm that you want Amazon S3 to use to create the
1937
+ # checksum for the object. For more information, see [Checking object
1938
+ # integrity][1] in the *Amazon S3 User Guide*.
1939
+ #
1940
+ #
1941
+ #
1942
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
635
1943
  # @return [MultipartUpload]
636
1944
  def initiate_multipart_upload(options = {})
637
1945
  options = options.merge(
638
1946
  bucket: @bucket_name,
639
1947
  key: @key
640
1948
  )
641
- resp = @client.create_multipart_upload(options)
1949
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1950
+ @client.create_multipart_upload(options)
1951
+ end
642
1952
  MultipartUpload.new(
643
1953
  bucket_name: @bucket_name,
644
1954
  object_key: @key,
@@ -659,7 +1969,13 @@ module Aws::S3
659
1969
  # content_length: 1,
660
1970
  # content_md5: "ContentMD5",
661
1971
  # content_type: "ContentType",
1972
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1973
+ # checksum_crc32: "ChecksumCRC32",
1974
+ # checksum_crc32c: "ChecksumCRC32C",
1975
+ # checksum_sha1: "ChecksumSHA1",
1976
+ # checksum_sha256: "ChecksumSHA256",
662
1977
  # expires: Time.now,
1978
+ # if_none_match: "IfNoneMatch",
663
1979
  # grant_full_control: "GrantFullControl",
664
1980
  # grant_read: "GrantRead",
665
1981
  # grant_read_acp: "GrantReadACP",
@@ -667,111 +1983,552 @@ module Aws::S3
667
1983
  # metadata: {
668
1984
  # "MetadataKey" => "MetadataValue",
669
1985
  # },
670
- # server_side_encryption: "AES256", # accepts AES256, aws:kms
671
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
1986
+ # server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
1987
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
672
1988
  # website_redirect_location: "WebsiteRedirectLocation",
673
1989
  # sse_customer_algorithm: "SSECustomerAlgorithm",
674
1990
  # sse_customer_key: "SSECustomerKey",
675
1991
  # sse_customer_key_md5: "SSECustomerKeyMD5",
676
1992
  # ssekms_key_id: "SSEKMSKeyId",
677
1993
  # ssekms_encryption_context: "SSEKMSEncryptionContext",
1994
+ # bucket_key_enabled: false,
678
1995
  # request_payer: "requester", # accepts requester
679
1996
  # tagging: "TaggingHeader",
680
1997
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
681
1998
  # object_lock_retain_until_date: Time.now,
682
1999
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
2000
+ # expected_bucket_owner: "AccountId",
683
2001
  # })
684
2002
  # @param [Hash] options ({})
685
2003
  # @option options [String] :acl
686
- # The canned ACL to apply to the object.
687
- # @option options [String, IO] :body
2004
+ # The canned ACL to apply to the object. For more information, see
2005
+ # [Canned ACL][1] in the *Amazon S3 User Guide*.
2006
+ #
2007
+ # When adding a new object, you can use headers to grant ACL-based
2008
+ # permissions to individual Amazon Web Services accounts or to
2009
+ # predefined groups defined by Amazon S3. These permissions are then
2010
+ # added to the ACL on the object. By default, all objects are private.
2011
+ # Only the owner has full access control. For more information, see
2012
+ # [Access Control List (ACL) Overview][2] and [Managing ACLs Using the
2013
+ # REST API][3] in the *Amazon S3 User Guide*.
2014
+ #
2015
+ # If the bucket that you're uploading objects to uses the bucket owner
2016
+ # enforced setting for S3 Object Ownership, ACLs are disabled and no
2017
+ # longer affect permissions. Buckets that use this setting only accept
2018
+ # PUT requests that don't specify an ACL or PUT requests that specify
2019
+ # bucket owner full control ACLs, such as the
2020
+ # `bucket-owner-full-control` canned ACL or an equivalent form of this
2021
+ # ACL expressed in the XML format. PUT requests that contain other ACLs
2022
+ # (for example, custom grants to certain Amazon Web Services accounts)
2023
+ # fail and return a `400` error with the error code
2024
+ # `AccessControlListNotSupported`. For more information, see [
2025
+ # Controlling ownership of objects and disabling ACLs][4] in the *Amazon
2026
+ # S3 User Guide*.
2027
+ #
2028
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2029
+ #
2030
+ # * This functionality is not supported for Amazon S3 on Outposts.
2031
+ #
2032
+ # </note>
2033
+ #
2034
+ #
2035
+ #
2036
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
2037
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html
2038
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html
2039
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
2040
+ # @option options [String, StringIO, File] :body
688
2041
  # Object data.
689
2042
  # @option options [String] :cache_control
690
- # Specifies caching behavior along the request/reply chain.
2043
+ # Can be used to specify caching behavior along the request/reply chain.
2044
+ # For more information, see
2045
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9][1].
2046
+ #
2047
+ #
2048
+ #
2049
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
691
2050
  # @option options [String] :content_disposition
692
- # Specifies presentational information for the object.
2051
+ # Specifies presentational information for the object. For more
2052
+ # information, see
2053
+ # [https://www.rfc-editor.org/rfc/rfc6266#section-4][1].
2054
+ #
2055
+ #
2056
+ #
2057
+ # [1]: https://www.rfc-editor.org/rfc/rfc6266#section-4
693
2058
  # @option options [String] :content_encoding
694
2059
  # Specifies what content encodings have been applied to the object and
695
2060
  # thus what decoding mechanisms must be applied to obtain the media-type
696
- # referenced by the Content-Type header field.
2061
+ # referenced by the Content-Type header field. For more information, see
2062
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding][1].
2063
+ #
2064
+ #
2065
+ #
2066
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding
697
2067
  # @option options [String] :content_language
698
2068
  # The language the content is in.
699
2069
  # @option options [Integer] :content_length
700
2070
  # Size of the body in bytes. This parameter is useful when the size of
701
- # the body cannot be determined automatically.
2071
+ # the body cannot be determined automatically. For more information, see
2072
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length][1].
2073
+ #
2074
+ #
2075
+ #
2076
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
702
2077
  # @option options [String] :content_md5
703
- # The base64-encoded 128-bit MD5 digest of the part data. This parameter
704
- # is auto-populated when using the command from the CLI. This parameted
705
- # is required if object lock parameters are specified.
2078
+ # The base64-encoded 128-bit MD5 digest of the message (without the
2079
+ # headers) according to RFC 1864. This header can be used as a message
2080
+ # integrity check to verify that the data is the same data that was
2081
+ # originally sent. Although it is optional, we recommend using the
2082
+ # Content-MD5 mechanism as an end-to-end integrity check. For more
2083
+ # information about REST request authentication, see [REST
2084
+ # Authentication][1].
2085
+ #
2086
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2087
+ # for any request to upload an object with a retention period configured
2088
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2089
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2090
+ # Guide*.
2091
+ #
2092
+ # </note>
2093
+ #
2094
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2095
+ #
2096
+ # </note>
2097
+ #
2098
+ #
2099
+ #
2100
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
2101
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
706
2102
  # @option options [String] :content_type
707
- # A standard MIME type describing the format of the object data.
2103
+ # A standard MIME type describing the format of the contents. For more
2104
+ # information, see
2105
+ # [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type][1].
2106
+ #
2107
+ #
2108
+ #
2109
+ # [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type
2110
+ # @option options [String] :checksum_algorithm
2111
+ # Indicates the algorithm used to create the checksum for the object
2112
+ # when you use the SDK. This header will not provide any additional
2113
+ # functionality if you don't use the SDK. When you send this header,
2114
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
2115
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
2116
+ # with the HTTP status code `400 Bad Request`.
2117
+ #
2118
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
2119
+ # the supported algorithm from the following list:
2120
+ #
2121
+ # * `CRC32`
2122
+ #
2123
+ # * `CRC32C`
2124
+ #
2125
+ # * `SHA1`
2126
+ #
2127
+ # * `SHA256`
2128
+ #
2129
+ # For more information, see [Checking object integrity][1] in the
2130
+ # *Amazon S3 User Guide*.
2131
+ #
2132
+ # If the individual checksum value you provide through
2133
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2134
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
2135
+ # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2136
+ # that matches the provided value in `x-amz-checksum-algorithm `.
2137
+ #
2138
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2139
+ # for any request to upload an object with a retention period configured
2140
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2141
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2142
+ # Guide*.
2143
+ #
2144
+ # </note>
2145
+ #
2146
+ # For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2147
+ # is the default checksum algorithm that's used for performance.
2148
+ #
2149
+ #
2150
+ #
2151
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2152
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2153
+ # @option options [String] :checksum_crc32
2154
+ # This header can be used as a data integrity check to verify that the
2155
+ # data received is the same data that was originally sent. This header
2156
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
2157
+ # For more information, see [Checking object integrity][1] in the
2158
+ # *Amazon S3 User Guide*.
2159
+ #
2160
+ #
2161
+ #
2162
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2163
+ # @option options [String] :checksum_crc32c
2164
+ # This header can be used as a data integrity check to verify that the
2165
+ # data received is the same data that was originally sent. This header
2166
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
2167
+ # For more information, see [Checking object integrity][1] in the
2168
+ # *Amazon S3 User Guide*.
2169
+ #
2170
+ #
2171
+ #
2172
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2173
+ # @option options [String] :checksum_sha1
2174
+ # This header can be used as a data integrity check to verify that the
2175
+ # data received is the same data that was originally sent. This header
2176
+ # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
2177
+ # more information, see [Checking object integrity][1] in the *Amazon S3
2178
+ # User Guide*.
2179
+ #
2180
+ #
2181
+ #
2182
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2183
+ # @option options [String] :checksum_sha256
2184
+ # This header can be used as a data integrity check to verify that the
2185
+ # data received is the same data that was originally sent. This header
2186
+ # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
2187
+ # For more information, see [Checking object integrity][1] in the
2188
+ # *Amazon S3 User Guide*.
2189
+ #
2190
+ #
2191
+ #
2192
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
708
2193
  # @option options [Time,DateTime,Date,Integer,String] :expires
709
- # The date and time at which the object is no longer cacheable.
2194
+ # The date and time at which the object is no longer cacheable. For more
2195
+ # information, see
2196
+ # [https://www.rfc-editor.org/rfc/rfc7234#section-5.3][1].
2197
+ #
2198
+ #
2199
+ #
2200
+ # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2201
+ # @option options [String] :if_none_match
2202
+ # Uploads the object only if the object key name does not already exist
2203
+ # in the bucket specified. Otherwise, Amazon S3 returns a `412
2204
+ # Precondition Failed` error.
2205
+ #
2206
+ # If a conflicting operation occurs during the upload S3 returns a `409
2207
+ # ConditionalRequestConflict` response. On a 409 failure you should
2208
+ # retry the upload.
2209
+ #
2210
+ # Expects the '*' (asterisk) character.
2211
+ #
2212
+ # For more information about conditional requests, see [RFC 7232][1], or
2213
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2214
+ #
2215
+ #
2216
+ #
2217
+ # [1]: https://tools.ietf.org/html/rfc7232
2218
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
710
2219
  # @option options [String] :grant_full_control
711
2220
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
712
2221
  # object.
2222
+ #
2223
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2224
+ #
2225
+ # * This functionality is not supported for Amazon S3 on Outposts.
2226
+ #
2227
+ # </note>
713
2228
  # @option options [String] :grant_read
714
2229
  # Allows grantee to read the object data and its metadata.
2230
+ #
2231
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2232
+ #
2233
+ # * This functionality is not supported for Amazon S3 on Outposts.
2234
+ #
2235
+ # </note>
715
2236
  # @option options [String] :grant_read_acp
716
2237
  # Allows grantee to read the object ACL.
2238
+ #
2239
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2240
+ #
2241
+ # * This functionality is not supported for Amazon S3 on Outposts.
2242
+ #
2243
+ # </note>
717
2244
  # @option options [String] :grant_write_acp
718
2245
  # Allows grantee to write the ACL for the applicable object.
2246
+ #
2247
+ # <note markdown="1"> * This functionality is not supported for directory buckets.
2248
+ #
2249
+ # * This functionality is not supported for Amazon S3 on Outposts.
2250
+ #
2251
+ # </note>
719
2252
  # @option options [Hash<String,String>] :metadata
720
2253
  # A map of metadata to store with the object in S3.
721
2254
  # @option options [String] :server_side_encryption
722
- # The Server-side encryption algorithm used when storing this object in
723
- # S3 (e.g., AES256, aws:kms).
2255
+ # The server-side encryption algorithm that was used when you store this
2256
+ # object in Amazon S3 (for example, `AES256`, `aws:kms`,
2257
+ # `aws:kms:dsse`).
2258
+ #
2259
+ # * <b>General purpose buckets </b> - You have four mutually exclusive
2260
+ # options to protect data using server-side encryption in Amazon S3,
2261
+ # depending on how you choose to manage the encryption keys.
2262
+ # Specifically, the encryption key options are Amazon S3 managed keys
2263
+ # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
2264
+ # customer-provided keys (SSE-C). Amazon S3 encrypts data with
2265
+ # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
2266
+ # default. You can optionally tell Amazon S3 to encrypt data at rest
2267
+ # by using server-side encryption with other key options. For more
2268
+ # information, see [Using Server-Side Encryption][1] in the *Amazon S3
2269
+ # User Guide*.
2270
+ #
2271
+ # * <b>Directory buckets </b> - For directory buckets, there are only
2272
+ # two supported options for server-side encryption: server-side
2273
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
2274
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
2275
+ # recommend that the bucket's default encryption uses the desired
2276
+ # encryption configuration and you don't override the bucket default
2277
+ # encryption in your `CreateSession` requests or `PUT` object
2278
+ # requests. Then, new objects are automatically encrypted with the
2279
+ # desired encryption settings. For more information, see [Protecting
2280
+ # data with server-side encryption][2] in the *Amazon S3 User Guide*.
2281
+ # For more information about the encryption overriding behaviors in
2282
+ # directory buckets, see [Specifying server-side encryption with KMS
2283
+ # for new object uploads][3].
2284
+ #
2285
+ # In the Zonal endpoint API calls (except [CopyObject][4] and
2286
+ # [UploadPartCopy][5]) using the REST API, the encryption request
2287
+ # headers must match the encryption settings that are specified in the
2288
+ # `CreateSession` request. You can't override the values of the
2289
+ # encryption settings (`x-amz-server-side-encryption`,
2290
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
2291
+ # `x-amz-server-side-encryption-context`, and
2292
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
2293
+ # specified in the `CreateSession` request. You don't need to
2294
+ # explicitly specify these encryption settings values in Zonal
2295
+ # endpoint API calls, and Amazon S3 will use the encryption settings
2296
+ # values from the `CreateSession` request to protect new objects in
2297
+ # the directory bucket.
2298
+ #
2299
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
2300
+ # `CreateSession`, the session token refreshes automatically to avoid
2301
+ # service interruptions when a session expires. The CLI or the Amazon
2302
+ # Web Services SDKs use the bucket's default encryption configuration
2303
+ # for the `CreateSession` request. It's not supported to override the
2304
+ # encryption settings values in the `CreateSession` request. So in the
2305
+ # Zonal endpoint API calls (except [CopyObject][4] and
2306
+ # [UploadPartCopy][5]), the encryption request headers must match the
2307
+ # default encryption configuration of the directory bucket.
2308
+ #
2309
+ # </note>
2310
+ #
2311
+ #
2312
+ #
2313
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
2314
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
2315
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
2316
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
2317
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
724
2318
  # @option options [String] :storage_class
725
- # The type of storage to use for the object. Defaults to 'STANDARD'.
2319
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
2320
+ # created objects. The STANDARD storage class provides high durability
2321
+ # and high availability. Depending on performance needs, you can specify
2322
+ # a different Storage Class. For more information, see [Storage
2323
+ # Classes][1] in the *Amazon S3 User Guide*.
2324
+ #
2325
+ # <note markdown="1"> * For directory buckets, only the S3 Express One Zone storage class is
2326
+ # supported to store newly created objects.
2327
+ #
2328
+ # * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.
2329
+ #
2330
+ # </note>
2331
+ #
2332
+ #
2333
+ #
2334
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
726
2335
  # @option options [String] :website_redirect_location
727
2336
  # If the bucket is configured as a website, redirects requests for this
728
2337
  # object to another object in the same bucket or to an external URL.
729
- # Amazon S3 stores the value of this header in the object metadata.
2338
+ # Amazon S3 stores the value of this header in the object metadata. For
2339
+ # information about object metadata, see [Object Key and Metadata][1] in
2340
+ # the *Amazon S3 User Guide*.
2341
+ #
2342
+ # In the following example, the request header sets the redirect to an
2343
+ # object (anotherPage.html) in the same bucket:
2344
+ #
2345
+ # `x-amz-website-redirect-location: /anotherPage.html`
2346
+ #
2347
+ # In the following example, the request header sets the object redirect
2348
+ # to another website:
2349
+ #
2350
+ # `x-amz-website-redirect-location: http://www.example.com/`
2351
+ #
2352
+ # For more information about website hosting in Amazon S3, see [Hosting
2353
+ # Websites on Amazon S3][2] and [How to Configure Website Page
2354
+ # Redirects][3] in the *Amazon S3 User Guide*.
2355
+ #
2356
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2357
+ #
2358
+ # </note>
2359
+ #
2360
+ #
2361
+ #
2362
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
2363
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
2364
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
730
2365
  # @option options [String] :sse_customer_algorithm
731
- # Specifies the algorithm to use to when encrypting the object (e.g.,
732
- # AES256).
2366
+ # Specifies the algorithm to use when encrypting the object (for
2367
+ # example, `AES256`).
2368
+ #
2369
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2370
+ #
2371
+ # </note>
733
2372
  # @option options [String] :sse_customer_key
734
2373
  # Specifies the customer-provided encryption key for Amazon S3 to use in
735
2374
  # encrypting data. This value is used to store the object and then it is
736
- # discarded; Amazon does not store the encryption key. The key must be
737
- # appropriate for use with the algorithm specified in the
738
- # x-amz-server-side​-encryption​-customer-algorithm header.
2375
+ # discarded; Amazon S3 does not store the encryption key. The key must
2376
+ # be appropriate for use with the algorithm specified in the
2377
+ # `x-amz-server-side-encryption-customer-algorithm` header.
2378
+ #
2379
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2380
+ #
2381
+ # </note>
739
2382
  # @option options [String] :sse_customer_key_md5
740
2383
  # Specifies the 128-bit MD5 digest of the encryption key according to
741
2384
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
742
- # ensure the encryption key was transmitted without error.
2385
+ # ensure that the encryption key was transmitted without error.
2386
+ #
2387
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2388
+ #
2389
+ # </note>
743
2390
  # @option options [String] :ssekms_key_id
744
- # Specifies the AWS KMS key ID to use for object encryption. All GET and
745
- # PUT requests for an object protected by AWS KMS will fail if not made
746
- # via SSL or using SigV4. Documentation on configuring any of the
747
- # officially supported AWS SDKs and CLI can be found at
748
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
2391
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
2392
+ # object encryption. If the KMS key doesn't exist in the same account
2393
+ # that's issuing the command, you must use the full Key ARN not the Key
2394
+ # ID.
2395
+ #
2396
+ # **General purpose buckets** - If you specify
2397
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
2398
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
2399
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
2400
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
2401
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
2402
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
2403
+ #
2404
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
2405
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
2406
+ # header is implicitly assigned the ID of the KMS symmetric encryption
2407
+ # customer managed key that's configured for your directory bucket's
2408
+ # default encryption setting. If you want to specify the `
2409
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
2410
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
2411
+ # customer managed key that's configured for your directory bucket's
2412
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
2413
+ # Request` error. Only use the key ID or key ARN. The key alias format
2414
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
2415
+ # support 1 [customer managed key][1] per directory bucket for the
2416
+ # lifetime of the bucket. The [Amazon Web Services managed key][2]
2417
+ # (`aws/s3`) isn't supported.
2418
+ #
2419
+ #
2420
+ #
2421
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
2422
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
749
2423
  # @option options [String] :ssekms_encryption_context
750
- # Specifies the AWS KMS Encryption Context to use for object encryption.
751
- # The value of this header is a base64-encoded UTF-8 string holding JSON
752
- # with the encryption context key-value pairs.
2424
+ # Specifies the Amazon Web Services KMS Encryption Context as an
2425
+ # additional encryption context to use for object encryption. The value
2426
+ # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
2427
+ # which contains the encryption context as key-value pairs. This value
2428
+ # is stored as object metadata and automatically gets passed on to
2429
+ # Amazon Web Services KMS for future `GetObject` operations on this
2430
+ # object.
2431
+ #
2432
+ # **General purpose buckets** - This value must be explicitly added
2433
+ # during `CopyObject` operations if you want an additional encryption
2434
+ # context for your object. For more information, see [Encryption
2435
+ # context][1] in the *Amazon S3 User Guide*.
2436
+ #
2437
+ # **Directory buckets** - You can optionally provide an explicit
2438
+ # encryption context value. The value must match the default encryption
2439
+ # context - the bucket Amazon Resource Name (ARN). An additional
2440
+ # encryption context value is not supported.
2441
+ #
2442
+ #
2443
+ #
2444
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
2445
+ # @option options [Boolean] :bucket_key_enabled
2446
+ # Specifies whether Amazon S3 should use an S3 Bucket Key for object
2447
+ # encryption with server-side encryption using Key Management Service
2448
+ # (KMS) keys (SSE-KMS).
2449
+ #
2450
+ # **General purpose buckets** - Setting this header to `true` causes
2451
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
2452
+ # Also, specifying this header with a PUT action doesn't affect
2453
+ # bucket-level settings for S3 Bucket Key.
2454
+ #
2455
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
2456
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
2457
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
2458
+ # from general purpose buckets to directory buckets, from directory
2459
+ # buckets to general purpose buckets, or between directory buckets,
2460
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
2461
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
2462
+ # makes a call to KMS every time a copy request is made for a
2463
+ # KMS-encrypted object.
2464
+ #
2465
+ #
2466
+ #
2467
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
2468
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
2469
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
2470
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
753
2471
  # @option options [String] :request_payer
754
- # Confirms that the requester knows that she or he will be charged for
755
- # the request. Bucket owners need not specify this parameter in their
756
- # requests. Documentation on downloading objects from requester pays
757
- # buckets can be found at
758
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2472
+ # Confirms that the requester knows that they will be charged for the
2473
+ # request. Bucket owners need not specify this parameter in their
2474
+ # requests. If either the source or destination S3 bucket has Requester
2475
+ # Pays enabled, the requester will pay for corresponding charges to copy
2476
+ # the object. For information about downloading objects from Requester
2477
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
2478
+ # in the *Amazon S3 User Guide*.
2479
+ #
2480
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2481
+ #
2482
+ # </note>
2483
+ #
2484
+ #
2485
+ #
2486
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
759
2487
  # @option options [String] :tagging
760
2488
  # The tag-set for the object. The tag-set must be encoded as URL Query
761
2489
  # parameters. (For example, "Key1=Value1")
2490
+ #
2491
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2492
+ #
2493
+ # </note>
762
2494
  # @option options [String] :object_lock_mode
763
- # The object lock mode that you want to apply to this object.
2495
+ # The Object Lock mode that you want to apply to this object.
2496
+ #
2497
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2498
+ #
2499
+ # </note>
764
2500
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
765
- # The date and time when you want this object's object lock to expire.
2501
+ # The date and time when you want this object's Object Lock to expire.
2502
+ # Must be formatted as a timestamp parameter.
2503
+ #
2504
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2505
+ #
2506
+ # </note>
766
2507
  # @option options [String] :object_lock_legal_hold_status
767
- # The Legal Hold status that you want to apply to the specified object.
2508
+ # Specifies whether a legal hold will be applied to this object. For
2509
+ # more information about S3 Object Lock, see [Object Lock][1] in the
2510
+ # *Amazon S3 User Guide*.
2511
+ #
2512
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2513
+ #
2514
+ # </note>
2515
+ #
2516
+ #
2517
+ #
2518
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
2519
+ # @option options [String] :expected_bucket_owner
2520
+ # The account ID of the expected bucket owner. If the account ID that
2521
+ # you provide does not match the actual owner of the bucket, the request
2522
+ # fails with the HTTP status code `403 Forbidden` (access denied).
768
2523
  # @return [Types::PutObjectOutput]
769
2524
  def put(options = {})
770
2525
  options = options.merge(
771
2526
  bucket: @bucket_name,
772
2527
  key: @key
773
2528
  )
774
- resp = @client.put_object(options)
2529
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2530
+ @client.put_object(options)
2531
+ end
775
2532
  resp.data
776
2533
  end
777
2534
 
@@ -825,7 +2582,7 @@ module Aws::S3
825
2582
  # bucket_name: "BucketName", # required
826
2583
  # prefix: "LocationPrefix", # required
827
2584
  # encryption: {
828
- # encryption_type: "AES256", # required, accepts AES256, aws:kms
2585
+ # encryption_type: "AES256", # required, accepts AES256, aws:kms, aws:kms:dsse
829
2586
  # kms_key_id: "SSEKMSKeyId",
830
2587
  # kms_context: "KMSContext",
831
2588
  # },
@@ -856,28 +2613,63 @@ module Aws::S3
856
2613
  # value: "MetadataValue",
857
2614
  # },
858
2615
  # ],
859
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
2616
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW, EXPRESS_ONEZONE
860
2617
  # },
861
2618
  # },
862
2619
  # },
863
2620
  # request_payer: "requester", # accepts requester
2621
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
2622
+ # expected_bucket_owner: "AccountId",
864
2623
  # })
865
2624
  # @param [Hash] options ({})
866
2625
  # @option options [String] :version_id
2626
+ # VersionId used to reference a specific version of the object.
867
2627
  # @option options [Types::RestoreRequest] :restore_request
2628
+ # Container for restore job parameters.
868
2629
  # @option options [String] :request_payer
869
- # Confirms that the requester knows that she or he will be charged for
870
- # the request. Bucket owners need not specify this parameter in their
871
- # requests. Documentation on downloading objects from requester pays
872
- # buckets can be found at
873
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2630
+ # Confirms that the requester knows that they will be charged for the
2631
+ # request. Bucket owners need not specify this parameter in their
2632
+ # requests. If either the source or destination S3 bucket has Requester
2633
+ # Pays enabled, the requester will pay for corresponding charges to copy
2634
+ # the object. For information about downloading objects from Requester
2635
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
2636
+ # in the *Amazon S3 User Guide*.
2637
+ #
2638
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2639
+ #
2640
+ # </note>
2641
+ #
2642
+ #
2643
+ #
2644
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2645
+ # @option options [String] :checksum_algorithm
2646
+ # Indicates the algorithm used to create the checksum for the object
2647
+ # when you use the SDK. This header will not provide any additional
2648
+ # functionality if you don't use the SDK. When you send this header,
2649
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
2650
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
2651
+ # status code `400 Bad Request`. For more information, see [Checking
2652
+ # object integrity][1] in the *Amazon S3 User Guide*.
2653
+ #
2654
+ # If you provide an individual checksum, Amazon S3 ignores any provided
2655
+ # `ChecksumAlgorithm` parameter.
2656
+ #
2657
+ #
2658
+ #
2659
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2660
+ # @option options [String] :expected_bucket_owner
2661
+ # The account ID of the expected bucket owner. If the account ID that
2662
+ # you provide does not match the actual owner of the bucket, the request
2663
+ # fails with the HTTP status code `403 Forbidden` (access denied).
874
2664
  # @return [Types::RestoreObjectOutput]
875
2665
  def restore_object(options = {})
876
2666
  options = options.merge(
877
2667
  bucket: @bucket_name,
878
2668
  key: @key
879
2669
  )
880
- resp = @client.restore_object(options)
2670
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2671
+ @client.restore_object(options)
2672
+ end
881
2673
  resp.data
882
2674
  end
883
2675
 
@@ -967,8 +2759,8 @@ module Aws::S3
967
2759
 
968
2760
  def yield_waiter_and_warn(waiter, &block)
969
2761
  if !@waiter_block_warned
970
- msg = "pass options to configure the waiter; "
971
- msg << "yielding the waiter is deprecated"
2762
+ msg = "pass options to configure the waiter; "\
2763
+ "yielding the waiter is deprecated"
972
2764
  warn(msg)
973
2765
  @waiter_block_warned = true
974
2766
  end
@@ -976,7 +2768,9 @@ module Aws::S3
976
2768
  end
977
2769
 
978
2770
  def separate_params_and_options(options)
979
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
2771
+ opts = Set.new(
2772
+ [:client, :max_attempts, :delay, :before_attempt, :before_wait]
2773
+ )
980
2774
  waiter_opts = {}
981
2775
  waiter_params = {}
982
2776
  options.each_pair do |key, value|
@@ -1000,21 +2794,94 @@ module Aws::S3
1000
2794
  # mfa: "MFA",
1001
2795
  # request_payer: "requester", # accepts requester
1002
2796
  # bypass_governance_retention: false,
2797
+ # expected_bucket_owner: "AccountId",
2798
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
1003
2799
  # })
1004
2800
  # @param options ({})
1005
2801
  # @option options [String] :mfa
1006
2802
  # The concatenation of the authentication device's serial number, a
1007
2803
  # space, and the value that is displayed on your authentication device.
2804
+ # Required to permanently delete a versioned object if versioning is
2805
+ # configured with MFA delete enabled.
2806
+ #
2807
+ # When performing the `DeleteObjects` operation on an MFA delete enabled
2808
+ # bucket, which attempts to delete the specified versioned objects, you
2809
+ # must include an MFA token. If you don't provide an MFA token, the
2810
+ # entire request will fail, even if there are non-versioned objects that
2811
+ # you are trying to delete. If you provide an invalid token, whether
2812
+ # there are versioned object keys in the request or not, the entire
2813
+ # Multi-Object Delete request will fail. For information about MFA
2814
+ # Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
2815
+ #
2816
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2817
+ #
2818
+ # </note>
2819
+ #
2820
+ #
2821
+ #
2822
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
1008
2823
  # @option options [String] :request_payer
1009
- # Confirms that the requester knows that she or he will be charged for
1010
- # the request. Bucket owners need not specify this parameter in their
1011
- # requests. Documentation on downloading objects from requester pays
1012
- # buckets can be found at
1013
- # http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
2824
+ # Confirms that the requester knows that they will be charged for the
2825
+ # request. Bucket owners need not specify this parameter in their
2826
+ # requests. If either the source or destination S3 bucket has Requester
2827
+ # Pays enabled, the requester will pay for corresponding charges to copy
2828
+ # the object. For information about downloading objects from Requester
2829
+ # Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
2830
+ # in the *Amazon S3 User Guide*.
2831
+ #
2832
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2833
+ #
2834
+ # </note>
2835
+ #
2836
+ #
2837
+ #
2838
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1014
2839
  # @option options [Boolean] :bypass_governance_retention
1015
2840
  # Specifies whether you want to delete this object even if it has a
1016
- # Governance-type object lock in place. You must have sufficient
1017
- # permissions to perform this operation.
2841
+ # Governance-type Object Lock in place. To use this header, you must
2842
+ # have the `s3:BypassGovernanceRetention` permission.
2843
+ #
2844
+ # <note markdown="1"> This functionality is not supported for directory buckets.
2845
+ #
2846
+ # </note>
2847
+ # @option options [String] :expected_bucket_owner
2848
+ # The account ID of the expected bucket owner. If the account ID that
2849
+ # you provide does not match the actual owner of the bucket, the request
2850
+ # fails with the HTTP status code `403 Forbidden` (access denied).
2851
+ # @option options [String] :checksum_algorithm
2852
+ # Indicates the algorithm used to create the checksum for the object
2853
+ # when you use the SDK. This header will not provide any additional
2854
+ # functionality if you don't use the SDK. When you send this header,
2855
+ # there must be a corresponding `x-amz-checksum-algorithm ` or
2856
+ # `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
2857
+ # with the HTTP status code `400 Bad Request`.
2858
+ #
2859
+ # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
2860
+ # the supported algorithm from the following list:
2861
+ #
2862
+ # * `CRC32`
2863
+ #
2864
+ # * `CRC32C`
2865
+ #
2866
+ # * `SHA1`
2867
+ #
2868
+ # * `SHA256`
2869
+ #
2870
+ # For more information, see [Checking object integrity][1] in the
2871
+ # *Amazon S3 User Guide*.
2872
+ #
2873
+ # If the individual checksum value you provide through
2874
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
2875
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
2876
+ # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2877
+ # that matches the provided value in `x-amz-checksum-algorithm `.
2878
+ #
2879
+ # If you provide an individual checksum, Amazon S3 ignores any provided
2880
+ # `ChecksumAlgorithm` parameter.
2881
+ #
2882
+ #
2883
+ #
2884
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
1018
2885
  # @return [void]
1019
2886
  def batch_delete!(options = {})
1020
2887
  batch_enum.each do |batch|
@@ -1027,7 +2894,9 @@ module Aws::S3
1027
2894
  key: item.key
1028
2895
  }
1029
2896
  end
1030
- batch[0].client.delete_objects(params)
2897
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2898
+ batch[0].client.delete_objects(params)
2899
+ end
1031
2900
  end
1032
2901
  nil
1033
2902
  end
@@ -1037,3 +2906,6 @@ module Aws::S3
1037
2906
  end
1038
2907
  end
1039
2908
  end
2909
+
2910
+ # Load customizations if they exist
2911
+ require 'aws-sdk-s3/customizations/object_summary'