aws-sdk-s3 1.169.0 → 1.189.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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +118 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +79 -33
  5. data/lib/aws-sdk-s3/bucket_acl.rb +6 -5
  6. data/lib/aws-sdk-s3/bucket_cors.rb +6 -5
  7. data/lib/aws-sdk-s3/bucket_lifecycle.rb +7 -2
  8. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +22 -2
  9. data/lib/aws-sdk-s3/bucket_logging.rb +2 -2
  10. data/lib/aws-sdk-s3/bucket_policy.rb +6 -5
  11. data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
  12. data/lib/aws-sdk-s3/bucket_tagging.rb +3 -3
  13. data/lib/aws-sdk-s3/bucket_versioning.rb +9 -9
  14. data/lib/aws-sdk-s3/bucket_website.rb +3 -3
  15. data/lib/aws-sdk-s3/client.rb +2529 -1652
  16. data/lib/aws-sdk-s3/client_api.rb +325 -160
  17. data/lib/aws-sdk-s3/endpoint_provider.rb +400 -276
  18. data/lib/aws-sdk-s3/endpoints.rb +42 -0
  19. data/lib/aws-sdk-s3/errors.rb +44 -0
  20. data/lib/aws-sdk-s3/file_downloader.rb +14 -31
  21. data/lib/aws-sdk-s3/multipart_file_uploader.rb +31 -13
  22. data/lib/aws-sdk-s3/multipart_upload.rb +83 -6
  23. data/lib/aws-sdk-s3/multipart_upload_part.rb +50 -34
  24. data/lib/aws-sdk-s3/object.rb +242 -114
  25. data/lib/aws-sdk-s3/object_acl.rb +11 -5
  26. data/lib/aws-sdk-s3/object_summary.rb +180 -82
  27. data/lib/aws-sdk-s3/object_version.rb +60 -13
  28. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  29. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +11 -20
  30. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +3 -3
  31. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -71
  32. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +5 -7
  33. data/lib/aws-sdk-s3/presigner.rb +5 -5
  34. data/lib/aws-sdk-s3/resource.rb +10 -9
  35. data/lib/aws-sdk-s3/types.rb +2300 -1050
  36. data/lib/aws-sdk-s3.rb +1 -1
  37. data/sig/bucket.rbs +12 -6
  38. data/sig/bucket_acl.rbs +1 -1
  39. data/sig/bucket_cors.rbs +1 -1
  40. data/sig/bucket_lifecycle.rbs +1 -1
  41. data/sig/bucket_lifecycle_configuration.rbs +1 -1
  42. data/sig/bucket_logging.rbs +1 -1
  43. data/sig/bucket_policy.rbs +1 -1
  44. data/sig/bucket_request_payment.rbs +1 -1
  45. data/sig/bucket_tagging.rbs +1 -1
  46. data/sig/bucket_versioning.rbs +3 -3
  47. data/sig/bucket_website.rbs +1 -1
  48. data/sig/client.rbs +104 -37
  49. data/sig/errors.rbs +8 -0
  50. data/sig/multipart_upload.rbs +11 -2
  51. data/sig/multipart_upload_part.rbs +5 -1
  52. data/sig/object.rbs +22 -6
  53. data/sig/object_acl.rbs +1 -1
  54. data/sig/object_summary.rbs +17 -7
  55. data/sig/object_version.rbs +9 -3
  56. data/sig/resource.rbs +5 -3
  57. data/sig/types.rbs +153 -36
  58. metadata +7 -10
  59. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +0 -31
@@ -63,6 +63,18 @@ module Aws::S3
63
63
  end
64
64
  end
65
65
 
66
+ class CreateBucketMetadataTableConfiguration
67
+ def self.build(context)
68
+ Aws::S3::EndpointParameters.create(
69
+ context.config,
70
+ bucket: context.params[:bucket],
71
+ use_dual_stack: context[:use_dualstack_endpoint],
72
+ accelerate: context[:use_accelerate_endpoint],
73
+ use_s3_express_control_endpoint: true,
74
+ )
75
+ end
76
+ end
77
+
66
78
  class CreateMultipartUpload
67
79
  def self.build(context)
