aws-sdk-s3 1.30.0 → 1.114.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 +903 -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 +377 -77
- 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 +44 -15
- 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 +9016 -669
- data/lib/aws-sdk-s3/client_api.rb +786 -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 +78 -19
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +20 -7
- 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 +236 -43
- data/lib/aws-sdk-s3/object.rb +848 -162
- 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 +615 -144
- data/lib/aws-sdk-s3/object_version.rb +161 -68
- 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 +34 -30
- 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 +95 -36
- 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 +110 -51
- 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 +8652 -1146
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +12 -6
- metadata +38 -13
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -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 Bucket
|
10
13
|
|
11
14
|
extend Aws::Deprecations
|
@@ -21,6 +24,7 @@ module Aws::S3
|
|
21
24
|
@name = extract_name(args, options)
|
22
25
|
@data = options.delete(:data)
|
23
26
|
@client = options.delete(:client) || Client.new(options)
|
27
|
+
@waiter_block_warned = false
|
24
28
|
end
|
25
29
|
|
26
30
|
# @!group Read-Only Attributes
|
@@ -30,7 +34,8 @@ module Aws::S3
|
|
30
34
|
@name
|
31
35
|
end
|
32
36
|
|
33
|
-
# Date the bucket was created.
|
37
|
+
# Date the bucket was created. This date can change when making changes
|
38
|
+
# to your bucket, such as editing its bucket policy.
|
34
39
|
# @return [Time]
|
35
40
|
def creation_date
|
36
41
|
data[:creation_date]
|
@@ -86,10 +91,10 @@ module Aws::S3
|
|
86
91
|
# @option options [Proc] :before_attempt
|
87
92
|
# @option options [Proc] :before_wait
|
88
93
|
# @return [Bucket]
|
89
|
-
def wait_until_exists(options = {})
|
94
|
+
def wait_until_exists(options = {}, &block)
|
90
95
|
options, params = separate_params_and_options(options)
|
91
96
|
waiter = Waiters::BucketExists.new(options)
|
92
|
-
yield_waiter_and_warn(waiter, &
|
97
|
+
yield_waiter_and_warn(waiter, &block) if block_given?
|
93
98
|
waiter.wait(params.merge(bucket: @name))
|
94
99
|
Bucket.new({
|
95
100
|
name: @name,
|
@@ -103,10 +108,10 @@ module Aws::S3
|
|
103
108
|
# @option options [Proc] :before_attempt
|
104
109
|
# @option options [Proc] :before_wait
|
105
110
|
# @return [Bucket]
|
106
|
-
def wait_until_not_exists(options = {})
|
111
|
+
def wait_until_not_exists(options = {}, &block)
|
107
112
|
options, params = separate_params_and_options(options)
|
108
113
|
waiter = Waiters::BucketNotExists.new(options)
|
109
|
-
yield_waiter_and_warn(waiter, &
|
114
|
+
yield_waiter_and_warn(waiter, &block) if block_given?
|
110
115
|
waiter.wait(params.merge(bucket: @name))
|
111
116
|
Bucket.new({
|
112
117
|
name: @name,
|
@@ -119,7 +124,8 @@ module Aws::S3
|
|
119
124
|
# Waiter polls an API operation until a resource enters a desired
|
120
125
|
# state.
|
121
126
|
#
|
122
|
-
# @note The waiting operation is performed on a copy. The original resource
|
127
|
+
# @note The waiting operation is performed on a copy. The original resource
|
128
|
+
# remains unchanged.
|
123
129
|
#
|
124
130
|
# ## Basic Usage
|
125
131
|
#
|
@@ -132,13 +138,15 @@ module Aws::S3
|
|
132
138
|
#
|
133
139
|
# ## Example
|
134
140
|
#
|
135
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
141
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
142
|
+
# instance.state.name == 'running'
|
143
|
+
# end
|
136
144
|
#
|
137
145
|
# ## Configuration
|
138
146
|
#
|
139
147
|
# You can configure the maximum number of polling attempts, and the
|
140
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
141
|
-
# by passing a block to {#wait_until}:
|
148
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
149
|
+
# set by passing a block to {#wait_until}:
|
142
150
|
#
|
143
151
|
# # poll for ~25 seconds
|
144
152
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -169,17 +177,16 @@ module Aws::S3
|
|
169
177
|
# # resource did not enter the desired state in time
|
170
178
|
# end
|
171
179
|
#
|
180
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
172
181
|
#
|
173
|
-
# @
|
174
|
-
#
|
175
|
-
#
|
176
|
-
# because the waiter has entered a state that it will not transition
|
177
|
-
# out of, preventing success.
|
182
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
183
|
+
# terminates because the waiter has entered a state that it will not
|
184
|
+
# transition out of, preventing success.
|
178
185
|
#
|
179
186
|
# yet successful.
|
180
187
|
#
|
181
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
182
|
-
# while polling for a resource that is not expected.
|
188
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
189
|
+
# encountered while polling for a resource that is not expected.
|
183
190
|
#
|
184
191
|
# @raise [NotImplementedError] Raised when the resource does not
|
185
192
|
#
|
@@ -216,7 +223,7 @@ module Aws::S3
|
|
216
223
|
# bucket.create({
|
217
224
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
|
218
225
|
# create_bucket_configuration: {
|
219
|
-
# location_constraint: "
|
226
|
+
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
|
220
227
|
# },
|
221
228
|
# grant_full_control: "GrantFullControl",
|
222
229
|
# grant_read: "GrantRead",
|
@@ -224,11 +231,13 @@ module Aws::S3
|
|
224
231
|
# grant_write: "GrantWrite",
|
225
232
|
# grant_write_acp: "GrantWriteACP",
|
226
233
|
# object_lock_enabled_for_bucket: false,
|
234
|
+
# object_ownership: "BucketOwnerPreferred", # accepts BucketOwnerPreferred, ObjectWriter, BucketOwnerEnforced
|
227
235
|
# })
|
228
236
|
# @param [Hash] options ({})
|
229
237
|
# @option options [String] :acl
|
230
238
|
# The canned ACL to apply to the bucket.
|
231
239
|
# @option options [Types::CreateBucketConfiguration] :create_bucket_configuration
|
240
|
+
# The configuration information for the bucket.
|
232
241
|
# @option options [String] :grant_full_control
|
233
242
|
# Allows grantee the read, write, read ACP, and write ACP permissions on
|
234
243
|
# the bucket.
|
@@ -237,13 +246,32 @@ module Aws::S3
|
|
237
246
|
# @option options [String] :grant_read_acp
|
238
247
|
# Allows grantee to read the bucket ACL.
|
239
248
|
# @option options [String] :grant_write
|
240
|
-
# Allows grantee to create
|
241
|
-
#
|
249
|
+
# Allows grantee to create new objects in the bucket.
|
250
|
+
#
|
251
|
+
# For the bucket and object owners of existing objects, also allows
|
252
|
+
# deletions and overwrites of those objects.
|
242
253
|
# @option options [String] :grant_write_acp
|
243
254
|
# Allows grantee to write the ACL for the applicable bucket.
|
244
255
|
# @option options [Boolean] :object_lock_enabled_for_bucket
|
245
256
|
# Specifies whether you want S3 Object Lock to be enabled for the new
|
246
257
|
# bucket.
|
258
|
+
# @option options [String] :object_ownership
|
259
|
+
# The container element for object ownership for a bucket's ownership
|
260
|
+
# controls.
|
261
|
+
#
|
262
|
+
# BucketOwnerPreferred - Objects uploaded to the bucket change ownership
|
263
|
+
# to the bucket owner if the objects are uploaded with the
|
264
|
+
# `bucket-owner-full-control` canned ACL.
|
265
|
+
#
|
266
|
+
# ObjectWriter - The uploading account will own the object if the object
|
267
|
+
# is uploaded with the `bucket-owner-full-control` canned ACL.
|
268
|
+
#
|
269
|
+
# BucketOwnerEnforced - Access control lists (ACLs) are disabled and no
|
270
|
+
# longer affect permissions. The bucket owner automatically owns and has
|
271
|
+
# full control over every object in the bucket. The bucket only accepts
|
272
|
+
# PUT requests that don't specify an ACL or bucket owner full control
|
273
|
+
# ACLs, such as the `bucket-owner-full-control` canned ACL or an
|
274
|
+
# equivalent form of this ACL expressed in the XML format.
|
247
275
|
# @return [Types::CreateBucketOutput]
|
248
276
|
def create(options = {})
|
249
277
|
options = options.merge(bucket: @name)
|
@@ -253,8 +281,14 @@ module Aws::S3
|
|
253
281
|
|
254
282
|
# @example Request syntax with placeholder values
|
255
283
|
#
|
256
|
-
# bucket.delete(
|
284
|
+
# bucket.delete({
|
285
|
+
# expected_bucket_owner: "AccountId",
|
286
|
+
# })
|
257
287
|
# @param [Hash] options ({})
|
288
|
+
# @option options [String] :expected_bucket_owner
|
289
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
290
|
+
# a different account, the request fails with the HTTP status code `403
|
291
|
+
# Forbidden` (access denied).
|
258
292
|
# @return [EmptyStructure]
|
259
293
|
def delete(options = {})
|
260
294
|
options = options.merge(bucket: @name)
|
@@ -277,22 +311,53 @@ module Aws::S3
|
|
277
311
|
# mfa: "MFA",
|
278
312
|
# request_payer: "requester", # accepts requester
|
279
313
|
# bypass_governance_retention: false,
|
314
|
+
# expected_bucket_owner: "AccountId",
|
315
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
280
316
|
# })
|
281
317
|
# @param [Hash] options ({})
|
282
318
|
# @option options [required, Types::Delete] :delete
|
319
|
+
# Container for the request.
|
283
320
|
# @option options [String] :mfa
|
284
321
|
# The concatenation of the authentication device's serial number, a
|
285
322
|
# space, and the value that is displayed on your authentication device.
|
323
|
+
# Required to permanently delete a versioned object if versioning is
|
324
|
+
# configured with MFA delete enabled.
|
286
325
|
# @option options [String] :request_payer
|
287
|
-
# Confirms that the requester knows that
|
288
|
-
#
|
289
|
-
# requests.
|
290
|
-
# buckets
|
291
|
-
#
|
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
|
292
335
|
# @option options [Boolean] :bypass_governance_retention
|
293
336
|
# Specifies whether you want to delete this object even if it has a
|
294
|
-
# Governance-type Object Lock in place.
|
295
|
-
#
|
337
|
+
# Governance-type Object Lock in place. To use this header, you must
|
338
|
+
# have the `s3:BypassGovernanceRetention` permission.
|
339
|
+
# @option options [String] :expected_bucket_owner
|
340
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
341
|
+
# a different account, the request fails with the HTTP status code `403
|
342
|
+
# Forbidden` (access denied).
|
343
|
+
# @option options [String] :checksum_algorithm
|
344
|
+
# Indicates the algorithm used to create the checksum for the object
|
345
|
+
# when using the SDK. This header will not provide any additional
|
346
|
+
# functionality if not using the SDK. When sending this header, there
|
347
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
348
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
349
|
+
# `400 Bad Request`. For more information, see [Checking object
|
350
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
351
|
+
#
|
352
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
353
|
+
# `ChecksumAlgorithm` parameter.
|
354
|
+
#
|
355
|
+
# This checksum algorithm must be the same for all parts and it match
|
356
|
+
# the checksum value supplied in the `CreateMultipartUpload` request.
|
357
|
+
#
|
358
|
+
#
|
359
|
+
#
|
360
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
296
361
|
# @return [Types::DeleteObjectsOutput]
|
297
362
|
def delete_objects(options = {})
|
298
363
|
options = options.merge(bucket: @name)
|
@@ -312,6 +377,11 @@ module Aws::S3
|
|
312
377
|
# content_length: 1,
|
313
378
|
# content_md5: "ContentMD5",
|
314
379
|
# content_type: "ContentType",
|
380
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
381
|
+
# checksum_crc32: "ChecksumCRC32",
|
382
|
+
# checksum_crc32c: "ChecksumCRC32C",
|
383
|
+
# checksum_sha1: "ChecksumSHA1",
|
384
|
+
# checksum_sha256: "ChecksumSHA256",
|
315
385
|
# expires: Time.now,
|
316
386
|
# grant_full_control: "GrantFullControl",
|
317
387
|
# grant_read: "GrantRead",
|
@@ -322,89 +392,256 @@ module Aws::S3
|
|
322
392
|
# "MetadataKey" => "MetadataValue",
|
323
393
|
# },
|
324
394
|
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
325
|
-
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER
|
395
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR
|
326
396
|
# website_redirect_location: "WebsiteRedirectLocation",
|
327
397
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
328
398
|
# sse_customer_key: "SSECustomerKey",
|
329
399
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
330
400
|
# ssekms_key_id: "SSEKMSKeyId",
|
401
|
+
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
402
|
+
# bucket_key_enabled: false,
|
331
403
|
# request_payer: "requester", # accepts requester
|
332
404
|
# tagging: "TaggingHeader",
|
333
405
|
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
334
406
|
# object_lock_retain_until_date: Time.now,
|
335
407
|
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
408
|
+
# expected_bucket_owner: "AccountId",
|
336
409
|
# })
|
337
410
|
# @param [Hash] options ({})
|
338
411
|
# @option options [String] :acl
|
339
|
-
# The canned ACL to apply to the object.
|
340
|
-
#
|
412
|
+
# The canned ACL to apply to the object. For more information, see
|
413
|
+
# [Canned ACL][1].
|
414
|
+
#
|
415
|
+
# This action is not supported by Amazon S3 on Outposts.
|
416
|
+
#
|
417
|
+
#
|
418
|
+
#
|
419
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
420
|
+
# @option options [String, StringIO, File] :body
|
341
421
|
# Object data.
|
342
422
|
# @option options [String] :cache_control
|
343
|
-
#
|
423
|
+
# Can be used to specify caching behavior along the request/reply chain.
|
424
|
+
# For more information, see
|
425
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9][1].
|
426
|
+
#
|
427
|
+
#
|
428
|
+
#
|
429
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
|
344
430
|
# @option options [String] :content_disposition
|
345
|
-
# Specifies presentational information for the object.
|
431
|
+
# Specifies presentational information for the object. For more
|
432
|
+
# information, see
|
433
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1][1].
|
434
|
+
#
|
435
|
+
#
|
436
|
+
#
|
437
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1
|
346
438
|
# @option options [String] :content_encoding
|
347
439
|
# Specifies what content encodings have been applied to the object and
|
348
440
|
# thus what decoding mechanisms must be applied to obtain the media-type
|
349
|
-
# referenced by the Content-Type header field.
|
441
|
+
# referenced by the Content-Type header field. For more information, see
|
442
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11][1].
|
443
|
+
#
|
444
|
+
#
|
445
|
+
#
|
446
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
|
350
447
|
# @option options [String] :content_language
|
351
448
|
# The language the content is in.
|
352
449
|
# @option options [Integer] :content_length
|
353
450
|
# Size of the body in bytes. This parameter is useful when the size of
|
354
|
-
# the body cannot be determined automatically.
|
451
|
+
# the body cannot be determined automatically. For more information, see
|
452
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13][1].
|
453
|
+
#
|
454
|
+
#
|
455
|
+
#
|
456
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
|
355
457
|
# @option options [String] :content_md5
|
356
|
-
# The base64-encoded 128-bit MD5 digest of the
|
458
|
+
# The base64-encoded 128-bit MD5 digest of the message (without the
|
459
|
+
# headers) according to RFC 1864. This header can be used as a message
|
460
|
+
# integrity check to verify that the data is the same data that was
|
461
|
+
# originally sent. Although it is optional, we recommend using the
|
462
|
+
# Content-MD5 mechanism as an end-to-end integrity check. For more
|
463
|
+
# information about REST request authentication, see [REST
|
464
|
+
# Authentication][1].
|
465
|
+
#
|
466
|
+
#
|
467
|
+
#
|
468
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
357
469
|
# @option options [String] :content_type
|
358
|
-
# A standard MIME type describing the format of the
|
470
|
+
# A standard MIME type describing the format of the contents. For more
|
471
|
+
# information, see
|
472
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17][1].
|
473
|
+
#
|
474
|
+
#
|
475
|
+
#
|
476
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
|
477
|
+
# @option options [String] :checksum_algorithm
|
478
|
+
# Indicates the algorithm used to create the checksum for the object
|
479
|
+
# when using the SDK. This header will not provide any additional
|
480
|
+
# functionality if not using the SDK. When sending this header, there
|
481
|
+
# must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
|
482
|
+
# sent. Otherwise, Amazon S3 fails the request with the HTTP status code
|
483
|
+
# `400 Bad Request`. For more information, see [Checking object
|
484
|
+
# integrity][1] in the *Amazon S3 User Guide*.
|
485
|
+
#
|
486
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
487
|
+
# `ChecksumAlgorithm` parameter.
|
488
|
+
#
|
489
|
+
#
|
490
|
+
#
|
491
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
492
|
+
# @option options [String] :checksum_crc32
|
493
|
+
# This header can be used as a data integrity check to verify that the
|
494
|
+
# data received is the same data that was originally sent. This header
|
495
|
+
# specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
|
496
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
497
|
+
# User Guide*.
|
498
|
+
#
|
499
|
+
#
|
500
|
+
#
|
501
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
502
|
+
# @option options [String] :checksum_crc32c
|
503
|
+
# This header can be used as a data integrity check to verify that the
|
504
|
+
# data received is the same data that was originally sent. This header
|
505
|
+
# specifies the base64-encoded, 32-bit CRC32C checksum of the object.
|
506
|
+
# For more information, see [Checking object integrity][1] in the
|
507
|
+
# *Amazon S3 User Guide*.
|
508
|
+
#
|
509
|
+
#
|
510
|
+
#
|
511
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
512
|
+
# @option options [String] :checksum_sha1
|
513
|
+
# This header can be used as a data integrity check to verify that the
|
514
|
+
# data received is the same data that was originally sent. This header
|
515
|
+
# specifies the base64-encoded, 160-bit SHA-1 digest of the object. For
|
516
|
+
# more information, see [Checking object integrity][1] in the *Amazon S3
|
517
|
+
# User Guide*.
|
518
|
+
#
|
519
|
+
#
|
520
|
+
#
|
521
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
522
|
+
# @option options [String] :checksum_sha256
|
523
|
+
# This header can be used as a data integrity check to verify that the
|
524
|
+
# data received is the same data that was originally sent. This header
|
525
|
+
# specifies the base64-encoded, 256-bit SHA-256 digest of the object.
|
526
|
+
# For more information, see [Checking object integrity][1] in the
|
527
|
+
# *Amazon S3 User Guide*.
|
528
|
+
#
|
529
|
+
#
|
530
|
+
#
|
531
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
359
532
|
# @option options [Time,DateTime,Date,Integer,String] :expires
|
360
|
-
# The date and time at which the object is no longer cacheable.
|
533
|
+
# The date and time at which the object is no longer cacheable. For more
|
534
|
+
# information, see
|
535
|
+
# [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21][1].
|
536
|
+
#
|
537
|
+
#
|
538
|
+
#
|
539
|
+
# [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
|
361
540
|
# @option options [String] :grant_full_control
|
362
541
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
363
542
|
# object.
|
543
|
+
#
|
544
|
+
# This action is not supported by Amazon S3 on Outposts.
|
364
545
|
# @option options [String] :grant_read
|
365
546
|
# Allows grantee to read the object data and its metadata.
|
547
|
+
#
|
548
|
+
# This action is not supported by Amazon S3 on Outposts.
|
366
549
|
# @option options [String] :grant_read_acp
|
367
550
|
# Allows grantee to read the object ACL.
|
551
|
+
#
|
552
|
+
# This action is not supported by Amazon S3 on Outposts.
|
368
553
|
# @option options [String] :grant_write_acp
|
369
554
|
# Allows grantee to write the ACL for the applicable object.
|
555
|
+
#
|
556
|
+
# This action is not supported by Amazon S3 on Outposts.
|
370
557
|
# @option options [required, String] :key
|
371
|
-
# Object key for which the PUT
|
558
|
+
# Object key for which the PUT action was initiated.
|
372
559
|
# @option options [Hash<String,String>] :metadata
|
373
560
|
# A map of metadata to store with the object in S3.
|
374
561
|
# @option options [String] :server_side_encryption
|
375
|
-
# The
|
376
|
-
# S3 (
|
562
|
+
# The server-side encryption algorithm used when storing this object in
|
563
|
+
# Amazon S3 (for example, AES256, aws:kms).
|
377
564
|
# @option options [String] :storage_class
|
378
|
-
#
|
565
|
+
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
566
|
+
# created objects. The STANDARD storage class provides high durability
|
567
|
+
# and high availability. Depending on performance needs, you can specify
|
568
|
+
# a different Storage Class. Amazon S3 on Outposts only uses the
|
569
|
+
# OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
|
570
|
+
# in the *Amazon S3 User Guide*.
|
571
|
+
#
|
572
|
+
#
|
573
|
+
#
|
574
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
|
379
575
|
# @option options [String] :website_redirect_location
|
380
576
|
# If the bucket is configured as a website, redirects requests for this
|
381
577
|
# object to another object in the same bucket or to an external URL.
|
382
|
-
# Amazon S3 stores the value of this header in the object metadata.
|
578
|
+
# Amazon S3 stores the value of this header in the object metadata. For
|
579
|
+
# information about object metadata, see [Object Key and Metadata][1].
|
580
|
+
#
|
581
|
+
# In the following example, the request header sets the redirect to an
|
582
|
+
# object (anotherPage.html) in the same bucket:
|
583
|
+
#
|
584
|
+
# `x-amz-website-redirect-location: /anotherPage.html`
|
585
|
+
#
|
586
|
+
# In the following example, the request header sets the object redirect
|
587
|
+
# to another website:
|
588
|
+
#
|
589
|
+
# `x-amz-website-redirect-location: http://www.example.com/`
|
590
|
+
#
|
591
|
+
# For more information about website hosting in Amazon S3, see [Hosting
|
592
|
+
# Websites on Amazon S3][2] and [How to Configure Website Page
|
593
|
+
# Redirects][3].
|
594
|
+
#
|
595
|
+
#
|
596
|
+
#
|
597
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
|
598
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
|
599
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
|
383
600
|
# @option options [String] :sse_customer_algorithm
|
384
|
-
# Specifies the algorithm to use to when encrypting the object (
|
385
|
-
# AES256).
|
601
|
+
# Specifies the algorithm to use to when encrypting the object (for
|
602
|
+
# example, AES256).
|
386
603
|
# @option options [String] :sse_customer_key
|
387
604
|
# Specifies the customer-provided encryption key for Amazon S3 to use in
|
388
605
|
# encrypting data. This value is used to store the object and then it is
|
389
|
-
# discarded; Amazon does not store the encryption key. The key must
|
390
|
-
# appropriate for use with the algorithm specified in the
|
391
|
-
# x-amz-server-side
|
606
|
+
# discarded; Amazon S3 does not store the encryption key. The key must
|
607
|
+
# be appropriate for use with the algorithm specified in the
|
608
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
392
609
|
# @option options [String] :sse_customer_key_md5
|
393
610
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
394
611
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
395
|
-
# ensure the encryption key was transmitted without error.
|
612
|
+
# ensure that the encryption key was transmitted without error.
|
396
613
|
# @option options [String] :ssekms_key_id
|
397
|
-
#
|
398
|
-
#
|
399
|
-
#
|
400
|
-
#
|
401
|
-
#
|
614
|
+
# If `x-amz-server-side-encryption` is present and has the value of
|
615
|
+
# `aws:kms`, this header specifies the ID of the Amazon Web Services Key
|
616
|
+
# Management Service (Amazon Web Services KMS) symmetrical customer
|
617
|
+
# managed key that was used for the object. If you specify
|
618
|
+
# `x-amz-server-side-encryption:aws:kms`, but do not provide`
|
619
|
+
# x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
620
|
+
# Amazon Web Services managed key to protect the data. If the KMS key
|
621
|
+
# does not exist in the same account issuing the command, you must use
|
622
|
+
# the full ARN and not just the ID.
|
623
|
+
# @option options [String] :ssekms_encryption_context
|
624
|
+
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
625
|
+
# object encryption. The value of this header is a base64-encoded UTF-8
|
626
|
+
# string holding JSON with the encryption context key-value pairs.
|
627
|
+
# @option options [Boolean] :bucket_key_enabled
|
628
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
629
|
+
# encryption with server-side encryption using AWS KMS (SSE-KMS).
|
630
|
+
# Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
|
631
|
+
# for object encryption with SSE-KMS.
|
632
|
+
#
|
633
|
+
# Specifying this header with a PUT action doesn’t affect bucket-level
|
634
|
+
# settings for S3 Bucket Key.
|
402
635
|
# @option options [String] :request_payer
|
403
|
-
# Confirms that the requester knows that
|
404
|
-
#
|
405
|
-
# requests.
|
406
|
-
# buckets
|
407
|
-
#
|
636
|
+
# Confirms that the requester knows that they will be charged for the
|
637
|
+
# request. Bucket owners need not specify this parameter in their
|
638
|
+
# requests. For information about downloading objects from Requester
|
639
|
+
# Pays buckets, see [Downloading Objects in Requester Pays Buckets][1]
|
640
|
+
# in the *Amazon S3 User Guide*.
|
641
|
+
#
|
642
|
+
#
|
643
|
+
#
|
644
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
408
645
|
# @option options [String] :tagging
|
409
646
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
410
647
|
# parameters. (For example, "Key1=Value1")
|
@@ -412,12 +649,22 @@ module Aws::S3
|
|
412
649
|
# The Object Lock mode that you want to apply to this object.
|
413
650
|
# @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
|
414
651
|
# The date and time when you want this object's Object Lock to expire.
|
652
|
+
# Must be formatted as a timestamp parameter.
|
415
653
|
# @option options [String] :object_lock_legal_hold_status
|
416
|
-
#
|
654
|
+
# Specifies whether a legal hold will be applied to this object. For
|
655
|
+
# more information about S3 Object Lock, see [Object Lock][1].
|
656
|
+
#
|
657
|
+
#
|
658
|
+
#
|
659
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
660
|
+
# @option options [String] :expected_bucket_owner
|
661
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
662
|
+
# a different account, the request fails with the HTTP status code `403
|
663
|
+
# Forbidden` (access denied).
|
417
664
|
# @return [Object]
|
418
665
|
def put_object(options = {})
|
419
666
|
options = options.merge(bucket: @name)
|
420
|
-
|
667
|
+
@client.put_object(options)
|
421
668
|
Object.new(
|
422
669
|
bucket_name: @name,
|
423
670
|
key: options[:key],
|
@@ -475,10 +722,18 @@ module Aws::S3
|
|
475
722
|
# key_marker: "KeyMarker",
|
476
723
|
# prefix: "Prefix",
|
477
724
|
# upload_id_marker: "UploadIdMarker",
|
725
|
+
# expected_bucket_owner: "AccountId",
|
478
726
|
# })
|
479
727
|
# @param [Hash] options ({})
|
480
728
|
# @option options [String] :delimiter
|
481
729
|
# Character you use to group keys.
|
730
|
+
#
|
731
|
+
# All keys that contain the same string between the prefix, if
|
732
|
+
# specified, and the first occurrence of the delimiter after the prefix
|
733
|
+
# are grouped under a single result element, `CommonPrefixes`. If you
|
734
|
+
# don't specify the prefix parameter, then the substring starts at the
|
735
|
+
# beginning of the key. The keys that are grouped under `CommonPrefixes`
|
736
|
+
# result element are not returned elsewhere in the response.
|
482
737
|
# @option options [String] :encoding_type
|
483
738
|
# Requests Amazon S3 to encode the object keys in the response and
|
484
739
|
# specifies the encoding method to use. An object key may contain any
|
@@ -489,13 +744,31 @@ module Aws::S3
|
|
489
744
|
# @option options [String] :key_marker
|
490
745
|
# Together with upload-id-marker, this parameter specifies the multipart
|
491
746
|
# upload after which listing should begin.
|
747
|
+
#
|
748
|
+
# If `upload-id-marker` is not specified, only the keys
|
749
|
+
# lexicographically greater than the specified `key-marker` will be
|
750
|
+
# included in the list.
|
751
|
+
#
|
752
|
+
# If `upload-id-marker` is specified, any multipart uploads for a key
|
753
|
+
# equal to the `key-marker` might also be included, provided those
|
754
|
+
# multipart uploads have upload IDs lexicographically greater than the
|
755
|
+
# specified `upload-id-marker`.
|
492
756
|
# @option options [String] :prefix
|
493
757
|
# Lists in-progress uploads only for those keys that begin with the
|
494
|
-
# specified prefix.
|
758
|
+
# specified prefix. You can use prefixes to separate a bucket into
|
759
|
+
# different grouping of keys. (You can think of using prefix to make
|
760
|
+
# groups in the same way you'd use a folder in a file system.)
|
495
761
|
# @option options [String] :upload_id_marker
|
496
762
|
# Together with key-marker, specifies the multipart upload after which
|
497
763
|
# listing should begin. If key-marker is not specified, the
|
498
|
-
# upload-id-marker parameter is ignored.
|
764
|
+
# upload-id-marker parameter is ignored. Otherwise, any multipart
|
765
|
+
# uploads for a key equal to the key-marker might be included in the
|
766
|
+
# list only if they have an upload ID lexicographically greater than the
|
767
|
+
# specified `upload-id-marker`.
|
768
|
+
# @option options [String] :expected_bucket_owner
|
769
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
770
|
+
# a different account, the request fails with the HTTP status code `403
|
771
|
+
# Forbidden` (access denied).
|
499
772
|
# @return [MultipartUpload::Collection]
|
500
773
|
def multipart_uploads(options = {})
|
501
774
|
batches = Enumerator.new do |y|
|
@@ -544,10 +817,16 @@ module Aws::S3
|
|
544
817
|
# key_marker: "KeyMarker",
|
545
818
|
# prefix: "Prefix",
|
546
819
|
# version_id_marker: "VersionIdMarker",
|
820
|
+
# expected_bucket_owner: "AccountId",
|
547
821
|
# })
|
548
822
|
# @param [Hash] options ({})
|
549
823
|
# @option options [String] :delimiter
|
550
|
-
# A delimiter is a character you
|
824
|
+
# A delimiter is a character that you specify to group keys. All keys
|
825
|
+
# that contain the same string between the `prefix` and the first
|
826
|
+
# occurrence of the delimiter are grouped under a single result element
|
827
|
+
# in CommonPrefixes. These groups are counted as one result against the
|
828
|
+
# max-keys limitation. These keys are not returned elsewhere in the
|
829
|
+
# response.
|
551
830
|
# @option options [String] :encoding_type
|
552
831
|
# Requests Amazon S3 to encode the object keys in the response and
|
553
832
|
# specifies the encoding method to use. An object key may contain any
|
@@ -558,9 +837,18 @@ module Aws::S3
|
|
558
837
|
# @option options [String] :key_marker
|
559
838
|
# Specifies the key to start with when listing objects in a bucket.
|
560
839
|
# @option options [String] :prefix
|
561
|
-
#
|
840
|
+
# Use this parameter to select only those keys that begin with the
|
841
|
+
# specified prefix. You can use prefixes to separate a bucket into
|
842
|
+
# different groupings of keys. (You can think of using prefix to make
|
843
|
+
# groups in the same way you'd use a folder in a file system.) You can
|
844
|
+
# use prefix with delimiter to roll up numerous objects into a single
|
845
|
+
# result under CommonPrefixes.
|
562
846
|
# @option options [String] :version_id_marker
|
563
847
|
# Specifies the object version you want to start listing from.
|
848
|
+
# @option options [String] :expected_bucket_owner
|
849
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
850
|
+
# a different account, the request fails with the HTTP status code `403
|
851
|
+
# Forbidden` (access denied).
|
564
852
|
# @return [ObjectVersion::Collection]
|
565
853
|
def object_versions(options = {})
|
566
854
|
batches = Enumerator.new do |y|
|
@@ -589,29 +877,39 @@ module Aws::S3
|
|
589
877
|
# delimiter: "Delimiter",
|
590
878
|
# encoding_type: "url", # accepts url
|
591
879
|
# prefix: "Prefix",
|
880
|
+
# fetch_owner: false,
|
881
|
+
# start_after: "StartAfter",
|
592
882
|
# request_payer: "requester", # accepts requester
|
883
|
+
# expected_bucket_owner: "AccountId",
|
593
884
|
# })
|
594
885
|
# @param [Hash] options ({})
|
595
886
|
# @option options [String] :delimiter
|
596
887
|
# A delimiter is a character you use to group keys.
|
597
888
|
# @option options [String] :encoding_type
|
598
|
-
#
|
599
|
-
# specifies the encoding method to use. An object key may contain any
|
600
|
-
# Unicode character; however, XML 1.0 parser cannot parse some
|
601
|
-
# characters, such as characters with an ASCII value from 0 to 10. For
|
602
|
-
# characters that are not supported in XML 1.0, you can add this
|
603
|
-
# parameter to request that Amazon S3 encode the keys in the response.
|
889
|
+
# Encoding type used by Amazon S3 to encode object keys in the response.
|
604
890
|
# @option options [String] :prefix
|
605
891
|
# Limits the response to keys that begin with the specified prefix.
|
892
|
+
# @option options [Boolean] :fetch_owner
|
893
|
+
# The owner field is not present in listV2 by default, if you want to
|
894
|
+
# return owner field with each key in the result then set the fetch
|
895
|
+
# owner field to true.
|
896
|
+
# @option options [String] :start_after
|
897
|
+
# StartAfter is where you want Amazon S3 to start listing from. Amazon
|
898
|
+
# S3 starts listing after this specified key. StartAfter can be any key
|
899
|
+
# in the bucket.
|
606
900
|
# @option options [String] :request_payer
|
607
901
|
# Confirms that the requester knows that she or he will be charged for
|
608
|
-
# the list objects request. Bucket owners need not specify
|
609
|
-
# parameter in their requests.
|
902
|
+
# the list objects request in V2 style. Bucket owners need not specify
|
903
|
+
# this parameter in their requests.
|
904
|
+
# @option options [String] :expected_bucket_owner
|
905
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
906
|
+
# a different account, the request fails with the HTTP status code `403
|
907
|
+
# Forbidden` (access denied).
|
610
908
|
# @return [ObjectSummary::Collection]
|
611
909
|
def objects(options = {})
|
612
910
|
batches = Enumerator.new do |y|
|
613
911
|
options = options.merge(bucket: @name)
|
614
|
-
resp = @client.
|
912
|
+
resp = @client.list_objects_v2(options)
|
615
913
|
resp.each_page do |page|
|
616
914
|
batch = []
|
617
915
|
page.data.contents.each do |c|
|
@@ -690,8 +988,8 @@ module Aws::S3
|
|
690
988
|
|
691
989
|
def yield_waiter_and_warn(waiter, &block)
|
692
990
|
if !@waiter_block_warned
|
693
|
-
msg = "pass options to configure the waiter; "
|
694
|
-
|
991
|
+
msg = "pass options to configure the waiter; "\
|
992
|
+
"yielding the waiter is deprecated"
|
695
993
|
warn(msg)
|
696
994
|
@waiter_block_warned = true
|
697
995
|
end
|
@@ -699,7 +997,9 @@ module Aws::S3
|
|
699
997
|
end
|
700
998
|
|
701
999
|
def separate_params_and_options(options)
|
702
|
-
opts = Set.new(
|
1000
|
+
opts = Set.new(
|
1001
|
+
[:client, :max_attempts, :delay, :before_attempt, :before_wait]
|
1002
|
+
)
|
703
1003
|
waiter_opts = {}
|
704
1004
|
waiter_params = {}
|
705
1005
|
options.each_pair do |key, value|
|