aws-sdk-s3 1.31.0 → 1.111.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +868 -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 -78
- data/lib/aws-sdk-s3/bucket_acl.rb +41 -15
- data/lib/aws-sdk-s3/bucket_cors.rb +51 -14
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +38 -16
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +40 -16
- data/lib/aws-sdk-s3/bucket_logging.rb +36 -15
- data/lib/aws-sdk-s3/bucket_notification.rb +44 -18
- 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 -14
- data/lib/aws-sdk-s3/bucket_versioning.rb +70 -12
- data/lib/aws-sdk-s3/bucket_website.rb +50 -17
- data/lib/aws-sdk-s3/client.rb +7851 -628
- 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 +16 -9
- 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 -29
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +116 -42
- data/lib/aws-sdk-s3/object.rb +656 -156
- data/lib/aws-sdk-s3/object_acl.rb +65 -21
- 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 -143
- data/lib/aws-sdk-s3/object_version.rb +117 -62
- 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 +72 -32
- 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 +6758 -1027
- 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 ObjectAcl
|
10
13
|
|
11
14
|
extend Aws::Deprecations
|
@@ -24,6 +27,7 @@ module Aws::S3
|
|
24
27
|
@object_key = extract_object_key(args, options)
|
25
28
|
@data = options.delete(:data)
|
26
29
|
@client = options.delete(:client) || Client.new(options)
|
30
|
+
@waiter_block_warned = false
|
27
31
|
end
|
28
32
|
|
29
33
|
# @!group Read-Only Attributes
|
@@ -38,7 +42,7 @@ module Aws::S3
|
|
38
42
|
@object_key
|
39
43
|
end
|
40
44
|
|
41
|
-
|
45
|
+
# Container for the bucket owner's display name and ID.
|
42
46
|
# @return [Types::Owner]
|
43
47
|
def owner
|
44
48
|
data[:owner]
|
@@ -100,7 +104,8 @@ module Aws::S3
|
|
100
104
|
# Waiter polls an API operation until a resource enters a desired
|
101
105
|
# state.
|
102
106
|
#
|
103
|
-
# @note The waiting operation is performed on a copy. The original resource
|
107
|
+
# @note The waiting operation is performed on a copy. The original resource
|
108
|
+
# remains unchanged.
|
104
109
|
#
|
105
110
|
# ## Basic Usage
|
106
111
|
#
|
@@ -113,13 +118,15 @@ module Aws::S3
|
|
113
118
|
#
|
114
119
|
# ## Example
|
115
120
|
#
|
116
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
121
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
122
|
+
# instance.state.name == 'running'
|
123
|
+
# end
|
117
124
|
#
|
118
125
|
# ## Configuration
|
119
126
|
#
|
120
127
|
# You can configure the maximum number of polling attempts, and the
|
121
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
122
|
-
# by passing a block to {#wait_until}:
|
128
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
129
|
+
# set by passing a block to {#wait_until}:
|
123
130
|
#
|
124
131
|
# # poll for ~25 seconds
|
125
132
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -150,17 +157,16 @@ module Aws::S3
|
|
150
157
|
# # resource did not enter the desired state in time
|
151
158
|
# end
|
152
159
|
#
|
160
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
153
161
|
#
|
154
|
-
# @
|
155
|
-
#
|
156
|
-
#
|
157
|
-
# because the waiter has entered a state that it will not transition
|
158
|
-
# out of, preventing success.
|
162
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
163
|
+
# terminates because the waiter has entered a state that it will not
|
164
|
+
# transition out of, preventing success.
|
159
165
|
#
|
160
166
|
# yet successful.
|
161
167
|
#
|
162
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
163
|
-
# while polling for a resource that is not expected.
|
168
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
169
|
+
# encountered while polling for a resource that is not expected.
|
164
170
|
#
|
165
171
|
# @raise [NotImplementedError] Raised when the resource does not
|
166
172
|
#
|
@@ -222,32 +228,70 @@ module Aws::S3
|
|
222
228
|
# grant_write_acp: "GrantWriteACP",
|
223
229
|
# request_payer: "requester", # accepts requester
|
224
230
|
# version_id: "ObjectVersionId",
|
231
|
+
# expected_bucket_owner: "AccountId",
|
225
232
|
# })
|
226
233
|
# @param [Hash] options ({})
|
227
234
|
# @option options [String] :acl
|
228
|
-
# The canned ACL to apply to the object.
|
235
|
+
# The canned ACL to apply to the object. For more information, see
|
236
|
+
# [Canned ACL][1].
|
237
|
+
#
|
238
|
+
#
|
239
|
+
#
|
240
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
229
241
|
# @option options [Types::AccessControlPolicy] :access_control_policy
|
242
|
+
# Contains the elements that set the ACL permissions for an object per
|
243
|
+
# grantee.
|
230
244
|
# @option options [String] :content_md5
|
245
|
+
# The base64-encoded 128-bit MD5 digest of the data. This header must be
|
246
|
+
# used as a message integrity check to verify that the request body was
|
247
|
+
# not corrupted in transit. For more information, go to [RFC
|
248
|
+
# 1864.>][1]
|
249
|
+
#
|
250
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
251
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
252
|
+
# automatically.
|
253
|
+
#
|
254
|
+
#
|
255
|
+
#
|
256
|
+
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
231
257
|
# @option options [String] :grant_full_control
|
232
258
|
# Allows grantee the read, write, read ACP, and write ACP permissions on
|
233
259
|
# the bucket.
|
260
|
+
#
|
261
|
+
# This action is not supported by Amazon S3 on Outposts.
|
234
262
|
# @option options [String] :grant_read
|
235
263
|
# Allows grantee to list the objects in the bucket.
|
264
|
+
#
|
265
|
+
# This action is not supported by Amazon S3 on Outposts.
|
236
266
|
# @option options [String] :grant_read_acp
|
237
267
|
# Allows grantee to read the bucket ACL.
|
268
|
+
#
|
269
|
+
# This action is not supported by Amazon S3 on Outposts.
|
238
270
|
# @option options [String] :grant_write
|
239
|
-
# Allows grantee to create
|
240
|
-
#
|
271
|
+
# Allows grantee to create new objects in the bucket.
|
272
|
+
#
|
273
|
+
# For the bucket and object owners of existing objects, also allows
|
274
|
+
# deletions and overwrites of those objects.
|
241
275
|
# @option options [String] :grant_write_acp
|
242
276
|
# Allows grantee to write the ACL for the applicable bucket.
|
277
|
+
#
|
278
|
+
# This action is not supported by Amazon S3 on Outposts.
|
243
279
|
# @option options [String] :request_payer
|
244
|
-
# Confirms that the requester knows that
|
245
|
-
#
|
246
|
-
# requests.
|
247
|
-
# buckets
|
248
|
-
#
|
280
|
+
# Confirms that the requester knows that they will be charged for the
|
281
|
+
# request. Bucket owners need not specify this parameter in their
|
282
|
+
# requests. For information about downloading objects from requester
|
283
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
284
|
+
# in the *Amazon S3 User Guide*.
|
285
|
+
#
|
286
|
+
#
|
287
|
+
#
|
288
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
249
289
|
# @option options [String] :version_id
|
250
290
|
# VersionId used to reference a specific version of the object.
|
291
|
+
# @option options [String] :expected_bucket_owner
|
292
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
293
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
294
|
+
# Denied)` error.
|
251
295
|
# @return [Types::PutObjectAclOutput]
|
252
296
|
def put(options = {})
|
253
297
|
options = options.merge(
|