aws-sdk-s3 1.130.0 → 1.151.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 +139 -1
- 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 +241 -0
- data/lib/aws-sdk-s3/bucket.rb +424 -81
- data/lib/aws-sdk-s3/bucket_acl.rb +9 -9
- data/lib/aws-sdk-s3/bucket_cors.rb +12 -12
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -12
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -12
- data/lib/aws-sdk-s3/bucket_logging.rb +16 -9
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +58 -14
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +9 -9
- data/lib/aws-sdk-s3/bucket_tagging.rb +12 -12
- data/lib/aws-sdk-s3/bucket_versioning.rb +27 -27
- data/lib/aws-sdk-s3/bucket_website.rb +12 -12
- data/lib/aws-sdk-s3/client.rb +5784 -2609
- data/lib/aws-sdk-s3/client_api.rb +114 -18
- data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
- data/lib/aws-sdk-s3/customizations/object.rb +55 -0
- data/lib/aws-sdk-s3/customizations.rb +8 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +36 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +110 -252
- data/lib/aws-sdk-s3/endpoints.rb +440 -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 +142 -21
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +4 -4
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +5 -4
- data/lib/aws-sdk-s3/multipart_upload.rb +69 -16
- data/lib/aws-sdk-s3/multipart_upload_part.rb +160 -35
- data/lib/aws-sdk-s3/object.rb +1504 -235
- data/lib/aws-sdk-s3/object_acl.rb +29 -15
- data/lib/aws-sdk-s3/object_multipart_copier.rb +10 -8
- data/lib/aws-sdk-s3/object_summary.rb +1367 -254
- data/lib/aws-sdk-s3/object_version.rb +297 -42
- data/lib/aws-sdk-s3/plugins/access_grants.rb +108 -0
- data/lib/aws-sdk-s3/plugins/endpoints.rb +14 -2
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +91 -0
- 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/presigner.rb +4 -2
- data/lib/aws-sdk-s3/resource.rb +83 -11
- data/lib/aws-sdk-s3/types.rb +4529 -1361
- 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 +2362 -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 +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 +126 -0
- data/sig/types.rbs +2562 -0
- data/sig/waiters.rbs +83 -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]
|
@@ -264,13 +264,23 @@ module Aws::S3
|
|
264
264
|
# space, and the value that is displayed on your authentication device.
|
265
265
|
# Required to permanently delete a versioned object if versioning is
|
266
266
|
# configured with MFA delete enabled.
|
267
|
+
#
|
268
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
269
|
+
#
|
270
|
+
# </note>
|
267
271
|
# @option options [String] :request_payer
|
268
272
|
# Confirms that the requester knows that they will be charged for the
|
269
273
|
# request. Bucket owners need not specify this parameter in their
|
270
|
-
# 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
|
271
277
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
272
278
|
# in the *Amazon S3 User Guide*.
|
273
279
|
#
|
280
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
281
|
+
#
|
282
|
+
# </note>
|
283
|
+
#
|
274
284
|
#
|
275
285
|
#
|
276
286
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -278,10 +288,14 @@ module Aws::S3
|
|
278
288
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
279
289
|
# restrictions to process this operation. To use this header, you must
|
280
290
|
# have the `s3:BypassGovernanceRetention` permission.
|
291
|
+
#
|
292
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
293
|
+
#
|
294
|
+
# </note>
|
281
295
|
# @option options [String] :expected_bucket_owner
|
282
|
-
# The account ID of the expected bucket owner. If the
|
283
|
-
#
|
284
|
-
# 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).
|
285
299
|
# @return [Types::DeleteObjectOutput]
|
286
300
|
def delete(options = {})
|
287
301
|
options = options.merge(
|
@@ -320,18 +334,64 @@ module Aws::S3
|
|
320
334
|
# @param [Hash] options ({})
|
321
335
|
# @option options [String] :if_match
|
322
336
|
# Return the object only if its entity tag (ETag) is the same as the one
|
323
|
-
# 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
|
324
350
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
325
351
|
# Return the object only if it has been modified since the specified
|
326
|
-
# 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
|
327
364
|
# @option options [String] :if_none_match
|
328
365
|
# Return the object only if its entity tag (ETag) is different from the
|
329
|
-
# 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
|
330
379
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
331
380
|
# Return the object only if it has not been modified since the specified
|
332
|
-
# 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
|
333
393
|
# @option options [String] :range
|
334
|
-
# Downloads the specified range
|
394
|
+
# Downloads the specified byte range of an object. For more information
|
335
395
|
# about the HTTP Range header, see
|
336
396
|
# [https://www.rfc-editor.org/rfc/rfc9110.html#name-range][1].
|
337
397
|
#
|
@@ -346,7 +406,7 @@ module Aws::S3
|
|
346
406
|
# @option options [String] :response_cache_control
|
347
407
|
# Sets the `Cache-Control` header of the response.
|
348
408
|
# @option options [String] :response_content_disposition
|
349
|
-
# Sets the `Content-Disposition` header of the response
|
409
|
+
# Sets the `Content-Disposition` header of the response.
|
350
410
|
# @option options [String] :response_content_encoding
|
351
411
|
# Sets the `Content-Encoding` header of the response.
|
352
412
|
# @option options [String] :response_content_language
|
@@ -356,25 +416,99 @@ module Aws::S3
|
|
356
416
|
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
357
417
|
# Sets the `Expires` header of the response.
|
358
418
|
# @option options [String] :sse_customer_algorithm
|
359
|
-
# Specifies the algorithm to use
|
360
|
-
# 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
|
361
443
|
# @option options [String] :sse_customer_key
|
362
|
-
# Specifies the customer-provided encryption key
|
363
|
-
#
|
364
|
-
#
|
365
|
-
#
|
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
|
366
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
|
367
472
|
# @option options [String] :sse_customer_key_md5
|
368
|
-
# Specifies the 128-bit MD5 digest of the encryption
|
369
|
-
# RFC 1321. Amazon S3 uses this header for a message
|
370
|
-
# 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
|
371
499
|
# @option options [String] :request_payer
|
372
500
|
# Confirms that the requester knows that they will be charged for the
|
373
501
|
# request. Bucket owners need not specify this parameter in their
|
374
|
-
# 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
|
375
505
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
376
506
|
# in the *Amazon S3 User Guide*.
|
377
507
|
#
|
508
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
509
|
+
#
|
510
|
+
# </note>
|
511
|
+
#
|
378
512
|
#
|
379
513
|
#
|
380
514
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -384,9 +518,9 @@ module Aws::S3
|
|
384
518
|
# for the part specified. Useful for downloading just a part of an
|
385
519
|
# object.
|
386
520
|
# @option options [String] :expected_bucket_owner
|
387
|
-
# The account ID of the expected bucket owner. If the
|
388
|
-
#
|
389
|
-
# 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).
|
390
524
|
# @option options [String] :checksum_mode
|
391
525
|
# To retrieve the checksum, this mode must be enabled.
|
392
526
|
# @return [Types::GetObjectOutput]
|
@@ -422,40 +556,118 @@ module Aws::S3
|
|
422
556
|
# @option options [String] :if_match
|
423
557
|
# Return the object only if its entity tag (ETag) is the same as the one
|
424
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
|
425
574
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
426
575
|
# Return the object only if it has been modified since the specified
|
427
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
|
428
592
|
# @option options [String] :if_none_match
|
429
593
|
# Return the object only if its entity tag (ETag) is different from the
|
430
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
|
431
610
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
432
611
|
# Return the object only if it has not been modified since the specified
|
433
612
|
# time; otherwise, return a 412 (precondition failed) error.
|
613
|
+
#
|
614
|
+
# If both of the `If-Match` and `If-Unmodified-Since` headers are
|
615
|
+
# present in the request as follows:
|
616
|
+
#
|
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].
|
624
|
+
#
|
625
|
+
#
|
626
|
+
#
|
627
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
434
628
|
# @option options [String] :range
|
435
629
|
# HeadObject returns only the metadata for an object. If the Range is
|
436
630
|
# satisfiable, only the `ContentLength` is affected in the response. If
|
437
631
|
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
438
632
|
# Satisfiable` error.
|
439
633
|
# @option options [String] :sse_customer_algorithm
|
440
|
-
# Specifies the algorithm to use
|
634
|
+
# Specifies the algorithm to use when encrypting the object (for
|
441
635
|
# example, AES256).
|
636
|
+
#
|
637
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
638
|
+
#
|
639
|
+
# </note>
|
442
640
|
# @option options [String] :sse_customer_key
|
443
641
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
444
642
|
# encrypting data. This value is used to store the object and then it is
|
445
643
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
446
644
|
# be appropriate for use with the algorithm specified in the
|
447
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>
|
448
650
|
# @option options [String] :sse_customer_key_md5
|
449
651
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
450
652
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
451
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>
|
452
658
|
# @option options [String] :request_payer
|
453
659
|
# Confirms that the requester knows that they will be charged for the
|
454
660
|
# request. Bucket owners need not specify this parameter in their
|
455
|
-
# requests.
|
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
|
456
664
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
457
665
|
# in the *Amazon S3 User Guide*.
|
458
666
|
#
|
667
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
668
|
+
#
|
669
|
+
# </note>
|
670
|
+
#
|
459
671
|
#
|
460
672
|
#
|
461
673
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -465,9 +677,9 @@ module Aws::S3
|
|
465
677
|
# for the part specified. Useful querying about the size of the part and
|
466
678
|
# the number of parts in this object.
|
467
679
|
# @option options [String] :expected_bucket_owner
|
468
|
-
# The account ID of the expected bucket owner. If the
|
469
|
-
#
|
470
|
-
# Forbidden` (access denied).
|
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).
|
471
683
|
# @option options [String] :checksum_mode
|
472
684
|
# To retrieve the checksum, this parameter must be enabled.
|
473
685
|
#
|
@@ -564,13 +776,36 @@ module Aws::S3
|
|
564
776
|
# space, and the value that is displayed on your authentication device.
|
565
777
|
# Required to permanently delete a versioned object if versioning is
|
566
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
|
567
796
|
# @option options [String] :request_payer
|
568
797
|
# Confirms that the requester knows that they will be charged for the
|
569
798
|
# request. Bucket owners need not specify this parameter in their
|
570
|
-
# requests.
|
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
|
571
802
|
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
572
803
|
# in the *Amazon S3 User Guide*.
|
573
804
|
#
|
805
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
806
|
+
#
|
807
|
+
# </note>
|
808
|
+
#
|
574
809
|
#
|
575
810
|
#
|
576
811
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
@@ -578,25 +813,45 @@ module Aws::S3
|
|
578
813
|
# Specifies whether you want to delete this object even if it has a
|
579
814
|
# Governance-type Object Lock in place. To use this header, you must
|
580
815
|
# have the `s3:BypassGovernanceRetention` permission.
|
816
|
+
#
|
817
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
818
|
+
#
|
819
|
+
# </note>
|
581
820
|
# @option options [String] :expected_bucket_owner
|
582
|
-
# The account ID of the expected bucket owner. If the
|
583
|
-
#
|
584
|
-
# Forbidden` (access denied).
|
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).
|
585
824
|
# @option options [String] :checksum_algorithm
|
586
825
|
# Indicates the algorithm used to create the checksum for the object
|
587
|
-
# when
|
588
|
-
# functionality if
|
589
|
-
# must be a corresponding `x-amz-checksum` or
|
590
|
-
# sent. Otherwise, Amazon S3 fails the request
|
591
|
-
# `400 Bad Request`.
|
592
|
-
#
|
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 `.
|
593
851
|
#
|
594
852
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
595
853
|
# `ChecksumAlgorithm` parameter.
|
596
854
|
#
|
597
|
-
# This checksum algorithm must be the same for all parts and it match
|
598
|
-
# the checksum value supplied in the `CreateMultipartUpload` request.
|
599
|
-
#
|
600
855
|
#
|
601
856
|
#
|
602
857
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module S3
|
5
|
+
module Plugins
|
6
|
+
# @api private
|
7
|
+
class AccessGrants < Seahorse::Client::Plugin
|
8
|
+
@s3control =
|
9
|
+
begin
|
10
|
+
require 'aws-sdk-s3control'
|
11
|
+
true
|
12
|
+
rescue LoadError
|
13
|
+
false
|
14
|
+
end
|
15
|
+
|
16
|
+
option(
|
17
|
+
:access_grants,
|
18
|
+
default: false,
|
19
|
+
doc_type: 'Boolean',
|
20
|
+
docstring: <<-DOCS)
|
21
|
+
When `true`, the S3 client will use the S3 Access Grants feature to
|
22
|
+
authenticate requests. Bucket credentials will be fetched from S3
|
23
|
+
Control using the `get_data_access` API.
|
24
|
+
DOCS
|
25
|
+
|
26
|
+
option(:access_grants_credentials_provider,
|
27
|
+
doc_type: 'Aws::S3::AccessGrantsCredentialsProvider',
|
28
|
+
rbs_type: 'untyped',
|
29
|
+
docstring: <<-DOCS) do |_cfg|
|
30
|
+
When `access_grants` is `true`, this option can be used to provide
|
31
|
+
additional options to the credentials provider, including a privilege
|
32
|
+
setting, caching, and fallback behavior.
|
33
|
+
DOCS
|
34
|
+
Aws::S3::AccessGrantsCredentialsProvider.new
|
35
|
+
end
|
36
|
+
|
37
|
+
# @api private
|
38
|
+
class Handler < Seahorse::Client::Handler
|
39
|
+
PERMISSION_MAP = {
|
40
|
+
head_object: 'READ',
|
41
|
+
get_object: 'READ',
|
42
|
+
get_object_acl: 'READ',
|
43
|
+
list_multipart_uploads: 'READ',
|
44
|
+
list_objects_v2: 'READ',
|
45
|
+
list_object_versions: 'READ',
|
46
|
+
list_parts: 'READ',
|
47
|
+
put_object: 'WRITE',
|
48
|
+
put_object_acl: 'WRITE',
|
49
|
+
delete_object: 'WRITE',
|
50
|
+
abort_multipart_upload: 'WRITE',
|
51
|
+
create_multipart_upload: 'WRITE',
|
52
|
+
upload_part: 'WRITE',
|
53
|
+
complete_multipart_upload: 'WRITE'
|
54
|
+
}.freeze
|
55
|
+
|
56
|
+
def call(context)
|
57
|
+
if access_grants_operation?(context) &&
|
58
|
+
!s3_express_endpoint?(context)
|
59
|
+
params = context[:endpoint_params]
|
60
|
+
permission = PERMISSION_MAP[context.operation_name]
|
61
|
+
|
62
|
+
provider = context.config.access_grants_credentials_provider
|
63
|
+
credentials = provider.access_grants_credentials_for(
|
64
|
+
bucket: params[:bucket],
|
65
|
+
key: params[:key],
|
66
|
+
prefix: params[:prefix],
|
67
|
+
permission: permission
|
68
|
+
)
|
69
|
+
context[:sigv4_credentials] = credentials # Sign will use this
|
70
|
+
end
|
71
|
+
|
72
|
+
@handler.call(context)
|
73
|
+
end
|
74
|
+
|
75
|
+
private
|
76
|
+
|
77
|
+
def access_grants_operation?(context)
|
78
|
+
params = context[:endpoint_params]
|
79
|
+
params[:bucket] && PERMISSION_MAP[context.operation_name]
|
80
|
+
end
|
81
|
+
|
82
|
+
def s3_express_endpoint?(context)
|
83
|
+
context[:endpoint_properties]['backend'] == 'S3Express'
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def add_handlers(handlers, config)
|
88
|
+
return unless AccessGrants.s3control? && config.access_grants
|
89
|
+
|
90
|
+
handlers.add(Handler)
|
91
|
+
end
|
92
|
+
|
93
|
+
def after_initialize(client)
|
94
|
+
return unless AccessGrants.s3control? && client.config.access_grants
|
95
|
+
|
96
|
+
provider = client.config.access_grants_credentials_provider
|
97
|
+
provider.s3_client = client unless provider.s3_client
|
98
|
+
end
|
99
|
+
|
100
|
+
class << self
|
101
|
+
def s3control?
|
102
|
+
@s3control
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -14,6 +14,7 @@ module Aws::S3
|
|
14
14
|
option(
|
15
15
|
:endpoint_provider,
|
16
16
|
doc_type: 'Aws::S3::EndpointProvider',
|
17
|
+
rbs_type: 'untyped',
|
17
18
|
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
19
|
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
20
|
'where `parameters` is a Struct similar to '\
|
@@ -22,19 +23,26 @@ module Aws::S3
|
|
22
23
|
Aws::S3::EndpointProvider.new
|
23
24
|
end
|
24
25
|
|
26
|
+
option(
|
27
|
+
:disable_s3_express_session_auth,
|
28
|
+
doc_type: 'Boolean',
|
29
|
+
default: nil,
|
30
|
+
docstring: "Parameter to indicate whether S3Express session auth should be disabled")
|
31
|
+
|
25
32
|
# @api private
|
26
33
|
class Handler < Seahorse::Client::Handler
|
27
34
|
def call(context)
|
28
|
-
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
35
|
unless context[:discovered_endpoint]
|
30
36
|
params = parameters_for_operation(context)
|
31
37
|
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
38
|
|
33
39
|
context.http_request.endpoint = endpoint.url
|
34
40
|
apply_endpoint_headers(context, endpoint.headers)
|
41
|
+
|
42
|
+
context[:endpoint_params] = params
|
43
|
+
context[:endpoint_properties] = endpoint.properties
|
35
44
|
end
|
36
45
|
|
37
|
-
context[:endpoint_params] = params
|
38
46
|
context[:auth_scheme] =
|
39
47
|
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
48
|
|
@@ -66,6 +74,8 @@ module Aws::S3
|
|
66
74
|
Aws::S3::Endpoints::CreateBucket.build(context)
|
67
75
|
when :create_multipart_upload
|
68
76
|
Aws::S3::Endpoints::CreateMultipartUpload.build(context)
|
77
|
+
when :create_session
|
78
|
+
Aws::S3::Endpoints::CreateSession.build(context)
|
69
79
|
when :delete_bucket
|
70
80
|
Aws::S3::Endpoints::DeleteBucket.build(context)
|
71
81
|
when :delete_bucket_analytics_configuration
|
@@ -176,6 +186,8 @@ module Aws::S3
|
|
176
186
|
Aws::S3::Endpoints::ListBucketMetricsConfigurations.build(context)
|
177
187
|
when :list_buckets
|
178
188
|
Aws::S3::Endpoints::ListBuckets.build(context)
|
189
|
+
when :list_directory_buckets
|
190
|
+
Aws::S3::Endpoints::ListDirectoryBuckets.build(context)
|
179
191
|
when :list_multipart_uploads
|
180
192
|
Aws::S3::Endpoints::ListMultipartUploads.build(context)
|
181
193
|
when :list_object_versions
|