aws-sdk-s3 1.122.0 → 1.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +94 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +108 -49
- data/lib/aws-sdk-s3/bucket_acl.rb +9 -3
- data/lib/aws-sdk-s3/bucket_cors.rb +12 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -4
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -4
- data/lib/aws-sdk-s3/bucket_logging.rb +9 -3
- data/lib/aws-sdk-s3/bucket_notification.rb +9 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +12 -4
- data/lib/aws-sdk-s3/bucket_request_payment.rb +9 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +12 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +15 -5
- data/lib/aws-sdk-s3/bucket_website.rb +12 -4
- data/lib/aws-sdk-s3/client.rb +727 -626
- data/lib/aws-sdk-s3/client_api.rb +24 -0
- data/lib/aws-sdk-s3/customizations/bucket.rb +3 -1
- data/lib/aws-sdk-s3/customizations/errors.rb +1 -1
- data/lib/aws-sdk-s3/customizations/object.rb +91 -18
- data/lib/aws-sdk-s3/encryption/client.rb +6 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
- data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
- data/lib/aws-sdk-s3/endpoint_parameters.rb +4 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +22 -246
- data/lib/aws-sdk-s3/endpoints.rb +1 -0
- data/lib/aws-sdk-s3/file_downloader.rb +170 -44
- data/lib/aws-sdk-s3/file_uploader.rb +8 -6
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +5 -3
- data/lib/aws-sdk-s3/multipart_upload.rb +27 -13
- data/lib/aws-sdk-s3/multipart_upload_part.rb +19 -9
- data/lib/aws-sdk-s3/object.rb +125 -84
- data/lib/aws-sdk-s3/object_acl.rb +14 -6
- data/lib/aws-sdk-s3/object_copier.rb +7 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +33 -17
- data/lib/aws-sdk-s3/object_summary.rb +123 -74
- data/lib/aws-sdk-s3/object_version.rb +49 -17
- data/lib/aws-sdk-s3/presigned_post.rb +52 -43
- data/lib/aws-sdk-s3/presigner.rb +4 -2
- data/lib/aws-sdk-s3/resource.rb +7 -3
- data/lib/aws-sdk-s3/types.rb +529 -299
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a563e0602ed3c1393406bb2158324b9571f7c579924f3f349fe237333d218d1
|
4
|
+
data.tar.gz: 4559f4a20a3abd9dcddde15fd814012e3874813d2e5cc15cd0066125aea8348f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03eda70ab440bdf32208be9a6f8bbe5435d77090ef6198129b9cb06b91d2aba9fb5bb3820d53380af6863f4538344d6833d507d5c46b3609d648f2c52a26561c
|
7
|
+
data.tar.gz: 43cd7b5022e8602f9590463478de5adf88de7cc31d1d13179551b9434a21fd6150c61009b98796eddc91a772c70e47698e58720f79733ad03ea638c27e052653
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,100 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.136.0 (2023-09-26)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - This release adds a new field COMPLETED to the ReplicationStatus Enum. You can now use this field to validate the replication status of S3 objects using the AWS SDK.
|
8
|
+
|
9
|
+
1.135.0 (2023-09-20)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Fix an issue where the SDK can fail to unmarshall response due to NumberFormatException
|
13
|
+
|
14
|
+
1.134.0 (2023-08-24)
|
15
|
+
------------------
|
16
|
+
|
17
|
+
* Feature - Updates to endpoint ruleset tests to address Smithy validation issues.
|
18
|
+
|
19
|
+
1.133.0 (2023-08-22)
|
20
|
+
------------------
|
21
|
+
|
22
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
23
|
+
|
24
|
+
* Feature - Add support for `progress_callback` in `Object#download_file` and improve multi-threaded performance #(2901).
|
25
|
+
|
26
|
+
1.132.1 (2023-08-09)
|
27
|
+
------------------
|
28
|
+
|
29
|
+
* Issue - Add support for disabling checksum validation in `Object#download_file` (#2893).
|
30
|
+
|
31
|
+
1.132.0 (2023-07-24)
|
32
|
+
------------------
|
33
|
+
|
34
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
35
|
+
|
36
|
+
* Feature - Add support for verifying checksums in FileDownloader.
|
37
|
+
|
38
|
+
1.131.0 (2023-07-20)
|
39
|
+
------------------
|
40
|
+
|
41
|
+
* Feature - Improve performance of S3 clients by simplifying and optimizing endpoint resolution.
|
42
|
+
|
43
|
+
1.130.0 (2023-07-13)
|
44
|
+
------------------
|
45
|
+
|
46
|
+
* Feature - S3 Inventory now supports Object Access Control List and Object Owner as available object metadata fields in inventory reports.
|
47
|
+
|
48
|
+
* Feature - Allow Object multipart copy API to work when requiring a checksum algorithm.
|
49
|
+
* Feature - Allow Object multipart copy API to optionally copy parts as they exist on the source object if it has parts, instead of generating new part ranges, when specifying `use_source_parts: true`.
|
50
|
+
|
51
|
+
1.129.0 (2023-07-11)
|
52
|
+
------------------
|
53
|
+
|
54
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
55
|
+
|
56
|
+
1.128.0 (2023-07-06)
|
57
|
+
------------------
|
58
|
+
|
59
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
60
|
+
|
61
|
+
1.127.0 (2023-06-28)
|
62
|
+
------------------
|
63
|
+
|
64
|
+
* Feature - The S3 LISTObjects, ListObjectsV2 and ListObjectVersions API now supports a new optional header x-amz-optional-object-attributes. If header contains RestoreStatus as the value, then S3 will include Glacier restore status i.e. isRestoreInProgress and RestoreExpiryDate in List response.
|
65
|
+
|
66
|
+
* Feature - Select minimum expiration time for presigned urls between the expiration time option and the credential expiration time.
|
67
|
+
|
68
|
+
1.126.0 (2023-06-16)
|
69
|
+
------------------
|
70
|
+
|
71
|
+
* Feature - This release adds SDK support for request-payer request header and request-charged response header in the "GetBucketAccelerateConfiguration", "ListMultipartUploads", "ListObjects", "ListObjectsV2" and "ListObjectVersions" S3 APIs.
|
72
|
+
|
73
|
+
1.125.0 (2023-06-15)
|
74
|
+
------------------
|
75
|
+
|
76
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
77
|
+
|
78
|
+
1.124.0 (2023-06-13)
|
79
|
+
------------------
|
80
|
+
|
81
|
+
* Feature - Integrate double encryption feature to SDKs.
|
82
|
+
|
83
|
+
1.123.2 (2023-06-12)
|
84
|
+
------------------
|
85
|
+
|
86
|
+
* Issue - Fix issue when decrypting noncurrent versions of objects when using client side encryption (#2866).
|
87
|
+
|
88
|
+
1.123.1 (2023-06-02)
|
89
|
+
------------------
|
90
|
+
|
91
|
+
* Issue - Fix multipart `download_file` so that it does not download bytes out of range (#2859).
|
92
|
+
|
93
|
+
1.123.0 (2023-05-31)
|
94
|
+
------------------
|
95
|
+
|
96
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
97
|
+
|
4
98
|
1.122.0 (2023-05-04)
|
5
99
|
------------------
|
6
100
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.136.0
|
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -95,7 +95,9 @@ module Aws::S3
|
|
95
95
|
options, params = separate_params_and_options(options)
|
96
96
|
waiter = Waiters::BucketExists.new(options)
|
97
97
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
98
|
-
|
98
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
99
|
+
waiter.wait(params.merge(bucket: @name))
|
100
|
+
end
|
99
101
|
Bucket.new({
|
100
102
|
name: @name,
|
101
103
|
client: @client
|
@@ -112,7 +114,9 @@ module Aws::S3
|
|
112
114
|
options, params = separate_params_and_options(options)
|
113
115
|
waiter = Waiters::BucketNotExists.new(options)
|
114
116
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
115
|
-
|
117
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
118
|
+
waiter.wait(params.merge(bucket: @name))
|
119
|
+
end
|
116
120
|
Bucket.new({
|
117
121
|
name: @name,
|
118
122
|
client: @client
|
@@ -213,7 +217,9 @@ module Aws::S3
|
|
213
217
|
:retry
|
214
218
|
end
|
215
219
|
end
|
216
|
-
Aws::
|
220
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
221
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
222
|
+
end
|
217
223
|
end
|
218
224
|
|
219
225
|
# @!group Actions
|
@@ -223,7 +229,7 @@ module Aws::S3
|
|
223
229
|
# bucket.create({
|
224
230
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
|
225
231
|
# create_bucket_configuration: {
|
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, ap-southeast-3, 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
|
232
|
+
# 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, ap-southeast-3, 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, ap-south-2, eu-south-2
|
227
233
|
# },
|
228
234
|
# grant_full_control: "GrantFullControl",
|
229
235
|
# grant_read: "GrantRead",
|
@@ -275,7 +281,9 @@ module Aws::S3
|
|
275
281
|
# @return [Types::CreateBucketOutput]
|
276
282
|
def create(options = {})
|
277
283
|
options = options.merge(bucket: @name)
|
278
|
-
resp =
|
284
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
285
|
+
@client.create_bucket(options)
|
286
|
+
end
|
279
287
|
resp.data
|
280
288
|
end
|
281
289
|
|
@@ -292,7 +300,9 @@ module Aws::S3
|
|
292
300
|
# @return [EmptyStructure]
|
293
301
|
def delete(options = {})
|
294
302
|
options = options.merge(bucket: @name)
|
295
|
-
resp =
|
303
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
304
|
+
@client.delete_bucket(options)
|
305
|
+
end
|
296
306
|
resp.data
|
297
307
|
end
|
298
308
|
|
@@ -325,9 +335,11 @@ module Aws::S3
|
|
325
335
|
# @option options [String] :request_payer
|
326
336
|
# Confirms that the requester knows that they will be charged for the
|
327
337
|
# request. Bucket owners need not specify this parameter in their
|
328
|
-
# requests.
|
329
|
-
# Pays
|
330
|
-
#
|
338
|
+
# requests. If either the source or destination Amazon S3 bucket has
|
339
|
+
# Requester Pays enabled, the requester will pay for corresponding
|
340
|
+
# charges to copy the object. For information about downloading objects
|
341
|
+
# from Requester Pays buckets, see [Downloading Objects in Requester
|
342
|
+
# Pays Buckets][1] in the *Amazon S3 User Guide*.
|
331
343
|
#
|
332
344
|
#
|
333
345
|
#
|
@@ -361,7 +373,9 @@ module Aws::S3
|
|
361
373
|
# @return [Types::DeleteObjectsOutput]
|
362
374
|
def delete_objects(options = {})
|
363
375
|
options = options.merge(bucket: @name)
|
364
|
-
resp =
|
376
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
377
|
+
@client.delete_objects(options)
|
378
|
+
end
|
365
379
|
resp.data
|
366
380
|
end
|
367
381
|
|
@@ -391,7 +405,7 @@ module Aws::S3
|
|
391
405
|
# metadata: {
|
392
406
|
# "MetadataKey" => "MetadataValue",
|
393
407
|
# },
|
394
|
-
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
408
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
395
409
|
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS, GLACIER_IR, SNOW
|
396
410
|
# website_redirect_location: "WebsiteRedirectLocation",
|
397
411
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
@@ -560,7 +574,7 @@ module Aws::S3
|
|
560
574
|
# A map of metadata to store with the object in S3.
|
561
575
|
# @option options [String] :server_side_encryption
|
562
576
|
# The server-side encryption algorithm used when storing this object in
|
563
|
-
# Amazon S3 (for example, AES256
|
577
|
+
# Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
|
564
578
|
# @option options [String] :storage_class
|
565
579
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
566
580
|
# created objects. The STANDARD storage class provides high durability
|
@@ -611,15 +625,16 @@ module Aws::S3
|
|
611
625
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
612
626
|
# ensure that the encryption key was transmitted without error.
|
613
627
|
# @option options [String] :ssekms_key_id
|
614
|
-
# If `x-amz-server-side-encryption` has a valid value of `aws:kms
|
615
|
-
# header specifies the ID
|
616
|
-
#
|
617
|
-
# managed key that was used for the object. If you specify
|
618
|
-
# `x-amz-server-side-encryption:aws:kms
|
628
|
+
# If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
|
629
|
+
# `aws:kms:dsse`, this header specifies the ID (Key ID, Key ARN, or Key
|
630
|
+
# Alias) of the Key Management Service (KMS) symmetric encryption
|
631
|
+
# customer managed key that was used for the object. If you specify
|
632
|
+
# `x-amz-server-side-encryption:aws:kms` or
|
633
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
|
619
634
|
# 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
|
621
|
-
# does not exist in the same account issuing the
|
622
|
-
# the full ARN and not just the ID.
|
635
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data. If the
|
636
|
+
# KMS key does not exist in the same account that's issuing the
|
637
|
+
# command, you must use the full ARN and not just the ID.
|
623
638
|
# @option options [String] :ssekms_encryption_context
|
624
639
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
625
640
|
# object encryption. The value of this header is a base64-encoded UTF-8
|
@@ -629,18 +644,20 @@ module Aws::S3
|
|
629
644
|
# operations on this object.
|
630
645
|
# @option options [Boolean] :bucket_key_enabled
|
631
646
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
632
|
-
# encryption with server-side encryption using
|
633
|
-
# Setting this header to `true` causes Amazon S3
|
634
|
-
# for object encryption with SSE-KMS.
|
647
|
+
# encryption with server-side encryption using Key Management Service
|
648
|
+
# (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
|
649
|
+
# to use an S3 Bucket Key for object encryption with SSE-KMS.
|
635
650
|
#
|
636
651
|
# Specifying this header with a PUT action doesn’t affect bucket-level
|
637
652
|
# settings for S3 Bucket Key.
|
638
653
|
# @option options [String] :request_payer
|
639
654
|
# Confirms that the requester knows that they will be charged for the
|
640
655
|
# request. Bucket owners need not specify this parameter in their
|
641
|
-
# requests.
|
642
|
-
# Pays
|
643
|
-
#
|
656
|
+
# requests. If either the source or destination Amazon S3 bucket has
|
657
|
+
# Requester Pays enabled, the requester will pay for corresponding
|
658
|
+
# charges to copy the object. For information about downloading objects
|
659
|
+
# from Requester Pays buckets, see [Downloading Objects in Requester
|
660
|
+
# Pays Buckets][1] in the *Amazon S3 User Guide*.
|
644
661
|
#
|
645
662
|
#
|
646
663
|
#
|
@@ -667,7 +684,9 @@ module Aws::S3
|
|
667
684
|
# @return [Object]
|
668
685
|
def put_object(options = {})
|
669
686
|
options = options.merge(bucket: @name)
|
670
|
-
|
687
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
688
|
+
@client.put_object(options)
|
689
|
+
end
|
671
690
|
Object.new(
|
672
691
|
bucket_name: @name,
|
673
692
|
key: options[:key],
|
@@ -726,6 +745,7 @@ module Aws::S3
|
|
726
745
|
# prefix: "Prefix",
|
727
746
|
# upload_id_marker: "UploadIdMarker",
|
728
747
|
# expected_bucket_owner: "AccountId",
|
748
|
+
# request_payer: "requester", # accepts requester
|
729
749
|
# })
|
730
750
|
# @param [Hash] options ({})
|
731
751
|
# @option options [String] :delimiter
|
@@ -739,14 +759,14 @@ module Aws::S3
|
|
739
759
|
# result element are not returned elsewhere in the response.
|
740
760
|
# @option options [String] :encoding_type
|
741
761
|
# Requests Amazon S3 to encode the object keys in the response and
|
742
|
-
# specifies the encoding method to use. An object key
|
743
|
-
# Unicode character; however, XML 1.0 parser cannot parse some
|
762
|
+
# specifies the encoding method to use. An object key can contain any
|
763
|
+
# Unicode character; however, the XML 1.0 parser cannot parse some
|
744
764
|
# characters, such as characters with an ASCII value from 0 to 10. For
|
745
765
|
# characters that are not supported in XML 1.0, you can add this
|
746
766
|
# parameter to request that Amazon S3 encode the keys in the response.
|
747
767
|
# @option options [String] :key_marker
|
748
|
-
# Together with upload-id-marker
|
749
|
-
# upload after which listing should begin.
|
768
|
+
# Together with `upload-id-marker`, this parameter specifies the
|
769
|
+
# multipart upload after which listing should begin.
|
750
770
|
#
|
751
771
|
# If `upload-id-marker` is not specified, only the keys
|
752
772
|
# lexicographically greater than the specified `key-marker` will be
|
@@ -759,8 +779,8 @@ module Aws::S3
|
|
759
779
|
# @option options [String] :prefix
|
760
780
|
# Lists in-progress uploads only for those keys that begin with the
|
761
781
|
# specified prefix. You can use prefixes to separate a bucket into
|
762
|
-
# different grouping of keys. (You can think of using prefix to make
|
763
|
-
# groups in the same way you'd use a folder in a file system.)
|
782
|
+
# different grouping of keys. (You can think of using `prefix` to make
|
783
|
+
# groups in the same way that you'd use a folder in a file system.)
|
764
784
|
# @option options [String] :upload_id_marker
|
765
785
|
# Together with key-marker, specifies the multipart upload after which
|
766
786
|
# listing should begin. If key-marker is not specified, the
|
@@ -772,11 +792,25 @@ module Aws::S3
|
|
772
792
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
773
793
|
# a different account, the request fails with the HTTP status code `403
|
774
794
|
# Forbidden` (access denied).
|
795
|
+
# @option options [String] :request_payer
|
796
|
+
# Confirms that the requester knows that they will be charged for the
|
797
|
+
# request. Bucket owners need not specify this parameter in their
|
798
|
+
# requests. If either the source or destination Amazon S3 bucket has
|
799
|
+
# Requester Pays enabled, the requester will pay for corresponding
|
800
|
+
# charges to copy the object. For information about downloading objects
|
801
|
+
# from Requester Pays buckets, see [Downloading Objects in Requester
|
802
|
+
# Pays Buckets][1] in the *Amazon S3 User Guide*.
|
803
|
+
#
|
804
|
+
#
|
805
|
+
#
|
806
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
775
807
|
# @return [MultipartUpload::Collection]
|
776
808
|
def multipart_uploads(options = {})
|
777
809
|
batches = Enumerator.new do |y|
|
778
810
|
options = options.merge(bucket: @name)
|
779
|
-
resp =
|
811
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
812
|
+
@client.list_multipart_uploads(options)
|
813
|
+
end
|
780
814
|
resp.each_page do |page|
|
781
815
|
batch = []
|
782
816
|
page.data.uploads.each do |u|
|
@@ -821,19 +855,21 @@ module Aws::S3
|
|
821
855
|
# prefix: "Prefix",
|
822
856
|
# version_id_marker: "VersionIdMarker",
|
823
857
|
# expected_bucket_owner: "AccountId",
|
858
|
+
# request_payer: "requester", # accepts requester
|
859
|
+
# optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
|
824
860
|
# })
|
825
861
|
# @param [Hash] options ({})
|
826
862
|
# @option options [String] :delimiter
|
827
863
|
# A delimiter is a character that you specify to group keys. All keys
|
828
864
|
# that contain the same string between the `prefix` and the first
|
829
865
|
# occurrence of the delimiter are grouped under a single result element
|
830
|
-
# in CommonPrefixes
|
831
|
-
# max-keys limitation. These keys are not returned elsewhere in
|
832
|
-
# response.
|
866
|
+
# in `CommonPrefixes`. These groups are counted as one result against
|
867
|
+
# the `max-keys` limitation. These keys are not returned elsewhere in
|
868
|
+
# the response.
|
833
869
|
# @option options [String] :encoding_type
|
834
870
|
# Requests Amazon S3 to encode the object keys in the response and
|
835
|
-
# specifies the encoding method to use. An object key
|
836
|
-
# Unicode character; however, XML 1.0 parser cannot parse some
|
871
|
+
# specifies the encoding method to use. An object key can contain any
|
872
|
+
# Unicode character; however, the XML 1.0 parser cannot parse some
|
837
873
|
# characters, such as characters with an ASCII value from 0 to 10. For
|
838
874
|
# characters that are not supported in XML 1.0, you can add this
|
839
875
|
# parameter to request that Amazon S3 encode the keys in the response.
|
@@ -842,21 +878,38 @@ module Aws::S3
|
|
842
878
|
# @option options [String] :prefix
|
843
879
|
# Use this parameter to select only those keys that begin with the
|
844
880
|
# specified prefix. You can use prefixes to separate a bucket into
|
845
|
-
# different groupings of keys. (You can think of using prefix to make
|
846
|
-
# groups in the same way you'd use a folder in a file system.) You
|
847
|
-
# use prefix with delimiter to roll up numerous objects into a
|
848
|
-
# result under CommonPrefixes
|
881
|
+
# different groupings of keys. (You can think of using `prefix` to make
|
882
|
+
# groups in the same way that you'd use a folder in a file system.) You
|
883
|
+
# can use `prefix` with `delimiter` to roll up numerous objects into a
|
884
|
+
# single result under `CommonPrefixes`.
|
849
885
|
# @option options [String] :version_id_marker
|
850
886
|
# Specifies the object version you want to start listing from.
|
851
887
|
# @option options [String] :expected_bucket_owner
|
852
888
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
853
889
|
# a different account, the request fails with the HTTP status code `403
|
854
890
|
# Forbidden` (access denied).
|
891
|
+
# @option options [String] :request_payer
|
892
|
+
# Confirms that the requester knows that they will be charged for the
|
893
|
+
# request. Bucket owners need not specify this parameter in their
|
894
|
+
# requests. If either the source or destination Amazon S3 bucket has
|
895
|
+
# Requester Pays enabled, the requester will pay for corresponding
|
896
|
+
# charges to copy the object. For information about downloading objects
|
897
|
+
# from Requester Pays buckets, see [Downloading Objects in Requester
|
898
|
+
# Pays Buckets][1] in the *Amazon S3 User Guide*.
|
899
|
+
#
|
900
|
+
#
|
901
|
+
#
|
902
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
903
|
+
# @option options [Array<String>] :optional_object_attributes
|
904
|
+
# Specifies the optional fields that you want returned in the response.
|
905
|
+
# Fields that you do not specify are not returned.
|
855
906
|
# @return [ObjectVersion::Collection]
|
856
907
|
def object_versions(options = {})
|
857
908
|
batches = Enumerator.new do |y|
|
858
909
|
options = options.merge(bucket: @name)
|
859
|
-
resp =
|
910
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
911
|
+
@client.list_object_versions(options)
|
912
|
+
end
|
860
913
|
resp.each_page do |page|
|
861
914
|
batch = []
|
862
915
|
page.data.versions_delete_markers.each do |v|
|
@@ -884,18 +937,19 @@ module Aws::S3
|
|
884
937
|
# start_after: "StartAfter",
|
885
938
|
# request_payer: "requester", # accepts requester
|
886
939
|
# expected_bucket_owner: "AccountId",
|
940
|
+
# optional_object_attributes: ["RestoreStatus"], # accepts RestoreStatus
|
887
941
|
# })
|
888
942
|
# @param [Hash] options ({})
|
889
943
|
# @option options [String] :delimiter
|
890
|
-
# A delimiter is a character you use to group keys.
|
944
|
+
# A delimiter is a character that you use to group keys.
|
891
945
|
# @option options [String] :encoding_type
|
892
946
|
# Encoding type used by Amazon S3 to encode object keys in the response.
|
893
947
|
# @option options [String] :prefix
|
894
948
|
# Limits the response to keys that begin with the specified prefix.
|
895
949
|
# @option options [Boolean] :fetch_owner
|
896
|
-
# The owner field is not present in
|
897
|
-
# return owner field with each key in the result then set
|
898
|
-
#
|
950
|
+
# The owner field is not present in `ListObjectsV2` by default. If you
|
951
|
+
# want to return the owner field with each key in the result, then set
|
952
|
+
# the `FetchOwner` field to `true`.
|
899
953
|
# @option options [String] :start_after
|
900
954
|
# StartAfter is where you want Amazon S3 to start listing from. Amazon
|
901
955
|
# S3 starts listing after this specified key. StartAfter can be any key
|
@@ -908,11 +962,16 @@ module Aws::S3
|
|
908
962
|
# The account ID of the expected bucket owner. If the bucket is owned by
|
909
963
|
# a different account, the request fails with the HTTP status code `403
|
910
964
|
# Forbidden` (access denied).
|
965
|
+
# @option options [Array<String>] :optional_object_attributes
|
966
|
+
# Specifies the optional fields that you want returned in the response.
|
967
|
+
# Fields that you do not specify are not returned.
|
911
968
|
# @return [ObjectSummary::Collection]
|
912
969
|
def objects(options = {})
|
913
970
|
batches = Enumerator.new do |y|
|
914
971
|
options = options.merge(bucket: @name)
|
915
|
-
resp =
|
972
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
973
|
+
@client.list_objects_v2(options)
|
974
|
+
end
|
916
975
|
resp.each_page do |page|
|
917
976
|
batch = []
|
918
977
|
page.data.contents.each do |c|
|
@@ -60,7 +60,9 @@ module Aws::S3
|
|
60
60
|
#
|
61
61
|
# @return [self]
|
62
62
|
def load
|
63
|
-
resp =
|
63
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
64
|
+
@client.get_bucket_acl(bucket: @bucket_name)
|
65
|
+
end
|
64
66
|
@data = resp.data
|
65
67
|
self
|
66
68
|
end
|
@@ -175,7 +177,9 @@ module Aws::S3
|
|
175
177
|
:retry
|
176
178
|
end
|
177
179
|
end
|
178
|
-
Aws::
|
180
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
181
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
182
|
+
end
|
179
183
|
end
|
180
184
|
|
181
185
|
# @!group Actions
|
@@ -265,7 +269,9 @@ module Aws::S3
|
|
265
269
|
# @return [EmptyStructure]
|
266
270
|
def put(options = {})
|
267
271
|
options = options.merge(bucket: @bucket_name)
|
268
|
-
resp =
|
272
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
273
|
+
@client.put_bucket_acl(options)
|
274
|
+
end
|
269
275
|
resp.data
|
270
276
|
end
|
271
277
|
|
@@ -55,7 +55,9 @@ module Aws::S3
|
|
55
55
|
#
|
56
56
|
# @return [self]
|
57
57
|
def load
|
58
|
-
resp =
|
58
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
59
|
+
@client.get_bucket_cors(bucket: @bucket_name)
|
60
|
+
end
|
59
61
|
@data = resp.data
|
60
62
|
self
|
61
63
|
end
|
@@ -170,7 +172,9 @@ module Aws::S3
|
|
170
172
|
:retry
|
171
173
|
end
|
172
174
|
end
|
173
|
-
Aws::
|
175
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
176
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
177
|
+
end
|
174
178
|
end
|
175
179
|
|
176
180
|
# @!group Actions
|
@@ -188,7 +192,9 @@ module Aws::S3
|
|
188
192
|
# @return [EmptyStructure]
|
189
193
|
def delete(options = {})
|
190
194
|
options = options.merge(bucket: @bucket_name)
|
191
|
-
resp =
|
195
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
196
|
+
@client.delete_bucket_cors(options)
|
197
|
+
end
|
192
198
|
resp.data
|
193
199
|
end
|
194
200
|
|
@@ -254,7 +260,9 @@ module Aws::S3
|
|
254
260
|
# @return [EmptyStructure]
|
255
261
|
def put(options = {})
|
256
262
|
options = options.merge(bucket: @bucket_name)
|
257
|
-
resp =
|
263
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
264
|
+
@client.put_bucket_cors(options)
|
265
|
+
end
|
258
266
|
resp.data
|
259
267
|
end
|
260
268
|
|
@@ -54,7 +54,9 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp =
|
57
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
58
|
+
@client.get_bucket_lifecycle(bucket: @bucket_name)
|
59
|
+
end
|
58
60
|
@data = resp.data
|
59
61
|
self
|
60
62
|
end
|
@@ -169,7 +171,9 @@ module Aws::S3
|
|
169
171
|
:retry
|
170
172
|
end
|
171
173
|
end
|
172
|
-
Aws::
|
174
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
175
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
176
|
+
end
|
173
177
|
end
|
174
178
|
|
175
179
|
# @!group Actions
|
@@ -187,7 +191,9 @@ module Aws::S3
|
|
187
191
|
# @return [EmptyStructure]
|
188
192
|
def delete(options = {})
|
189
193
|
options = options.merge(bucket: @bucket_name)
|
190
|
-
resp =
|
194
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
195
|
+
@client.delete_bucket_lifecycle(options)
|
196
|
+
end
|
191
197
|
resp.data
|
192
198
|
end
|
193
199
|
|
@@ -257,7 +263,9 @@ module Aws::S3
|
|
257
263
|
# @return [EmptyStructure]
|
258
264
|
def put(options = {})
|
259
265
|
options = options.merge(bucket: @bucket_name)
|
260
|
-
resp =
|
266
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
267
|
+
@client.put_bucket_lifecycle(options)
|
268
|
+
end
|
261
269
|
resp.data
|
262
270
|
end
|
263
271
|
|
@@ -54,7 +54,9 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp =
|
57
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
58
|
+
@client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
|
59
|
+
end
|
58
60
|
@data = resp.data
|
59
61
|
self
|
60
62
|
end
|
@@ -169,7 +171,9 @@ module Aws::S3
|
|
169
171
|
:retry
|
170
172
|
end
|
171
173
|
end
|
172
|
-
Aws::
|
174
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
175
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
176
|
+
end
|
173
177
|
end
|
174
178
|
|
175
179
|
# @!group Actions
|
@@ -187,7 +191,9 @@ module Aws::S3
|
|
187
191
|
# @return [EmptyStructure]
|
188
192
|
def delete(options = {})
|
189
193
|
options = options.merge(bucket: @bucket_name)
|
190
|
-
resp =
|
194
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
195
|
+
@client.delete_bucket_lifecycle(options)
|
196
|
+
end
|
191
197
|
resp.data
|
192
198
|
end
|
193
199
|
|
@@ -277,7 +283,9 @@ module Aws::S3
|
|
277
283
|
# @return [EmptyStructure]
|
278
284
|
def put(options = {})
|
279
285
|
options = options.merge(bucket: @bucket_name)
|
280
|
-
resp =
|
286
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
287
|
+
@client.put_bucket_lifecycle_configuration(options)
|
288
|
+
end
|
281
289
|
resp.data
|
282
290
|
end
|
283
291
|
|
@@ -60,7 +60,9 @@ module Aws::S3
|
|
60
60
|
#
|
61
61
|
# @return [self]
|
62
62
|
def load
|
63
|
-
resp =
|
63
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
64
|
+
@client.get_bucket_logging(bucket: @bucket_name)
|
65
|
+
end
|
64
66
|
@data = resp.data
|
65
67
|
self
|
66
68
|
end
|
@@ -175,7 +177,9 @@ module Aws::S3
|
|
175
177
|
:retry
|
176
178
|
end
|
177
179
|
end
|
178
|
-
Aws::
|
180
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
181
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
182
|
+
end
|
179
183
|
end
|
180
184
|
|
181
185
|
# @!group Actions
|
@@ -236,7 +240,9 @@ module Aws::S3
|
|
236
240
|
# @return [EmptyStructure]
|
237
241
|
def put(options = {})
|
238
242
|
options = options.merge(bucket: @bucket_name)
|
239
|
-
resp =
|
243
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
244
|
+
@client.put_bucket_logging(options)
|
245
|
+
end
|
240
246
|
resp.data
|
241
247
|
end
|
242
248
|
|