aws-sdk-s3 1.103.0 → 1.113.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 +70 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +6 -6
- data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +2 -3
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +6 -6
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +7 -6
- data/lib/aws-sdk-s3/bucket.rb +115 -18
- data/lib/aws-sdk-s3/bucket_acl.rb +18 -2
- data/lib/aws-sdk-s3/bucket_cors.rb +20 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +24 -6
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +28 -6
- data/lib/aws-sdk-s3/bucket_logging.rb +18 -2
- data/lib/aws-sdk-s3/bucket_notification.rb +17 -5
- data/lib/aws-sdk-s3/bucket_policy.rb +20 -4
- data/lib/aws-sdk-s3/bucket_request_payment.rb +18 -2
- data/lib/aws-sdk-s3/bucket_tagging.rb +20 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +54 -6
- data/lib/aws-sdk-s3/bucket_website.rb +20 -4
- data/lib/aws-sdk-s3/client.rb +1954 -683
- data/lib/aws-sdk-s3/client_api.rb +387 -21
- data/lib/aws-sdk-s3/customizations/object.rb +76 -3
- data/lib/aws-sdk-s3/file_downloader.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +5 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -7
- data/lib/aws-sdk-s3/multipart_upload.rb +126 -12
- data/lib/aws-sdk-s3/multipart_upload_part.rb +132 -13
- data/lib/aws-sdk-s3/object.rb +249 -77
- data/lib/aws-sdk-s3/object_acl.rb +20 -4
- data/lib/aws-sdk-s3/object_summary.rb +167 -45
- data/lib/aws-sdk-s3/object_version.rb +64 -38
- data/lib/aws-sdk-s3/plugins/accelerate.rb +7 -1
- data/lib/aws-sdk-s3/plugins/arn.rb +11 -24
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +1 -1
- data/lib/aws-sdk-s3/plugins/dualstack.rb +25 -31
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -0
- data/lib/aws-sdk-s3/plugins/md5s.rb +5 -3
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +19 -4
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
- data/lib/aws-sdk-s3/presigned_post.rb +38 -19
- data/lib/aws-sdk-s3/resource.rb +18 -0
- data/lib/aws-sdk-s3/types.rb +2462 -547
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +5 -4
@@ -72,6 +72,12 @@ module Aws::S3
|
|
72
72
|
data[:etag]
|
73
73
|
end
|
74
74
|
|
75
|
+
# The algorithm that was used to create a checksum of the object.
|
76
|
+
# @return [Array<String>]
|
77
|
+
def checksum_algorithm
|
78
|
+
data[:checksum_algorithm]
|
79
|
+
end
|
80
|
+
|
75
81
|
# Size in bytes of the object
|
76
82
|
# @return [Integer]
|
77
83
|
def size
|
@@ -276,6 +282,7 @@ module Aws::S3
|
|
276
282
|
# object_summary.copy_from({
|
277
283
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
|
278
284
|
# cache_control: "CacheControl",
|
285
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
279
286
|
# content_disposition: "ContentDisposition",
|
280
287
|
# content_encoding: "ContentEncoding",
|
281
288
|
# content_language: "ContentLanguage",
|
@@ -296,7 +303,7 @@ module Aws::S3
|
|
296
303
|
# metadata_directive: "COPY", # accepts COPY, REPLACE
|
297
304
|
# tagging_directive: "COPY", # accepts COPY, REPLACE
|
298
305
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
299
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
306
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
300
307
|
# website_redirect_location: "WebsiteRedirectLocation",
|
301
308
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
302
309
|
# sse_customer_key: "SSECustomerKey",
|
@@ -322,6 +329,14 @@ module Aws::S3
|
|
322
329
|
# This action is not supported by Amazon S3 on Outposts.
|
323
330
|
# @option options [String] :cache_control
|
324
331
|
# Specifies caching behavior along the request/reply chain.
|
332
|
+
# @option options [String] :checksum_algorithm
|
333
|
+
# Indicates the algorithm you want Amazon S3 to use to create the
|
334
|
+
# checksum for the object. For more information, see [Checking object
|
335
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
336
|
+
#
|
337
|
+
#
|
338
|
+
#
|
339
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
325
340
|
# @option options [String] :content_disposition
|
326
341
|
# Specifies presentational information for the object.
|
327
342
|
# @option options [String] :content_encoding
|
@@ -341,8 +356,8 @@ module Aws::S3
|
|
341
356
|
# of the source bucket and the key of the source object, separated by
|
342
357
|
# a slash (/). For example, to copy the object `reports/january.pdf`
|
343
358
|
# from the bucket `awsexamplebucket`, use
|
344
|
-
# `awsexamplebucket/reports/january.pdf`. The value must be
|
345
|
-
# encoded.
|
359
|
+
# `awsexamplebucket/reports/january.pdf`. The value must be
|
360
|
+
# URL-encoded.
|
346
361
|
#
|
347
362
|
# * For objects accessed through access points, specify the Amazon
|
348
363
|
# Resource Name (ARN) of the object as accessed through the access
|
@@ -367,7 +382,7 @@ module Aws::S3
|
|
367
382
|
# outpost `my-outpost` owned by account `123456789012` in Region
|
368
383
|
# `us-west-2`, use the URL encoding of
|
369
384
|
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
370
|
-
# The value must be URL
|
385
|
+
# The value must be URL-encoded.
|
371
386
|
#
|
372
387
|
# To copy a specific version of an object, append
|
373
388
|
# `?versionId=<version-id>` to the value (for example,
|
@@ -484,8 +499,8 @@ module Aws::S3
|
|
484
499
|
# @option options [String] :request_payer
|
485
500
|
# Confirms that the requester knows that they will be charged for the
|
486
501
|
# request. Bucket owners need not specify this parameter in their
|
487
|
-
# requests. For information about downloading objects from
|
488
|
-
#
|
502
|
+
# requests. For information about downloading objects from Requester
|
503
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
489
504
|
# in the *Amazon S3 User Guide*.
|
490
505
|
#
|
491
506
|
#
|
@@ -501,15 +516,15 @@ module Aws::S3
|
|
501
516
|
# The date and time when you want the copied object's Object Lock to
|
502
517
|
# expire.
|
503
518
|
# @option options [String] :object_lock_legal_hold_status
|
504
|
-
# Specifies whether you want to apply a
|
519
|
+
# Specifies whether you want to apply a legal hold to the copied object.
|
505
520
|
# @option options [String] :expected_bucket_owner
|
506
521
|
# The account ID of the expected destination bucket owner. If the
|
507
|
-
# destination bucket is owned by a different account, the request
|
508
|
-
#
|
522
|
+
# destination bucket is owned by a different account, the request fails
|
523
|
+
# with the HTTP status code `403 Forbidden` (access denied).
|
509
524
|
# @option options [String] :expected_source_bucket_owner
|
510
525
|
# The account ID of the expected source bucket owner. If the source
|
511
|
-
# bucket is owned by a different account, the request
|
512
|
-
# HTTP `403 (
|
526
|
+
# bucket is owned by a different account, the request fails with the
|
527
|
+
# HTTP status code `403 Forbidden` (access denied).
|
513
528
|
# @return [Types::CopyObjectOutput]
|
514
529
|
def copy_from(options = {})
|
515
530
|
options = options.merge(
|
@@ -540,8 +555,8 @@ module Aws::S3
|
|
540
555
|
# @option options [String] :request_payer
|
541
556
|
# Confirms that the requester knows that they will be charged for the
|
542
557
|
# request. Bucket owners need not specify this parameter in their
|
543
|
-
# requests. For information about downloading objects from
|
544
|
-
#
|
558
|
+
# requests. For information about downloading objects from Requester
|
559
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
545
560
|
# in the *Amazon S3 User Guide*.
|
546
561
|
#
|
547
562
|
#
|
@@ -550,11 +565,11 @@ module Aws::S3
|
|
550
565
|
# @option options [Boolean] :bypass_governance_retention
|
551
566
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
552
567
|
# restrictions to process this operation. To use this header, you must
|
553
|
-
# have the `s3:
|
568
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
554
569
|
# @option options [String] :expected_bucket_owner
|
555
570
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
556
|
-
# a different account, the request
|
557
|
-
#
|
571
|
+
# a different account, the request fails with the HTTP status code `403
|
572
|
+
# Forbidden` (access denied).
|
558
573
|
# @return [Types::DeleteObjectOutput]
|
559
574
|
def delete(options = {})
|
560
575
|
options = options.merge(
|
@@ -586,20 +601,21 @@ module Aws::S3
|
|
586
601
|
# request_payer: "requester", # accepts requester
|
587
602
|
# part_number: 1,
|
588
603
|
# expected_bucket_owner: "AccountId",
|
604
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
589
605
|
# })
|
590
606
|
# @param [Hash] options ({})
|
591
607
|
# @option options [String] :if_match
|
592
608
|
# Return the object only if its entity tag (ETag) is the same as the one
|
593
|
-
# specified
|
609
|
+
# specified; otherwise, return a 412 (precondition failed) error.
|
594
610
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
595
611
|
# Return the object only if it has been modified since the specified
|
596
|
-
# time
|
612
|
+
# time; otherwise, return a 304 (not modified) error.
|
597
613
|
# @option options [String] :if_none_match
|
598
614
|
# Return the object only if its entity tag (ETag) is different from the
|
599
|
-
# one specified
|
615
|
+
# one specified; otherwise, return a 304 (not modified) error.
|
600
616
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
601
617
|
# Return the object only if it has not been modified since the specified
|
602
|
-
# time
|
618
|
+
# time; otherwise, return a 412 (precondition failed) error.
|
603
619
|
# @option options [String] :range
|
604
620
|
# Downloads the specified range bytes of an object. For more information
|
605
621
|
# about the HTTP Range header, see
|
@@ -643,8 +659,8 @@ module Aws::S3
|
|
643
659
|
# @option options [String] :request_payer
|
644
660
|
# Confirms that the requester knows that they will be charged for the
|
645
661
|
# request. Bucket owners need not specify this parameter in their
|
646
|
-
# requests. For information about downloading objects from
|
647
|
-
#
|
662
|
+
# requests. For information about downloading objects from Requester
|
663
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
648
664
|
# in the *Amazon S3 User Guide*.
|
649
665
|
#
|
650
666
|
#
|
@@ -657,8 +673,10 @@ module Aws::S3
|
|
657
673
|
# object.
|
658
674
|
# @option options [String] :expected_bucket_owner
|
659
675
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
660
|
-
# a different account, the request
|
661
|
-
#
|
676
|
+
# a different account, the request fails with the HTTP status code `403
|
677
|
+
# Forbidden` (access denied).
|
678
|
+
# @option options [String] :checksum_mode
|
679
|
+
# To retrieve the checksum, this mode must be enabled.
|
662
680
|
# @return [Types::GetObjectOutput]
|
663
681
|
def get(options = {}, &block)
|
664
682
|
options = options.merge(
|
@@ -687,7 +705,7 @@ module Aws::S3
|
|
687
705
|
# "MetadataKey" => "MetadataValue",
|
688
706
|
# },
|
689
707
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
690
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
708
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
691
709
|
# website_redirect_location: "WebsiteRedirectLocation",
|
692
710
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
693
711
|
# sse_customer_key: "SSECustomerKey",
|
@@ -701,6 +719,7 @@ module Aws::S3
|
|
701
719
|
# object_lock_retain_until_date: Time.now,
|
702
720
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
703
721
|
# expected_bucket_owner: "AccountId",
|
722
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
704
723
|
# })
|
705
724
|
# @param [Hash] options ({})
|
706
725
|
# @option options [String] :acl
|
@@ -798,8 +817,8 @@ module Aws::S3
|
|
798
817
|
# @option options [String] :request_payer
|
799
818
|
# Confirms that the requester knows that they will be charged for the
|
800
819
|
# request. Bucket owners need not specify this parameter in their
|
801
|
-
# requests. For information about downloading objects from
|
802
|
-
#
|
820
|
+
# requests. For information about downloading objects from Requester
|
821
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
803
822
|
# in the *Amazon S3 User Guide*.
|
804
823
|
#
|
805
824
|
#
|
@@ -814,12 +833,20 @@ module Aws::S3
|
|
814
833
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
815
834
|
# Specifies the date and time when you want the Object Lock to expire.
|
816
835
|
# @option options [String] :object_lock_legal_hold_status
|
817
|
-
# Specifies whether you want to apply a
|
836
|
+
# Specifies whether you want to apply a legal hold to the uploaded
|
818
837
|
# object.
|
819
838
|
# @option options [String] :expected_bucket_owner
|
820
839
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
821
|
-
# a different account, the request
|
822
|
-
#
|
840
|
+
# a different account, the request fails with the HTTP status code `403
|
841
|
+
# Forbidden` (access denied).
|
842
|
+
# @option options [String] :checksum_algorithm
|
843
|
+
# Indicates the algorithm you want Amazon S3 to use to create the
|
844
|
+
# checksum for the object. For more information, see [Checking object
|
845
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
846
|
+
#
|
847
|
+
#
|
848
|
+
#
|
849
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
823
850
|
# @return [MultipartUpload]
|
824
851
|
def initiate_multipart_upload(options = {})
|
825
852
|
options = options.merge(
|
@@ -847,6 +874,11 @@ module Aws::S3
|
|
847
874
|
# content_length: 1,
|
848
875
|
# content_md5: "ContentMD5",
|
849
876
|
# content_type: "ContentType",
|
877
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
878
|
+
# checksum_crc32: "ChecksumCRC32",
|
879
|
+
# checksum_crc32c: "ChecksumCRC32C",
|
880
|
+
# checksum_sha1: "ChecksumSHA1",
|
881
|
+
# checksum_sha256: "ChecksumSHA256",
|
850
882
|
# expires: Time.now,
|
851
883
|
# grant_full_control: "GrantFullControl",
|
852
884
|
# grant_read: "GrantRead",
|
@@ -856,7 +888,7 @@ module Aws::S3
|
|
856
888
|
# "MetadataKey" => "MetadataValue",
|
857
889
|
# },
|
858
890
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
859
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
891
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
860
892
|
# website_redirect_location: "WebsiteRedirectLocation",
|
861
893
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
862
894
|
# sse_customer_key: "SSECustomerKey",
|
@@ -938,6 +970,61 @@ module Aws::S3
|
|
938
970
|
#
|
939
971
|
#
|
940
972
|
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
|
973
|
+
# @option options [String] :checksum_algorithm
|
974
|
+
# Indicates the algorithm used to create the checksum for the object
|
975
|
+
# when using the SDK. This header will not provide any additional
|
976
|
+
# functionality if not using the SDK. When sending this header, there
|
977
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
978
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
979
|
+
# `400 Bad Request`. For more information, see [Checking object
|
980
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
981
|
+
#
|
982
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
983
|
+
# `ChecksumAlgorithm` parameter.
|
984
|
+
#
|
985
|
+
#
|
986
|
+
#
|
987
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
988
|
+
# @option options [String] :checksum_crc32
|
989
|
+
# This header can be used as a data integrity check to verify that the
|
990
|
+
# data received is the same data that was originally sent. This header
|
991
|
+
# specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
|
992
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
993
|
+
# User Guide*.
|
994
|
+
#
|
995
|
+
#
|
996
|
+
#
|
997
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
998
|
+
# @option options [String] :checksum_crc32c
|
999
|
+
# This header can be used as a data integrity check to verify that the
|
1000
|
+
# data received is the same data that was originally sent. This header
|
1001
|
+
# specifies the base64-encoded, 32-bit CRC32C checksum of the object.
|
1002
|
+
# For more information, see [Checking object integrity][1] in the
|
1003
|
+
# *Amazon S3 User Guide*.
|
1004
|
+
#
|
1005
|
+
#
|
1006
|
+
#
|
1007
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
1008
|
+
# @option options [String] :checksum_sha1
|
1009
|
+
# This header can be used as a data integrity check to verify that the
|
1010
|
+
# data received is the same data that was originally sent. This header
|
1011
|
+
# specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
|
1012
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
1013
|
+
# User Guide*.
|
1014
|
+
#
|
1015
|
+
#
|
1016
|
+
#
|
1017
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
1018
|
+
# @option options [String] :checksum_sha256
|
1019
|
+
# This header can be used as a data integrity check to verify that the
|
1020
|
+
# data received is the same data that was originally sent. This header
|
1021
|
+
# specifies the base64-encoded, 256-bit SHA-256 digest of the object.
|
1022
|
+
# For more information, see [Checking object integrity][1] in the
|
1023
|
+
# *Amazon S3 User Guide*.
|
1024
|
+
#
|
1025
|
+
#
|
1026
|
+
#
|
1027
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
941
1028
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
942
1029
|
# The date and time at which the object is no longer cacheable. For more
|
943
1030
|
# information, see
|
@@ -1042,8 +1129,8 @@ module Aws::S3
|
|
1042
1129
|
# @option options [String] :request_payer
|
1043
1130
|
# Confirms that the requester knows that they will be charged for the
|
1044
1131
|
# request. Bucket owners need not specify this parameter in their
|
1045
|
-
# requests. For information about downloading objects from
|
1046
|
-
#
|
1132
|
+
# requests. For information about downloading objects from Requester
|
1133
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
1047
1134
|
# in the *Amazon S3 User Guide*.
|
1048
1135
|
#
|
1049
1136
|
#
|
@@ -1066,8 +1153,8 @@ module Aws::S3
|
|
1066
1153
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
1067
1154
|
# @option options [String] :expected_bucket_owner
|
1068
1155
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
1069
|
-
# a different account, the request
|
1070
|
-
#
|
1156
|
+
# a different account, the request fails with the HTTP status code `403
|
1157
|
+
# Forbidden` (access denied).
|
1071
1158
|
# @return [Types::PutObjectOutput]
|
1072
1159
|
def put(options = {})
|
1073
1160
|
options = options.merge(
|
@@ -1159,11 +1246,12 @@ module Aws::S3
|
|
1159
1246
|
# value: "MetadataValue",
|
1160
1247
|
# },
|
1161
1248
|
# ],
|
1162
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
|
1249
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
1163
1250
|
# },
|
1164
1251
|
# },
|
1165
1252
|
# },
|
1166
1253
|
# request_payer: "requester", # accepts requester
|
1254
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
1167
1255
|
# expected_bucket_owner: "AccountId",
|
1168
1256
|
# })
|
1169
1257
|
# @param [Hash] options ({})
|
@@ -1174,17 +1262,32 @@ module Aws::S3
|
|
1174
1262
|
# @option options [String] :request_payer
|
1175
1263
|
# Confirms that the requester knows that they will be charged for the
|
1176
1264
|
# request. Bucket owners need not specify this parameter in their
|
1177
|
-
# requests. For information about downloading objects from
|
1178
|
-
#
|
1265
|
+
# requests. For information about downloading objects from Requester
|
1266
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
1179
1267
|
# in the *Amazon S3 User Guide*.
|
1180
1268
|
#
|
1181
1269
|
#
|
1182
1270
|
#
|
1183
1271
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
1272
|
+
# @option options [String] :checksum_algorithm
|
1273
|
+
# Indicates the algorithm used to create the checksum for the object
|
1274
|
+
# when using the SDK. This header will not provide any additional
|
1275
|
+
# functionality if not using the SDK. When sending this header, there
|
1276
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
1277
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
1278
|
+
# `400 Bad Request`. For more information, see [Checking object
|
1279
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
1280
|
+
#
|
1281
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
1282
|
+
# `ChecksumAlgorithm` parameter.
|
1283
|
+
#
|
1284
|
+
#
|
1285
|
+
#
|
1286
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
1184
1287
|
# @option options [String] :expected_bucket_owner
|
1185
1288
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
1186
|
-
# a different account, the request
|
1187
|
-
#
|
1289
|
+
# a different account, the request fails with the HTTP status code `403
|
1290
|
+
# Forbidden` (access denied).
|
1188
1291
|
# @return [Types::RestoreObjectOutput]
|
1189
1292
|
def restore_object(options = {})
|
1190
1293
|
options = options.merge(
|
@@ -1317,6 +1420,7 @@ module Aws::S3
|
|
1317
1420
|
# request_payer: "requester", # accepts requester
|
1318
1421
|
# bypass_governance_retention: false,
|
1319
1422
|
# expected_bucket_owner: "AccountId",
|
1423
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
1320
1424
|
# })
|
1321
1425
|
# @param options ({})
|
1322
1426
|
# @option options [String] :mfa
|
@@ -1327,8 +1431,8 @@ module Aws::S3
|
|
1327
1431
|
# @option options [String] :request_payer
|
1328
1432
|
# Confirms that the requester knows that they will be charged for the
|
1329
1433
|
# request. Bucket owners need not specify this parameter in their
|
1330
|
-
# requests. For information about downloading objects from
|
1331
|
-
#
|
1434
|
+
# requests. For information about downloading objects from Requester
|
1435
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
1332
1436
|
# in the *Amazon S3 User Guide*.
|
1333
1437
|
#
|
1334
1438
|
#
|
@@ -1337,11 +1441,29 @@ module Aws::S3
|
|
1337
1441
|
# @option options [Boolean] :bypass_governance_retention
|
1338
1442
|
# Specifies whether you want to delete this object even if it has a
|
1339
1443
|
# Governance-type Object Lock in place. To use this header, you must
|
1340
|
-
# have the `s3:
|
1444
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
1341
1445
|
# @option options [String] :expected_bucket_owner
|
1342
1446
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
1343
|
-
# a different account, the request
|
1344
|
-
#
|
1447
|
+
# a different account, the request fails with the HTTP status code `403
|
1448
|
+
# Forbidden` (access denied).
|
1449
|
+
# @option options [String] :checksum_algorithm
|
1450
|
+
# Indicates the algorithm used to create the checksum for the object
|
1451
|
+
# when using the SDK. This header will not provide any additional
|
1452
|
+
# functionality if not using the SDK. When sending this header, there
|
1453
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
1454
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
1455
|
+
# `400 Bad Request`. For more information, see [Checking object
|
1456
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
1457
|
+
#
|
1458
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
1459
|
+
# `ChecksumAlgorithm` parameter.
|
1460
|
+
#
|
1461
|
+
# This checksum algorithm must be the same for all parts and it match
|
1462
|
+
# the checksum value supplied in the `CreateMultipartUpload` request.
|
1463
|
+
#
|
1464
|
+
#
|
1465
|
+
#
|
1466
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
1345
1467
|
# @return [void]
|
1346
1468
|
def batch_delete!(options = {})
|
1347
1469
|
batch_enum.each do |batch|
|
@@ -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
|
@@ -245,8 +251,8 @@ module Aws::S3
|
|
245
251
|
# @option options [String] :request_payer
|
246
252
|
# Confirms that the requester knows that they will be charged for the
|
247
253
|
# request. Bucket owners need not specify this parameter in their
|
248
|
-
# requests. For information about downloading objects from
|
249
|
-
#
|
254
|
+
# requests. For information about downloading objects from Requester
|
255
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
250
256
|
# in the *Amazon S3 User Guide*.
|
251
257
|
#
|
252
258
|
#
|
@@ -255,11 +261,11 @@ module Aws::S3
|
|
255
261
|
# @option options [Boolean] :bypass_governance_retention
|
256
262
|
# Indicates whether S3 Object Lock should bypass Governance-mode
|
257
263
|
# restrictions to process this operation. To use this header, you must
|
258
|
-
# have the `s3:
|
264
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
259
265
|
# @option options [String] :expected_bucket_owner
|
260
266
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
261
|
-
# a different account, the request
|
262
|
-
#
|
267
|
+
# a different account, the request fails with the HTTP status code `403
|
268
|
+
# Forbidden` (access denied).
|
263
269
|
# @return [Types::DeleteObjectOutput]
|
264
270
|
def delete(options = {})
|
265
271
|
options = options.merge(
|
@@ -291,20 +297,21 @@ module Aws::S3
|
|
291
297
|
# request_payer: "requester", # accepts requester
|
292
298
|
# part_number: 1,
|
293
299
|
# expected_bucket_owner: "AccountId",
|
300
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
294
301
|
# })
|
295
302
|
# @param [Hash] options ({})
|
296
303
|
# @option options [String] :if_match
|
297
304
|
# Return the object only if its entity tag (ETag) is the same as the one
|
298
|
-
# specified
|
305
|
+
# specified; otherwise, return a 412 (precondition failed) error.
|
299
306
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
300
307
|
# Return the object only if it has been modified since the specified
|
301
|
-
# time
|
308
|
+
# time; otherwise, return a 304 (not modified) error.
|
302
309
|
# @option options [String] :if_none_match
|
303
310
|
# Return the object only if its entity tag (ETag) is different from the
|
304
|
-
# one specified
|
311
|
+
# one specified; otherwise, return a 304 (not modified) error.
|
305
312
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
306
313
|
# Return the object only if it has not been modified since the specified
|
307
|
-
# time
|
314
|
+
# time; otherwise, return a 412 (precondition failed) error.
|
308
315
|
# @option options [String] :range
|
309
316
|
# Downloads the specified range bytes of an object. For more information
|
310
317
|
# about the HTTP Range header, see
|
@@ -346,8 +353,8 @@ module Aws::S3
|
|
346
353
|
# @option options [String] :request_payer
|
347
354
|
# Confirms that the requester knows that they will be charged for the
|
348
355
|
# request. Bucket owners need not specify this parameter in their
|
349
|
-
# requests. For information about downloading objects from
|
350
|
-
#
|
356
|
+
# requests. For information about downloading objects from Requester
|
357
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
351
358
|
# in the *Amazon S3 User Guide*.
|
352
359
|
#
|
353
360
|
#
|
@@ -360,8 +367,10 @@ module Aws::S3
|
|
360
367
|
# object.
|
361
368
|
# @option options [String] :expected_bucket_owner
|
362
369
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
363
|
-
# a different account, the request
|
364
|
-
#
|
370
|
+
# a different account, the request fails with the HTTP status code `403
|
371
|
+
# Forbidden` (access denied).
|
372
|
+
# @option options [String] :checksum_mode
|
373
|
+
# To retrieve the checksum, this mode must be enabled.
|
365
374
|
# @return [Types::GetObjectOutput]
|
366
375
|
def get(options = {}, &block)
|
367
376
|
options = options.merge(
|
@@ -387,33 +396,24 @@ module Aws::S3
|
|
387
396
|
# request_payer: "requester", # accepts requester
|
388
397
|
# part_number: 1,
|
389
398
|
# expected_bucket_owner: "AccountId",
|
399
|
+
# checksum_mode: "ENABLED", # accepts ENABLED
|
390
400
|
# })
|
391
401
|
# @param [Hash] options ({})
|
392
402
|
# @option options [String] :if_match
|
393
403
|
# Return the object only if its entity tag (ETag) is the same as the one
|
394
|
-
# specified
|
404
|
+
# specified; otherwise, return a 412 (precondition failed) error.
|
395
405
|
# @option options [Time,DateTime,Date,Integer,String] :if_modified_since
|
396
406
|
# Return the object only if it has been modified since the specified
|
397
|
-
# time
|
407
|
+
# time; otherwise, return a 304 (not modified) error.
|
398
408
|
# @option options [String] :if_none_match
|
399
409
|
# Return the object only if its entity tag (ETag) is different from the
|
400
|
-
# one specified
|
410
|
+
# one specified; otherwise, return a 304 (not modified) error.
|
401
411
|
# @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
|
402
412
|
# Return the object only if it has not been modified since the specified
|
403
|
-
# time
|
413
|
+
# time; otherwise, return a 412 (precondition failed) error.
|
404
414
|
# @option options [String] :range
|
405
|
-
#
|
406
|
-
#
|
407
|
-
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
|
408
|
-
#
|
409
|
-
# <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
|
410
|
-
# `GET` request.
|
411
|
-
#
|
412
|
-
# </note>
|
413
|
-
#
|
414
|
-
#
|
415
|
-
#
|
416
|
-
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
|
415
|
+
# Because `HeadObject` returns only the metadata for an object, this
|
416
|
+
# parameter has no effect.
|
417
417
|
# @option options [String] :sse_customer_algorithm
|
418
418
|
# Specifies the algorithm to use to when encrypting the object (for
|
419
419
|
# example, AES256).
|
@@ -430,8 +430,8 @@ module Aws::S3
|
|
430
430
|
# @option options [String] :request_payer
|
431
431
|
# Confirms that the requester knows that they will be charged for the
|
432
432
|
# request. Bucket owners need not specify this parameter in their
|
433
|
-
# requests. For information about downloading objects from
|
434
|
-
#
|
433
|
+
# requests. For information about downloading objects from Requester
|
434
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
435
435
|
# in the *Amazon S3 User Guide*.
|
436
436
|
#
|
437
437
|
#
|
@@ -444,8 +444,15 @@ module Aws::S3
|
|
444
444
|
# the number of parts in this object.
|
445
445
|
# @option options [String] :expected_bucket_owner
|
446
446
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
447
|
-
# a different account, the request
|
448
|
-
#
|
447
|
+
# a different account, the request fails with the HTTP status code `403
|
448
|
+
# Forbidden` (access denied).
|
449
|
+
# @option options [String] :checksum_mode
|
450
|
+
# To retrieve the checksum, this parameter must be enabled.
|
451
|
+
#
|
452
|
+
# In addition, if you enable `ChecksumMode` and the object is encrypted
|
453
|
+
# with Amazon Web Services Key Management Service (Amazon Web Services
|
454
|
+
# KMS), you must have permission to use the `kms:Decrypt` action for the
|
455
|
+
# request to succeed.
|
449
456
|
# @return [Types::HeadObjectOutput]
|
450
457
|
def head(options = {})
|
451
458
|
options = options.merge(
|
@@ -525,6 +532,7 @@ module Aws::S3
|
|
525
532
|
# request_payer: "requester", # accepts requester
|
526
533
|
# bypass_governance_retention: false,
|
527
534
|
# expected_bucket_owner: "AccountId",
|
535
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
528
536
|
# })
|
529
537
|
# @param options ({})
|
530
538
|
# @option options [String] :mfa
|
@@ -535,8 +543,8 @@ module Aws::S3
|
|
535
543
|
# @option options [String] :request_payer
|
536
544
|
# Confirms that the requester knows that they will be charged for the
|
537
545
|
# request. Bucket owners need not specify this parameter in their
|
538
|
-
# requests. For information about downloading objects from
|
539
|
-
#
|
546
|
+
# requests. For information about downloading objects from Requester
|
547
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
540
548
|
# in the *Amazon S3 User Guide*.
|
541
549
|
#
|
542
550
|
#
|
@@ -545,11 +553,29 @@ module Aws::S3
|
|
545
553
|
# @option options [Boolean] :bypass_governance_retention
|
546
554
|
# Specifies whether you want to delete this object even if it has a
|
547
555
|
# Governance-type Object Lock in place. To use this header, you must
|
548
|
-
# have the `s3:
|
556
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
549
557
|
# @option options [String] :expected_bucket_owner
|
550
558
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
551
|
-
# a different account, the request
|
552
|
-
#
|
559
|
+
# a different account, the request fails with the HTTP status code `403
|
560
|
+
# Forbidden` (access denied).
|
561
|
+
# @option options [String] :checksum_algorithm
|
562
|
+
# Indicates the algorithm used to create the checksum for the object
|
563
|
+
# when using the SDK. This header will not provide any additional
|
564
|
+
# functionality if not using the SDK. When sending this header, there
|
565
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
566
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
567
|
+
# `400 Bad Request`. For more information, see [Checking object
|
568
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
569
|
+
#
|
570
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
571
|
+
# `ChecksumAlgorithm` parameter.
|
572
|
+
#
|
573
|
+
# This checksum algorithm must be the same for all parts and it match
|
574
|
+
# the checksum value supplied in the `CreateMultipartUpload` request.
|
575
|
+
#
|
576
|
+
#
|
577
|
+
#
|
578
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
553
579
|
# @return [void]
|
554
580
|
def batch_delete!(options = {})
|
555
581
|
batch_enum.each do |batch|
|
@@ -41,11 +41,17 @@ each bucket. [Go here for more information](http://docs.aws.amazon.com/AmazonS3/
|
|
41
41
|
accelerate = context.params.delete(:use_accelerate_endpoint)
|
42
42
|
end
|
43
43
|
accelerate = context.config.use_accelerate_endpoint if accelerate.nil?
|
44
|
-
# Raise if :endpoint and
|
44
|
+
# Raise if :endpoint and accelerate are both provided
|
45
45
|
if accelerate && !context.config.regional_endpoint
|
46
46
|
raise ArgumentError,
|
47
47
|
'Cannot use both :use_accelerate_endpoint and :endpoint'
|
48
48
|
end
|
49
|
+
# Raise if :use_fips_endpoint and accelerate are both provided
|
50
|
+
if accelerate && context.config.use_fips_endpoint
|
51
|
+
raise ArgumentError,
|
52
|
+
'Cannot use both :use_accelerate_endpoint and '\
|
53
|
+
':use_fips_endpoint'
|
54
|
+
end
|
49
55
|
context[:use_accelerate_endpoint] = accelerate
|
50
56
|
@handler.call(context)
|
51
57
|
end
|