aws-sdk-s3 1.61.1 → 1.166.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1255 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
- data/lib/aws-sdk-s3/bucket.rb +814 -112
- data/lib/aws-sdk-s3/bucket_acl.rb +54 -17
- data/lib/aws-sdk-s3/bucket_cors.rb +63 -20
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +63 -19
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +64 -19
- data/lib/aws-sdk-s3/bucket_logging.rb +58 -17
- data/lib/aws-sdk-s3/bucket_notification.rb +47 -20
- data/lib/aws-sdk-s3/bucket_policy.rb +104 -17
- data/lib/aws-sdk-s3/bucket_region_cache.rb +11 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +53 -19
- data/lib/aws-sdk-s3/bucket_tagging.rb +60 -17
- data/lib/aws-sdk-s3/bucket_versioning.rb +106 -17
- data/lib/aws-sdk-s3/bucket_website.rb +64 -19
- data/lib/aws-sdk-s3/client.rb +11280 -3232
- data/lib/aws-sdk-s3/client_api.rb +1078 -197
- data/lib/aws-sdk-s3/customizations/bucket.rb +33 -45
- data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
- data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
- data/lib/aws-sdk-s3/customizations/object.rb +237 -39
- data/lib/aws-sdk-s3/customizations/object_summary.rb +10 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +27 -28
- data/lib/aws-sdk-s3/encryption/client.rb +25 -8
- 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 +2 -0
- 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 +46 -11
- 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 +570 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +223 -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 +173 -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 +186 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +592 -0
- data/lib/aws-sdk-s3/endpoints.rb +2392 -0
- data/lib/aws-sdk-s3/errors.rb +27 -1
- data/lib/aws-sdk-s3/event_streams.rb +8 -1
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
- data/lib/aws-sdk-s3/file_downloader.rb +176 -44
- data/lib/aws-sdk-s3/file_part.rb +2 -0
- data/lib/aws-sdk-s3/file_uploader.rb +28 -8
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +69 -13
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +49 -18
- data/lib/aws-sdk-s3/multipart_upload.rb +242 -25
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +343 -31
- data/lib/aws-sdk-s3/object.rb +2240 -218
- data/lib/aws-sdk-s3/object_acl.rb +80 -21
- data/lib/aws-sdk-s3/object_copier.rb +9 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -22
- data/lib/aws-sdk-s3/object_summary.rb +1900 -178
- data/lib/aws-sdk-s3/object_version.rb +449 -59
- data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
- data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
- data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +5 -41
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +3 -6
- data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
- data/lib/aws-sdk-s3/plugins/endpoints.rb +289 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +60 -15
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +11 -27
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +32 -26
- 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 +50 -88
- 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 +160 -103
- data/lib/aws-sdk-s3/presigner.rb +136 -61
- data/lib/aws-sdk-s3/resource.rb +120 -15
- data/lib/aws-sdk-s3/types.rb +9683 -4358
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +40 -29
- data/sig/bucket.rbs +213 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +111 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2397 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/errors.rbs +34 -0
- data/sig/multipart_upload.rbs +111 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +443 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +335 -0
- data/sig/object_version.rbs +137 -0
- data/sig/resource.rbs +130 -0
- data/sig/types.rbs +2585 -0
- data/sig/waiters.rbs +95 -0
- metadata +73 -15
- data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -211
@@ -1,7 +1,9 @@
|
|
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
|
|
@@ -67,6 +69,11 @@ module Aws::S3
|
|
67
69
|
end
|
68
70
|
|
69
71
|
# The class of storage used to store the object.
|
72
|
+
#
|
73
|
+
# <note markdown="1"> **Directory buckets** - Only the S3 Express One Zone storage class is
|
74
|
+
# supported by directory buckets to store objects.
|
75
|
+
#
|
76
|
+
# </note>
|
70
77
|
# @return [String]
|
71
78
|
def storage_class
|
72
79
|
data[:storage_class]
|
@@ -74,6 +81,11 @@ module Aws::S3
|
|
74
81
|
|
75
82
|
# Specifies the owner of the object that is part of the multipart
|
76
83
|
# upload.
|
84
|
+
#
|
85
|
+
# <note markdown="1"> **Directory buckets** - The bucket owner is returned as the object
|
86
|
+
# owner for all the objects.
|
87
|
+
#
|
88
|
+
# </note>
|
77
89
|
# @return [Types::Owner]
|
78
90
|
def owner
|
79
91
|
data[:owner]
|
@@ -85,6 +97,12 @@ module Aws::S3
|
|
85
97
|
data[:initiator]
|
86
98
|
end
|
87
99
|
|
100
|
+
# The algorithm that was used to create a checksum of the object.
|
101
|
+
# @return [String]
|
102
|
+
def checksum_algorithm
|
103
|
+
data[:checksum_algorithm]
|
104
|
+
end
|
105
|
+
|
88
106
|
# @!endgroup
|
89
107
|
|
90
108
|
# @return [Client]
|
@@ -120,7 +138,8 @@ module Aws::S3
|
|
120
138
|
# Waiter polls an API operation until a resource enters a desired
|
121
139
|
# state.
|
122
140
|
#
|
123
|
-
# @note The waiting operation is performed on a copy. The original resource
|
141
|
+
# @note The waiting operation is performed on a copy. The original resource
|
142
|
+
# remains unchanged.
|
124
143
|
#
|
125
144
|
# ## Basic Usage
|
126
145
|
#
|
@@ -133,13 +152,15 @@ module Aws::S3
|
|
133
152
|
#
|
134
153
|
# ## Example
|
135
154
|
#
|
136
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
155
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
156
|
+
# instance.state.name == 'running'
|
157
|
+
# end
|
137
158
|
#
|
138
159
|
# ## Configuration
|
139
160
|
#
|
140
161
|
# You can configure the maximum number of polling attempts, and the
|
141
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
142
|
-
# by passing a block to {#wait_until}:
|
162
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
163
|
+
# set by passing a block to {#wait_until}:
|
143
164
|
#
|
144
165
|
# # poll for ~25 seconds
|
145
166
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -170,17 +191,16 @@ module Aws::S3
|
|
170
191
|
# # resource did not enter the desired state in time
|
171
192
|
# end
|
172
193
|
#
|
194
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
173
195
|
#
|
174
|
-
# @
|
175
|
-
#
|
176
|
-
#
|
177
|
-
# because the waiter has entered a state that it will not transition
|
178
|
-
# out of, preventing success.
|
196
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
197
|
+
# terminates because the waiter has entered a state that it will not
|
198
|
+
# transition out of, preventing success.
|
179
199
|
#
|
180
200
|
# yet successful.
|
181
201
|
#
|
182
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
183
|
-
# while polling for a resource that is not expected.
|
202
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
203
|
+
# encountered while polling for a resource that is not expected.
|
184
204
|
#
|
185
205
|
# @raise [NotImplementedError] Raised when the resource does not
|
186
206
|
#
|
@@ -207,7 +227,9 @@ module Aws::S3
|
|
207
227
|
:retry
|
208
228
|
end
|
209
229
|
end
|
210
|
-
Aws::
|
230
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
231
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
232
|
+
end
|
211
233
|
end
|
212
234
|
|
213
235
|
# @!group Actions
|
@@ -216,18 +238,29 @@ module Aws::S3
|
|
216
238
|
#
|
217
239
|
# multipart_upload.abort({
|
218
240
|
# request_payer: "requester", # accepts requester
|
241
|
+
# expected_bucket_owner: "AccountId",
|
219
242
|
# })
|
220
243
|
# @param [Hash] options ({})
|
221
244
|
# @option options [String] :request_payer
|
222
245
|
# Confirms that the requester knows that they will be charged for the
|
223
246
|
# request. Bucket owners need not specify this parameter in their
|
224
|
-
# requests.
|
225
|
-
#
|
226
|
-
#
|
247
|
+
# requests. If either the source or destination S3 bucket has Requester
|
248
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
249
|
+
# the object. For information about downloading objects from Requester
|
250
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
251
|
+
# in the *Amazon S3 User Guide*.
|
252
|
+
#
|
253
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
254
|
+
#
|
255
|
+
# </note>
|
227
256
|
#
|
228
257
|
#
|
229
258
|
#
|
230
259
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
260
|
+
# @option options [String] :expected_bucket_owner
|
261
|
+
# The account ID of the expected bucket owner. If the account ID that
|
262
|
+
# you provide does not match the actual owner of the bucket, the request
|
263
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
231
264
|
# @return [Types::AbortMultipartUploadOutput]
|
232
265
|
def abort(options = {})
|
233
266
|
options = options.merge(
|
@@ -235,7 +268,9 @@ module Aws::S3
|
|
235
268
|
key: @object_key,
|
236
269
|
upload_id: @id
|
237
270
|
)
|
238
|
-
resp =
|
271
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
272
|
+
@client.abort_multipart_upload(options)
|
273
|
+
end
|
239
274
|
resp.data
|
240
275
|
end
|
241
276
|
|
@@ -246,25 +281,147 @@ module Aws::S3
|
|
246
281
|
# parts: [
|
247
282
|
# {
|
248
283
|
# etag: "ETag",
|
284
|
+
# checksum_crc32: "ChecksumCRC32",
|
285
|
+
# checksum_crc32c: "ChecksumCRC32C",
|
286
|
+
# checksum_sha1: "ChecksumSHA1",
|
287
|
+
# checksum_sha256: "ChecksumSHA256",
|
249
288
|
# part_number: 1,
|
250
289
|
# },
|
251
290
|
# ],
|
252
291
|
# },
|
292
|
+
# checksum_crc32: "ChecksumCRC32",
|
293
|
+
# checksum_crc32c: "ChecksumCRC32C",
|
294
|
+
# checksum_sha1: "ChecksumSHA1",
|
295
|
+
# checksum_sha256: "ChecksumSHA256",
|
253
296
|
# request_payer: "requester", # accepts requester
|
297
|
+
# expected_bucket_owner: "AccountId",
|
298
|
+
# if_none_match: "IfNoneMatch",
|
299
|
+
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
300
|
+
# sse_customer_key: "SSECustomerKey",
|
301
|
+
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
254
302
|
# })
|
255
303
|
# @param [Hash] options ({})
|
256
304
|
# @option options [Types::CompletedMultipartUpload] :multipart_upload
|
257
305
|
# The container for the multipart upload request information.
|
306
|
+
# @option options [String] :checksum_crc32
|
307
|
+
# This header can be used as a data integrity check to verify that the
|
308
|
+
# data received is the same data that was originally sent. This header
|
309
|
+
# specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
|
310
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
311
|
+
# User Guide*.
|
312
|
+
#
|
313
|
+
#
|
314
|
+
#
|
315
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
316
|
+
# @option options [String] :checksum_crc32c
|
317
|
+
# This header can be used as a data integrity check to verify that the
|
318
|
+
# data received is the same data that was originally sent. This header
|
319
|
+
# specifies the base64-encoded, 32-bit CRC32C checksum of the object.
|
320
|
+
# For more information, see [Checking object integrity][1] in the
|
321
|
+
# *Amazon S3 User Guide*.
|
322
|
+
#
|
323
|
+
#
|
324
|
+
#
|
325
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
326
|
+
# @option options [String] :checksum_sha1
|
327
|
+
# This header can be used as a data integrity check to verify that the
|
328
|
+
# 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
|
330
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
331
|
+
# User Guide*.
|
332
|
+
#
|
333
|
+
#
|
334
|
+
#
|
335
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
336
|
+
# @option options [String] :checksum_sha256
|
337
|
+
# This header can be used as a data integrity check to verify that the
|
338
|
+
# 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.
|
340
|
+
# For more information, see [Checking object integrity][1] in the
|
341
|
+
# *Amazon S3 User Guide*.
|
342
|
+
#
|
343
|
+
#
|
344
|
+
#
|
345
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
258
346
|
# @option options [String] :request_payer
|
259
347
|
# Confirms that the requester knows that they will be charged for the
|
260
348
|
# request. Bucket owners need not specify this parameter in their
|
261
|
-
# requests.
|
262
|
-
#
|
263
|
-
#
|
349
|
+
# requests. If either the source or destination S3 bucket has Requester
|
350
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
351
|
+
# the object. For information about downloading objects from Requester
|
352
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
353
|
+
# in the *Amazon S3 User Guide*.
|
354
|
+
#
|
355
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
356
|
+
#
|
357
|
+
# </note>
|
264
358
|
#
|
265
359
|
#
|
266
360
|
#
|
267
361
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
362
|
+
# @option options [String] :expected_bucket_owner
|
363
|
+
# The account ID of the expected bucket owner. If the account ID that
|
364
|
+
# you provide does not match the actual owner of the bucket, the request
|
365
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
366
|
+
# @option options [String] :if_none_match
|
367
|
+
# Uploads the object only if the object key name does not already exist
|
368
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
369
|
+
# Precondition Failed` error.
|
370
|
+
#
|
371
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
372
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
373
|
+
# re-initiate the multipart upload with `CreateMultipartUpload` and
|
374
|
+
# re-upload each part.
|
375
|
+
#
|
376
|
+
# Expects the '*' (asterisk) character.
|
377
|
+
#
|
378
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
379
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
380
|
+
#
|
381
|
+
#
|
382
|
+
#
|
383
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
384
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
385
|
+
# @option options [String] :sse_customer_algorithm
|
386
|
+
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
387
|
+
# This parameter is required only when the object was created using a
|
388
|
+
# checksum algorithm or if your bucket policy requires the use of SSE-C.
|
389
|
+
# For more information, see [Protecting data using SSE-C keys][1] in the
|
390
|
+
# *Amazon S3 User Guide*.
|
391
|
+
#
|
392
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
393
|
+
#
|
394
|
+
# </note>
|
395
|
+
#
|
396
|
+
#
|
397
|
+
#
|
398
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key
|
399
|
+
# @option options [String] :sse_customer_key
|
400
|
+
# The server-side encryption (SSE) customer managed key. This parameter
|
401
|
+
# is needed only when the object was created using a checksum algorithm.
|
402
|
+
# For more information, see [Protecting data using SSE-C keys][1] in the
|
403
|
+
# *Amazon S3 User Guide*.
|
404
|
+
#
|
405
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
406
|
+
#
|
407
|
+
# </note>
|
408
|
+
#
|
409
|
+
#
|
410
|
+
#
|
411
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
412
|
+
# @option options [String] :sse_customer_key_md5
|
413
|
+
# The MD5 server-side encryption (SSE) customer managed key. This
|
414
|
+
# parameter is needed only when the object was created using a checksum
|
415
|
+
# algorithm. For more information, see [Protecting data using SSE-C
|
416
|
+
# keys][1] in the *Amazon S3 User Guide*.
|
417
|
+
#
|
418
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
419
|
+
#
|
420
|
+
# </note>
|
421
|
+
#
|
422
|
+
#
|
423
|
+
#
|
424
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
268
425
|
# @return [Object]
|
269
426
|
def complete(options = {})
|
270
427
|
options = options.merge(
|
@@ -272,7 +429,9 @@ module Aws::S3
|
|
272
429
|
key: @object_key,
|
273
430
|
upload_id: @id
|
274
431
|
)
|
275
|
-
|
432
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
433
|
+
@client.complete_multipart_upload(options)
|
434
|
+
end
|
276
435
|
Object.new(
|
277
436
|
bucket_name: @bucket_name,
|
278
437
|
key: @object_key,
|
@@ -307,18 +466,71 @@ module Aws::S3
|
|
307
466
|
#
|
308
467
|
# parts = multipart_upload.parts({
|
309
468
|
# request_payer: "requester", # accepts requester
|
469
|
+
# expected_bucket_owner: "AccountId",
|
470
|
+
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
471
|
+
# sse_customer_key: "SSECustomerKey",
|
472
|
+
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
310
473
|
# })
|
311
474
|
# @param [Hash] options ({})
|
312
475
|
# @option options [String] :request_payer
|
313
476
|
# Confirms that the requester knows that they will be charged for the
|
314
477
|
# request. Bucket owners need not specify this parameter in their
|
315
|
-
# requests.
|
316
|
-
#
|
317
|
-
#
|
478
|
+
# requests. If either the source or destination S3 bucket has Requester
|
479
|
+
# Pays enabled, the requester will pay for corresponding charges to copy
|
480
|
+
# the object. For information about downloading objects from Requester
|
481
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
482
|
+
# in the *Amazon S3 User Guide*.
|
483
|
+
#
|
484
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
485
|
+
#
|
486
|
+
# </note>
|
318
487
|
#
|
319
488
|
#
|
320
489
|
#
|
321
490
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
491
|
+
# @option options [String] :expected_bucket_owner
|
492
|
+
# The account ID of the expected bucket owner. If the account ID that
|
493
|
+
# you provide does not match the actual owner of the bucket, the request
|
494
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
495
|
+
# @option options [String] :sse_customer_algorithm
|
496
|
+
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
497
|
+
# This parameter is needed only when the object was created using a
|
498
|
+
# checksum algorithm. For more information, see [Protecting data using
|
499
|
+
# SSE-C keys][1] in the *Amazon S3 User Guide*.
|
500
|
+
#
|
501
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
502
|
+
#
|
503
|
+
# </note>
|
504
|
+
#
|
505
|
+
#
|
506
|
+
#
|
507
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
508
|
+
# @option options [String] :sse_customer_key
|
509
|
+
# The server-side encryption (SSE) customer managed key. This parameter
|
510
|
+
# is needed only when the object was created using a checksum algorithm.
|
511
|
+
# For more information, see [Protecting data using SSE-C keys][1] in the
|
512
|
+
# *Amazon S3 User Guide*.
|
513
|
+
#
|
514
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
515
|
+
#
|
516
|
+
# </note>
|
517
|
+
#
|
518
|
+
#
|
519
|
+
#
|
520
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
521
|
+
# @option options [String] :sse_customer_key_md5
|
522
|
+
# The MD5 server-side encryption (SSE) customer managed key. This
|
523
|
+
# parameter is needed only when the object was created using a checksum
|
524
|
+
# algorithm. For more information, see [Protecting data using SSE-C
|
525
|
+
# keys][1] in the *Amazon S3 User Guide*.
|
526
|
+
#
|
527
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
528
|
+
#
|
529
|
+
# </note>
|
530
|
+
#
|
531
|
+
#
|
532
|
+
#
|
533
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
322
534
|
# @return [MultipartUploadPart::Collection]
|
323
535
|
def parts(options = {})
|
324
536
|
batches = Enumerator.new do |y|
|
@@ -327,7 +539,9 @@ module Aws::S3
|
|
327
539
|
key: @object_key,
|
328
540
|
upload_id: @id
|
329
541
|
)
|
330
|
-
resp =
|
542
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
543
|
+
@client.list_parts(options)
|
544
|
+
end
|
331
545
|
resp.each_page do |page|
|
332
546
|
batch = []
|
333
547
|
page.data.parts.each do |p|
|
@@ -395,3 +609,6 @@ module Aws::S3
|
|
395
609
|
class Collection < Aws::Resources::Collection; end
|
396
610
|
end
|
397
611
|
end
|
612
|
+
|
613
|
+
# Load customizations if they exist
|
614
|
+
require 'aws-sdk-s3/customizations/multipart_upload'
|