68
80
  Aws::S3::EndpointParameters.create(
@@ -171,6 +183,18 @@ module Aws::S3
171
183
  end
172
184
  end
173
185
 
186
+ class DeleteBucketMetadataTableConfiguration
187
+ def self.build(context)
188
+ Aws::S3::EndpointParameters.create(
189
+ context.config,
190
+ bucket: context.params[:bucket],
191
+ use_dual_stack: context[:use_dualstack_endpoint],
192
+ accelerate: context[:use_accelerate_endpoint],
193
+ use_s3_express_control_endpoint: true,
194
+ )
195
+ end
196
+ end
197
+
174
198
  class DeleteBucketMetricsConfiguration
175
199
  def self.build(context)
176
200
  Aws::S3::EndpointParameters.create(
@@ -421,6 +445,18 @@ module Aws::S3
421
445
  end
422
446
  end
423
447
 
448
+ class GetBucketMetadataTableConfiguration
449
+ def self.build(context)
450
+ Aws::S3::EndpointParameters.create(
451
+ context.config,
452
+ bucket: context.params[:bucket],
453
+ use_dual_stack: context[:use_dualstack_endpoint],
454
+ accelerate: context[:use_accelerate_endpoint],
455
+ use_s3_express_control_endpoint: true,
456
+ )
457
+ end
458
+ end
459
+
424
460
  class GetBucketMetricsConfiguration
425
461
  def self.build(context)
426
462
  Aws::S3::EndpointParameters.create(
@@ -1194,6 +1230,8 @@ module Aws::S3
1194
1230
  CopyObject.build(context)
1195
1231
  when :create_bucket
1196
1232
  CreateBucket.build(context)
1233
+ when :create_bucket_metadata_table_configuration
1234
+ CreateBucketMetadataTableConfiguration.build(context)
1197
1235
  when :create_multipart_upload
1198
1236
  CreateMultipartUpload.build(context)
1199
1237
  when :create_session
@@ -1212,6 +1250,8 @@ module Aws::S3
1212
1250
  DeleteBucketInventoryConfiguration.build(context)
1213
1251
  when :delete_bucket_lifecycle
1214
1252
  DeleteBucketLifecycle.build(context)
1253
+ when :delete_bucket_metadata_table_configuration
1254
+ DeleteBucketMetadataTableConfiguration.build(context)
1215
1255
  when :delete_bucket_metrics_configuration
1216
1256
  DeleteBucketMetricsConfiguration.build(context)
1217
1257
  when :delete_bucket_ownership_controls
@@ -1254,6 +1294,8 @@ module Aws::S3
1254
1294
  GetBucketLocation.build(context)
1255
1295
  when :get_bucket_logging
1256
1296
  GetBucketLogging.build(context)
1297
+ when :get_bucket_metadata_table_configuration
1298
+ GetBucketMetadataTableConfiguration.build(context)
1257
1299
  when :get_bucket_metrics_configuration
1258
1300
  GetBucketMetricsConfiguration.build(context)
1259
1301
  when :get_bucket_notification
@@ -29,12 +29,16 @@ module Aws::S3
29
29
  # ## Error Classes
30
30
  # * {BucketAlreadyExists}
31
31
  # * {BucketAlreadyOwnedByYou}
32
+ # * {EncryptionTypeMismatch}
32
33
  # * {InvalidObjectState}
34
+ # * {InvalidRequest}
35
+ # * {InvalidWriteOffset}
33
36
  # * {NoSuchBucket}
34
37
  # * {NoSuchKey}
35
38
  # * {NoSuchUpload}
36
39
  # * {ObjectAlreadyInActiveTierError}
37
40
  # * {ObjectNotInActiveTierError}
41
+ # * {TooManyParts}
38
42
  #
39
43
  # Additionally, error classes are dynamically generated for service errors based on the error code
40
44
  # if they are not defined above.
@@ -62,6 +66,16 @@ module Aws::S3
62
66
  end
63
67
  end
64
68
 
69
+ class EncryptionTypeMismatch < ServiceError
70
+
71
+ # @param [Seahorse::Client::RequestContext] context
72
+ # @param [String] message
73
+ # @param [Aws::S3::Types::EncryptionTypeMismatch] data
74
+ def initialize(context, message, data = Aws::EmptyStructure.new)
75
+ super(context, message, data)
76
+ end
77
+ end
78
+
65
79
  class InvalidObjectState < ServiceError
66
80
 
67
81
  # @param [Seahorse::Client::RequestContext] context
@@ -82,6 +96,26 @@ module Aws::S3
82
96
  end
83
97
  end
84
98
 
99
+ class InvalidRequest < ServiceError
100
+
101
+ # @param [Seahorse::Client::RequestContext] context
102
+ # @param [String] message
103
+ # @param [Aws::S3::Types::InvalidRequest] data
104
+ def initialize(context, message, data = Aws::EmptyStructure.new)
105
+ super(context, message, data)
106
+ end
107
+ end
108
+
109
+ class InvalidWriteOffset < ServiceError
110
+
111
+ # @param [Seahorse::Client::RequestContext] context
112
+ # @param [String] message
113
+ # @param [Aws::S3::Types::InvalidWriteOffset] data
114
+ def initialize(context, message, data = Aws::EmptyStructure.new)
115
+ super(context, message, data)
116
+ end
117
+ end
118
+
85
119
  class NoSuchBucket < ServiceError
86
120
 
87
121
  # @param [Seahorse::Client::RequestContext] context
@@ -132,6 +166,16 @@ module Aws::S3
132
166
  end
133
167
  end
134
168
 
169
+ class TooManyParts < ServiceError
170
+
171
+ # @param [Seahorse::Client::RequestContext] context
172
+ # @param [String] message
173
+ # @param [Aws::S3::Types::TooManyParts] data
174
+ def initialize(context, message, data = Aws::EmptyStructure.new)
175
+ super(context, message, data)
176
+ end
177
+ end
178
+
135
179
  end
136
180
  end
137
181
 
@@ -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 MultipartProgress
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
- CREATE_OPTIONS.inject({}) do |hash, key|
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
- COMPLETE_OPTIONS.inject({}) do |hash, key|
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
- hash[key] = options[key] if options.key?(key)
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 = {etag: resp.etag, part_number: part[:part_number]}
163
-
164
- # get the requested checksum from the response
165
- if part[:checksum_algorithm]
166
- k = "checksum_#{part[:checksum_algorithm].downcase}".to_sym
167
- completed_part[k] = resp[k]
168
- end
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** - Only the S3 Express One Zone storage class is
74
- # supported by directory buckets to store objects.
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,14 @@ 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",
298
329
  # if_none_match: "IfNoneMatch",
299
330
  # sse_customer_algorithm: "SSECustomerAlgorithm",
300
331
  # sse_customer_key: "SSECustomerKey",
@@ -306,7 +337,7 @@ module Aws::S3
306
337
  # @option options [String] :checksum_crc32
307
338
  # This header can be used as a data integrity check to verify that the
308
339
  # data received is the same data that was originally sent. This header
309
- # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
340
+ # specifies the Base64 encoded, 32-bit `CRC32` checksum of the object.
310
341
  # For more information, see [Checking object integrity][1] in the
311
342
  # *Amazon S3 User Guide*.
312
343
  #
@@ -316,17 +347,28 @@ module Aws::S3
316
347
  # @option options [String] :checksum_crc32c
317
348
  # This header can be used as a data integrity check to verify that the
318
349
  # data received is the same data that was originally sent. This header
319
- # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
350
+ # specifies the Base64 encoded, 32-bit `CRC32C` checksum of the object.
320
351
  # For more information, see [Checking object integrity][1] in the
321
352
  # *Amazon S3 User Guide*.
322
353
  #
323
354
  #
324
355
  #
325
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
326
368
  # @option options [String] :checksum_sha1
327
369
  # This header can be used as a data integrity check to verify that the
328
370
  # data received is the same data that was originally sent. This header
329
- # specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
371
+ # specifies the Base64 encoded, 160-bit `SHA1` digest of the object. For
330
372
  # more information, see [Checking object integrity][1] in the *Amazon S3
331
373
  # User Guide*.
332
374
  #
@@ -336,13 +378,28 @@ module Aws::S3
336
378
  # @option options [String] :checksum_sha256
337
379
  # This header can be used as a data integrity check to verify that the
338
380
  # data received is the same data that was originally sent. This header
339
- # specifies the base64-encoded, 256-bit SHA-256 digest of the object.
381
+ # specifies the Base64 encoded, 256-bit `SHA256` digest of the object.
340
382
  # For more information, see [Checking object integrity][1] in the
341
383
  # *Amazon S3 User Guide*.
342
384
  #
343
385
  #
344
386
  #
345
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.
346
403
  # @option options [String] :request_payer
347
404
  # Confirms that the requester knows that they will be charged for the
348
405
  # request. Bucket owners need not specify this parameter in their
@@ -363,6 +420,26 @@ module Aws::S3
363
420
  # The account ID of the expected bucket owner. If the account ID that
364
421
  # you provide does not match the actual owner of the bucket, the request
365
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
366
443
  # @option options [String] :if_none_match
367
444
  # Uploads the object only if the object key name does not already exist
368
445
  # in the bucket specified. Otherwise, Amazon S3 returns a `412