aws-sdk-s3 1.103.0 → 1.143.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +288 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +590 -100
- data/lib/aws-sdk-s3/bucket_acl.rb +28 -6
- data/lib/aws-sdk-s3/bucket_cors.rb +34 -10
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +38 -12
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +42 -12
- data/lib/aws-sdk-s3/bucket_logging.rb +35 -6
- data/lib/aws-sdk-s3/bucket_notification.rb +27 -9
- data/lib/aws-sdk-s3/bucket_policy.rb +78 -10
- data/lib/aws-sdk-s3/bucket_request_payment.rb +28 -6
- data/lib/aws-sdk-s3/bucket_tagging.rb +34 -10
- data/lib/aws-sdk-s3/bucket_versioning.rb +72 -14
- data/lib/aws-sdk-s3/bucket_website.rb +34 -10
- data/lib/aws-sdk-s3/client.rb +7917 -3171
- data/lib/aws-sdk-s3/client_api.rb +709 -224
- data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
- data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
- data/lib/aws-sdk-s3/customizations/object.rb +171 -22
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +7 -0
- data/lib/aws-sdk-s3/encryption/client.rb +6 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
- data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
- data/lib/aws-sdk-s3/endpoint_parameters.rb +178 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +591 -0
- data/lib/aws-sdk-s3/endpoints.rb +2590 -0
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_cache.rb +30 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +36 -0
- data/lib/aws-sdk-s3/file_downloader.rb +170 -45
- data/lib/aws-sdk-s3/file_uploader.rb +11 -4
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -8
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +41 -14
- data/lib/aws-sdk-s3/multipart_upload.rb +194 -19
- data/lib/aws-sdk-s3/multipart_upload_part.rb +280 -30
- data/lib/aws-sdk-s3/object.rb +1735 -266
- data/lib/aws-sdk-s3/object_acl.rb +49 -13
- data/lib/aws-sdk-s3/object_copier.rb +7 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +41 -19
- data/lib/aws-sdk-s3/object_summary.rb +1497 -221
- data/lib/aws-sdk-s3/object_version.rb +365 -58
- data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -44
- data/lib/aws-sdk-s3/plugins/arn.rb +0 -197
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
- data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -55
- data/lib/aws-sdk-s3/plugins/endpoints.rb +274 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +91 -0
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +6 -3
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +35 -109
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
- data/lib/aws-sdk-s3/presigned_post.rb +99 -78
- data/lib/aws-sdk-s3/presigner.rb +26 -37
- data/lib/aws-sdk-s3/resource.rb +97 -3
- data/lib/aws-sdk-s3/types.rb +6618 -4880
- data/lib/aws-sdk-s3.rb +5 -1
- data/sig/bucket.rbs +212 -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 +111 -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 +2360 -0
- data/sig/errors.rbs +34 -0
- data/sig/multipart_upload.rbs +110 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +436 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +334 -0
- data/sig/object_version.rbs +131 -0
- data/sig/resource.rbs +124 -0
- data/sig/types.rbs +2562 -0
- data/sig/waiters.rbs +83 -0
- metadata +45 -16
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -73
- data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -56,6 +56,12 @@ module Aws::S3
|
|
56
56
|
data[:etag]
|
57
57
|
end
|
58
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
|
+
|
59
65
|
# Size in bytes of the object.
|
60
66
|
# @return [Integer]
|
61
67
|
def size
|
@@ -87,7 +93,7 @@ module Aws::S3
|
|
87
93
|
data[:is_latest]
|
88
94
|
end
|
89
95
|
|
90
|
-
# Date and time the object was last modified.
|
96
|
+
# Date and time when the object was last modified.
|
91
97
|
# @return [Time]
|
92
98
|
def last_modified
|
93
99
|
data[:last_modified]
|
@@ -99,6 +105,20 @@ module Aws::S3
|
|
99
105
|
data[:owner]
|
100
106
|
end
|
101
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
|
+
|
102
122
|
# @!endgroup
|
103
123
|
|
104
124
|
# @return [Client]
|
@@ -223,7 +243,9 @@ module Aws::S3
|
|
223
243
|
:retry
|
224
244
|
end
|
225
245
|
end
|
226
|
-
Aws::
|
246
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
247
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
248
|
+
end
|
227
249
|
end
|
228
250
|
|
229
251
|
# @!group Actions
|
@@ -242,24 +264,38 @@ module Aws::S3
|
|
242
264
|
# space, and the value that is displayed on your authentication device.
|
243
265
|
# Required to permanently delete a versioned object if versioning is
|
244
266
|
# configured with MFA delete enabled.
|
267
|
+
#
|
268
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
269
|
+
#
|
270
|
+
# </note>
|
245
271
|
# @option options [String] :request_payer
|
246
272
|
# Confirms that the requester knows that they will be charged for the
|
247
273
|
# request. Bucket owners need not specify this parameter in their
|
248
|
-
# requests.
|
249
|
-
#
|
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]
|
250
278
|
# in the *Amazon S3 User Guide*.
|
251
279
|
#
|
280
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
281
|
+
#
|
282
|
+
# </note>
|
283
|
+
#
|
252
284
|
#
|
253
285
|
#
|
254
286
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
255
287
|
# @option options [Boolean] :bypass_governance_retention
|
256
288
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
257
289
|
# restrictions to process this operation. To use this header, you must
|
258
|
-
# have the `s3:
|
290
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
291
|
+
#
|
292
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
293
|
+
#
|
294
|
+
# </note>
|
259
295
|
# @option options [String] :expected_bucket_owner
|
260
|
-
# The account ID of the expected bucket owner. If the
|
261
|
-
#
|
262
|
-
#
|
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).
|
263
299
|
# @return [Types::DeleteObjectOutput]
|
264
300
|
def delete(options = {})
|
265
301
|
options = options.merge(
|
@@ -267,7 +303,9 @@ module Aws::S3
|
|
267
303
|
key: @object_key,
|
268
304
|
version_id: @id
|
269
305
|
)
|
270
|
-
resp =
|
306
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
307
|
+
@client.delete_object(options)
|
308
|
+
end
|
271
309
|
resp.data
|
272
310
|
end
|
273
311
|
|
@@ -291,24 +329,71 @@ module Aws::S3
|
|
291
329
|
# request_payer: "requester", # accepts requester
|
292
330
|
# part_number: 1,
|
293
331
|
# expected_bucket_owner: "AccountId",
|
332
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
294
333
|
# })
|
295
334
|
# @param [Hash] options ({})
|
296
335
|
# @option options [String] :if_match
|
297
336
|
# Return the object only if its entity tag (ETag) is the same as the one
|
298
|
-
# 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
|
299
350
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
300
351
|
# Return the object only if it has been modified since the specified
|
301
|
-
# 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
|
302
364
|
# @option options [String] :if_none_match
|
303
365
|
# Return the object only if its entity tag (ETag) is different from the
|
304
|
-
# 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
|
305
379
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
306
380
|
# Return the object only if it has not been modified since the specified
|
307
|
-
# 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
|
308
393
|
# @option options [String] :range
|
309
|
-
# Downloads the specified range
|
394
|
+
# Downloads the specified byte range of an object. For more information
|
310
395
|
# about the HTTP Range header, see
|
311
|
-
# [https://www.
|
396
|
+
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
312
397
|
#
|
313
398
|
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
314
399
|
# `GET` request.
|
@@ -317,11 +402,11 @@ module Aws::S3
|
|
317
402
|
#
|
318
403
|
#
|
319
404
|
#
|
320
|
-
# [1]: https://www.
|
405
|
+
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-range
|
321
406
|
# @option options [String] :response_cache_control
|
322
407
|
# Sets the `Cache-Control` header of the response.
|
323
408
|
# @option options [String] :response_content_disposition
|
324
|
-
# Sets the `Content-Disposition` header of the response
|
409
|
+
# Sets the `Content-Disposition` header of the response.
|
325
410
|
# @option options [String] :response_content_encoding
|
326
411
|
# Sets the `Content-Encoding` header of the response.
|
327
412
|
# @option options [String] :response_content_language
|
@@ -331,25 +416,99 @@ module Aws::S3
|
|
331
416
|
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
332
417
|
# Sets the `Expires` header of the response.
|
333
418
|
# @option options [String] :sse_customer_algorithm
|
334
|
-
# Specifies the algorithm to use
|
335
|
-
# example, 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
|
336
443
|
# @option options [String] :sse_customer_key
|
337
|
-
# Specifies the customer-provided encryption key
|
338
|
-
#
|
339
|
-
#
|
340
|
-
#
|
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
|
341
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
|
342
472
|
# @option options [String] :sse_customer_key_md5
|
343
|
-
# Specifies the 128-bit MD5 digest of the encryption
|
344
|
-
# RFC 1321. Amazon S3 uses this header for a message
|
345
|
-
# ensure that 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
|
346
499
|
# @option options [String] :request_payer
|
347
500
|
# Confirms that the requester knows that they will be charged for the
|
348
501
|
# request. Bucket owners need not specify this parameter in their
|
349
|
-
# requests.
|
350
|
-
#
|
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]
|
351
506
|
# in the *Amazon S3 User Guide*.
|
352
507
|
#
|
508
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
509
|
+
#
|
510
|
+
# </note>
|
511
|
+
#
|
353
512
|
#
|
354
513
|
#
|
355
514
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -359,9 +518,11 @@ module Aws::S3
|
|
359
518
|
# for the part specified. Useful for downloading just a part of an
|
360
519
|
# object.
|
361
520
|
# @option options [String] :expected_bucket_owner
|
362
|
-
# The account ID of the expected bucket owner. If the
|
363
|
-
#
|
364
|
-
#
|
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.
|
365
526
|
# @return [Types::GetObjectOutput]
|
366
527
|
def get(options = {}, &block)
|
367
528
|
options = options.merge(
|
@@ -369,7 +530,9 @@ module Aws::S3
|
|
369
530
|
key: @object_key,
|
370
531
|
version_id: @id
|
371
532
|
)
|
372
|
-
resp =
|
533
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
534
|
+
@client.get_object(options, &block)
|
535
|
+
end
|
373
536
|
resp.data
|
374
537
|
end
|
375
538
|
|
@@ -387,53 +550,124 @@ module Aws::S3
|
|
387
550
|
# request_payer: "requester", # accepts requester
|
388
551
|
# part_number: 1,
|
389
552
|
# expected_bucket_owner: "AccountId",
|
553
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
390
554
|
# })
|
391
555
|
# @param [Hash] options ({})
|
392
556
|
# @option options [String] :if_match
|
393
557
|
# Return the object only if its entity tag (ETag) is the same as the one
|
394
|
-
# specified
|
558
|
+
# specified; otherwise, return a 412 (precondition failed) error.
|
559
|
+
#
|
560
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
561
|
+
# present in the request as follows:
|
562
|
+
#
|
563
|
+
# * `If-Match` condition evaluates to `true`, and;
|
564
|
+
#
|
565
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
566
|
+
#
|
567
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
568
|
+
#
|
569
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
570
|
+
#
|
571
|
+
#
|
572
|
+
#
|
573
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
395
574
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
396
575
|
# Return the object only if it has been modified since the specified
|
397
|
-
# time
|
576
|
+
# time; otherwise, return a 304 (not modified) error.
|
577
|
+
#
|
578
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
579
|
+
# present in the request as follows:
|
580
|
+
#
|
581
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
582
|
+
#
|
583
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
584
|
+
#
|
585
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
586
|
+
#
|
587
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
588
|
+
#
|
589
|
+
#
|
590
|
+
#
|
591
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
398
592
|
# @option options [String] :if_none_match
|
399
593
|
# Return the object only if its entity tag (ETag) is different from the
|
400
|
-
# one specified
|
594
|
+
# one specified; otherwise, return a 304 (not modified) error.
|
595
|
+
#
|
596
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
597
|
+
# present in the request as follows:
|
598
|
+
#
|
599
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
600
|
+
#
|
601
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
602
|
+
#
|
603
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
604
|
+
#
|
605
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
606
|
+
#
|
607
|
+
#
|
608
|
+
#
|
609
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
401
610
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
402
611
|
# Return the object only if it has not been modified since the specified
|
403
|
-
# time
|
404
|
-
# @option options [String] :range
|
405
|
-
# Downloads the specified range bytes of an object. For more information
|
406
|
-
# about the HTTP Range header, see
|
407
|
-
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
|
612
|
+
# time; otherwise, return a 412 (precondition failed) error.
|
408
613
|
#
|
409
|
-
#
|
410
|
-
#
|
614
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
615
|
+
# present in the request as follows:
|
411
616
|
#
|
412
|
-
#
|
617
|
+
# * `If-Match` condition evaluates to `true`, and;
|
618
|
+
#
|
619
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
620
|
+
#
|
621
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
622
|
+
#
|
623
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
413
624
|
#
|
414
625
|
#
|
415
626
|
#
|
416
|
-
# [1]:
|
627
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
628
|
+
# @option options [String] :range
|
629
|
+
# HeadObject returns only the metadata for an object. If the Range is
|
630
|
+
# satisfiable, only the `ContentLength` is affected in the response. If
|
631
|
+
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
632
|
+
# Satisfiable` error.
|
417
633
|
# @option options [String] :sse_customer_algorithm
|
418
|
-
# Specifies the algorithm to use
|
634
|
+
# Specifies the algorithm to use when encrypting the object (for
|
419
635
|
# example, AES256).
|
636
|
+
#
|
637
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
638
|
+
#
|
639
|
+
# </note>
|
420
640
|
# @option options [String] :sse_customer_key
|
421
641
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
422
642
|
# encrypting data. This value is used to store the object and then it is
|
423
643
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
424
644
|
# be appropriate for use with the algorithm specified in the
|
425
645
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
646
|
+
#
|
647
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
648
|
+
#
|
649
|
+
# </note>
|
426
650
|
# @option options [String] :sse_customer_key_md5
|
427
651
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
428
652
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
429
653
|
# ensure that the encryption key was transmitted without error.
|
654
|
+
#
|
655
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
656
|
+
#
|
657
|
+
# </note>
|
430
658
|
# @option options [String] :request_payer
|
431
659
|
# Confirms that the requester knows that they will be charged for the
|
432
660
|
# request. Bucket owners need not specify this parameter in their
|
433
|
-
# requests.
|
434
|
-
#
|
661
|
+
# requests. If either the source or destination S3 bucket has Requester
|
662
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
663
|
+
# the object. For information about downloading objects from Requester
|
664
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
435
665
|
# in the *Amazon S3 User Guide*.
|
436
666
|
#
|
667
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
668
|
+
#
|
669
|
+
# </note>
|
670
|
+
#
|
437
671
|
#
|
438
672
|
#
|
439
673
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -443,9 +677,16 @@ module Aws::S3
|
|
443
677
|
# for the part specified. Useful querying about the size of the part and
|
444
678
|
# the number of parts in this object.
|
445
679
|
# @option options [String] :expected_bucket_owner
|
446
|
-
# The account ID of the expected bucket owner. If the
|
447
|
-
#
|
448
|
-
#
|
680
|
+
# The account ID of the expected bucket owner. If the account ID that
|
681
|
+
# you provide does not match the actual owner of the bucket, the request
|
682
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
683
|
+
# @option options [String] :checksum_mode
|
684
|
+
# To retrieve the checksum, this parameter must be enabled.
|
685
|
+
#
|
686
|
+
# In addition, if you enable `ChecksumMode` and the object is encrypted
|
687
|
+
# with Amazon Web Services Key Management Service (Amazon Web Services
|
688
|
+
# KMS), you must have permission to use the `kms:Decrypt` action for the
|
689
|
+
# request to succeed.
|
449
690
|
# @return [Types::HeadObjectOutput]
|
450
691
|
def head(options = {})
|
451
692
|
options = options.merge(
|
@@ -453,7 +694,9 @@ module Aws::S3
|
|
453
694
|
key: @object_key,
|
454
695
|
version_id: @id
|
455
696
|
)
|
456
|
-
resp =
|
697
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
698
|
+
@client.head_object(options)
|
699
|
+
end
|
457
700
|
resp.data
|
458
701
|
end
|
459
702
|
|
@@ -525,6 +768,7 @@ module Aws::S3
|
|
525
768
|
# request_payer: "requester", # accepts requester
|
526
769
|
# bypass_governance_retention: false,
|
527
770
|
# expected_bucket_owner: "AccountId",
|
771
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
528
772
|
# })
|
529
773
|
# @param options ({})
|
530
774
|
# @option options [String] :mfa
|
@@ -532,24 +776,85 @@ module Aws::S3
|
|
532
776
|
# space, and the value that is displayed on your authentication device.
|
533
777
|
# Required to permanently delete a versioned object if versioning is
|
534
778
|
# configured with MFA delete enabled.
|
779
|
+
#
|
780
|
+
# When performing the `DeleteObjects` operation on an MFA delete enabled
|
781
|
+
# bucket, which attempts to delete the specified versioned objects, you
|
782
|
+
# must include an MFA token. If you don't provide an MFA token, the
|
783
|
+
# entire request will fail, even if there are non-versioned objects that
|
784
|
+
# you are trying to delete. If you provide an invalid token, whether
|
785
|
+
# there are versioned object keys in the request or not, the entire
|
786
|
+
# Multi-Object Delete request will fail. For information about MFA
|
787
|
+
# Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
|
788
|
+
#
|
789
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
790
|
+
#
|
791
|
+
# </note>
|
792
|
+
#
|
793
|
+
#
|
794
|
+
#
|
795
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
535
796
|
# @option options [String] :request_payer
|
536
797
|
# Confirms that the requester knows that they will be charged for the
|
537
798
|
# request. Bucket owners need not specify this parameter in their
|
538
|
-
# requests.
|
539
|
-
#
|
799
|
+
# requests. If either the source or destination S3 bucket has Requester
|
800
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
801
|
+
# the object. For information about downloading objects from Requester
|
802
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
540
803
|
# in the *Amazon S3 User Guide*.
|
541
804
|
#
|
805
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
806
|
+
#
|
807
|
+
# </note>
|
808
|
+
#
|
542
809
|
#
|
543
810
|
#
|
544
811
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
545
812
|
# @option options [Boolean] :bypass_governance_retention
|
546
813
|
# Specifies whether you want to delete this object even if it has a
|
547
814
|
# Governance-type Object Lock in place. To use this header, you must
|
548
|
-
# have the `s3:
|
815
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
816
|
+
#
|
817
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
818
|
+
#
|
819
|
+
# </note>
|
549
820
|
# @option options [String] :expected_bucket_owner
|
550
|
-
# The account ID of the expected bucket owner. If the
|
551
|
-
#
|
552
|
-
#
|
821
|
+
# The account ID of the expected bucket owner. If the account ID that
|
822
|
+
# you provide does not match the actual owner of the bucket, the request
|
823
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
824
|
+
# @option options [String] :checksum_algorithm
|
825
|
+
# Indicates the algorithm used to create the checksum for the object
|
826
|
+
# when you use the SDK. This header will not provide any additional
|
827
|
+
# functionality if you don't use the SDK. When you send this header,
|
828
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
829
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
830
|
+
# with the HTTP status code `400 Bad Request`.
|
831
|
+
#
|
832
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
833
|
+
# the supported algorithm from the following list:
|
834
|
+
#
|
835
|
+
# * CRC32
|
836
|
+
#
|
837
|
+
# * CRC32C
|
838
|
+
#
|
839
|
+
# * SHA1
|
840
|
+
#
|
841
|
+
# * SHA256
|
842
|
+
#
|
843
|
+
# For more information, see [Checking object integrity][1] in the
|
844
|
+
# *Amazon S3 User Guide*.
|
845
|
+
#
|
846
|
+
# If the individual checksum value you provide through
|
847
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
848
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
|
849
|
+
# provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
|
850
|
+
# that matches the provided value in `x-amz-checksum-algorithm `.
|
851
|
+
#
|
852
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
853
|
+
# `ChecksumAlgorithm` parameter.
|
854
|
+
#
|
855
|
+
#
|
856
|
+
#
|
857
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
553
858
|
# @return [void]
|
554
859
|
def batch_delete!(options = {})
|
555
860
|
batch_enum.each do |batch|
|
@@ -563,7 +868,9 @@ module Aws::S3
|
|
563
868
|
version_id: item.id
|
564
869
|
}
|
565
870
|
end
|
566
|
-
|
871
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
872
|
+
batch[0].client.delete_objects(params)
|
873
|
+
end
|
567
874
|
end
|
568
875
|
nil
|
569
876
|
end
|