aws-sdk-s3 1.10.0 → 1.208.0

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