aws-sdk-s3 1.48.0 → 1.183.0

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