aws-sdk-s3 1.122.0 → 1.157.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +238 -0
- data/VERSION +1 -1
- 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 +507 -114
- data/lib/aws-sdk-s3/bucket_acl.rb +18 -12
- data/lib/aws-sdk-s3/bucket_cors.rb +24 -16
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +24 -16
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +24 -16
- data/lib/aws-sdk-s3/bucket_logging.rb +25 -12
- data/lib/aws-sdk-s3/bucket_notification.rb +12 -6
- data/lib/aws-sdk-s3/bucket_policy.rb +70 -18
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +18 -12
- data/lib/aws-sdk-s3/bucket_tagging.rb +24 -16
- data/lib/aws-sdk-s3/bucket_versioning.rb +42 -32
- data/lib/aws-sdk-s3/bucket_website.rb +24 -16
- data/lib/aws-sdk-s3/client.rb +6048 -2781
- data/lib/aws-sdk-s3/client_api.rb +148 -20
- data/lib/aws-sdk-s3/customizations/bucket.rb +3 -1
- data/lib/aws-sdk-s3/customizations/errors.rb +16 -3
- data/lib/aws-sdk-s3/customizations/object.rb +91 -18
- data/lib/aws-sdk-s3/customizations.rb +8 -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 +44 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +111 -252
- data/lib/aws-sdk-s3/endpoints.rb +540 -0
- 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 +169 -44
- data/lib/aws-sdk-s3/file_uploader.rb +8 -6
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +4 -4
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +10 -7
- data/lib/aws-sdk-s3/multipart_upload.rb +81 -20
- data/lib/aws-sdk-s3/multipart_upload_part.rb +169 -38
- data/lib/aws-sdk-s3/object.rb +1571 -261
- data/lib/aws-sdk-s3/object_acl.rb +38 -18
- data/lib/aws-sdk-s3/object_copier.rb +7 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +42 -24
- data/lib/aws-sdk-s3/object_summary.rb +1422 -276
- data/lib/aws-sdk-s3/object_version.rb +344 -47
- data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
- data/lib/aws-sdk-s3/plugins/endpoints.rb +14 -2
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +2 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/presigned_post.rb +52 -43
- data/lib/aws-sdk-s3/presigner.rb +8 -4
- data/lib/aws-sdk-s3/resource.rb +89 -13
- data/lib/aws-sdk-s3/types.rb +4879 -1513
- data/lib/aws-sdk-s3.rb +1 -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 +2381 -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 +110 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +442 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +334 -0
- data/sig/object_version.rbs +137 -0
- data/sig/resource.rbs +127 -0
- data/sig/types.rbs +2568 -0
- data/sig/waiters.rbs +95 -0
- metadata +43 -11
@@ -93,7 +93,7 @@ module Aws::S3
|
|
93
93
|
data[:is_latest]
|
94
94
|
end
|
95
95
|
|
96
|
-
# Date and time the object was last modified.
|
96
|
+
# Date and time when the object was last modified.
|
97
97
|
# @return [Time]
|
98
98
|
def last_modified
|
99
99
|
data[:last_modified]
|
@@ -105,6 +105,20 @@ module Aws::S3
|
|
105
105
|
data[:owner]
|
106
106
|
end
|
107
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
|
+
|
108
122
|
# @!endgroup
|
109
123
|
|
110
124
|
# @return [Client]
|
@@ -229,7 +243,9 @@ module Aws::S3
|
|
229
243
|
:retry
|
230
244
|
end
|
231
245
|
end
|
232
|
-
Aws::
|
246
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
247
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
248
|
+
end
|
233
249
|
end
|
234
250
|
|
235
251
|
# @!group Actions
|
@@ -248,13 +264,23 @@ module Aws::S3
|
|
248
264
|
# space, and the value that is displayed on your authentication device.
|
249
265
|
# Required to permanently delete a versioned object if versioning is
|
250
266
|
# configured with MFA delete enabled.
|
267
|
+
#
|
268
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
269
|
+
#
|
270
|
+
# </note>
|
251
271
|
# @option options [String] :request_payer
|
252
272
|
# Confirms that the requester knows that they will be charged for the
|
253
273
|
# request. Bucket owners need not specify this parameter in their
|
254
|
-
# requests.
|
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
|
255
277
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
256
278
|
# in the *Amazon S3 User Guide*.
|
257
279
|
#
|
280
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
281
|
+
#
|
282
|
+
# </note>
|
283
|
+
#
|
258
284
|
#
|
259
285
|
#
|
260
286
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -262,10 +288,14 @@ module Aws::S3
|
|
262
288
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
263
289
|
# restrictions to process this operation. To use this header, you must
|
264
290
|
# have the `s3:BypassGovernanceRetention` permission.
|
291
|
+
#
|
292
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
293
|
+
#
|
294
|
+
# </note>
|
265
295
|
# @option options [String] :expected_bucket_owner
|
266
|
-
# The account ID of the expected bucket owner. If the
|
267
|
-
#
|
268
|
-
# Forbidden` (access denied).
|
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).
|
269
299
|
# @return [Types::DeleteObjectOutput]
|
270
300
|
def delete(options = {})
|
271
301
|
options = options.merge(
|
@@ -273,7 +303,9 @@ module Aws::S3
|
|
273
303
|
key: @object_key,
|
274
304
|
version_id: @id
|
275
305
|
)
|
276
|
-
resp =
|
306
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
307
|
+
@client.delete_object(options)
|
308
|
+
end
|
277
309
|
resp.data
|
278
310
|
end
|
279
311
|
|
@@ -302,18 +334,64 @@ module Aws::S3
|
|
302
334
|
# @param [Hash] options ({})
|
303
335
|
# @option options [String] :if_match
|
304
336
|
# Return the object only if its entity tag (ETag) is the same as the one
|
305
|
-
# specified; otherwise, return a 412
|
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
|
306
350
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
307
351
|
# Return the object only if it has been modified since the specified
|
308
|
-
# time; otherwise, return a 304
|
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
|
309
364
|
# @option options [String] :if_none_match
|
310
365
|
# Return the object only if its entity tag (ETag) is different from the
|
311
|
-
# one specified; otherwise, return a 304
|
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
|
312
379
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
313
380
|
# Return the object only if it has not been modified since the specified
|
314
|
-
# time; otherwise, return a 412
|
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
|
315
393
|
# @option options [String] :range
|
316
|
-
# Downloads the specified range
|
394
|
+
# Downloads the specified byte range of an object. For more information
|
317
395
|
# about the HTTP Range header, see
|
318
396
|
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
319
397
|
#
|
@@ -328,7 +406,7 @@ module Aws::S3
|
|
328
406
|
# @option options [String] :response_cache_control
|
329
407
|
# Sets the `Cache-Control` header of the response.
|
330
408
|
# @option options [String] :response_content_disposition
|
331
|
-
# Sets the `Content-Disposition` header of the response
|
409
|
+
# Sets the `Content-Disposition` header of the response.
|
332
410
|
# @option options [String] :response_content_encoding
|
333
411
|
# Sets the `Content-Encoding` header of the response.
|
334
412
|
# @option options [String] :response_content_language
|
@@ -338,25 +416,99 @@ module Aws::S3
|
|
338
416
|
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
339
417
|
# Sets the `Expires` header of the response.
|
340
418
|
# @option options [String] :sse_customer_algorithm
|
341
|
-
# Specifies the algorithm to use
|
342
|
-
# 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
|
343
443
|
# @option options [String] :sse_customer_key
|
344
|
-
# Specifies the customer-provided encryption key
|
345
|
-
#
|
346
|
-
#
|
347
|
-
#
|
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
|
348
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
|
349
472
|
# @option options [String] :sse_customer_key_md5
|
350
|
-
# Specifies the 128-bit MD5 digest of the encryption
|
351
|
-
# RFC 1321. Amazon S3 uses this header for a message
|
352
|
-
# 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
|
353
499
|
# @option options [String] :request_payer
|
354
500
|
# Confirms that the requester knows that they will be charged for the
|
355
501
|
# request. Bucket owners need not specify this parameter in their
|
356
|
-
# requests.
|
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
|
357
505
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
358
506
|
# in the *Amazon S3 User Guide*.
|
359
507
|
#
|
508
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
509
|
+
#
|
510
|
+
# </note>
|
511
|
+
#
|
360
512
|
#
|
361
513
|
#
|
362
514
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -366,9 +518,9 @@ module Aws::S3
|
|
366
518
|
# for the part specified. Useful for downloading just a part of an
|
367
519
|
# object.
|
368
520
|
# @option options [String] :expected_bucket_owner
|
369
|
-
# The account ID of the expected bucket owner. If the
|
370
|
-
#
|
371
|
-
# Forbidden` (access denied).
|
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).
|
372
524
|
# @option options [String] :checksum_mode
|
373
525
|
# To retrieve the checksum, this mode must be enabled.
|
374
526
|
# @return [Types::GetObjectOutput]
|
@@ -378,7 +530,9 @@ module Aws::S3
|
|
378
530
|
key: @object_key,
|
379
531
|
version_id: @id
|
380
532
|
)
|
381
|
-
resp =
|
533
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
534
|
+
@client.get_object(options, &block)
|
535
|
+
end
|
382
536
|
resp.data
|
383
537
|
end
|
384
538
|
|
@@ -390,6 +544,12 @@ module Aws::S3
|
|
390
544
|
# if_none_match: "IfNoneMatch",
|
391
545
|
# if_unmodified_since: Time.now,
|
392
546
|
# range: "Range",
|
547
|
+
# response_cache_control: "ResponseCacheControl",
|
548
|
+
# response_content_disposition: "ResponseContentDisposition",
|
549
|
+
# response_content_encoding: "ResponseContentEncoding",
|
550
|
+
# response_content_language: "ResponseContentLanguage",
|
551
|
+
# response_content_type: "ResponseContentType",
|
552
|
+
# response_expires: Time.now,
|
393
553
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
394
554
|
# sse_customer_key: "SSECustomerKey",
|
395
555
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
@@ -402,40 +562,130 @@ module Aws::S3
|
|
402
562
|
# @option options [String] :if_match
|
403
563
|
# Return the object only if its entity tag (ETag) is the same as the one
|
404
564
|
# specified; otherwise, return a 412 (precondition failed) error.
|
565
|
+
#
|
566
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
567
|
+
# present in the request as follows:
|
568
|
+
#
|
569
|
+
# * `If-Match` condition evaluates to `true`, and;
|
570
|
+
#
|
571
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
572
|
+
#
|
573
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
574
|
+
#
|
575
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
576
|
+
#
|
577
|
+
#
|
578
|
+
#
|
579
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
405
580
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
406
581
|
# Return the object only if it has been modified since the specified
|
407
582
|
# time; otherwise, return a 304 (not modified) error.
|
583
|
+
#
|
584
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
585
|
+
# present in the request as follows:
|
586
|
+
#
|
587
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
588
|
+
#
|
589
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
590
|
+
#
|
591
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
592
|
+
#
|
593
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
594
|
+
#
|
595
|
+
#
|
596
|
+
#
|
597
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
408
598
|
# @option options [String] :if_none_match
|
409
599
|
# Return the object only if its entity tag (ETag) is different from the
|
410
600
|
# one specified; otherwise, return a 304 (not modified) error.
|
601
|
+
#
|
602
|
+
# If both of the `If-None-Match` and `If-Modified-Since` headers are
|
603
|
+
# present in the request as follows:
|
604
|
+
#
|
605
|
+
# * `If-None-Match` condition evaluates to `false`, and;
|
606
|
+
#
|
607
|
+
# * `If-Modified-Since` condition evaluates to `true`;
|
608
|
+
#
|
609
|
+
# Then Amazon S3 returns the `304 Not Modified` response code.
|
610
|
+
#
|
611
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
612
|
+
#
|
613
|
+
#
|
614
|
+
#
|
615
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
411
616
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
412
617
|
# Return the object only if it has not been modified since the specified
|
413
618
|
# time; otherwise, return a 412 (precondition failed) error.
|
619
|
+
#
|
620
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
621
|
+
# present in the request as follows:
|
622
|
+
#
|
623
|
+
# * `If-Match` condition evaluates to `true`, and;
|
624
|
+
#
|
625
|
+
# * `If-Unmodified-Since` condition evaluates to `false`;
|
626
|
+
#
|
627
|
+
# Then Amazon S3 returns `200 OK` and the data requested.
|
628
|
+
#
|
629
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
630
|
+
#
|
631
|
+
#
|
632
|
+
#
|
633
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
414
634
|
# @option options [String] :range
|
415
635
|
# HeadObject returns only the metadata for an object. If the Range is
|
416
636
|
# satisfiable, only the `ContentLength` is affected in the response. If
|
417
637
|
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
418
638
|
# Satisfiable` error.
|
639
|
+
# @option options [String] :response_cache_control
|
640
|
+
# Sets the `Cache-Control` header of the response.
|
641
|
+
# @option options [String] :response_content_disposition
|
642
|
+
# Sets the `Content-Disposition` header of the response.
|
643
|
+
# @option options [String] :response_content_encoding
|
644
|
+
# Sets the `Content-Encoding` header of the response.
|
645
|
+
# @option options [String] :response_content_language
|
646
|
+
# Sets the `Content-Language` header of the response.
|
647
|
+
# @option options [String] :response_content_type
|
648
|
+
# Sets the `Content-Type` header of the response.
|
649
|
+
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
650
|
+
# Sets the `Expires` header of the response.
|
419
651
|
# @option options [String] :sse_customer_algorithm
|
420
|
-
# Specifies the algorithm to use
|
652
|
+
# Specifies the algorithm to use when encrypting the object (for
|
421
653
|
# example, AES256).
|
654
|
+
#
|
655
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
656
|
+
#
|
657
|
+
# </note>
|
422
658
|
# @option options [String] :sse_customer_key
|
423
659
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
424
660
|
# encrypting data. This value is used to store the object and then it is
|
425
661
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
426
662
|
# be appropriate for use with the algorithm specified in the
|
427
663
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
664
|
+
#
|
665
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
666
|
+
#
|
667
|
+
# </note>
|
428
668
|
# @option options [String] :sse_customer_key_md5
|
429
669
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
430
670
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
431
671
|
# ensure that the encryption key was transmitted without error.
|
672
|
+
#
|
673
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
674
|
+
#
|
675
|
+
# </note>
|
432
676
|
# @option options [String] :request_payer
|
433
677
|
# Confirms that the requester knows that they will be charged for the
|
434
678
|
# request. Bucket owners need not specify this parameter in their
|
435
|
-
# requests.
|
679
|
+
# requests. If either the source or destination S3 bucket has Requester
|
680
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
681
|
+
# the object. For information about downloading objects from Requester
|
436
682
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
437
683
|
# in the *Amazon S3 User Guide*.
|
438
684
|
#
|
685
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
686
|
+
#
|
687
|
+
# </note>
|
688
|
+
#
|
439
689
|
#
|
440
690
|
#
|
441
691
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -445,9 +695,9 @@ module Aws::S3
|
|
445
695
|
# for the part specified. Useful querying about the size of the part and
|
446
696
|
# the number of parts in this object.
|
447
697
|
# @option options [String] :expected_bucket_owner
|
448
|
-
# The account ID of the expected bucket owner. If the
|
449
|
-
#
|
450
|
-
# Forbidden` (access denied).
|
698
|
+
# The account ID of the expected bucket owner. If the account ID that
|
699
|
+
# you provide does not match the actual owner of the bucket, the request
|
700
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
451
701
|
# @option options [String] :checksum_mode
|
452
702
|
# To retrieve the checksum, this parameter must be enabled.
|
453
703
|
#
|
@@ -462,7 +712,9 @@ module Aws::S3
|
|
462
712
|
key: @object_key,
|
463
713
|
version_id: @id
|
464
714
|
)
|
465
|
-
resp =
|
715
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
716
|
+
@client.head_object(options)
|
717
|
+
end
|
466
718
|
resp.data
|
467
719
|
end
|
468
720
|
|
@@ -542,13 +794,36 @@ module Aws::S3
|
|
542
794
|
# space, and the value that is displayed on your authentication device.
|
543
795
|
# Required to permanently delete a versioned object if versioning is
|
544
796
|
# configured with MFA delete enabled.
|
797
|
+
#
|
798
|
+
# When performing the `DeleteObjects` operation on an MFA delete enabled
|
799
|
+
# bucket, which attempts to delete the specified versioned objects, you
|
800
|
+
# must include an MFA token. If you don't provide an MFA token, the
|
801
|
+
# entire request will fail, even if there are non-versioned objects that
|
802
|
+
# you are trying to delete. If you provide an invalid token, whether
|
803
|
+
# there are versioned object keys in the request or not, the entire
|
804
|
+
# Multi-Object Delete request will fail. For information about MFA
|
805
|
+
# Delete, see [ MFA Delete][1] in the *Amazon S3 User Guide*.
|
806
|
+
#
|
807
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
808
|
+
#
|
809
|
+
# </note>
|
810
|
+
#
|
811
|
+
#
|
812
|
+
#
|
813
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
|
545
814
|
# @option options [String] :request_payer
|
546
815
|
# Confirms that the requester knows that they will be charged for the
|
547
816
|
# request. Bucket owners need not specify this parameter in their
|
548
|
-
# requests.
|
817
|
+
# requests. If either the source or destination S3 bucket has Requester
|
818
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
819
|
+
# the object. For information about downloading objects from Requester
|
549
820
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
550
821
|
# in the *Amazon S3 User Guide*.
|
551
822
|
#
|
823
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
824
|
+
#
|
825
|
+
# </note>
|
826
|
+
#
|
552
827
|
#
|
553
828
|
#
|
554
829
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -556,25 +831,45 @@ module Aws::S3
|
|
556
831
|
# Specifies whether you want to delete this object even if it has a
|
557
832
|
# Governance-type Object Lock in place. To use this header, you must
|
558
833
|
# have the `s3:BypassGovernanceRetention` permission.
|
834
|
+
#
|
835
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
836
|
+
#
|
837
|
+
# </note>
|
559
838
|
# @option options [String] :expected_bucket_owner
|
560
|
-
# The account ID of the expected bucket owner. If the
|
561
|
-
#
|
562
|
-
# Forbidden` (access denied).
|
839
|
+
# The account ID of the expected bucket owner. If the account ID that
|
840
|
+
# you provide does not match the actual owner of the bucket, the request
|
841
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
563
842
|
# @option options [String] :checksum_algorithm
|
564
843
|
# Indicates the algorithm used to create the checksum for the object
|
565
|
-
# when
|
566
|
-
# functionality if
|
567
|
-
# must be a corresponding `x-amz-checksum` or
|
568
|
-
# sent. Otherwise, Amazon S3 fails the request
|
569
|
-
# `400 Bad Request`.
|
570
|
-
#
|
844
|
+
# when you use the SDK. This header will not provide any additional
|
845
|
+
# functionality if you don't use the SDK. When you send this header,
|
846
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
847
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
848
|
+
# with the HTTP status code `400 Bad Request`.
|
849
|
+
#
|
850
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
851
|
+
# the supported algorithm from the following list:
|
852
|
+
#
|
853
|
+
# * CRC32
|
854
|
+
#
|
855
|
+
# * CRC32C
|
856
|
+
#
|
857
|
+
# * SHA1
|
858
|
+
#
|
859
|
+
# * SHA256
|
860
|
+
#
|
861
|
+
# For more information, see [Checking object integrity][1] in the
|
862
|
+
# *Amazon S3 User Guide*.
|
863
|
+
#
|
864
|
+
# If the individual checksum value you provide through
|
865
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
866
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
|
867
|
+
# provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
|
868
|
+
# that matches the provided value in `x-amz-checksum-algorithm `.
|
571
869
|
#
|
572
870
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
573
871
|
# `ChecksumAlgorithm` parameter.
|
574
872
|
#
|
575
|
-
# This checksum algorithm must be the same for all parts and it match
|
576
|
-
# the checksum value supplied in the `CreateMultipartUpload` request.
|
577
|
-
#
|
578
873
|
#
|
579
874
|
#
|
580
875
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
@@ -591,7 +886,9 @@ module Aws::S3
|
|
591
886
|
version_id: item.id
|
592
887
|
}
|
593
888
|
end
|
594
|
-
|
889
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
890
|
+
batch[0].client.delete_objects(params)
|
891
|
+
end
|
595
892
|
end
|
596
893
|
nil
|
597
894
|
end
|