aws-sdk-s3 1.30.1 → 1.112.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +883 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +69 -0
- data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +69 -0
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +74 -0
- data/lib/aws-sdk-s3/bucket.rb +298 -77
- data/lib/aws-sdk-s3/bucket_acl.rb +41 -14
- data/lib/aws-sdk-s3/bucket_cors.rb +51 -13
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +38 -15
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +40 -15
- data/lib/aws-sdk-s3/bucket_logging.rb +36 -15
- data/lib/aws-sdk-s3/bucket_notification.rb +44 -15
- data/lib/aws-sdk-s3/bucket_policy.rb +35 -13
- data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
- data/lib/aws-sdk-s3/bucket_request_payment.rb +35 -12
- data/lib/aws-sdk-s3/bucket_tagging.rb +43 -13
- data/lib/aws-sdk-s3/bucket_versioning.rb +70 -12
- data/lib/aws-sdk-s3/bucket_website.rb +50 -13
- data/lib/aws-sdk-s3/client.rb +7889 -661
- data/lib/aws-sdk-s3/client_api.rb +436 -2
- data/lib/aws-sdk-s3/customizations/bucket.rb +59 -16
- 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 +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 +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/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 +53 -13
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +20 -7
- data/lib/aws-sdk-s3/multipart_upload.rb +64 -28
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +117 -43
- data/lib/aws-sdk-s3/object.rb +656 -152
- data/lib/aws-sdk-s3/object_acl.rb +65 -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 +485 -138
- data/lib/aws-sdk-s3/object_version.rb +117 -60
- data/lib/aws-sdk-s3/plugins/accelerate.rb +38 -38
- data/lib/aws-sdk-s3/plugins/arn.rb +254 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +8 -8
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +25 -3
- data/lib/aws-sdk-s3/plugins/dualstack.rb +38 -33
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +4 -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 +73 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
- data/lib/aws-sdk-s3/plugins/md5s.rb +30 -28
- data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
- 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 +89 -36
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +118 -0
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
- data/lib/aws-sdk-s3/presigned_post.rb +101 -49
- data/lib/aws-sdk-s3/presigner.rb +168 -66
- data/lib/aws-sdk-s3/resource.rb +41 -5
- data/lib/aws-sdk-s3/types.rb +6768 -1033
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +12 -6
- metadata +37 -13
@@ -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 MultipartUploadPart
|
10
13
|
|
11
14
|
extend Aws::Deprecations
|
@@ -30,6 +33,7 @@ module Aws::S3
|
|
30
33
|
@part_number = extract_part_number(args, options)
|
31
34
|
@data = options.delete(:data)
|
32
35
|
@client = options.delete(:client) || Client.new(options)
|
36
|
+
@waiter_block_warned = false
|
33
37
|
end
|
34
38
|
|
35
39
|
# @!group Read-Only Attributes
|
@@ -107,7 +111,8 @@ module Aws::S3
|
|
107
111
|
# Waiter polls an API operation until a resource enters a desired
|
108
112
|
# state.
|
109
113
|
#
|
110
|
-
# @note The waiting operation is performed on a copy. The original resource
|
114
|
+
# @note The waiting operation is performed on a copy. The original resource
|
115
|
+
# remains unchanged.
|
111
116
|
#
|
112
117
|
# ## Basic Usage
|
113
118
|
#
|
@@ -120,13 +125,15 @@ module Aws::S3
|
|
120
125
|
#
|
121
126
|
# ## Example
|
122
127
|
#
|
123
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
128
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
129
|
+
# instance.state.name == 'running'
|
130
|
+
# end
|
124
131
|
#
|
125
132
|
# ## Configuration
|
126
133
|
#
|
127
134
|
# You can configure the maximum number of polling attempts, and the
|
128
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
129
|
-
# by passing a block to {#wait_until}:
|
135
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
136
|
+
# set by passing a block to {#wait_until}:
|
130
137
|
#
|
131
138
|
# # poll for ~25 seconds
|
132
139
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -157,17 +164,16 @@ module Aws::S3
|
|
157
164
|
# # resource did not enter the desired state in time
|
158
165
|
# end
|
159
166
|
#
|
167
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
160
168
|
#
|
161
|
-
# @
|
162
|
-
#
|
163
|
-
#
|
164
|
-
# because the waiter has entered a state that it will not transition
|
165
|
-
# out of, preventing success.
|
169
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
170
|
+
# terminates because the waiter has entered a state that it will not
|
171
|
+
# transition out of, preventing success.
|
166
172
|
#
|
167
173
|
# yet successful.
|
168
174
|
#
|
169
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
170
|
-
# while polling for a resource that is not expected.
|
175
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
176
|
+
# encountered while polling for a resource that is not expected.
|
171
177
|
#
|
172
178
|
# @raise [NotImplementedError] Raised when the resource does not
|
173
179
|
#
|
@@ -215,11 +221,56 @@ module Aws::S3
|
|
215
221
|
# copy_source_sse_customer_key: "CopySourceSSECustomerKey",
|
216
222
|
# copy_source_sse_customer_key_md5: "CopySourceSSECustomerKeyMD5",
|
217
223
|
# request_payer: "requester", # accepts requester
|
224
|
+
# expected_bucket_owner: "AccountId",
|
225
|
+
# expected_source_bucket_owner: "AccountId",
|
218
226
|
# })
|
219
227
|
# @param [Hash] options ({})
|
220
228
|
# @option options [required, String] :copy_source
|
221
|
-
#
|
222
|
-
#
|
229
|
+
# Specifies the source object for the copy operation. You specify the
|
230
|
+
# value in one of two formats, depending on whether you want to access
|
231
|
+
# the source object through an [access point][1]\:
|
232
|
+
#
|
233
|
+
# * For objects not accessed through an access point, specify the name
|
234
|
+
# of the source bucket and key of the source object, separated by a
|
235
|
+
# slash (/). For example, to copy the object `reports/january.pdf`
|
236
|
+
# from the bucket `awsexamplebucket`, use
|
237
|
+
# `awsexamplebucket/reports/january.pdf`. The value must be URL
|
238
|
+
# encoded.
|
239
|
+
#
|
240
|
+
# * For objects accessed through access points, specify the Amazon
|
241
|
+
# Resource Name (ARN) of the object as accessed through the access
|
242
|
+
# point, in the format
|
243
|
+
# `arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>`.
|
244
|
+
# For example, to copy the object `reports/january.pdf` through access
|
245
|
+
# point `my-access-point` owned by account `123456789012` in Region
|
246
|
+
# `us-west-2`, use the URL encoding of
|
247
|
+
# `arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf`.
|
248
|
+
# The value must be URL encoded.
|
249
|
+
#
|
250
|
+
# <note markdown="1"> Amazon S3 supports copy operations using access points only when the
|
251
|
+
# source and destination buckets are in the same Amazon Web Services
|
252
|
+
# Region.
|
253
|
+
#
|
254
|
+
# </note>
|
255
|
+
#
|
256
|
+
# Alternatively, for objects accessed through Amazon S3 on Outposts,
|
257
|
+
# specify the ARN of the object as accessed in the format
|
258
|
+
# `arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>`.
|
259
|
+
# For example, to copy the object `reports/january.pdf` through
|
260
|
+
# outpost `my-outpost` owned by account `123456789012` in Region
|
261
|
+
# `us-west-2`, use the URL encoding of
|
262
|
+
# `arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf`.
|
263
|
+
# The value must be URL encoded.
|
264
|
+
#
|
265
|
+
# To copy a specific version of an object, append
|
266
|
+
# `?versionId=<version-id>` to the value (for example,
|
267
|
+
# `awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893`).
|
268
|
+
# If you don't specify a version ID, Amazon S3 copies the latest
|
269
|
+
# version of the source object.
|
270
|
+
#
|
271
|
+
#
|
272
|
+
#
|
273
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
|
223
274
|
# @option options [String] :copy_source_if_match
|
224
275
|
# Copies the object if its entity tag (ETag) matches the specified tag.
|
225
276
|
# @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
|
@@ -234,26 +285,26 @@ module Aws::S3
|
|
234
285
|
# The range of bytes to copy from the source object. The range value
|
235
286
|
# must use the form bytes=first-last, where the first and last are the
|
236
287
|
# zero-based byte offsets to copy. For example, bytes=0-9 indicates that
|
237
|
-
# you want to copy the first
|
238
|
-
# range only if the source object is greater than 5
|
288
|
+
# you want to copy the first 10 bytes of the source. You can copy a
|
289
|
+
# range only if the source object is greater than 5 MB.
|
239
290
|
# @option options [String] :sse_customer_algorithm
|
240
|
-
# Specifies the algorithm to use to when encrypting the object (
|
241
|
-
# AES256).
|
291
|
+
# Specifies the algorithm to use to when encrypting the object (for
|
292
|
+
# example, AES256).
|
242
293
|
# @option options [String] :sse_customer_key
|
243
294
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
244
295
|
# encrypting data. This value is used to store the object and then it is
|
245
|
-
# discarded; Amazon does not store the encryption key. The key must
|
246
|
-
# appropriate for use with the algorithm specified in the
|
247
|
-
# x-amz-server-side
|
296
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
297
|
+
# be appropriate for use with the algorithm specified in the
|
298
|
+
# `x-amz-server-side-encryption-customer-algorithm` header. This must be
|
248
299
|
# the same encryption key specified in the initiate multipart upload
|
249
300
|
# request.
|
250
301
|
# @option options [String] :sse_customer_key_md5
|
251
302
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
252
303
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
253
|
-
# ensure the encryption key was transmitted without error.
|
304
|
+
# ensure that the encryption key was transmitted without error.
|
254
305
|
# @option options [String] :copy_source_sse_customer_algorithm
|
255
|
-
# Specifies the algorithm to use when decrypting the source object
|
256
|
-
#
|
306
|
+
# Specifies the algorithm to use when decrypting the source object (for
|
307
|
+
# example, AES256).
|
257
308
|
# @option options [String] :copy_source_sse_customer_key
|
258
309
|
# Specifies the customer-provided encryption key for Amazon S3 to use to
|
259
310
|
# decrypt the source object. The encryption key provided in this header
|
@@ -261,13 +312,25 @@ module Aws::S3
|
|
261
312
|
# @option options [String] :copy_source_sse_customer_key_md5
|
262
313
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
263
314
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
264
|
-
# ensure the encryption key was transmitted without error.
|
315
|
+
# ensure that the encryption key was transmitted without error.
|
265
316
|
# @option options [String] :request_payer
|
266
|
-
# Confirms that the requester knows that
|
267
|
-
#
|
268
|
-
# requests.
|
269
|
-
# buckets
|
270
|
-
#
|
317
|
+
# Confirms that the requester knows that they will be charged for the
|
318
|
+
# request. Bucket owners need not specify this parameter in their
|
319
|
+
# requests. For information about downloading objects from requester
|
320
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
321
|
+
# in the *Amazon S3 User Guide*.
|
322
|
+
#
|
323
|
+
#
|
324
|
+
#
|
325
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
326
|
+
# @option options [String] :expected_bucket_owner
|
327
|
+
# The account ID of the expected destination bucket owner. If the
|
328
|
+
# destination bucket is owned by a different account, the request will
|
329
|
+
# fail with an HTTP `403 (Access Denied)` error.
|
330
|
+
# @option options [String] :expected_source_bucket_owner
|
331
|
+
# The account ID of the expected source bucket owner. If the source
|
332
|
+
# bucket is owned by a different account, the request will fail with an
|
333
|
+
# HTTP `403 (Access Denied)` error.
|
271
334
|
# @return [Types::UploadPartCopyOutput]
|
272
335
|
def copy_from(options = {})
|
273
336
|
options = options.merge(
|
@@ -290,36 +353,47 @@ module Aws::S3
|
|
290
353
|
# sse_customer_key: "SSECustomerKey",
|
291
354
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
292
355
|
# request_payer: "requester", # accepts requester
|
356
|
+
# expected_bucket_owner: "AccountId",
|
293
357
|
# })
|
294
358
|
# @param [Hash] options ({})
|
295
|
-
# @option options [String,
|
359
|
+
# @option options [String, StringIO, File] :body
|
296
360
|
# Object data.
|
297
361
|
# @option options [Integer] :content_length
|
298
362
|
# Size of the body in bytes. This parameter is useful when the size of
|
299
363
|
# the body cannot be determined automatically.
|
300
364
|
# @option options [String] :content_md5
|
301
|
-
# The base64-encoded 128-bit MD5 digest of the part data.
|
365
|
+
# The base64-encoded 128-bit MD5 digest of the part data. This parameter
|
366
|
+
# is auto-populated when using the command from the CLI. This parameter
|
367
|
+
# is required if object lock parameters are specified.
|
302
368
|
# @option options [String] :sse_customer_algorithm
|
303
|
-
# Specifies the algorithm to use to when encrypting the object (
|
304
|
-
# AES256).
|
369
|
+
# Specifies the algorithm to use to when encrypting the object (for
|
370
|
+
# example, AES256).
|
305
371
|
# @option options [String] :sse_customer_key
|
306
372
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
307
373
|
# encrypting data. This value is used to store the object and then it is
|
308
|
-
# discarded; Amazon does not store the encryption key. The key must
|
309
|
-
# appropriate for use with the algorithm specified in the
|
310
|
-
# x-amz-server-side
|
374
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
375
|
+
# be appropriate for use with the algorithm specified in the
|
376
|
+
# `x-amz-server-side-encryption-customer-algorithm header`. This must be
|
311
377
|
# the same encryption key specified in the initiate multipart upload
|
312
378
|
# request.
|
313
379
|
# @option options [String] :sse_customer_key_md5
|
314
380
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
315
381
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
316
|
-
# ensure the encryption key was transmitted without error.
|
382
|
+
# ensure that the encryption key was transmitted without error.
|
317
383
|
# @option options [String] :request_payer
|
318
|
-
# Confirms that the requester knows that
|
319
|
-
#
|
320
|
-
# requests.
|
321
|
-
# buckets
|
322
|
-
#
|
384
|
+
# Confirms that the requester knows that they will be charged for the
|
385
|
+
# request. Bucket owners need not specify this parameter in their
|
386
|
+
# requests. For information about downloading objects from requester
|
387
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
388
|
+
# in the *Amazon S3 User Guide*.
|
389
|
+
#
|
390
|
+
#
|
391
|
+
#
|
392
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
393
|
+
# @option options [String] :expected_bucket_owner
|
394
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
395
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
396
|
+
# Denied)` error.
|
323
397
|
# @return [Types::UploadPartOutput]
|
324
398
|
def upload(options = {})
|
325
399
|
options = options.merge(
|