aws-sdk-s3 1.156.0 → 1.190.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 +193 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +12 -3
- data/lib/aws-sdk-s3/bucket.rb +304 -94
- data/lib/aws-sdk-s3/bucket_acl.rb +6 -5
- data/lib/aws-sdk-s3/bucket_cors.rb +6 -5
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +7 -2
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +60 -3
- data/lib/aws-sdk-s3/bucket_logging.rb +2 -2
- data/lib/aws-sdk-s3/bucket_policy.rb +10 -9
- data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +3 -3
- data/lib/aws-sdk-s3/bucket_versioning.rb +9 -9
- data/lib/aws-sdk-s3/bucket_website.rb +3 -3
- data/lib/aws-sdk-s3/client.rb +4081 -1812
- data/lib/aws-sdk-s3/client_api.rb +404 -162
- data/lib/aws-sdk-s3/customizations/object.rb +6 -0
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations.rb +24 -38
- data/lib/aws-sdk-s3/endpoint_parameters.rb +13 -18
- data/lib/aws-sdk-s3/endpoint_provider.rb +400 -276
- data/lib/aws-sdk-s3/endpoints.rb +465 -1706
- data/lib/aws-sdk-s3/errors.rb +58 -0
- data/lib/aws-sdk-s3/file_downloader.rb +14 -31
- data/lib/aws-sdk-s3/legacy_signer.rb +2 -1
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +31 -13
- data/lib/aws-sdk-s3/multipart_upload.rb +108 -8
- data/lib/aws-sdk-s3/multipart_upload_part.rb +52 -36
- data/lib/aws-sdk-s3/object.rb +614 -203
- data/lib/aws-sdk-s3/object_acl.rb +11 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -1
- data/lib/aws-sdk-s3/object_summary.rb +518 -151
- data/lib/aws-sdk-s3/object_version.rb +81 -12
- data/lib/aws-sdk-s3/plugins/access_grants.rb +68 -4
- data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
- data/lib/aws-sdk-s3/plugins/endpoints.rb +24 -212
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +11 -20
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +3 -3
- data/lib/aws-sdk-s3/plugins/md5s.rb +10 -71
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +5 -7
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
- data/lib/aws-sdk-s3/presigner.rb +5 -5
- data/lib/aws-sdk-s3/resource.rb +45 -18
- data/lib/aws-sdk-s3/types.rb +3462 -1337
- data/lib/aws-sdk-s3.rb +35 -31
- data/sig/bucket.rbs +16 -6
- 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 +8 -4
- 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 +162 -45
- data/sig/errors.rbs +10 -0
- data/sig/multipart_upload.rbs +12 -2
- data/sig/multipart_upload_part.rbs +5 -1
- data/sig/object.rbs +26 -6
- data/sig/object_acl.rbs +1 -1
- data/sig/object_summary.rbs +18 -7
- data/sig/object_version.rbs +9 -3
- data/sig/resource.rbs +11 -4
- data/sig/types.rbs +210 -38
- metadata +8 -10
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
data/lib/aws-sdk-s3/errors.rb
CHANGED
@@ -29,12 +29,17 @@ module Aws::S3
|
|
29
29
|
# ## Error Classes
|
30
30
|
# * {BucketAlreadyExists}
|
31
31
|
# * {BucketAlreadyOwnedByYou}
|
32
|
+
# * {EncryptionTypeMismatch}
|
33
|
+
# * {IdempotencyParameterMismatch}
|
32
34
|
# * {InvalidObjectState}
|
35
|
+
# * {InvalidRequest}
|
36
|
+
# * {InvalidWriteOffset}
|
33
37
|
# * {NoSuchBucket}
|
34
38
|
# * {NoSuchKey}
|
35
39
|
# * {NoSuchUpload}
|
36
40
|
# * {ObjectAlreadyInActiveTierError}
|
37
41
|
# * {ObjectNotInActiveTierError}
|
42
|
+
# * {TooManyParts}
|
38
43
|
#
|
39
44
|
# Additionally, error classes are dynamically generated for service errors based on the error code
|
40
45
|
# if they are not defined above.
|
@@ -62,6 +67,26 @@ module Aws::S3
|
|
62
67
|
end
|
63
68
|
end
|
64
69
|
|
70
|
+
class EncryptionTypeMismatch < ServiceError
|
71
|
+
|
72
|
+
# @param [Seahorse::Client::RequestContext] context
|
73
|
+
# @param [String] message
|
74
|
+
# @param [Aws::S3::Types::EncryptionTypeMismatch] data
|
75
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
76
|
+
super(context, message, data)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
class IdempotencyParameterMismatch < ServiceError
|
81
|
+
|
82
|
+
# @param [Seahorse::Client::RequestContext] context
|
83
|
+
# @param [String] message
|
84
|
+
# @param [Aws::S3::Types::IdempotencyParameterMismatch] data
|
85
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
86
|
+
super(context, message, data)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
65
90
|
class InvalidObjectState < ServiceError
|
66
91
|
|
67
92
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -82,6 +107,26 @@ module Aws::S3
|
|
82
107
|
end
|
83
108
|
end
|
84
109
|
|
110
|
+
class InvalidRequest < ServiceError
|
111
|
+
|
112
|
+
# @param [Seahorse::Client::RequestContext] context
|
113
|
+
# @param [String] message
|
114
|
+
# @param [Aws::S3::Types::InvalidRequest] data
|
115
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
116
|
+
super(context, message, data)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
class InvalidWriteOffset < ServiceError
|
121
|
+
|
122
|
+
# @param [Seahorse::Client::RequestContext] context
|
123
|
+
# @param [String] message
|
124
|
+
# @param [Aws::S3::Types::InvalidWriteOffset] data
|
125
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
126
|
+
super(context, message, data)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
85
130
|
class NoSuchBucket < ServiceError
|
86
131
|
|
87
132
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -132,5 +177,18 @@ module Aws::S3
|
|
132
177
|
end
|
133
178
|
end
|
134
179
|
|
180
|
+
class TooManyParts < ServiceError
|
181
|
+
|
182
|
+
# @param [Seahorse::Client::RequestContext] context
|
183
|
+
# @param [String] message
|
184
|
+
# @param [Aws::S3::Types::TooManyParts] data
|
185
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
186
|
+
super(context, message, data)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
135
190
|
end
|
136
191
|
end
|
192
|
+
|
193
|
+
# Load customizations if they exist
|
194
|
+
require 'aws-sdk-s3/customizations/errors'
|
@@ -28,18 +28,10 @@ module Aws
|
|
28
28
|
@chunk_size = options[:chunk_size]
|
29
29
|
@params = {
|
30
30
|
bucket: options[:bucket],
|
31
|
-
key: options[:key]
|
31
|
+
key: options[:key]
|
32
32
|
}
|
33
33
|
@params[:version_id] = options[:version_id] if options[:version_id]
|
34
|
-
|
35
|
-
# checksum_mode only supports the value "ENABLED"
|
36
|
-
# falsey values (false/nil) or "DISABLED" should be considered
|
37
|
-
# disabled and the api parameter should be unset.
|
38
|
-
if (checksum_mode = options.fetch(:checksum_mode, 'ENABLED'))
|
39
|
-
@params[:checksum_mode] = checksum_mode unless checksum_mode.upcase == 'DISABLED'
|
40
|
-
end
|
41
34
|
@on_checksum_validated = options[:on_checksum_validated]
|
42
|
-
|
43
35
|
@progress_callback = options[:progress_callback]
|
44
36
|
|
45
37
|
validate!
|
@@ -51,7 +43,7 @@ module Aws
|
|
51
43
|
when 'get_range'
|
52
44
|
if @chunk_size
|
53
45
|
resp = @client.head_object(@params)
|
54
|
-
multithreaded_get_by_ranges(resp.content_length)
|
46
|
+
multithreaded_get_by_ranges(resp.content_length, resp.etag)
|
55
47
|
else
|
56
48
|
msg = 'In :get_range mode, :chunk_size must be provided'
|
57
49
|
raise ArgumentError, msg
|
@@ -67,11 +59,6 @@ module Aws
|
|
67
59
|
private
|
68
60
|
|
69
61
|
def validate!
|
70
|
-
if @on_checksum_validated && @params[:checksum_mode] != 'ENABLED'
|
71
|
-
raise ArgumentError, "You must set checksum_mode: 'ENABLED' " +
|
72
|
-
"when providing a on_checksum_validated callback"
|
73
|
-
end
|
74
|
-
|
75
62
|
if @on_checksum_validated && !@on_checksum_validated.respond_to?(:call)
|
76
63
|
raise ArgumentError, 'on_checksum_validated must be callable'
|
77
64
|
end
|
@@ -84,7 +71,7 @@ module Aws
|
|
84
71
|
if resp.content_length <= MIN_CHUNK_SIZE
|
85
72
|
single_request
|
86
73
|
else
|
87
|
-
multithreaded_get_by_ranges(resp.content_length)
|
74
|
+
multithreaded_get_by_ranges(resp.content_length, resp.etag)
|
88
75
|
end
|
89
76
|
else
|
90
77
|
# partNumber is an option
|
@@ -92,18 +79,18 @@ module Aws
|
|
92
79
|
if resp.content_length <= MIN_CHUNK_SIZE
|
93
80
|
single_request
|
94
81
|
else
|
95
|
-
compute_mode(resp.content_length, count)
|
82
|
+
compute_mode(resp.content_length, count, resp.etag)
|
96
83
|
end
|
97
84
|
end
|
98
85
|
end
|
99
86
|
|
100
|
-
def compute_mode(file_size, count)
|
87
|
+
def compute_mode(file_size, count, etag)
|
101
88
|
chunk_size = compute_chunk(file_size)
|
102
89
|
part_size = (file_size.to_f / count.to_f).ceil
|
103
90
|
if chunk_size < part_size
|
104
|
-
multithreaded_get_by_ranges(file_size)
|
91
|
+
multithreaded_get_by_ranges(file_size, etag)
|
105
92
|
else
|
106
|
-
multithreaded_get_by_parts(count, file_size)
|
93
|
+
multithreaded_get_by_parts(count, file_size, etag)
|
107
94
|
end
|
108
95
|
end
|
109
96
|
|
@@ -135,7 +122,7 @@ module Aws
|
|
135
122
|
chunks.each_slice(@thread_count).to_a
|
136
123
|
end
|
137
124
|
|
138
|
-
def multithreaded_get_by_ranges(file_size)
|
125
|
+
def multithreaded_get_by_ranges(file_size, etag)
|
139
126
|
offset = 0
|
140
127
|
default_chunk_size = compute_chunk(file_size)
|
141
128
|
chunks = []
|
@@ -147,7 +134,7 @@ module Aws
|
|
147
134
|
chunks << Part.new(
|
148
135
|
part_number: part_number,
|
149
136
|
size: (progress-offset),
|
150
|
-
params: @params.merge(range: range)
|
137
|
+
params: @params.merge(range: range, if_match: etag)
|
151
138
|
)
|
152
139
|
part_number += 1
|
153
140
|
offset = progress
|
@@ -155,18 +142,16 @@ module Aws
|
|
155
142
|
download_in_threads(PartList.new(chunks), file_size)
|
156
143
|
end
|
157
144
|
|
158
|
-
def multithreaded_get_by_parts(n_parts, total_size)
|
145
|
+
def multithreaded_get_by_parts(n_parts, total_size, etag)
|
159
146
|
parts = (1..n_parts).map do |part|
|
160
|
-
Part.new(part_number: part, params: @params.merge(part_number: part))
|
147
|
+
Part.new(part_number: part, params: @params.merge(part_number: part, if_match: etag))
|
161
148
|
end
|
162
149
|
download_in_threads(PartList.new(parts), total_size)
|
163
150
|
end
|
164
151
|
|
165
152
|
def download_in_threads(pending, total_size)
|
166
153
|
threads = []
|
167
|
-
if @progress_callback
|
168
|
-
progress = MultipartProgress.new(pending, total_size, @progress_callback)
|
169
|
-
end
|
154
|
+
progress = MultipartProgress.new(pending, total_size, @progress_callback) if @progress_callback
|
170
155
|
@thread_count.times do
|
171
156
|
thread = Thread.new do
|
172
157
|
begin
|
@@ -208,9 +193,7 @@ module Aws
|
|
208
193
|
|
209
194
|
return resp unless @on_checksum_validated
|
210
195
|
|
211
|
-
if resp.checksum_validated
|
212
|
-
@on_checksum_validated.call(resp.checksum_validated, resp)
|
213
|
-
end
|
196
|
+
@on_checksum_validated.call(resp.checksum_validated, resp) if resp.checksum_validated
|
214
197
|
|
215
198
|
resp
|
216
199
|
end
|
@@ -251,7 +234,7 @@ module Aws
|
|
251
234
|
end
|
252
235
|
|
253
236
|
# @api private
|
254
|
-
class
|
237
|
+
class MultipartProgress
|
255
238
|
def initialize(parts, total_size, progress_callback)
|
256
239
|
@bytes_received = Array.new(parts.size, 0)
|
257
240
|
@part_sizes = parts.map(&:size)
|
@@ -16,7 +16,6 @@ module Aws
|
|
16
16
|
|
17
17
|
THREAD_COUNT = 10
|
18
18
|
|
19
|
-
# @api private
|
20
19
|
CREATE_OPTIONS = Set.new(
|
21
20
|
Client.api.operation(:create_multipart_upload).input.shape.member_names
|
22
21
|
)
|
@@ -25,11 +24,16 @@ module Aws
|
|
25
24
|
Client.api.operation(:complete_multipart_upload).input.shape.member_names
|
26
25
|
)
|
27
26
|
|
28
|
-
# @api private
|
29
27
|
UPLOAD_PART_OPTIONS = Set.new(
|
30
28
|
Client.api.operation(:upload_part).input.shape.member_names
|
31
29
|
)
|
32
30
|
|
31
|
+
CHECKSUM_KEYS = Set.new(
|
32
|
+
Client.api.operation(:upload_part).input.shape.members.map do |n, s|
|
33
|
+
n if s.location == 'header' && s.location_name.start_with?('x-amz-checksum-')
|
34
|
+
end.compact
|
35
|
+
)
|
36
|
+
|
33
37
|
# @option options [Client] :client
|
34
38
|
# @option options [Integer] :thread_count (THREAD_COUNT)
|
35
39
|
def initialize(options = {})
|
@@ -121,15 +125,27 @@ module Aws
|
|
121
125
|
parts
|
122
126
|
end
|
123
127
|
|
128
|
+
def checksum_key?(key)
|
129
|
+
CHECKSUM_KEYS.include?(key)
|
130
|
+
end
|
131
|
+
|
132
|
+
def has_checksum_key?(keys)
|
133
|
+
keys.any? { |key| checksum_key?(key) }
|
134
|
+
end
|
135
|
+
|
124
136
|
def create_opts(options)
|
125
|
-
|
137
|
+
opts = { checksum_algorithm: Aws::Plugins::ChecksumAlgorithm::DEFAULT_CHECKSUM }
|
138
|
+
opts[:checksum_type] = 'FULL_OBJECT' if has_checksum_key?(options.keys)
|
139
|
+
CREATE_OPTIONS.inject(opts) do |hash, key|
|
126
140
|
hash[key] = options[key] if options.key?(key)
|
127
141
|
hash
|
128
142
|
end
|
129
143
|
end
|
130
144
|
|
131
145
|
def complete_opts(options)
|
132
|
-
|
146
|
+
opts = {}
|
147
|
+
opts[:checksum_type] = 'FULL_OBJECT' if has_checksum_key?(options.keys)
|
148
|
+
COMPLETE_OPTIONS.inject(opts) do |hash, key|
|
133
149
|
hash[key] = options[key] if options.key?(key)
|
134
150
|
hash
|
135
151
|
end
|
@@ -137,7 +153,10 @@ module Aws
|
|
137
153
|
|
138
154
|
def upload_part_opts(options)
|
139
155
|
UPLOAD_PART_OPTIONS.inject({}) do |hash, key|
|
140
|
-
|
156
|
+
if options.key?(key)
|
157
|
+
# don't pass through checksum calculations
|
158
|
+
hash[key] = options[key] unless checksum_key?(key)
|
159
|
+
end
|
141
160
|
hash
|
142
161
|
end
|
143
162
|
end
|
@@ -159,14 +178,13 @@ module Aws
|
|
159
178
|
end
|
160
179
|
resp = @client.upload_part(part)
|
161
180
|
part[:body].close
|
162
|
-
completed_part = {
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
181
|
+
completed_part = {
|
182
|
+
etag: resp.etag,
|
183
|
+
part_number: part[:part_number]
|
184
|
+
}
|
185
|
+
algorithm = resp.context.params[:checksum_algorithm]
|
186
|
+
k = "checksum_#{algorithm.downcase}".to_sym
|
187
|
+
completed_part[k] = resp.send(k)
|
170
188
|
completed.push(completed_part)
|
171
189
|
end
|
172
190
|
nil
|
@@ -70,8 +70,10 @@ module Aws::S3
|
|
70
70
|
|
71
71
|
# The class of storage used to store the object.
|
72
72
|
#
|
73
|
-
# <note markdown="1"> **Directory buckets** -
|
74
|
-
#
|
73
|
+
# <note markdown="1"> **Directory buckets** - Directory buckets only support
|
74
|
+
# `EXPRESS_ONEZONE` (the S3 Express One Zone storage class) in
|
75
|
+
# Availability Zones and `ONEZONE_IA` (the S3 One Zone-Infrequent Access
|
76
|
+
# storage class) in Dedicated Local Zones.
|
75
77
|
#
|
76
78
|
# </note>
|
77
79
|
# @return [String]
|
@@ -103,6 +105,18 @@ module Aws::S3
|
|
103
105
|
data[:checksum_algorithm]
|
104
106
|
end
|
105
107
|
|
108
|
+
# The checksum type that is used to calculate the object’s checksum
|
109
|
+
# value. For more information, see [Checking object integrity][1] in the
|
110
|
+
# *Amazon S3 User Guide*.
|
111
|
+
#
|
112
|
+
#
|
113
|
+
#
|
114
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
115
|
+
# @return [String]
|
116
|
+
def checksum_type
|
117
|
+
data[:checksum_type]
|
118
|
+
end
|
119
|
+
|
106
120
|
# @!endgroup
|
107
121
|
|
108
122
|
# @return [Client]
|
@@ -239,6 +253,7 @@ module Aws::S3
|
|
239
253
|
# multipart_upload.abort({
|
240
254
|
# request_payer: "requester", # accepts requester
|
241
255
|
# expected_bucket_owner: "AccountId",
|
256
|
+
# if_match_initiated_time: Time.now,
|
242
257
|
# })
|
243
258
|
# @param [Hash] options ({})
|
244
259
|
# @option options [String] :request_payer
|
@@ -261,6 +276,17 @@ module Aws::S3
|
|
261
276
|
# The account ID of the expected bucket owner. If the account ID that
|
262
277
|
# you provide does not match the actual owner of the bucket, the request
|
263
278
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
279
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_match_initiated_time
|
280
|
+
# If present, this header aborts an in progress multipart upload only if
|
281
|
+
# it was initiated on the provided timestamp. If the initiated timestamp
|
282
|
+
# of the multipart upload does not match the provided value, the
|
283
|
+
# operation returns a `412 Precondition Failed` error. If the initiated
|
284
|
+
# timestamp matches or if the multipart upload doesn’t exist, the
|
285
|
+
# operation returns a `204 Success (No Content)` response.
|
286
|
+
#
|
287
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
288
|
+
#
|
289
|
+
# </note>
|
264
290
|
# @return [Types::AbortMultipartUploadOutput]
|
265
291
|
def abort(options = {})
|
266
292
|
options = options.merge(
|
@@ -283,6 +309,7 @@ module Aws::S3
|
|
283
309
|
# etag: "ETag",
|
284
310
|
# checksum_crc32: "ChecksumCRC32",
|
285
311
|
# checksum_crc32c: "ChecksumCRC32C",
|
312
|
+
# checksum_crc64nvme: "ChecksumCRC64NVME",
|
286
313
|
# checksum_sha1: "ChecksumSHA1",
|
287
314
|
# checksum_sha256: "ChecksumSHA256",
|
288
315
|
# part_number: 1,
|
@@ -291,10 +318,15 @@ module Aws::S3
|
|
291
318
|
# },
|
292
319
|
# checksum_crc32: "ChecksumCRC32",
|
293
320
|
# checksum_crc32c: "ChecksumCRC32C",
|
321
|
+
# checksum_crc64nvme: "ChecksumCRC64NVME",
|
294
322
|
# checksum_sha1: "ChecksumSHA1",
|
295
323
|
# checksum_sha256: "ChecksumSHA256",
|
324
|
+
# checksum_type: "COMPOSITE", # accepts COMPOSITE, FULL_OBJECT
|
325
|
+
# mpu_object_size: 1,
|
296
326
|
# request_payer: "requester", # accepts requester
|
297
327
|
# expected_bucket_owner: "AccountId",
|
328
|
+
# if_match: "IfMatch",
|
329
|
+
# if_none_match: "IfNoneMatch",
|
298
330
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
299
331
|
# sse_customer_key: "SSECustomerKey",
|
300
332
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
@@ -305,9 +337,9 @@ module Aws::S3
|
|
305
337
|
# @option options [String] :checksum_crc32
|
306
338
|
# This header can be used as a data integrity check to verify that the
|
307
339
|
# data received is the same data that was originally sent. This header
|
308
|
-
# specifies the
|
309
|
-
# more information, see [Checking object integrity][1] in the
|
310
|
-
# User Guide*.
|
340
|
+
# specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
|
341
|
+
# For more information, see [Checking object integrity][1] in the
|
342
|
+
# *Amazon S3 User Guide*.
|
311
343
|
#
|
312
344
|
#
|
313
345
|
#
|
@@ -315,17 +347,28 @@ module Aws::S3
|
|
315
347
|
# @option options [String] :checksum_crc32c
|
316
348
|
# This header can be used as a data integrity check to verify that the
|
317
349
|
# data received is the same data that was originally sent. This header
|
318
|
-
# specifies the
|
350
|
+
# specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
|
319
351
|
# For more information, see [Checking object integrity][1] in the
|
320
352
|
# *Amazon S3 User Guide*.
|
321
353
|
#
|
322
354
|
#
|
323
355
|
#
|
324
356
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
357
|
+
# @option options [String] :checksum_crc64nvme
|
358
|
+
# This header can be used as a data integrity check to verify that the
|
359
|
+
# data received is the same data that was originally sent. This header
|
360
|
+
# specifies the Base64 encoded, 64-bit `CRC64NVME` checksum of the
|
361
|
+
# object. The `CRC64NVME` checksum is always a full object checksum. For
|
362
|
+
# more information, see [Checking object integrity in the Amazon S3 User
|
363
|
+
# Guide][1].
|
364
|
+
#
|
365
|
+
#
|
366
|
+
#
|
367
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
325
368
|
# @option options [String] :checksum_sha1
|
326
369
|
# This header can be used as a data integrity check to verify that the
|
327
370
|
# data received is the same data that was originally sent. This header
|
328
|
-
# specifies the
|
371
|
+
# specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
|
329
372
|
# more information, see [Checking object integrity][1] in the *Amazon S3
|
330
373
|
# User Guide*.
|
331
374
|
#
|
@@ -335,13 +378,28 @@ module Aws::S3
|
|
335
378
|
# @option options [String] :checksum_sha256
|
336
379
|
# This header can be used as a data integrity check to verify that the
|
337
380
|
# data received is the same data that was originally sent. This header
|
338
|
-
# specifies the
|
381
|
+
# specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
|
339
382
|
# For more information, see [Checking object integrity][1] in the
|
340
383
|
# *Amazon S3 User Guide*.
|
341
384
|
#
|
342
385
|
#
|
343
386
|
#
|
344
387
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
388
|
+
# @option options [String] :checksum_type
|
389
|
+
# This header specifies the checksum type of the object, which
|
390
|
+
# determines how part-level checksums are combined to create an
|
391
|
+
# object-level checksum for multipart objects. You can use this header
|
392
|
+
# as a data integrity check to verify that the checksum type that is
|
393
|
+
# received is the same checksum that was specified. If the checksum type
|
394
|
+
# doesn’t match the checksum type that was specified for the object
|
395
|
+
# during the `CreateMultipartUpload` request, it’ll result in a
|
396
|
+
# `BadDigest` error. For more information, see Checking object integrity
|
397
|
+
# in the Amazon S3 User Guide.
|
398
|
+
# @option options [Integer] :mpu_object_size
|
399
|
+
# The expected total object size of the multipart upload request. If
|
400
|
+
# there’s a mismatch between the specified object size value and the
|
401
|
+
# actual object size value, it results in an `HTTP 400 InvalidRequest`
|
402
|
+
# error.
|
345
403
|
# @option options [String] :request_payer
|
346
404
|
# Confirms that the requester knows that they will be charged for the
|
347
405
|
# request. Bucket owners need not specify this parameter in their
|
@@ -362,6 +420,45 @@ module Aws::S3
|
|
362
420
|
# The account ID of the expected bucket owner. If the account ID that
|
363
421
|
# you provide does not match the actual owner of the bucket, the request
|
364
422
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
423
|
+
# @option options [String] :if_match
|
424
|
+
# Uploads the object only if the ETag (entity tag) value provided during
|
425
|
+
# the WRITE operation matches the ETag of the object in S3. If the ETag
|
426
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
427
|
+
# error.
|
428
|
+
#
|
429
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
430
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
431
|
+
# fetch the object's ETag, re-initiate the multipart upload with
|
432
|
+
# `CreateMultipartUpload`, and re-upload each part.
|
433
|
+
#
|
434
|
+
# Expects the ETag value as a string.
|
435
|
+
#
|
436
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
437
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
438
|
+
#
|
439
|
+
#
|
440
|
+
#
|
441
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
442
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
443
|
+
# @option options [String] :if_none_match
|
444
|
+
# Uploads the object only if the object key name does not already exist
|
445
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
446
|
+
# Precondition Failed` error.
|
447
|
+
#
|
448
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
449
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
450
|
+
# re-initiate the multipart upload with `CreateMultipartUpload` and
|
451
|
+
# re-upload each part.
|
452
|
+
#
|
453
|
+
# Expects the '*' (asterisk) character.
|
454
|
+
#
|
455
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
456
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
457
|
+
#
|
458
|
+
#
|
459
|
+
#
|
460
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
461
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
365
462
|
# @option options [String] :sse_customer_algorithm
|
366
463
|
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
367
464
|
# This parameter is required only when the object was created using a
|
@@ -589,3 +686,6 @@ module Aws::S3
|
|
589
686
|
class Collection < Aws::Resources::Collection; end
|
590
687
|
end
|
591
688
|
end
|
689
|
+
|
690
|
+
# Load customizations if they exist
|
691
|
+
require 'aws-sdk-s3/customizations/multipart_upload'
|