aws-sdk-s3 1.174.0 → 1.179.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 +32 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +40 -26
- data/lib/aws-sdk-s3/bucket_acl.rb +5 -4
- data/lib/aws-sdk-s3/bucket_cors.rb +5 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +1 -1
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +2 -2
- data/lib/aws-sdk-s3/bucket_logging.rb +1 -1
- data/lib/aws-sdk-s3/bucket_policy.rb +9 -8
- data/lib/aws-sdk-s3/bucket_request_payment.rb +2 -2
- data/lib/aws-sdk-s3/bucket_tagging.rb +2 -2
- data/lib/aws-sdk-s3/bucket_versioning.rb +6 -6
- data/lib/aws-sdk-s3/bucket_website.rb +2 -2
- data/lib/aws-sdk-s3/client.rb +1409 -867
- data/lib/aws-sdk-s3/client_api.rb +128 -2
- data/lib/aws-sdk-s3/endpoint_provider.rb +36 -0
- data/lib/aws-sdk-s3/endpoints.rb +42 -0
- data/lib/aws-sdk-s3/file_downloader.rb +4 -21
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +31 -13
- data/lib/aws-sdk-s3/multipart_upload.rb +48 -6
- data/lib/aws-sdk-s3/multipart_upload_part.rb +52 -36
- data/lib/aws-sdk-s3/object.rb +111 -59
- data/lib/aws-sdk-s3/object_acl.rb +4 -4
- data/lib/aws-sdk-s3/object_summary.rb +63 -28
- data/lib/aws-sdk-s3/object_version.rb +21 -8
- data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +11 -20
- data/lib/aws-sdk-s3/plugins/md5s.rb +10 -71
- data/lib/aws-sdk-s3/presigner.rb +5 -5
- data/lib/aws-sdk-s3/resource.rb +9 -8
- data/lib/aws-sdk-s3/types.rb +1264 -528
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/bucket.rbs +5 -4
- data/sig/bucket_acl.rbs +1 -1
- data/sig/bucket_cors.rbs +1 -1
- data/sig/bucket_lifecycle.rbs +1 -1
- data/sig/bucket_lifecycle_configuration.rbs +1 -1
- data/sig/bucket_logging.rbs +1 -1
- data/sig/bucket_policy.rbs +1 -1
- data/sig/bucket_request_payment.rbs +1 -1
- data/sig/bucket_tagging.rbs +1 -1
- data/sig/bucket_versioning.rbs +3 -3
- data/sig/bucket_website.rbs +1 -1
- data/sig/client.rbs +85 -31
- data/sig/multipart_upload.rbs +8 -1
- data/sig/multipart_upload_part.rbs +5 -1
- data/sig/object.rbs +13 -5
- data/sig/object_acl.rbs +1 -1
- data/sig/object_summary.rbs +11 -6
- data/sig/object_version.rbs +5 -2
- data/sig/resource.rbs +4 -2
- data/sig/types.rbs +126 -34
- metadata +5 -5
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -66,7 +66,9 @@ module Aws::S3
|
|
66
66
|
# providing object expiration information. The value of the `rule-id` is
|
67
67
|
# URL-encoded.
|
68
68
|
#
|
69
|
-
# <note markdown="1">
|
69
|
+
# <note markdown="1"> Object expiration information is not returned in directory buckets and
|
70
|
+
# this header returns the value "`NotImplemented`" in all responses
|
71
|
+
# for directory buckets.
|
70
72
|
#
|
71
73
|
# </note>
|
72
74
|
#
|
@@ -132,14 +134,14 @@ module Aws::S3
|
|
132
134
|
data[:content_length]
|
133
135
|
end
|
134
136
|
|
135
|
-
# The
|
136
|
-
# only be present if
|
137
|
-
# API operation on an object that was uploaded
|
138
|
-
# this value may not be a direct checksum value
|
139
|
-
# Instead, it's a calculation based on the checksum
|
140
|
-
# individual part. For more information about how
|
141
|
-
# calculated with multipart uploads, see [ Checking object
|
142
|
-
# in the *Amazon S3 User Guide*.
|
137
|
+
# The Base64 encoded, 32-bit `CRC-32 checksum` of the object. This
|
138
|
+
# checksum is only be present if the checksum was uploaded with the
|
139
|
+
# object. When you use an API operation on an object that was uploaded
|
140
|
+
# using multipart uploads, this value may not be a direct checksum value
|
141
|
+
# of the full object. Instead, it's a calculation based on the checksum
|
142
|
+
# values of each individual part. For more information about how
|
143
|
+
# checksums are calculated with multipart uploads, see [ Checking object
|
144
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
143
145
|
#
|
144
146
|
#
|
145
147
|
#
|
@@ -149,14 +151,14 @@ module Aws::S3
|
|
149
151
|
data[:checksum_crc32]
|
150
152
|
end
|
151
153
|
|
152
|
-
# The
|
153
|
-
# only
|
154
|
-
# API operation on an object that was uploaded using
|
155
|
-
# this value may not be a direct checksum value of
|
156
|
-
# Instead, it's a calculation based on the checksum
|
157
|
-
# individual part. For more information about how
|
158
|
-
# calculated with multipart uploads, see [ Checking object
|
159
|
-
# in the *Amazon S3 User Guide*.
|
154
|
+
# The Base64 encoded, 32-bit `CRC-32C` checksum of the object. This
|
155
|
+
# checksum is only present if the checksum was uploaded with the object.
|
156
|
+
# When you use an API operation on an object that was uploaded using
|
157
|
+
# multipart uploads, this value may not be a direct checksum value of
|
158
|
+
# the full object. Instead, it's a calculation based on the checksum
|
159
|
+
# values of each individual part. For more information about how
|
160
|
+
# checksums are calculated with multipart uploads, see [ Checking object
|
161
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
160
162
|
#
|
161
163
|
#
|
162
164
|
#
|
@@ -166,14 +168,26 @@ module Aws::S3
|
|
166
168
|
data[:checksum_crc32c]
|
167
169
|
end
|
168
170
|
|
169
|
-
# The
|
170
|
-
#
|
171
|
-
#
|
172
|
-
#
|
173
|
-
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
#
|
171
|
+
# The Base64 encoded, 64-bit `CRC-64NVME` checksum of the object. For
|
172
|
+
# more information, see [Checking object integrity in the Amazon S3 User
|
173
|
+
# Guide][1].
|
174
|
+
#
|
175
|
+
#
|
176
|
+
#
|
177
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
178
|
+
# @return [String]
|
179
|
+
def checksum_crc64nvme
|
180
|
+
data[:checksum_crc64nvme]
|
181
|
+
end
|
182
|
+
|
183
|
+
# The Base64 encoded, 160-bit `SHA-1` digest of the object. This will
|
184
|
+
# only be present if the object was uploaded with the object. When you
|
185
|
+
# use the API operation on an object that was uploaded using multipart
|
186
|
+
# uploads, this value may not be a direct checksum value of the full
|
187
|
+
# object. Instead, it's a calculation based on the checksum values of
|
188
|
+
# each individual part. For more information about how checksums are
|
189
|
+
# calculated with multipart uploads, see [ Checking object integrity][1]
|
190
|
+
# in the *Amazon S3 User Guide*.
|
177
191
|
#
|
178
192
|
#
|
179
193
|
#
|
@@ -183,12 +197,12 @@ module Aws::S3
|
|
183
197
|
data[:checksum_sha1]
|
184
198
|
end
|
185
199
|
|
186
|
-
# The
|
187
|
-
# only be present if
|
188
|
-
# API operation on an object that was uploaded using multipart
|
189
|
-
# this value may not be a direct checksum value of the full
|
190
|
-
# Instead, it's a calculation based on the checksum values of
|
191
|
-
# individual part. For more information about how checksums are
|
200
|
+
# The Base64 encoded, 256-bit `SHA-256` digest of the object. This will
|
201
|
+
# only be present if the object was uploaded with the object. When you
|
202
|
+
# use an API operation on an object that was uploaded using multipart
|
203
|
+
# uploads, this value may not be a direct checksum value of the full
|
204
|
+
# object. Instead, it's a calculation based on the checksum values of
|
205
|
+
# each individual part. For more information about how checksums are
|
192
206
|
# calculated with multipart uploads, see [ Checking object integrity][1]
|
193
207
|
# in the *Amazon S3 User Guide*.
|
194
208
|
#
|
@@ -200,6 +214,21 @@ module Aws::S3
|
|
200
214
|
data[:checksum_sha256]
|
201
215
|
end
|
202
216
|
|
217
|
+
# The checksum type, which determines how part-level checksums are
|
218
|
+
# combined to create an object-level checksum for multipart objects. You
|
219
|
+
# can use this header response to verify that the checksum type that is
|
220
|
+
# received is the same checksum type that was specified in
|
221
|
+
# `CreateMultipartUpload` request. For more information, see [Checking
|
222
|
+
# object integrity in the Amazon S3 User Guide][1].
|
223
|
+
#
|
224
|
+
#
|
225
|
+
#
|
226
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
227
|
+
# @return [String]
|
228
|
+
def checksum_type
|
229
|
+
data[:checksum_type]
|
230
|
+
end
|
231
|
+
|
203
232
|
# An entity tag (ETag) is an opaque identifier assigned by a web server
|
204
233
|
# to a specific version of a resource found at a URL.
|
205
234
|
# @return [String]
|
@@ -674,7 +703,7 @@ module Aws::S3
|
|
674
703
|
# object.copy_from({
|
675
704
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
|
676
705
|
# cache_control: "CacheControl",
|
677
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
706
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
678
707
|
# content_disposition: "ContentDisposition",
|
679
708
|
# content_encoding: "ContentEncoding",
|
680
709
|
# content_language: "ContentLanguage",
|
@@ -1808,7 +1837,8 @@ module Aws::S3
|
|
1808
1837
|
# object_lock_retain_until_date: Time.now,
|
1809
1838
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
1810
1839
|
# expected_bucket_owner: "AccountId",
|
1811
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
1840
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
1841
|
+
# checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
|
1812
1842
|
# })
|
1813
1843
|
# @param [Hash] options ({})
|
1814
1844
|
# @option options [String] :acl
|
@@ -2244,7 +2274,7 @@ module Aws::S3
|
|
2244
2274
|
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
2245
2275
|
# @option options [String] :ssekms_encryption_context
|
2246
2276
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
2247
|
-
# object encryption. The value of this header is a Base64
|
2277
|
+
# object encryption. The value of this header is a Base64 encoded string
|
2248
2278
|
# of a UTF-8 encoded JSON, which contains the encryption context as
|
2249
2279
|
# key-value pairs.
|
2250
2280
|
#
|
@@ -2333,6 +2363,14 @@ module Aws::S3
|
|
2333
2363
|
#
|
2334
2364
|
#
|
2335
2365
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2366
|
+
# @option options [String] :checksum_type
|
2367
|
+
# Indicates the checksum type that you want Amazon S3 to use to
|
2368
|
+
# calculate the object’s checksum value. For more information, see
|
2369
|
+
# [Checking object integrity in the Amazon S3 User Guide][1].
|
2370
|
+
#
|
2371
|
+
#
|
2372
|
+
#
|
2373
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2336
2374
|
# @return [MultipartUpload]
|
2337
2375
|
def initiate_multipart_upload(options = {})
|
2338
2376
|
options = options.merge(
|
@@ -2362,9 +2400,10 @@ module Aws::S3
|
|
2362
2400
|
# content_length: 1,
|
2363
2401
|
# content_md5: "ContentMD5",
|
2364
2402
|
# content_type: "ContentType",
|
2365
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
2403
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
2366
2404
|
# checksum_crc32: "ChecksumCRC32",
|
2367
2405
|
# checksum_crc32c: "ChecksumCRC32C",
|
2406
|
+
# checksum_crc64nvme: "ChecksumCRC64NVME",
|
2368
2407
|
# checksum_sha1: "ChecksumSHA1",
|
2369
2408
|
# checksum_sha256: "ChecksumSHA256",
|
2370
2409
|
# expires: Time.now,
|
@@ -2470,7 +2509,7 @@ module Aws::S3
|
|
2470
2509
|
#
|
2471
2510
|
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
2472
2511
|
# @option options [String] :content_md5
|
2473
|
-
# The
|
2512
|
+
# The Base64 encoded 128-bit `MD5` digest of the message (without the
|
2474
2513
|
# headers) according to RFC 1864. This header can be used as a message
|
2475
2514
|
# integrity check to verify that the data is the same data that was
|
2476
2515
|
# originally sent. Although it is optional, we recommend using the
|
@@ -2513,22 +2552,23 @@ module Aws::S3
|
|
2513
2552
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
2514
2553
|
# the supported algorithm from the following list:
|
2515
2554
|
#
|
2516
|
-
# * `
|
2555
|
+
# * `CRC-32`
|
2556
|
+
#
|
2557
|
+
# * `CRC-32C`
|
2517
2558
|
#
|
2518
|
-
# * `
|
2559
|
+
# * `CRC-64NVME`
|
2519
2560
|
#
|
2520
|
-
# * `
|
2561
|
+
# * `SHA-1`
|
2521
2562
|
#
|
2522
|
-
# * `
|
2563
|
+
# * `SHA-256`
|
2523
2564
|
#
|
2524
2565
|
# For more information, see [Checking object integrity][1] in the
|
2525
2566
|
# *Amazon S3 User Guide*.
|
2526
2567
|
#
|
2527
2568
|
# If the individual checksum value you provide through
|
2528
2569
|
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
2529
|
-
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3
|
2530
|
-
#
|
2531
|
-
# that matches the provided value in `x-amz-checksum-algorithm `.
|
2570
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
2571
|
+
# request with a `BadDigest` error.
|
2532
2572
|
#
|
2533
2573
|
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
2534
2574
|
# for any request to upload an object with a retention period configured
|
@@ -2548,7 +2588,7 @@ module Aws::S3
|
|
2548
2588
|
# @option options [String] :checksum_crc32
|
2549
2589
|
# This header can be used as a data integrity check to verify that the
|
2550
2590
|
# data received is the same data that was originally sent. This header
|
2551
|
-
# specifies the
|
2591
|
+
# specifies the Base64 encoded, 32-bit `CRC-32` checksum of the object.
|
2552
2592
|
# For more information, see [Checking object integrity][1] in the
|
2553
2593
|
# *Amazon S3 User Guide*.
|
2554
2594
|
#
|
@@ -2558,19 +2598,30 @@ module Aws::S3
|
|
2558
2598
|
# @option options [String] :checksum_crc32c
|
2559
2599
|
# This header can be used as a data integrity check to verify that the
|
2560
2600
|
# data received is the same data that was originally sent. This header
|
2561
|
-
# specifies the
|
2601
|
+
# specifies the Base64 encoded, 32-bit `CRC-32C` checksum of the object.
|
2562
2602
|
# For more information, see [Checking object integrity][1] in the
|
2563
2603
|
# *Amazon S3 User Guide*.
|
2564
2604
|
#
|
2565
2605
|
#
|
2566
2606
|
#
|
2567
2607
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2608
|
+
# @option options [String] :checksum_crc64nvme
|
2609
|
+
# This header can be used as a data integrity check to verify that the
|
2610
|
+
# data received is the same data that was originally sent. This header
|
2611
|
+
# specifies the Base64 encoded, 64-bit `CRC-64NVME` checksum of the
|
2612
|
+
# object. The `CRC-64NVME` checksum is always a full object checksum.
|
2613
|
+
# For more information, see [Checking object integrity in the Amazon S3
|
2614
|
+
# User Guide][1].
|
2615
|
+
#
|
2616
|
+
#
|
2617
|
+
#
|
2618
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2568
2619
|
# @option options [String] :checksum_sha1
|
2569
2620
|
# This header can be used as a data integrity check to verify that the
|
2570
2621
|
# data received is the same data that was originally sent. This header
|
2571
|
-
# specifies the
|
2572
|
-
# more information, see [Checking object integrity][1] in the
|
2573
|
-
# User Guide*.
|
2622
|
+
# specifies the Base64 encoded, 160-bit `SHA-1` digest of the object.
|
2623
|
+
# For more information, see [Checking object integrity][1] in the
|
2624
|
+
# *Amazon S3 User Guide*.
|
2574
2625
|
#
|
2575
2626
|
#
|
2576
2627
|
#
|
@@ -2578,7 +2629,7 @@ module Aws::S3
|
|
2578
2629
|
# @option options [String] :checksum_sha256
|
2579
2630
|
# This header can be used as a data integrity check to verify that the
|
2580
2631
|
# data received is the same data that was originally sent. This header
|
2581
|
-
# specifies the
|
2632
|
+
# specifies the Base64 encoded, 256-bit `SHA-256` digest of the object.
|
2582
2633
|
# For more information, see [Checking object integrity][1] in the
|
2583
2634
|
# *Amazon S3 User Guide*.
|
2584
2635
|
#
|
@@ -2847,7 +2898,7 @@ module Aws::S3
|
|
2847
2898
|
# @option options [String] :ssekms_encryption_context
|
2848
2899
|
# Specifies the Amazon Web Services KMS Encryption Context as an
|
2849
2900
|
# additional encryption context to use for object encryption. The value
|
2850
|
-
# of this header is a Base64
|
2901
|
+
# of this header is a Base64 encoded string of a UTF-8 encoded JSON,
|
2851
2902
|
# which contains the encryption context as key-value pairs. This value
|
2852
2903
|
# is stored as object metadata and automatically gets passed on to
|
2853
2904
|
# Amazon Web Services KMS for future `GetObject` operations on this
|
@@ -3042,7 +3093,7 @@ module Aws::S3
|
|
3042
3093
|
# },
|
3043
3094
|
# },
|
3044
3095
|
# request_payer: "requester", # accepts requester
|
3045
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
3096
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
3046
3097
|
# expected_bucket_owner: "AccountId",
|
3047
3098
|
# })
|
3048
3099
|
# @param [Hash] options ({})
|
@@ -3409,7 +3460,7 @@ module Aws::S3
|
|
3409
3460
|
# request_payer: "requester", # accepts requester
|
3410
3461
|
# bypass_governance_retention: false,
|
3411
3462
|
# expected_bucket_owner: "AccountId",
|
3412
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
3463
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
3413
3464
|
# })
|
3414
3465
|
# @param options ({})
|
3415
3466
|
# @option options [String] :mfa
|
@@ -3473,22 +3524,23 @@ module Aws::S3
|
|
3473
3524
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
3474
3525
|
# the supported algorithm from the following list:
|
3475
3526
|
#
|
3476
|
-
# * `
|
3527
|
+
# * `CRC-32`
|
3528
|
+
#
|
3529
|
+
# * `CRC-32C`
|
3477
3530
|
#
|
3478
|
-
# * `
|
3531
|
+
# * `CRC-64NVME`
|
3479
3532
|
#
|
3480
|
-
# * `
|
3533
|
+
# * `SHA-1`
|
3481
3534
|
#
|
3482
|
-
# * `
|
3535
|
+
# * `SHA-256`
|
3483
3536
|
#
|
3484
3537
|
# For more information, see [Checking object integrity][1] in the
|
3485
3538
|
# *Amazon S3 User Guide*.
|
3486
3539
|
#
|
3487
3540
|
# If the individual checksum value you provide through
|
3488
3541
|
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
3489
|
-
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3
|
3490
|
-
#
|
3491
|
-
# that matches the provided value in `x-amz-checksum-algorithm `.
|
3542
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
3543
|
+
# request with a `BadDigest` error.
|
3492
3544
|
#
|
3493
3545
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
3494
3546
|
# `ChecksumAlgorithm` parameter.
|
@@ -229,7 +229,7 @@ module Aws::S3
|
|
229
229
|
# },
|
230
230
|
# },
|
231
231
|
# content_md5: "ContentMD5",
|
232
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
232
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
233
233
|
# grant_full_control: "GrantFullControl",
|
234
234
|
# grant_read: "GrantRead",
|
235
235
|
# grant_read_acp: "GrantReadACP",
|
@@ -251,9 +251,9 @@ module Aws::S3
|
|
251
251
|
# Contains the elements that set the ACL permissions for an object per
|
252
252
|
# grantee.
|
253
253
|
# @option options [String] :content_md5
|
254
|
-
# The
|
255
|
-
# used as a message integrity check to verify that the request body
|
256
|
-
# not corrupted in transit. For more information, go to [RFC
|
254
|
+
# The Base64 encoded 128-bit `MD5` digest of the data. This header must
|
255
|
+
# be used as a message integrity check to verify that the request body
|
256
|
+
# was not corrupted in transit. For more information, go to [RFC
|
257
257
|
# 1864.>][1]
|
258
258
|
#
|
259
259
|
# For requests made using the Amazon Web Services Command Line Interface
|
@@ -84,6 +84,18 @@ module Aws::S3
|
|
84
84
|
data[:checksum_algorithm]
|
85
85
|
end
|
86
86
|
|
87
|
+
# The checksum type that is used to calculate the object’s checksum
|
88
|
+
# value. For more information, see [Checking object integrity][1] in the
|
89
|
+
# *Amazon S3 User Guide*.
|
90
|
+
#
|
91
|
+
#
|
92
|
+
#
|
93
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
94
|
+
# @return [String]
|
95
|
+
def checksum_type
|
96
|
+
data[:checksum_type]
|
97
|
+
end
|
98
|
+
|
87
99
|
# Size in bytes of the object
|
88
100
|
# @return [Integer]
|
89
101
|
def size
|
@@ -324,7 +336,7 @@ module Aws::S3
|
|
324
336
|
# object_summary.copy_from({
|
325
337
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
|
326
338
|
# cache_control: "CacheControl",
|
327
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
339
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
328
340
|
# content_disposition: "ContentDisposition",
|
329
341
|
# content_encoding: "ContentEncoding",
|
330
342
|
# content_language: "ContentLanguage",
|
@@ -1458,7 +1470,8 @@ module Aws::S3
|
|
1458
1470
|
# object_lock_retain_until_date: Time.now,
|
1459
1471
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
1460
1472
|
# expected_bucket_owner: "AccountId",
|
1461
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
1473
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
1474
|
+
# checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
|
1462
1475
|
# })
|
1463
1476
|
# @param [Hash] options ({})
|
1464
1477
|
# @option options [String] :acl
|
@@ -1894,7 +1907,7 @@ module Aws::S3
|
|
1894
1907
|
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
1895
1908
|
# @option options [String] :ssekms_encryption_context
|
1896
1909
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
1897
|
-
# object encryption. The value of this header is a Base64
|
1910
|
+
# object encryption. The value of this header is a Base64 encoded string
|
1898
1911
|
# of a UTF-8 encoded JSON, which contains the encryption context as
|
1899
1912
|
# key-value pairs.
|
1900
1913
|
#
|
@@ -1983,6 +1996,14 @@ module Aws::S3
|
|
1983
1996
|
#
|
1984
1997
|
#
|
1985
1998
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
1999
|
+
# @option options [String] :checksum_type
|
2000
|
+
# Indicates the checksum type that you want Amazon S3 to use to
|
2001
|
+
# calculate the object’s checksum value. For more information, see
|
2002
|
+
# [Checking object integrity in the Amazon S3 User Guide][1].
|
2003
|
+
#
|
2004
|
+
#
|
2005
|
+
#
|
2006
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
1986
2007
|
# @return [MultipartUpload]
|
1987
2008
|
def initiate_multipart_upload(options = {})
|
1988
2009
|
options = options.merge(
|
@@ -2012,9 +2033,10 @@ module Aws::S3
|
|
2012
2033
|
# content_length: 1,
|
2013
2034
|
# content_md5: "ContentMD5",
|
2014
2035
|
# content_type: "ContentType",
|
2015
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
2036
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
2016
2037
|
# checksum_crc32: "ChecksumCRC32",
|
2017
2038
|
# checksum_crc32c: "ChecksumCRC32C",
|
2039
|
+
# checksum_crc64nvme: "ChecksumCRC64NVME",
|
2018
2040
|
# checksum_sha1: "ChecksumSHA1",
|
2019
2041
|
# checksum_sha256: "ChecksumSHA256",
|
2020
2042
|
# expires: Time.now,
|
@@ -2120,7 +2142,7 @@ module Aws::S3
|
|
2120
2142
|
#
|
2121
2143
|
# [1]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
|
2122
2144
|
# @option options [String] :content_md5
|
2123
|
-
# The
|
2145
|
+
# The Base64 encoded 128-bit `MD5` digest of the message (without the
|
2124
2146
|
# headers) according to RFC 1864. This header can be used as a message
|
2125
2147
|
# integrity check to verify that the data is the same data that was
|
2126
2148
|
# originally sent. Although it is optional, we recommend using the
|
@@ -2163,22 +2185,23 @@ module Aws::S3
|
|
2163
2185
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
2164
2186
|
# the supported algorithm from the following list:
|
2165
2187
|
#
|
2166
|
-
# * `
|
2188
|
+
# * `CRC-32`
|
2167
2189
|
#
|
2168
|
-
# * `
|
2190
|
+
# * `CRC-32C`
|
2169
2191
|
#
|
2170
|
-
# * `
|
2192
|
+
# * `CRC-64NVME`
|
2171
2193
|
#
|
2172
|
-
# * `
|
2194
|
+
# * `SHA-1`
|
2195
|
+
#
|
2196
|
+
# * `SHA-256`
|
2173
2197
|
#
|
2174
2198
|
# For more information, see [Checking object integrity][1] in the
|
2175
2199
|
# *Amazon S3 User Guide*.
|
2176
2200
|
#
|
2177
2201
|
# If the individual checksum value you provide through
|
2178
2202
|
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
2179
|
-
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3
|
2180
|
-
#
|
2181
|
-
# that matches the provided value in `x-amz-checksum-algorithm `.
|
2203
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
2204
|
+
# request with a `BadDigest` error.
|
2182
2205
|
#
|
2183
2206
|
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
2184
2207
|
# for any request to upload an object with a retention period configured
|
@@ -2198,7 +2221,7 @@ module Aws::S3
|
|
2198
2221
|
# @option options [String] :checksum_crc32
|
2199
2222
|
# This header can be used as a data integrity check to verify that the
|
2200
2223
|
# data received is the same data that was originally sent. This header
|
2201
|
-
# specifies the
|
2224
|
+
# specifies the Base64 encoded, 32-bit `CRC-32` checksum of the object.
|
2202
2225
|
# For more information, see [Checking object integrity][1] in the
|
2203
2226
|
# *Amazon S3 User Guide*.
|
2204
2227
|
#
|
@@ -2208,19 +2231,30 @@ module Aws::S3
|
|
2208
2231
|
# @option options [String] :checksum_crc32c
|
2209
2232
|
# This header can be used as a data integrity check to verify that the
|
2210
2233
|
# data received is the same data that was originally sent. This header
|
2211
|
-
# specifies the
|
2234
|
+
# specifies the Base64 encoded, 32-bit `CRC-32C` checksum of the object.
|
2212
2235
|
# For more information, see [Checking object integrity][1] in the
|
2213
2236
|
# *Amazon S3 User Guide*.
|
2214
2237
|
#
|
2215
2238
|
#
|
2216
2239
|
#
|
2217
2240
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2241
|
+
# @option options [String] :checksum_crc64nvme
|
2242
|
+
# This header can be used as a data integrity check to verify that the
|
2243
|
+
# data received is the same data that was originally sent. This header
|
2244
|
+
# specifies the Base64 encoded, 64-bit `CRC-64NVME` checksum of the
|
2245
|
+
# object. The `CRC-64NVME` checksum is always a full object checksum.
|
2246
|
+
# For more information, see [Checking object integrity in the Amazon S3
|
2247
|
+
# User Guide][1].
|
2248
|
+
#
|
2249
|
+
#
|
2250
|
+
#
|
2251
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2218
2252
|
# @option options [String] :checksum_sha1
|
2219
2253
|
# This header can be used as a data integrity check to verify that the
|
2220
2254
|
# data received is the same data that was originally sent. This header
|
2221
|
-
# specifies the
|
2222
|
-
# more information, see [Checking object integrity][1] in the
|
2223
|
-
# User Guide*.
|
2255
|
+
# specifies the Base64 encoded, 160-bit `SHA-1` digest of the object.
|
2256
|
+
# For more information, see [Checking object integrity][1] in the
|
2257
|
+
# *Amazon S3 User Guide*.
|
2224
2258
|
#
|
2225
2259
|
#
|
2226
2260
|
#
|
@@ -2228,7 +2262,7 @@ module Aws::S3
|
|
2228
2262
|
# @option options [String] :checksum_sha256
|
2229
2263
|
# This header can be used as a data integrity check to verify that the
|
2230
2264
|
# data received is the same data that was originally sent. This header
|
2231
|
-
# specifies the
|
2265
|
+
# specifies the Base64 encoded, 256-bit `SHA-256` digest of the object.
|
2232
2266
|
# For more information, see [Checking object integrity][1] in the
|
2233
2267
|
# *Amazon S3 User Guide*.
|
2234
2268
|
#
|
@@ -2497,7 +2531,7 @@ module Aws::S3
|
|
2497
2531
|
# @option options [String] :ssekms_encryption_context
|
2498
2532
|
# Specifies the Amazon Web Services KMS Encryption Context as an
|
2499
2533
|
# additional encryption context to use for object encryption. The value
|
2500
|
-
# of this header is a Base64
|
2534
|
+
# of this header is a Base64 encoded string of a UTF-8 encoded JSON,
|
2501
2535
|
# which contains the encryption context as key-value pairs. This value
|
2502
2536
|
# is stored as object metadata and automatically gets passed on to
|
2503
2537
|
# Amazon Web Services KMS for future `GetObject` operations on this
|
@@ -2692,7 +2726,7 @@ module Aws::S3
|
|
2692
2726
|
# },
|
2693
2727
|
# },
|
2694
2728
|
# request_payer: "requester", # accepts requester
|
2695
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
2729
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
2696
2730
|
# expected_bucket_owner: "AccountId",
|
2697
2731
|
# })
|
2698
2732
|
# @param [Hash] options ({})
|
@@ -2869,7 +2903,7 @@ module Aws::S3
|
|
2869
2903
|
# request_payer: "requester", # accepts requester
|
2870
2904
|
# bypass_governance_retention: false,
|
2871
2905
|
# expected_bucket_owner: "AccountId",
|
2872
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
2906
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
2873
2907
|
# })
|
2874
2908
|
# @param options ({})
|
2875
2909
|
# @option options [String] :mfa
|
@@ -2933,22 +2967,23 @@ module Aws::S3
|
|
2933
2967
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
2934
2968
|
# the supported algorithm from the following list:
|
2935
2969
|
#
|
2936
|
-
# * `
|
2970
|
+
# * `CRC-32`
|
2971
|
+
#
|
2972
|
+
# * `CRC-32C`
|
2937
2973
|
#
|
2938
|
-
# * `
|
2974
|
+
# * `CRC-64NVME`
|
2939
2975
|
#
|
2940
|
-
# * `
|
2976
|
+
# * `SHA-1`
|
2941
2977
|
#
|
2942
|
-
# * `
|
2978
|
+
# * `SHA-256`
|
2943
2979
|
#
|
2944
2980
|
# For more information, see [Checking object integrity][1] in the
|
2945
2981
|
# *Amazon S3 User Guide*.
|
2946
2982
|
#
|
2947
2983
|
# If the individual checksum value you provide through
|
2948
2984
|
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
2949
|
-
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3
|
2950
|
-
#
|
2951
|
-
# that matches the provided value in `x-amz-checksum-algorithm `.
|
2985
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
2986
|
+
# request with a `BadDigest` error.
|
2952
2987
|
#
|
2953
2988
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
2954
2989
|
# `ChecksumAlgorithm` parameter.
|
@@ -62,6 +62,18 @@ module Aws::S3
|
|
62
62
|
data[:checksum_algorithm]
|
63
63
|
end
|
64
64
|
|
65
|
+
# The checksum type that is used to calculate the object’s checksum
|
66
|
+
# value. For more information, see [Checking object integrity][1] in the
|
67
|
+
# *Amazon S3 User Guide*.
|
68
|
+
#
|
69
|
+
#
|
70
|
+
#
|
71
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
72
|
+
# @return [String]
|
73
|
+
def checksum_type
|
74
|
+
data[:checksum_type]
|
75
|
+
end
|
76
|
+
|
65
77
|
# Size in bytes of the object.
|
66
78
|
# @return [Integer]
|
67
79
|
def size
|
@@ -848,7 +860,7 @@ module Aws::S3
|
|
848
860
|
# request_payer: "requester", # accepts requester
|
849
861
|
# bypass_governance_retention: false,
|
850
862
|
# expected_bucket_owner: "AccountId",
|
851
|
-
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
863
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
852
864
|
# })
|
853
865
|
# @param options ({})
|
854
866
|
# @option options [String] :mfa
|
@@ -912,22 +924,23 @@ module Aws::S3
|
|
912
924
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
913
925
|
# the supported algorithm from the following list:
|
914
926
|
#
|
915
|
-
# * `
|
927
|
+
# * `CRC-32`
|
928
|
+
#
|
929
|
+
# * `CRC-32C`
|
916
930
|
#
|
917
|
-
# * `
|
931
|
+
# * `CRC-64NVME`
|
918
932
|
#
|
919
|
-
# * `
|
933
|
+
# * `SHA-1`
|
920
934
|
#
|
921
|
-
# * `
|
935
|
+
# * `SHA-256`
|
922
936
|
#
|
923
937
|
# For more information, see [Checking object integrity][1] in the
|
924
938
|
# *Amazon S3 User Guide*.
|
925
939
|
#
|
926
940
|
# If the individual checksum value you provide through
|
927
941
|
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
928
|
-
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3
|
929
|
-
#
|
930
|
-
# that matches the provided value in `x-amz-checksum-algorithm `.
|
942
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
|
943
|
+
# request with a `BadDigest` error.
|
931
944
|
#
|
932
945
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
933
946
|
# `ChecksumAlgorithm` parameter.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module S3
|
5
|
+
module Plugins
|
6
|
+
# @api private
|
7
|
+
class ChecksumAlgorithm < Seahorse::Client::Plugin
|
8
|
+
|
9
|
+
# S3 GetObject results for whole Multipart Objects contain a checksum
|
10
|
+
# that cannot be validated. These should be skipped by the
|
11
|
+
# ChecksumAlgorithm plugin.
|
12
|
+
class SkipWholeMultipartGetChecksumsHandler < Seahorse::Client::Handler
|
13
|
+
def call(context)
|
14
|
+
context[:http_checksum] ||= {}
|
15
|
+
context[:http_checksum][:skip_on_suffix] = true
|
16
|
+
|
17
|
+
@handler.call(context)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def add_handlers(handlers, _config)
|
22
|
+
handlers.add(
|
23
|
+
SkipWholeMultipartGetChecksumsHandler,
|
24
|
+
step: :initialize,
|
25
|
+
operations: [:get_object]
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|