aws-sdk-s3 1.21.0 → 1.117.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +930 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/bucket.rb +393 -75
- data/lib/aws-sdk-s3/bucket_acl.rb +57 -14
- data/lib/aws-sdk-s3/bucket_cors.rb +67 -13
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +54 -15
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +56 -15
- data/lib/aws-sdk-s3/bucket_logging.rb +52 -15
- data/lib/aws-sdk-s3/bucket_notification.rb +47 -17
- data/lib/aws-sdk-s3/bucket_policy.rb +51 -13
- data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
- data/lib/aws-sdk-s3/bucket_request_payment.rb +51 -12
- data/lib/aws-sdk-s3/bucket_tagging.rb +59 -13
- data/lib/aws-sdk-s3/bucket_versioning.rb +118 -12
- data/lib/aws-sdk-s3/bucket_website.rb +66 -13
- data/lib/aws-sdk-s3/client.rb +11422 -2518
- data/lib/aws-sdk-s3/client_api.rb +1196 -155
- data/lib/aws-sdk-s3/customizations/bucket.rb +53 -36
- data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
- data/lib/aws-sdk-s3/customizations/object.rb +200 -62
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
- data/lib/aws-sdk-s3/customizations.rb +4 -1
- data/lib/aws-sdk-s3/encryption/client.rb +23 -6
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
- data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
- data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +11 -3
- data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
- data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
- data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
- data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
- data/lib/aws-sdk-s3/encryption.rb +4 -0
- data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +222 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
- data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +142 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +2020 -0
- data/lib/aws-sdk-s3/endpoints.rb +2149 -0
- data/lib/aws-sdk-s3/errors.rb +123 -1
- data/lib/aws-sdk-s3/event_streams.rb +20 -7
- data/lib/aws-sdk-s3/file_downloader.rb +17 -10
- data/lib/aws-sdk-s3/file_part.rb +11 -6
- data/lib/aws-sdk-s3/file_uploader.rb +33 -14
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +78 -19
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +54 -15
- data/lib/aws-sdk-s3/multipart_upload.rb +178 -28
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +237 -44
- data/lib/aws-sdk-s3/object.rb +897 -154
- data/lib/aws-sdk-s3/object_acl.rb +81 -20
- data/lib/aws-sdk-s3/object_copier.rb +2 -0
- data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
- data/lib/aws-sdk-s3/object_summary.rb +649 -139
- data/lib/aws-sdk-s3/object_version.rb +167 -65
- data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
- data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +7 -43
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +20 -3
- data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
- data/lib/aws-sdk-s3/plugins/endpoints.rb +262 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
- data/lib/aws-sdk-s3/plugins/md5s.rb +34 -27
- data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +55 -92
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
- data/lib/aws-sdk-s3/presigned_post.rb +108 -56
- data/lib/aws-sdk-s3/presigner.rb +169 -77
- data/lib/aws-sdk-s3/resource.rb +45 -5
- data/lib/aws-sdk-s3/types.rb +8564 -3891
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +16 -6
- metadata +37 -13
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'thread'
|
2
4
|
require 'set'
|
3
5
|
require 'tempfile'
|
@@ -24,6 +26,10 @@ module Aws
|
|
24
26
|
UPLOAD_PART_OPTIONS =
|
25
27
|
Set.new(Client.api.operation(:upload_part).input.shape.member_names)
|
26
28
|
|
29
|
+
# @api private
|
30
|
+
COMPLETE_UPLOAD_OPTIONS =
|
31
|
+
Set.new(Client.api.operation(:complete_multipart_upload).input.shape.member_names)
|
32
|
+
|
27
33
|
# @option options [Client] :client
|
28
34
|
def initialize(options = {})
|
29
35
|
@client = options[:client] || Client.new
|
@@ -37,7 +43,7 @@ module Aws
|
|
37
43
|
|
38
44
|
# @option options [required,String] :bucket
|
39
45
|
# @option options [required,String] :key
|
40
|
-
# @return [
|
46
|
+
# @return [Seahorse::Client::Response] - the CompleteMultipartUploadResponse
|
41
47
|
def upload(options = {}, &block)
|
42
48
|
upload_id = initiate_upload(options)
|
43
49
|
parts = upload_parts(upload_id, options, &block)
|
@@ -52,20 +58,34 @@ module Aws
|
|
52
58
|
|
53
59
|
def complete_upload(upload_id, parts, options)
|
54
60
|
@client.complete_multipart_upload(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
61
|
+
**complete_opts(options).merge(
|
62
|
+
upload_id: upload_id,
|
63
|
+
multipart_upload: { parts: parts }
|
64
|
+
)
|
65
|
+
)
|
59
66
|
end
|
60
67
|
|
61
68
|
def upload_parts(upload_id, options, &block)
|
62
69
|
completed = Queue.new
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
70
|
+
thread_errors = []
|
71
|
+
errors = begin
|
72
|
+
IO.pipe do |read_pipe, write_pipe|
|
73
|
+
threads = upload_in_threads(
|
74
|
+
read_pipe, completed,
|
75
|
+
upload_part_opts(options).merge(upload_id: upload_id),
|
76
|
+
thread_errors)
|
77
|
+
begin
|
78
|
+
block.call(write_pipe)
|
79
|
+
ensure
|
80
|
+
# Ensure the pipe is closed to avoid https://github.com/jruby/jruby/issues/6111
|
81
|
+
write_pipe.close
|
82
|
+
end
|
83
|
+
threads.map(&:value).compact
|
84
|
+
end
|
85
|
+
rescue => e
|
86
|
+
thread_errors + [e]
|
68
87
|
end
|
88
|
+
|
69
89
|
if errors.empty?
|
70
90
|
Array.new(completed.size) { completed.pop }.sort_by { |part| part[:part_number] }
|
71
91
|
else
|
@@ -102,9 +122,16 @@ module Aws
|
|
102
122
|
end
|
103
123
|
end
|
104
124
|
|
125
|
+
def complete_opts(options)
|
126
|
+
COMPLETE_UPLOAD_OPTIONS.inject({}) do |hash, key|
|
127
|
+
hash[key] = options[key] if options.key?(key)
|
128
|
+
hash
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
105
132
|
def read_to_part_body(read_pipe)
|
106
133
|
return if read_pipe.closed?
|
107
|
-
temp_io = @tempfile ? Tempfile.new(TEMPFILE_PREIX) : StringIO.new
|
134
|
+
temp_io = @tempfile ? Tempfile.new(TEMPFILE_PREIX) : StringIO.new(String.new)
|
108
135
|
temp_io.binmode
|
109
136
|
bytes_copied = IO.copy_stream(read_pipe, temp_io, @part_size)
|
110
137
|
temp_io.rewind
|
@@ -119,7 +146,7 @@ module Aws
|
|
119
146
|
end
|
120
147
|
end
|
121
148
|
|
122
|
-
def upload_in_threads(read_pipe, completed, options)
|
149
|
+
def upload_in_threads(read_pipe, completed, options, thread_errors)
|
123
150
|
mutex = Mutex.new
|
124
151
|
part_number = 0
|
125
152
|
@thread_count.times.map do
|
@@ -129,25 +156,37 @@ module Aws
|
|
129
156
|
body, thread_part_number = mutex.synchronize do
|
130
157
|
[read_to_part_body(read_pipe), part_number += 1]
|
131
158
|
end
|
132
|
-
break unless body
|
159
|
+
break unless (body || thread_part_number == 1)
|
133
160
|
begin
|
134
161
|
part = options.merge(
|
135
162
|
body: body,
|
136
163
|
part_number: thread_part_number,
|
137
164
|
)
|
138
165
|
resp = @client.upload_part(part)
|
139
|
-
|
166
|
+
completed_part = {etag: resp.etag, part_number: part[:part_number]}
|
167
|
+
|
168
|
+
# get the requested checksum from the response
|
169
|
+
if part[:checksum_algorithm]
|
170
|
+
k = "checksum_#{part[:checksum_algorithm].downcase}".to_sym
|
171
|
+
completed_part[k] = resp[k]
|
172
|
+
end
|
173
|
+
completed.push(completed_part)
|
140
174
|
ensure
|
141
175
|
if Tempfile === body
|
142
176
|
body.close
|
143
177
|
body.unlink
|
178
|
+
elsif StringIO === body
|
179
|
+
body.string.clear
|
144
180
|
end
|
145
181
|
end
|
146
182
|
end
|
147
183
|
nil
|
148
184
|
rescue => error
|
149
185
|
# keep other threads from uploading other parts
|
150
|
-
mutex.synchronize
|
186
|
+
mutex.synchronize do
|
187
|
+
thread_errors.push(error)
|
188
|
+
read_pipe.close_read unless read_pipe.closed?
|
189
|
+
end
|
151
190
|
error
|
152
191
|
end
|
153
192
|
end
|
@@ -1,11 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
4
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
5
7
|
#
|
6
8
|
# WARNING ABOUT GENERATED CODE
|
7
9
|
|
8
10
|
module Aws::S3
|
11
|
+
|
9
12
|
class MultipartUpload
|
10
13
|
|
11
14
|
extend Aws::Deprecations
|
@@ -27,6 +30,7 @@ module Aws::S3
|
|
27
30
|
@id = extract_id(args, options)
|
28
31
|
@data = options.delete(:data)
|
29
32
|
@client = options.delete(:client) || Client.new(options)
|
33
|
+
@waiter_block_warned = false
|
30
34
|
end
|
31
35
|
|
32
36
|
# @!group Read-Only Attributes
|
@@ -70,6 +74,8 @@ module Aws::S3
|
|
70
74
|
data[:storage_class]
|
71
75
|
end
|
72
76
|
|
77
|
+
# Specifies the owner of the object that is part of the multipart
|
78
|
+
# upload.
|
73
79
|
# @return [Types::Owner]
|
74
80
|
def owner
|
75
81
|
data[:owner]
|
@@ -81,6 +87,12 @@ module Aws::S3
|
|
81
87
|
data[:initiator]
|
82
88
|
end
|
83
89
|
|
90
|
+
# The algorithm that was used to create a checksum of the object.
|
91
|
+
# @return [String]
|
92
|
+
def checksum_algorithm
|
93
|
+
data[:checksum_algorithm]
|
94
|
+
end
|
95
|
+
|
84
96
|
# @!endgroup
|
85
97
|
|
86
98
|
# @return [Client]
|
@@ -116,7 +128,8 @@ module Aws::S3
|
|
116
128
|
# Waiter polls an API operation until a resource enters a desired
|
117
129
|
# state.
|
118
130
|
#
|
119
|
-
# @note The waiting operation is performed on a copy. The original resource
|
131
|
+
# @note The waiting operation is performed on a copy. The original resource
|
132
|
+
# remains unchanged.
|
120
133
|
#
|
121
134
|
# ## Basic Usage
|
122
135
|
#
|
@@ -129,13 +142,15 @@ module Aws::S3
|
|
129
142
|
#
|
130
143
|
# ## Example
|
131
144
|
#
|
132
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
145
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
146
|
+
# instance.state.name == 'running'
|
147
|
+
# end
|
133
148
|
#
|
134
149
|
# ## Configuration
|
135
150
|
#
|
136
151
|
# You can configure the maximum number of polling attempts, and the
|
137
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
138
|
-
# by passing a block to {#wait_until}:
|
152
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
153
|
+
# set by passing a block to {#wait_until}:
|
139
154
|
#
|
140
155
|
# # poll for ~25 seconds
|
141
156
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -166,17 +181,16 @@ module Aws::S3
|
|
166
181
|
# # resource did not enter the desired state in time
|
167
182
|
# end
|
168
183
|
#
|
184
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
169
185
|
#
|
170
|
-
# @
|
171
|
-
#
|
172
|
-
#
|
173
|
-
# because the waiter has entered a state that it will not transition
|
174
|
-
# out of, preventing success.
|
186
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
187
|
+
# terminates because the waiter has entered a state that it will not
|
188
|
+
# transition out of, preventing success.
|
175
189
|
#
|
176
190
|
# yet successful.
|
177
191
|
#
|
178
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
179
|
-
# while polling for a resource that is not expected.
|
192
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
193
|
+
# encountered while polling for a resource that is not expected.
|
180
194
|
#
|
181
195
|
# @raise [NotImplementedError] Raised when the resource does not
|
182
196
|
#
|
@@ -212,14 +226,23 @@ module Aws::S3
|
|
212
226
|
#
|
213
227
|
# multipart_upload.abort({
|
214
228
|
# request_payer: "requester", # accepts requester
|
229
|
+
# expected_bucket_owner: "AccountId",
|
215
230
|
# })
|
216
231
|
# @param [Hash] options ({})
|
217
232
|
# @option options [String] :request_payer
|
218
|
-
# Confirms that the requester knows that
|
219
|
-
#
|
220
|
-
# requests.
|
221
|
-
# buckets
|
222
|
-
#
|
233
|
+
# Confirms that the requester knows that they will be charged for the
|
234
|
+
# request. Bucket owners need not specify this parameter in their
|
235
|
+
# requests. For information about downloading objects from Requester
|
236
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
237
|
+
# in the *Amazon S3 User Guide*.
|
238
|
+
#
|
239
|
+
#
|
240
|
+
#
|
241
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
242
|
+
# @option options [String] :expected_bucket_owner
|
243
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
244
|
+
# a different account, the request fails with the HTTP status code `403
|
245
|
+
# Forbidden` (access denied).
|
223
246
|
# @return [Types::AbortMultipartUploadOutput]
|
224
247
|
def abort(options = {})
|
225
248
|
options = options.merge(
|
@@ -238,20 +261,108 @@ module Aws::S3
|
|
238
261
|
# parts: [
|
239
262
|
# {
|
240
263
|
# etag: "ETag",
|
264
|
+
# checksum_crc32: "ChecksumCRC32",
|
265
|
+
# checksum_crc32c: "ChecksumCRC32C",
|
266
|
+
# checksum_sha1: "ChecksumSHA1",
|
267
|
+
# checksum_sha256: "ChecksumSHA256",
|
241
268
|
# part_number: 1,
|
242
269
|
# },
|
243
270
|
# ],
|
244
271
|
# },
|
272
|
+
# checksum_crc32: "ChecksumCRC32",
|
273
|
+
# checksum_crc32c: "ChecksumCRC32C",
|
274
|
+
# checksum_sha1: "ChecksumSHA1",
|
275
|
+
# checksum_sha256: "ChecksumSHA256",
|
245
276
|
# request_payer: "requester", # accepts requester
|
277
|
+
# expected_bucket_owner: "AccountId",
|
278
|
+
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
279
|
+
# sse_customer_key: "SSECustomerKey",
|
280
|
+
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
246
281
|
# })
|
247
282
|
# @param [Hash] options ({})
|
248
283
|
# @option options [Types::CompletedMultipartUpload] :multipart_upload
|
284
|
+
# The container for the multipart upload request information.
|
285
|
+
# @option options [String] :checksum_crc32
|
286
|
+
# This header can be used as a data integrity check to verify that the
|
287
|
+
# data received is the same data that was originally sent. This header
|
288
|
+
# specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
|
289
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
290
|
+
# User Guide*.
|
291
|
+
#
|
292
|
+
#
|
293
|
+
#
|
294
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
295
|
+
# @option options [String] :checksum_crc32c
|
296
|
+
# This header can be used as a data integrity check to verify that the
|
297
|
+
# data received is the same data that was originally sent. This header
|
298
|
+
# specifies the base64-encoded, 32-bit CRC32C checksum of the object.
|
299
|
+
# For more information, see [Checking object integrity][1] in the
|
300
|
+
# *Amazon S3 User Guide*.
|
301
|
+
#
|
302
|
+
#
|
303
|
+
#
|
304
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
305
|
+
# @option options [String] :checksum_sha1
|
306
|
+
# This header can be used as a data integrity check to verify that the
|
307
|
+
# data received is the same data that was originally sent. This header
|
308
|
+
# specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
|
309
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
310
|
+
# User Guide*.
|
311
|
+
#
|
312
|
+
#
|
313
|
+
#
|
314
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
315
|
+
# @option options [String] :checksum_sha256
|
316
|
+
# This header can be used as a data integrity check to verify that the
|
317
|
+
# data received is the same data that was originally sent. This header
|
318
|
+
# specifies the base64-encoded, 256-bit SHA-256 digest of the object.
|
319
|
+
# For more information, see [Checking object integrity][1] in the
|
320
|
+
# *Amazon S3 User Guide*.
|
321
|
+
#
|
322
|
+
#
|
323
|
+
#
|
324
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
249
325
|
# @option options [String] :request_payer
|
250
|
-
# Confirms that the requester knows that
|
251
|
-
#
|
252
|
-
# requests.
|
253
|
-
# buckets
|
254
|
-
#
|
326
|
+
# Confirms that the requester knows that they will be charged for the
|
327
|
+
# request. Bucket owners need not specify this parameter in their
|
328
|
+
# requests. For information about downloading objects from Requester
|
329
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
330
|
+
# in the *Amazon S3 User Guide*.
|
331
|
+
#
|
332
|
+
#
|
333
|
+
#
|
334
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
335
|
+
# @option options [String] :expected_bucket_owner
|
336
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
337
|
+
# a different account, the request fails with the HTTP status code `403
|
338
|
+
# Forbidden` (access denied).
|
339
|
+
# @option options [String] :sse_customer_algorithm
|
340
|
+
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
341
|
+
# This parameter is needed only when the object was created using a
|
342
|
+
# checksum algorithm. For more information, see [Protecting data using
|
343
|
+
# SSE-C keys][1] in the *Amazon S3 User Guide*.
|
344
|
+
#
|
345
|
+
#
|
346
|
+
#
|
347
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
348
|
+
# @option options [String] :sse_customer_key
|
349
|
+
# The server-side encryption (SSE) customer managed key. This parameter
|
350
|
+
# is needed only when the object was created using a checksum algorithm.
|
351
|
+
# For more information, see [Protecting data using SSE-C keys][1] in the
|
352
|
+
# *Amazon S3 User Guide*.
|
353
|
+
#
|
354
|
+
#
|
355
|
+
#
|
356
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
357
|
+
# @option options [String] :sse_customer_key_md5
|
358
|
+
# The MD5 server-side encryption (SSE) customer managed key. This
|
359
|
+
# parameter is needed only when the object was created using a checksum
|
360
|
+
# algorithm. For more information, see [Protecting data using SSE-C
|
361
|
+
# keys][1] in the *Amazon S3 User Guide*.
|
362
|
+
#
|
363
|
+
#
|
364
|
+
#
|
365
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
255
366
|
# @return [Object]
|
256
367
|
def complete(options = {})
|
257
368
|
options = options.merge(
|
@@ -259,7 +370,7 @@ module Aws::S3
|
|
259
370
|
key: @object_key,
|
260
371
|
upload_id: @id
|
261
372
|
)
|
262
|
-
|
373
|
+
@client.complete_multipart_upload(options)
|
263
374
|
Object.new(
|
264
375
|
bucket_name: @bucket_name,
|
265
376
|
key: @object_key,
|
@@ -294,14 +405,53 @@ module Aws::S3
|
|
294
405
|
#
|
295
406
|
# parts = multipart_upload.parts({
|
296
407
|
# request_payer: "requester", # accepts requester
|
408
|
+
# expected_bucket_owner: "AccountId",
|
409
|
+
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
410
|
+
# sse_customer_key: "SSECustomerKey",
|
411
|
+
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
297
412
|
# })
|
298
413
|
# @param [Hash] options ({})
|
299
414
|
# @option options [String] :request_payer
|
300
|
-
# Confirms that the requester knows that
|
301
|
-
#
|
302
|
-
# requests.
|
303
|
-
# buckets
|
304
|
-
#
|
415
|
+
# Confirms that the requester knows that they will be charged for the
|
416
|
+
# request. Bucket owners need not specify this parameter in their
|
417
|
+
# requests. For information about downloading objects from Requester
|
418
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
419
|
+
# in the *Amazon S3 User Guide*.
|
420
|
+
#
|
421
|
+
#
|
422
|
+
#
|
423
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
424
|
+
# @option options [String] :expected_bucket_owner
|
425
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
426
|
+
# a different account, the request fails with the HTTP status code `403
|
427
|
+
# Forbidden` (access denied).
|
428
|
+
# @option options [String] :sse_customer_algorithm
|
429
|
+
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
430
|
+
# This parameter is needed only when the object was created using a
|
431
|
+
# checksum algorithm. For more information, see [Protecting data using
|
432
|
+
# SSE-C keys][1] in the *Amazon S3 User Guide*.
|
433
|
+
#
|
434
|
+
#
|
435
|
+
#
|
436
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
437
|
+
# @option options [String] :sse_customer_key
|
438
|
+
# The server-side encryption (SSE) customer managed key. This parameter
|
439
|
+
# is needed only when the object was created using a checksum algorithm.
|
440
|
+
# For more information, see [Protecting data using SSE-C keys][1] in the
|
441
|
+
# *Amazon S3 User Guide*.
|
442
|
+
#
|
443
|
+
#
|
444
|
+
#
|
445
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
446
|
+
# @option options [String] :sse_customer_key_md5
|
447
|
+
# The MD5 server-side encryption (SSE) customer managed key. This
|
448
|
+
# parameter is needed only when the object was created using a checksum
|
449
|
+
# algorithm. For more information, see [Protecting data using SSE-C
|
450
|
+
# keys][1] in the *Amazon S3 User Guide*.
|
451
|
+
#
|
452
|
+
#
|
453
|
+
#
|
454
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
305
455
|
# @return [MultipartUploadPart::Collection]
|
306
456
|
def parts(options = {})
|
307
457
|
batches = Enumerator.new do |y|
|