aws-sdk-s3 1.48.0 → 1.169.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +1270 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
- data/lib/aws-sdk-s3/bucket.rb +959 -106
- data/lib/aws-sdk-s3/bucket_acl.rb +64 -18
- data/lib/aws-sdk-s3/bucket_cors.rb +79 -18
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +66 -20
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +106 -21
- data/lib/aws-sdk-s3/bucket_logging.rb +68 -16
- data/lib/aws-sdk-s3/bucket_notification.rb +52 -20
- data/lib/aws-sdk-s3/bucket_policy.rb +107 -17
- data/lib/aws-sdk-s3/bucket_region_cache.rb +11 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +60 -15
- data/lib/aws-sdk-s3/bucket_tagging.rb +71 -18
- data/lib/aws-sdk-s3/bucket_versioning.rb +133 -17
- data/lib/aws-sdk-s3/bucket_website.rb +78 -21
- data/lib/aws-sdk-s3/client.rb +13765 -1019
- data/lib/aws-sdk-s3/client_api.rb +1137 -197
- data/lib/aws-sdk-s3/customizations/bucket.rb +56 -37
- data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
- data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
- data/lib/aws-sdk-s3/customizations/object.rb +288 -68
- data/lib/aws-sdk-s3/customizations/object_summary.rb +10 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +27 -28
- data/lib/aws-sdk-s3/encryption/client.rb +28 -7
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
- data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
- data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
- data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +46 -11
- data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
- data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
- data/lib/aws-sdk-s3/encryption.rb +4 -0
- data/lib/aws-sdk-s3/encryptionV2/client.rb +570 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +223 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
- data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +173 -0
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +592 -0
- data/lib/aws-sdk-s3/endpoints.rb +1392 -0
- data/lib/aws-sdk-s3/errors.rb +126 -1
- data/lib/aws-sdk-s3/event_streams.rb +8 -1
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
- data/lib/aws-sdk-s3/file_downloader.rb +176 -44
- data/lib/aws-sdk-s3/file_part.rb +11 -6
- data/lib/aws-sdk-s3/file_uploader.rb +39 -18
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +82 -23
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +61 -21
- data/lib/aws-sdk-s3/multipart_upload.rb +265 -32
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +367 -45
- data/lib/aws-sdk-s3/object.rb +2475 -228
- data/lib/aws-sdk-s3/object_acl.rb +103 -25
- data/lib/aws-sdk-s3/object_copier.rb +9 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -22
- data/lib/aws-sdk-s3/object_summary.rb +2075 -203
- data/lib/aws-sdk-s3/object_version.rb +492 -80
- data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
- data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
- data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +7 -43
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +20 -3
- data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
- data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +60 -15
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +35 -30
- data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +63 -94
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
- data/lib/aws-sdk-s3/presigned_post.rb +160 -99
- data/lib/aws-sdk-s3/presigner.rb +138 -59
- data/lib/aws-sdk-s3/resource.rb +155 -17
- data/lib/aws-sdk-s3/types.rb +12229 -4377
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +46 -32
- data/sig/bucket.rbs +216 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +115 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2406 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/errors.rbs +34 -0
- data/sig/multipart_upload.rbs +111 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +443 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +335 -0
- data/sig/object_version.rbs +137 -0
- data/sig/resource.rbs +132 -0
- data/sig/types.rbs +2596 -0
- data/sig/waiters.rbs +95 -0
- metadata +74 -15
@@ -1,11 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
4
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
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 ObjectVersion
|
10
13
|
|
11
14
|
extend Aws::Deprecations
|
@@ -27,6 +30,7 @@ module Aws::S3
|
|
27
30
|
@id = extract_id(args, options)
|
28
31
|
@data = options.delete(:data)
|
29
32
|
@client = options.delete(:client) || Client.new(options)
|
33
|
+
@waiter_block_warned = false
|
30
34
|
end
|
31
35
|
|
32
36
|
# @!group Read-Only Attributes
|
@@ -46,12 +50,18 @@ module Aws::S3
|
|
46
50
|
@id
|
47
51
|
end
|
48
52
|
|
49
|
-
|
53
|
+
# The entity tag is an MD5 hash of that version of the object.
|
50
54
|
# @return [String]
|
51
55
|
def etag
|
52
56
|
data[:etag]
|
53
57
|
end
|
54
58
|
|
59
|
+
# The algorithm that was used to create a checksum of the object.
|
60
|
+
# @return [Array<String>]
|
61
|
+
def checksum_algorithm
|
62
|
+
data[:checksum_algorithm]
|
63
|
+
end
|
64
|
+
|
55
65
|
# Size in bytes of the object.
|
56
66
|
# @return [Integer]
|
57
67
|
def size
|
@@ -83,18 +93,32 @@ module Aws::S3
|
|
83
93
|
data[:is_latest]
|
84
94
|
end
|
85
95
|
|
86
|
-
# Date and time the object was last modified.
|
96
|
+
# Date and time when the object was last modified.
|
87
97
|
# @return [Time]
|
88
98
|
def last_modified
|
89
99
|
data[:last_modified]
|
90
100
|
end
|
91
101
|
|
92
|
-
|
102
|
+
# Specifies the owner of the object.
|
93
103
|
# @return [Types::Owner]
|
94
104
|
def owner
|
95
105
|
data[:owner]
|
96
106
|
end
|
97
107
|
|
108
|
+
# Specifies the restoration status of an object. Objects in certain
|
109
|
+
# storage classes must be restored before they can be retrieved. For
|
110
|
+
# more information about these storage classes and how to work with
|
111
|
+
# archived objects, see [ Working with archived objects][1] in the
|
112
|
+
# *Amazon S3 User Guide*.
|
113
|
+
#
|
114
|
+
#
|
115
|
+
#
|
116
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html
|
117
|
+
# @return [Types::RestoreStatus]
|
118
|
+
def restore_status
|
119
|
+
data[:restore_status]
|
120
|
+
end
|
121
|
+
|
98
122
|
# @!endgroup
|
99
123
|
|
100
124
|
# @return [Client]
|
@@ -130,7 +154,8 @@ module Aws::S3
|
|
130
154
|
# Waiter polls an API operation until a resource enters a desired
|
131
155
|
# state.
|
132
156
|
#
|
133
|
-
# @note The waiting operation is performed on a copy. The original resource
|
157
|
+
# @note The waiting operation is performed on a copy. The original resource
|
158
|
+
# remains unchanged.
|
134
159
|
#
|
135
160
|
# ## Basic Usage
|
136
161
|
#
|
@@ -143,13 +168,15 @@ module Aws::S3
|
|
143
168
|
#
|
144
169
|
# ## Example
|
145
170
|
#
|
146
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
171
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
172
|
+
# instance.state.name == 'running'
|
173
|
+
# end
|
147
174
|
#
|
148
175
|
# ## Configuration
|
149
176
|
#
|
150
177
|
# You can configure the maximum number of polling attempts, and the
|
151
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
152
|
-
# by passing a block to {#wait_until}:
|
178
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
179
|
+
# set by passing a block to {#wait_until}:
|
153
180
|
#
|
154
181
|
# # poll for ~25 seconds
|
155
182
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -180,17 +207,16 @@ module Aws::S3
|
|
180
207
|
# # resource did not enter the desired state in time
|
181
208
|
# end
|
182
209
|
#
|
210
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
183
211
|
#
|
184
|
-
# @
|
185
|
-
#
|
186
|
-
#
|
187
|
-
# because the waiter has entered a state that it will not transition
|
188
|
-
# out of, preventing success.
|
212
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
213
|
+
# terminates because the waiter has entered a state that it will not
|
214
|
+
# transition out of, preventing success.
|
189
215
|
#
|
190
216
|
# yet successful.
|
191
217
|
#
|
192
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
193
|
-
# while polling for a resource that is not expected.
|
218
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
219
|
+
# encountered while polling for a resource that is not expected.
|
194
220
|
#
|
195
221
|
# @raise [NotImplementedError] Raised when the resource does not
|
196
222
|
#
|
@@ -217,7 +243,9 @@ module Aws::S3
|
|
217
243
|
:retry
|
218
244
|
end
|
219
245
|
end
|
220
|
-
Aws::
|
246
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
247
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
248
|
+
end
|
221
249
|
end
|
222
250
|
|
223
251
|
# @!group Actions
|
@@ -228,20 +256,46 @@ module Aws::S3
|
|
228
256
|
# mfa: "MFA",
|
229
257
|
# request_payer: "requester", # accepts requester
|
230
258
|
# bypass_governance_retention: false,
|
259
|
+
# expected_bucket_owner: "AccountId",
|
231
260
|
# })
|
232
261
|
# @param [Hash] options ({})
|
233
262
|
# @option options [String] :mfa
|
234
263
|
# The concatenation of the authentication device's serial number, a
|
235
264
|
# space, and the value that is displayed on your authentication device.
|
265
|
+
# Required to permanently delete a versioned object if versioning is
|
266
|
+
# configured with MFA delete enabled.
|
267
|
+
#
|
268
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
269
|
+
#
|
270
|
+
# </note>
|
236
271
|
# @option options [String] :request_payer
|
237
|
-
# Confirms that the requester knows that
|
238
|
-
#
|
239
|
-
# requests.
|
240
|
-
#
|
241
|
-
#
|
272
|
+
# Confirms that the requester knows that they will be charged for the
|
273
|
+
# request. Bucket owners need not specify this parameter in their
|
274
|
+
# requests. If either the source or destination S3 bucket has Requester
|
275
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
276
|
+
# the object. For information about downloading objects from Requester
|
277
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
278
|
+
# in the *Amazon S3 User Guide*.
|
279
|
+
#
|
280
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
281
|
+
#
|
282
|
+
# </note>
|
283
|
+
#
|
284
|
+
#
|
285
|
+
#
|
286
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
242
287
|
# @option options [Boolean] :bypass_governance_retention
|
243
|
-
# Indicates whether
|
244
|
-
# restrictions to process this operation.
|
288
|
+
# Indicates whether S3 Object Lock should bypass Governance-mode
|
289
|
+
# restrictions to process this operation. To use this header, you must
|
290
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
291
|
+
#
|
292
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
293
|
+
#
|
294
|
+
# </note>
|
295
|
+
# @option options [String] :expected_bucket_owner
|
296
|
+
# The account ID of the expected bucket owner. If the account ID that
|
297
|
+
# you provide does not match the actual owner of the bucket, the request
|
298
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
245
299
|
# @return [Types::DeleteObjectOutput]
|
246
300
|
def delete(options = {})
|
247
301
|
options = options.merge(
|
@@ -249,7 +303,9 @@ module Aws::S3
|
|
249
303
|
key: @object_key,
|
250
304
|
version_id: @id
|
251
305
|
)
|
252
|
-
resp =
|
306
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
307
|
+
@client.delete_object(options)
|
308
|
+
end
|
253
309
|
resp.data
|
254
310
|
end
|
255
311
|
|
@@ -272,60 +328,210 @@ module Aws::S3
|
|
272
328
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
273
329
|
# request_payer: "requester", # accepts requester
|
274
330
|
# part_number: 1,
|
331
|
+
# expected_bucket_owner: "AccountId",
|
332
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
275
333
|
# })
|
276
334
|
# @param [Hash] options ({})
|
277
335
|
# @option options [String] :if_match
|
278
336
|
# Return the object only if its entity tag (ETag) is the same as the one
|
279
|
-
# specified
|
337
|
+
# specified in this header; otherwise, return a `412 Precondition
|
338
|
+
# Failed` error.
|
339
|
+
#
|
340
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
341
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
342
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
343
|
+
# then, S3 returns `200 OK` and the data requested.
|
344
|
+
#
|
345
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
346
|
+
#
|
347
|
+
#
|
348
|
+
#
|
349
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
280
350
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
281
351
|
# Return the object only if it has been modified since the specified
|
282
|
-
# time
|
352
|
+
# time; otherwise, return a `304 Not Modified` error.
|
353
|
+
#
|
354
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
355
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
356
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
357
|
+
# then, S3 returns `304 Not Modified` status code.
|
358
|
+
#
|
359
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
360
|
+
#
|
361
|
+
#
|
362
|
+
#
|
363
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
283
364
|
# @option options [String] :if_none_match
|
284
365
|
# Return the object only if its entity tag (ETag) is different from the
|
285
|
-
# one specified
|
366
|
+
# one specified in this header; otherwise, return a `304 Not Modified`
|
367
|
+
# error.
|
368
|
+
#
|
369
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
370
|
+
# present in the request as follows:` If-None-Match` condition evaluates
|
371
|
+
# to `false`, and; `If-Modified-Since` condition evaluates to `true`;
|
372
|
+
# then, S3 returns `304 Not Modified` HTTP status code.
|
373
|
+
#
|
374
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
375
|
+
#
|
376
|
+
#
|
377
|
+
#
|
378
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
286
379
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
287
380
|
# Return the object only if it has not been modified since the specified
|
288
|
-
# time
|
381
|
+
# time; otherwise, return a `412 Precondition Failed` error.
|
382
|
+
#
|
383
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
384
|
+
# present in the request as follows: `If-Match` condition evaluates to
|
385
|
+
# `true`, and; `If-Unmodified-Since` condition evaluates to `false`;
|
386
|
+
# then, S3 returns `200 OK` and the data requested.
|
387
|
+
#
|
388
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
389
|
+
#
|
390
|
+
#
|
391
|
+
#
|
392
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
289
393
|
# @option options [String] :range
|
290
|
-
# Downloads the specified range
|
291
|
-
# about the HTTP Range header,
|
292
|
-
#
|
394
|
+
# Downloads the specified byte range of an object. For more information
|
395
|
+
# about the HTTP Range header, see
|
396
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
397
|
+
#
|
398
|
+
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
399
|
+
# `GET` request.
|
400
|
+
#
|
401
|
+
# </note>
|
402
|
+
#
|
403
|
+
#
|
404
|
+
#
|
405
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
|
293
406
|
# @option options [String] :response_cache_control
|
294
|
-
# Sets the Cache-Control header of the response.
|
407
|
+
# Sets the `Cache-Control` header of the response.
|
295
408
|
# @option options [String] :response_content_disposition
|
296
|
-
# Sets the Content-Disposition header of the response
|
409
|
+
# Sets the `Content-Disposition` header of the response.
|
297
410
|
# @option options [String] :response_content_encoding
|
298
|
-
# Sets the Content-Encoding header of the response.
|
411
|
+
# Sets the `Content-Encoding` header of the response.
|
299
412
|
# @option options [String] :response_content_language
|
300
|
-
# Sets the Content-Language header of the response.
|
413
|
+
# Sets the `Content-Language` header of the response.
|
301
414
|
# @option options [String] :response_content_type
|
302
|
-
# Sets the Content-Type header of the response.
|
415
|
+
# Sets the `Content-Type` header of the response.
|
303
416
|
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
304
|
-
# Sets the Expires header of the response.
|
417
|
+
# Sets the `Expires` header of the response.
|
305
418
|
# @option options [String] :sse_customer_algorithm
|
306
|
-
# Specifies the algorithm to use
|
307
|
-
# AES256).
|
419
|
+
# Specifies the algorithm to use when decrypting the object (for
|
420
|
+
# example, `AES256`).
|
421
|
+
#
|
422
|
+
# If you encrypt an object by using server-side encryption with
|
423
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
424
|
+
# Amazon S3, then when you GET the object, you must use the following
|
425
|
+
# headers:
|
426
|
+
#
|
427
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
428
|
+
#
|
429
|
+
# * `x-amz-server-side-encryption-customer-key`
|
430
|
+
#
|
431
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
432
|
+
#
|
433
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
434
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
435
|
+
#
|
436
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
437
|
+
#
|
438
|
+
# </note>
|
439
|
+
#
|
440
|
+
#
|
441
|
+
#
|
442
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
308
443
|
# @option options [String] :sse_customer_key
|
309
|
-
# Specifies the customer-provided encryption key
|
310
|
-
#
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
444
|
+
# Specifies the customer-provided encryption key that you originally
|
445
|
+
# provided for Amazon S3 to encrypt the data before storing it. This
|
446
|
+
# value is used to decrypt the object when recovering it and must match
|
447
|
+
# the one used when storing the data. The key must be appropriate for
|
448
|
+
# use with the algorithm specified in the
|
449
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
450
|
+
#
|
451
|
+
# If you encrypt an object by using server-side encryption with
|
452
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
453
|
+
# Amazon S3, then when you GET the object, you must use the following
|
454
|
+
# headers:
|
455
|
+
#
|
456
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
457
|
+
#
|
458
|
+
# * `x-amz-server-side-encryption-customer-key`
|
459
|
+
#
|
460
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
461
|
+
#
|
462
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
463
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
464
|
+
#
|
465
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
466
|
+
#
|
467
|
+
# </note>
|
468
|
+
#
|
469
|
+
#
|
470
|
+
#
|
471
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
314
472
|
# @option options [String] :sse_customer_key_md5
|
315
|
-
# Specifies the 128-bit MD5 digest of the encryption
|
316
|
-
# RFC 1321. Amazon S3 uses this header for a message
|
317
|
-
# ensure the encryption key was transmitted
|
473
|
+
# Specifies the 128-bit MD5 digest of the customer-provided encryption
|
474
|
+
# key according to RFC 1321. Amazon S3 uses this header for a message
|
475
|
+
# integrity check to ensure that the encryption key was transmitted
|
476
|
+
# without error.
|
477
|
+
#
|
478
|
+
# If you encrypt an object by using server-side encryption with
|
479
|
+
# customer-provided encryption keys (SSE-C) when you store the object in
|
480
|
+
# Amazon S3, then when you GET the object, you must use the following
|
481
|
+
# headers:
|
482
|
+
#
|
483
|
+
# * `x-amz-server-side-encryption-customer-algorithm`
|
484
|
+
#
|
485
|
+
# * `x-amz-server-side-encryption-customer-key`
|
486
|
+
#
|
487
|
+
# * `x-amz-server-side-encryption-customer-key-MD5`
|
488
|
+
#
|
489
|
+
# For more information about SSE-C, see [Server-Side Encryption (Using
|
490
|
+
# Customer-Provided Encryption Keys)][1] in the *Amazon S3 User Guide*.
|
491
|
+
#
|
492
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
493
|
+
#
|
494
|
+
# </note>
|
495
|
+
#
|
496
|
+
#
|
497
|
+
#
|
498
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
318
499
|
# @option options [String] :request_payer
|
319
|
-
# Confirms that the requester knows that
|
320
|
-
#
|
321
|
-
# requests.
|
322
|
-
#
|
323
|
-
#
|
500
|
+
# Confirms that the requester knows that they will be charged for the
|
501
|
+
# request. Bucket owners need not specify this parameter in their
|
502
|
+
# requests. If either the source or destination S3 bucket has Requester
|
503
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
504
|
+
# the object. For information about downloading objects from Requester
|
505
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
506
|
+
# in the *Amazon S3 User Guide*.
|
507
|
+
#
|
508
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
509
|
+
#
|
510
|
+
# </note>
|
511
|
+
#
|
512
|
+
#
|
513
|
+
#
|
514
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
324
515
|
# @option options [Integer] :part_number
|
325
516
|
# Part number of the object being read. This is a positive integer
|
326
517
|
# between 1 and 10,000. Effectively performs a 'ranged' GET request
|
327
518
|
# for the part specified. Useful for downloading just a part of an
|
328
519
|
# object.
|
520
|
+
# @option options [String] :expected_bucket_owner
|
521
|
+
# The account ID of the expected bucket owner. If the account ID that
|
522
|
+
# you provide does not match the actual owner of the bucket, the request
|
523
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
524
|
+
# @option options [String] :checksum_mode
|
525
|
+
# To retrieve the checksum, this mode must be enabled.
|
526
|
+
#
|
527
|
+
# **General purpose buckets** - In addition, if you enable checksum mode
|
528
|
+
# and the object is uploaded with a [checksum][1] and encrypted with an
|
529
|
+
# Key Management Service (KMS) key, you must have permission to use the
|
530
|
+
# `kms:Decrypt` action to retrieve the checksum.
|
531
|
+
#
|
532
|
+
#
|
533
|
+
#
|
534
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
329
535
|
# @return [Types::GetObjectOutput]
|
330
536
|
def get(options = {}, &block)
|
331
537
|
options = options.merge(
|
@@ -333,7 +539,9 @@ module Aws::S3
|
|
333
539
|
key: @object_key,
|
334
540
|
version_id: @id
|
335
541
|
)
|
336
|
-
resp =
|
542
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
543
|
+
@client.get_object(options, &block)
|
544
|
+
end
|
337
545
|
resp.data
|
338
546
|
end
|
339
547
|
|
@@ -345,53 +553,177 @@ module Aws::S3
|
|
345
553
|
# if_none_match: "IfNoneMatch",
|
346
554
|
# if_unmodified_since: Time.now,
|
347
555
|
# range: "Range",
|
556
|
+
# response_cache_control: "ResponseCacheControl",
|
557
|
+
# response_content_disposition: "ResponseContentDisposition",
|
558
|
+
# response_content_encoding: "ResponseContentEncoding",
|
559
|
+
# response_content_language: "ResponseContentLanguage",
|
560
|
+
# response_content_type: "ResponseContentType",
|
561
|
+
# response_expires: Time.now,
|
348
562
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
349
563
|
# sse_customer_key: "SSECustomerKey",
|
350
564
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
351
565
|
# request_payer: "requester", # accepts requester
|
352
566
|
# part_number: 1,
|
567
|
+
# expected_bucket_owner: "AccountId",
|
568
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
353
569
|
# })
|
354
570
|
# @param [Hash] options ({})
|
355
571
|
# @option options [String] :if_match
|
356
572
|
# Return the object only if its entity tag (ETag) is the same as the one
|
357
|
-
# specified
|
573
|
+
# specified; otherwise, return a 412 (precondition failed) error.
|
574
|
+
#
|
575
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
576
|
+
# present in the request as follows:
|
577
|
+
#
|
578
|
+
# * `If-Match` condition evaluates to `true`, and;
|
579
|
+
#
|
580
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
581
|
+
#
|
582
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
583
|
+
#
|
584
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
585
|
+
#
|
586
|
+
#
|
587
|
+
#
|
588
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
358
589
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
359
590
|
# Return the object only if it has been modified since the specified
|
360
|
-
# time
|
591
|
+
# time; otherwise, return a 304 (not modified) error.
|
592
|
+
#
|
593
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
594
|
+
# present in the request as follows:
|
595
|
+
#
|
596
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
597
|
+
#
|
598
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
599
|
+
#
|
600
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
601
|
+
#
|
602
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
603
|
+
#
|
604
|
+
#
|
605
|
+
#
|
606
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
361
607
|
# @option options [String] :if_none_match
|
362
608
|
# Return the object only if its entity tag (ETag) is different from the
|
363
|
-
# one specified
|
609
|
+
# one specified; otherwise, return a 304 (not modified) error.
|
610
|
+
#
|
611
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
612
|
+
# present in the request as follows:
|
613
|
+
#
|
614
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
615
|
+
#
|
616
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
617
|
+
#
|
618
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
619
|
+
#
|
620
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
621
|
+
#
|
622
|
+
#
|
623
|
+
#
|
624
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
364
625
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
365
626
|
# Return the object only if it has not been modified since the specified
|
366
|
-
# time
|
627
|
+
# time; otherwise, return a 412 (precondition failed) error.
|
628
|
+
#
|
629
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
630
|
+
# present in the request as follows:
|
631
|
+
#
|
632
|
+
# * `If-Match` condition evaluates to `true`, and;
|
633
|
+
#
|
634
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
635
|
+
#
|
636
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
637
|
+
#
|
638
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
639
|
+
#
|
640
|
+
#
|
641
|
+
#
|
642
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
367
643
|
# @option options [String] :range
|
368
|
-
#
|
369
|
-
#
|
370
|
-
#
|
644
|
+
# HeadObject returns only the metadata for an object. If the Range is
|
645
|
+
# satisfiable, only the `ContentLength` is affected in the response. If
|
646
|
+
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
647
|
+
# Satisfiable` error.
|
648
|
+
# @option options [String] :response_cache_control
|
649
|
+
# Sets the `Cache-Control` header of the response.
|
650
|
+
# @option options [String] :response_content_disposition
|
651
|
+
# Sets the `Content-Disposition` header of the response.
|
652
|
+
# @option options [String] :response_content_encoding
|
653
|
+
# Sets the `Content-Encoding` header of the response.
|
654
|
+
# @option options [String] :response_content_language
|
655
|
+
# Sets the `Content-Language` header of the response.
|
656
|
+
# @option options [String] :response_content_type
|
657
|
+
# Sets the `Content-Type` header of the response.
|
658
|
+
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
659
|
+
# Sets the `Expires` header of the response.
|
371
660
|
# @option options [String] :sse_customer_algorithm
|
372
|
-
# Specifies the algorithm to use
|
373
|
-
# AES256).
|
661
|
+
# Specifies the algorithm to use when encrypting the object (for
|
662
|
+
# example, AES256).
|
663
|
+
#
|
664
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
665
|
+
#
|
666
|
+
# </note>
|
374
667
|
# @option options [String] :sse_customer_key
|
375
668
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
376
669
|
# encrypting data. This value is used to store the object and then it is
|
377
|
-
# discarded; Amazon does not store the encryption key. The key must
|
378
|
-
# appropriate for use with the algorithm specified in the
|
379
|
-
# x-amz-server-side
|
670
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
671
|
+
# be appropriate for use with the algorithm specified in the
|
672
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
673
|
+
#
|
674
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
675
|
+
#
|
676
|
+
# </note>
|
380
677
|
# @option options [String] :sse_customer_key_md5
|
381
678
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
382
679
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
383
|
-
# ensure the encryption key was transmitted without error.
|
680
|
+
# ensure that the encryption key was transmitted without error.
|
681
|
+
#
|
682
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
683
|
+
#
|
684
|
+
# </note>
|
384
685
|
# @option options [String] :request_payer
|
385
|
-
# Confirms that the requester knows that
|
386
|
-
#
|
387
|
-
# requests.
|
388
|
-
#
|
389
|
-
#
|
686
|
+
# Confirms that the requester knows that they will be charged for the
|
687
|
+
# request. Bucket owners need not specify this parameter in their
|
688
|
+
# requests. If either the source or destination S3 bucket has Requester
|
689
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
690
|
+
# the object. For information about downloading objects from Requester
|
691
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
692
|
+
# in the *Amazon S3 User Guide*.
|
693
|
+
#
|
694
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
695
|
+
#
|
696
|
+
# </note>
|
697
|
+
#
|
698
|
+
#
|
699
|
+
#
|
700
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
390
701
|
# @option options [Integer] :part_number
|
391
702
|
# Part number of the object being read. This is a positive integer
|
392
703
|
# between 1 and 10,000. Effectively performs a 'ranged' HEAD request
|
393
704
|
# for the part specified. Useful querying about the size of the part and
|
394
705
|
# the number of parts in this object.
|
706
|
+
# @option options [String] :expected_bucket_owner
|
707
|
+
# The account ID of the expected bucket owner. If the account ID that
|
708
|
+
# you provide does not match the actual owner of the bucket, the request
|
709
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
710
|
+
# @option options [String] :checksum_mode
|
711
|
+
# To retrieve the checksum, this parameter must be enabled.
|
712
|
+
#
|
713
|
+
# **General purpose buckets** - If you enable checksum mode and the
|
714
|
+
# object is uploaded with a [checksum][1] and encrypted with an Key
|
715
|
+
# Management Service (KMS) key, you must have permission to use the
|
716
|
+
# `kms:Decrypt` action to retrieve the checksum.
|
717
|
+
#
|
718
|
+
# **Directory buckets** - If you enable `ChecksumMode` and the object is
|
719
|
+
# encrypted with Amazon Web Services Key Management Service (Amazon Web
|
720
|
+
# Services KMS), you must also have the `kms:GenerateDataKey` and
|
721
|
+
# `kms:Decrypt` permissions in IAM identity-based policies and KMS key
|
722
|
+
# policies for the KMS key to retrieve the checksum of the object.
|
723
|
+
#
|
724
|
+
#
|
725
|
+
#
|
726
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
395
727
|
# @return [Types::HeadObjectOutput]
|
396
728
|
def head(options = {})
|
397
729
|
options = options.merge(
|
@@ -399,7 +731,9 @@ module Aws::S3
|
|
399
731
|
key: @object_key,
|
400
732
|
version_id: @id
|
401
733
|
)
|
402
|
-
resp =
|
734
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
735
|
+
@client.head_object(options)
|
736
|
+
end
|
403
737
|
resp.data
|
404
738
|
end
|
405
739
|
|
@@ -470,21 +804,94 @@ module Aws::S3
|
|
470
804
|
# mfa: "MFA",
|
471
805
|
# request_payer: "requester", # accepts requester
|
472
806
|
# bypass_governance_retention: false,
|
807
|
+
# expected_bucket_owner: "AccountId",
|
808
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
473
809
|
# })
|
474
810
|
# @param options ({})
|
475
811
|
# @option options [String] :mfa
|
476
812
|
# The concatenation of the authentication device's serial number, a
|
477
813
|
# space, and the value that is displayed on your authentication device.
|
814
|
+
# Required to permanently delete a versioned object if versioning is
|
815
|
+
# configured with MFA delete enabled.
|
816
|
+
#
|
817
|
+
# When performing the `DeleteObjects` operation on an MFA delete enabled
|
818
|
+
# bucket, which attempts to delete the specified versioned objects, you
|
819
|
+
# must include an MFA token. If you don't provide an MFA token, the
|
820
|
+
# entire request will fail, even if there are non-versioned objects that
|
821
|
+
# you are trying to delete. If you provide an invalid token, whether
|
822
|
+
# there are versioned object keys in the request or not, the entire
|
823
|
+
# Multi-Object Delete request will fail. For information about MFA
|
824
|
+
# Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
|
825
|
+
#
|
826
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
827
|
+
#
|
828
|
+
# </note>
|
829
|
+
#
|
830
|
+
#
|
831
|
+
#
|
832
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
478
833
|
# @option options [String] :request_payer
|
479
|
-
# Confirms that the requester knows that
|
480
|
-
#
|
481
|
-
# requests.
|
482
|
-
#
|
483
|
-
#
|
834
|
+
# Confirms that the requester knows that they will be charged for the
|
835
|
+
# request. Bucket owners need not specify this parameter in their
|
836
|
+
# requests. If either the source or destination S3 bucket has Requester
|
837
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
838
|
+
# the object. For information about downloading objects from Requester
|
839
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
840
|
+
# in the *Amazon S3 User Guide*.
|
841
|
+
#
|
842
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
843
|
+
#
|
844
|
+
# </note>
|
845
|
+
#
|
846
|
+
#
|
847
|
+
#
|
848
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
484
849
|
# @option options [Boolean] :bypass_governance_retention
|
485
850
|
# Specifies whether you want to delete this object even if it has a
|
486
|
-
# Governance-type
|
487
|
-
#
|
851
|
+
# Governance-type Object Lock in place. To use this header, you must
|
852
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
853
|
+
#
|
854
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
855
|
+
#
|
856
|
+
# </note>
|
857
|
+
# @option options [String] :expected_bucket_owner
|
858
|
+
# The account ID of the expected bucket owner. If the account ID that
|
859
|
+
# you provide does not match the actual owner of the bucket, the request
|
860
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
861
|
+
# @option options [String] :checksum_algorithm
|
862
|
+
# Indicates the algorithm used to create the checksum for the object
|
863
|
+
# when you use the SDK. This header will not provide any additional
|
864
|
+
# functionality if you don't use the SDK. When you send this header,
|
865
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
866
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
867
|
+
# with the HTTP status code `400 Bad Request`.
|
868
|
+
#
|
869
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
870
|
+
# the supported algorithm from the following list:
|
871
|
+
#
|
872
|
+
# * `CRC32`
|
873
|
+
#
|
874
|
+
# * `CRC32C`
|
875
|
+
#
|
876
|
+
# * `SHA1`
|
877
|
+
#
|
878
|
+
# * `SHA256`
|
879
|
+
#
|
880
|
+
# For more information, see [Checking object integrity][1] in the
|
881
|
+
# *Amazon S3 User Guide*.
|
882
|
+
#
|
883
|
+
# If the individual checksum value you provide through
|
884
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
885
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
|
886
|
+
# provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
|
887
|
+
# that matches the provided value in `x-amz-checksum-algorithm `.
|
888
|
+
#
|
889
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
890
|
+
# `ChecksumAlgorithm` parameter.
|
891
|
+
#
|
892
|
+
#
|
893
|
+
#
|
894
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
488
895
|
# @return [void]
|
489
896
|
def batch_delete!(options = {})
|
490
897
|
batch_enum.each do |batch|
|
@@ -498,7 +905,9 @@ module Aws::S3
|
|
498
905
|
version_id: item.id
|
499
906
|
}
|
500
907
|
end
|
501
|
-
|
908
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
909
|
+
batch[0].client.delete_objects(params)
|
910
|
+
end
|
502
911
|
end
|
503
912
|
nil
|
504
913
|
end
|
@@ -508,3 +917,6 @@ module Aws::S3
|
|
508
917
|
end
|
509
918
|
end
|
510
919
|
end
|
920
|
+
|
921
|
+
# Load customizations if they exist
|
922
|
+
require 'aws-sdk-s3/customizations/object_version'
|