aws-sdk-s3 1.136.0 → 1.176.1
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 +250 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
- data/lib/aws-sdk-s3/bucket.rb +671 -139
- data/lib/aws-sdk-s3/bucket_acl.rb +12 -12
- data/lib/aws-sdk-s3/bucket_cors.rb +16 -16
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +21 -16
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +74 -17
- data/lib/aws-sdk-s3/bucket_logging.rb +19 -12
- data/lib/aws-sdk-s3/bucket_notification.rb +6 -6
- data/lib/aws-sdk-s3/bucket_policy.rb +62 -18
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +12 -12
- data/lib/aws-sdk-s3/bucket_tagging.rb +16 -16
- data/lib/aws-sdk-s3/bucket_versioning.rb +32 -32
- data/lib/aws-sdk-s3/bucket_website.rb +16 -16
- data/lib/aws-sdk-s3/client.rb +7597 -2823
- data/lib/aws-sdk-s3/client_api.rb +288 -22
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
- data/lib/aws-sdk-s3/customizations/object.rb +11 -5
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations.rb +25 -31
- data/lib/aws-sdk-s3/encryption/client.rb +2 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/endpoint_parameters.rb +53 -18
- data/lib/aws-sdk-s3/endpoint_provider.rb +125 -6
- data/lib/aws-sdk-s3/endpoints.rb +545 -1261
- data/lib/aws-sdk-s3/errors.rb +47 -0
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
- data/lib/aws-sdk-s3/file_downloader.rb +1 -2
- data/lib/aws-sdk-s3/file_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +4 -4
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +6 -5
- data/lib/aws-sdk-s3/multipart_upload.rb +139 -36
- data/lib/aws-sdk-s3/multipart_upload_part.rb +175 -54
- data/lib/aws-sdk-s3/object.rb +1923 -313
- data/lib/aws-sdk-s3/object_acl.rb +34 -22
- data/lib/aws-sdk-s3/object_copier.rb +1 -1
- data/lib/aws-sdk-s3/object_multipart_copier.rb +10 -8
- data/lib/aws-sdk-s3/object_summary.rb +1690 -250
- data/lib/aws-sdk-s3/object_version.rb +397 -67
- data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
- data/lib/aws-sdk-s3/plugins/endpoints.rb +32 -208
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +2 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/presigner.rb +5 -2
- data/lib/aws-sdk-s3/resource.rb +121 -22
- data/lib/aws-sdk-s3/types.rb +5960 -1526
- data/lib/aws-sdk-s3.rb +35 -31
- data/sig/bucket.rbs +221 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +115 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2450 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/errors.rbs +42 -0
- data/sig/multipart_upload.rbs +113 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +448 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +340 -0
- data/sig/object_version.rbs +140 -0
- data/sig/resource.rbs +132 -0
- data/sig/types.rbs +2682 -0
- data/sig/waiters.rbs +95 -0
- metadata +44 -11
@@ -60,7 +60,7 @@ module Aws::S3
|
|
60
60
|
#
|
61
61
|
# @return [self]
|
62
62
|
def load
|
63
|
-
resp = Aws::Plugins::UserAgent.
|
63
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
64
64
|
@client.get_bucket_acl(bucket: @bucket_name)
|
65
65
|
end
|
66
66
|
@data = resp.data
|
@@ -177,7 +177,7 @@ module Aws::S3
|
|
177
177
|
:retry
|
178
178
|
end
|
179
179
|
end
|
180
|
-
Aws::Plugins::UserAgent.
|
180
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
181
181
|
Aws::Waiters::Waiter.new(options).wait({})
|
182
182
|
end
|
183
183
|
end
|
@@ -235,12 +235,12 @@ module Aws::S3
|
|
235
235
|
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
236
236
|
# @option options [String] :checksum_algorithm
|
237
237
|
# Indicates the algorithm used to create the checksum for the object
|
238
|
-
# when
|
239
|
-
# functionality if
|
240
|
-
# must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
241
|
-
# sent. Otherwise, Amazon S3 fails the request with the HTTP
|
242
|
-
# `400 Bad Request`. For more information, see [Checking
|
243
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
238
|
+
# when you use the SDK. This header will not provide any additional
|
239
|
+
# functionality if you don't use the SDK. When you send this header,
|
240
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
241
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
242
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
243
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
244
244
|
#
|
245
245
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
246
246
|
# `ChecksumAlgorithm` parameter.
|
@@ -263,13 +263,13 @@ module Aws::S3
|
|
263
263
|
# @option options [String] :grant_write_acp
|
264
264
|
# Allows grantee to write the ACL for the applicable bucket.
|
265
265
|
# @option options [String] :expected_bucket_owner
|
266
|
-
# The account ID of the expected bucket owner. If the
|
267
|
-
#
|
268
|
-
# Forbidden` (access denied).
|
266
|
+
# The account ID of the expected bucket owner. If the account ID that
|
267
|
+
# you provide does not match the actual owner of the bucket, the request
|
268
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
269
269
|
# @return [EmptyStructure]
|
270
270
|
def put(options = {})
|
271
271
|
options = options.merge(bucket: @bucket_name)
|
272
|
-
resp = Aws::Plugins::UserAgent.
|
272
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
273
273
|
@client.put_bucket_acl(options)
|
274
274
|
end
|
275
275
|
resp.data
|
@@ -55,7 +55,7 @@ module Aws::S3
|
|
55
55
|
#
|
56
56
|
# @return [self]
|
57
57
|
def load
|
58
|
-
resp = Aws::Plugins::UserAgent.
|
58
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
59
59
|
@client.get_bucket_cors(bucket: @bucket_name)
|
60
60
|
end
|
61
61
|
@data = resp.data
|
@@ -172,7 +172,7 @@ module Aws::S3
|
|
172
172
|
:retry
|
173
173
|
end
|
174
174
|
end
|
175
|
-
Aws::Plugins::UserAgent.
|
175
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
176
176
|
Aws::Waiters::Waiter.new(options).wait({})
|
177
177
|
end
|
178
178
|
end
|
@@ -186,13 +186,13 @@ module Aws::S3
|
|
186
186
|
# })
|
187
187
|
# @param [Hash] options ({})
|
188
188
|
# @option options [String] :expected_bucket_owner
|
189
|
-
# The account ID of the expected bucket owner. If the
|
190
|
-
#
|
191
|
-
# Forbidden` (access denied).
|
189
|
+
# The account ID of the expected bucket owner. If the account ID that
|
190
|
+
# you provide does not match the actual owner of the bucket, the request
|
191
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
192
192
|
# @return [EmptyStructure]
|
193
193
|
def delete(options = {})
|
194
194
|
options = options.merge(bucket: @bucket_name)
|
195
|
-
resp = Aws::Plugins::UserAgent.
|
195
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
196
196
|
@client.delete_bucket_cors(options)
|
197
197
|
end
|
198
198
|
resp.data
|
@@ -240,12 +240,12 @@ module Aws::S3
|
|
240
240
|
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
241
241
|
# @option options [String] :checksum_algorithm
|
242
242
|
# Indicates the algorithm used to create the checksum for the object
|
243
|
-
# when
|
244
|
-
# functionality if
|
245
|
-
# must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
246
|
-
# sent. Otherwise, Amazon S3 fails the request with the HTTP
|
247
|
-
# `400 Bad Request`. For more information, see [Checking
|
248
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
243
|
+
# when you use the SDK. This header will not provide any additional
|
244
|
+
# functionality if you don't use the SDK. When you send this header,
|
245
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
246
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
247
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
248
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
249
249
|
#
|
250
250
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
251
251
|
# `ChecksumAlgorithm` parameter.
|
@@ -254,13 +254,13 @@ module Aws::S3
|
|
254
254
|
#
|
255
255
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
256
256
|
# @option options [String] :expected_bucket_owner
|
257
|
-
# The account ID of the expected bucket owner. If the
|
258
|
-
#
|
259
|
-
# Forbidden` (access denied).
|
257
|
+
# The account ID of the expected bucket owner. If the account ID that
|
258
|
+
# you provide does not match the actual owner of the bucket, the request
|
259
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
260
260
|
# @return [EmptyStructure]
|
261
261
|
def put(options = {})
|
262
262
|
options = options.merge(bucket: @bucket_name)
|
263
|
-
resp = Aws::Plugins::UserAgent.
|
263
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
264
264
|
@client.put_bucket_cors(options)
|
265
265
|
end
|
266
266
|
resp.data
|
@@ -54,7 +54,7 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp = Aws::Plugins::UserAgent.
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
58
|
@client.get_bucket_lifecycle(bucket: @bucket_name)
|
59
59
|
end
|
60
60
|
@data = resp.data
|
@@ -171,7 +171,7 @@ module Aws::S3
|
|
171
171
|
:retry
|
172
172
|
end
|
173
173
|
end
|
174
|
-
Aws::Plugins::UserAgent.
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
175
175
|
Aws::Waiters::Waiter.new(options).wait({})
|
176
176
|
end
|
177
177
|
end
|
@@ -185,13 +185,18 @@ module Aws::S3
|
|
185
185
|
# })
|
186
186
|
# @param [Hash] options ({})
|
187
187
|
# @option options [String] :expected_bucket_owner
|
188
|
-
# The account ID of the expected bucket owner. If the
|
189
|
-
#
|
190
|
-
# Forbidden` (access denied).
|
188
|
+
# The account ID of the expected bucket owner. If the account ID that
|
189
|
+
# you provide does not match the actual owner of the bucket, the request
|
190
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
191
|
+
#
|
192
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It is not
|
193
|
+
# supported for directory bucket lifecycle configurations.
|
194
|
+
#
|
195
|
+
# </note>
|
191
196
|
# @return [EmptyStructure]
|
192
197
|
def delete(options = {})
|
193
198
|
options = options.merge(bucket: @bucket_name)
|
194
|
-
resp = Aws::Plugins::UserAgent.
|
199
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
195
200
|
@client.delete_bucket_lifecycle(options)
|
196
201
|
end
|
197
202
|
resp.data
|
@@ -242,12 +247,12 @@ module Aws::S3
|
|
242
247
|
# automatically.
|
243
248
|
# @option options [String] :checksum_algorithm
|
244
249
|
# Indicates the algorithm used to create the checksum for the object
|
245
|
-
# when
|
246
|
-
# functionality if
|
247
|
-
# must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
248
|
-
# sent. Otherwise, Amazon S3 fails the request with the HTTP
|
249
|
-
# `400 Bad Request`. For more information, see [Checking
|
250
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
250
|
+
# when you use the SDK. This header will not provide any additional
|
251
|
+
# functionality if you don't use the SDK. When you send this header,
|
252
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
253
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
254
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
255
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
251
256
|
#
|
252
257
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
253
258
|
# `ChecksumAlgorithm` parameter.
|
@@ -257,13 +262,13 @@ module Aws::S3
|
|
257
262
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
258
263
|
# @option options [Types::LifecycleConfiguration] :lifecycle_configuration
|
259
264
|
# @option options [String] :expected_bucket_owner
|
260
|
-
# The account ID of the expected bucket owner. If the
|
261
|
-
#
|
262
|
-
# Forbidden` (access denied).
|
265
|
+
# The account ID of the expected bucket owner. If the account ID that
|
266
|
+
# you provide does not match the actual owner of the bucket, the request
|
267
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
263
268
|
# @return [EmptyStructure]
|
264
269
|
def put(options = {})
|
265
270
|
options = options.merge(bucket: @bucket_name)
|
266
|
-
resp = Aws::Plugins::UserAgent.
|
271
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
267
272
|
@client.put_bucket_lifecycle(options)
|
268
273
|
end
|
269
274
|
resp.data
|
@@ -40,6 +40,31 @@ module Aws::S3
|
|
40
40
|
data[:rules]
|
41
41
|
end
|
42
42
|
|
43
|
+
# Indicates which default minimum object size behavior is applied to the
|
44
|
+
# lifecycle configuration.
|
45
|
+
#
|
46
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It is not
|
47
|
+
# supported for directory bucket lifecycle configurations.
|
48
|
+
#
|
49
|
+
# </note>
|
50
|
+
#
|
51
|
+
# * `all_storage_classes_128K` - Objects smaller than 128 KB will not
|
52
|
+
# transition to any storage class by default.
|
53
|
+
#
|
54
|
+
# * `varies_by_storage_class` - Objects smaller than 128 KB will
|
55
|
+
# transition to Glacier Flexible Retrieval or Glacier Deep Archive
|
56
|
+
# storage classes. By default, all other storage classes will prevent
|
57
|
+
# transitions smaller than 128 KB.
|
58
|
+
#
|
59
|
+
# To customize the minimum object size for any transition you can add a
|
60
|
+
# filter that specifies a custom `ObjectSizeGreaterThan` or
|
61
|
+
# `ObjectSizeLessThan` in the body of your transition rule. Custom
|
62
|
+
# filters always take precedence over the default transition behavior.
|
63
|
+
# @return [String]
|
64
|
+
def transition_default_minimum_object_size
|
65
|
+
data[:transition_default_minimum_object_size]
|
66
|
+
end
|
67
|
+
|
43
68
|
# @!endgroup
|
44
69
|
|
45
70
|
# @return [Client]
|
@@ -54,7 +79,7 @@ module Aws::S3
|
|
54
79
|
#
|
55
80
|
# @return [self]
|
56
81
|
def load
|
57
|
-
resp = Aws::Plugins::UserAgent.
|
82
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
83
|
@client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
|
59
84
|
end
|
60
85
|
@data = resp.data
|
@@ -171,7 +196,7 @@ module Aws::S3
|
|
171
196
|
:retry
|
172
197
|
end
|
173
198
|
end
|
174
|
-
Aws::Plugins::UserAgent.
|
199
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
175
200
|
Aws::Waiters::Waiter.new(options).wait({})
|
176
201
|
end
|
177
202
|
end
|
@@ -185,13 +210,18 @@ module Aws::S3
|
|
185
210
|
# })
|
186
211
|
# @param [Hash] options ({})
|
187
212
|
# @option options [String] :expected_bucket_owner
|
188
|
-
# The account ID of the expected bucket owner. If the
|
189
|
-
#
|
190
|
-
# Forbidden` (access denied).
|
213
|
+
# The account ID of the expected bucket owner. If the account ID that
|
214
|
+
# you provide does not match the actual owner of the bucket, the request
|
215
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
216
|
+
#
|
217
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It is not
|
218
|
+
# supported for directory bucket lifecycle configurations.
|
219
|
+
#
|
220
|
+
# </note>
|
191
221
|
# @return [EmptyStructure]
|
192
222
|
def delete(options = {})
|
193
223
|
options = options.merge(bucket: @bucket_name)
|
194
|
-
resp = Aws::Plugins::UserAgent.
|
224
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
195
225
|
@client.delete_bucket_lifecycle(options)
|
196
226
|
end
|
197
227
|
resp.data
|
@@ -257,16 +287,17 @@ module Aws::S3
|
|
257
287
|
# ],
|
258
288
|
# },
|
259
289
|
# expected_bucket_owner: "AccountId",
|
290
|
+
# transition_default_minimum_object_size: "varies_by_storage_class", # accepts varies_by_storage_class, all_storage_classes_128K
|
260
291
|
# })
|
261
292
|
# @param [Hash] options ({})
|
262
293
|
# @option options [String] :checksum_algorithm
|
263
294
|
# Indicates the algorithm used to create the checksum for the object
|
264
|
-
# when
|
265
|
-
# functionality if
|
266
|
-
# must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
267
|
-
# sent. Otherwise, Amazon S3 fails the request with the HTTP
|
268
|
-
# `400 Bad Request`. For more information, see [Checking
|
269
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
295
|
+
# when you use the SDK. This header will not provide any additional
|
296
|
+
# functionality if you don't use the SDK. When you send this header,
|
297
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
298
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
299
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
300
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
270
301
|
#
|
271
302
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
272
303
|
# `ChecksumAlgorithm` parameter.
|
@@ -277,13 +308,39 @@ module Aws::S3
|
|
277
308
|
# @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
|
278
309
|
# Container for lifecycle rules. You can add as many as 1,000 rules.
|
279
310
|
# @option options [String] :expected_bucket_owner
|
280
|
-
# The account ID of the expected bucket owner. If the
|
281
|
-
#
|
282
|
-
# Forbidden` (access denied).
|
283
|
-
#
|
311
|
+
# The account ID of the expected bucket owner. If the account ID that
|
312
|
+
# you provide does not match the actual owner of the bucket, the request
|
313
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
314
|
+
#
|
315
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It is not
|
316
|
+
# supported for directory bucket lifecycle configurations.
|
317
|
+
#
|
318
|
+
# </note>
|
319
|
+
# @option options [String] :transition_default_minimum_object_size
|
320
|
+
# Indicates which default minimum object size behavior is applied to the
|
321
|
+
# lifecycle configuration.
|
322
|
+
#
|
323
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It is not
|
324
|
+
# supported for directory bucket lifecycle configurations.
|
325
|
+
#
|
326
|
+
# </note>
|
327
|
+
#
|
328
|
+
# * `all_storage_classes_128K` - Objects smaller than 128 KB will not
|
329
|
+
# transition to any storage class by default.
|
330
|
+
#
|
331
|
+
# * `varies_by_storage_class` - Objects smaller than 128 KB will
|
332
|
+
# transition to Glacier Flexible Retrieval or Glacier Deep Archive
|
333
|
+
# storage classes. By default, all other storage classes will prevent
|
334
|
+
# transitions smaller than 128 KB.
|
335
|
+
#
|
336
|
+
# To customize the minimum object size for any transition you can add a
|
337
|
+
# filter that specifies a custom `ObjectSizeGreaterThan` or
|
338
|
+
# `ObjectSizeLessThan` in the body of your transition rule. Custom
|
339
|
+
# filters always take precedence over the default transition behavior.
|
340
|
+
# @return [Types::PutBucketLifecycleConfigurationOutput]
|
284
341
|
def put(options = {})
|
285
342
|
options = options.merge(bucket: @bucket_name)
|
286
|
-
resp = Aws::Plugins::UserAgent.
|
343
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
287
344
|
@client.put_bucket_lifecycle_configuration(options)
|
288
345
|
end
|
289
346
|
resp.data
|
@@ -60,7 +60,7 @@ module Aws::S3
|
|
60
60
|
#
|
61
61
|
# @return [self]
|
62
62
|
def load
|
63
|
-
resp = Aws::Plugins::UserAgent.
|
63
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
64
64
|
@client.get_bucket_logging(bucket: @bucket_name)
|
65
65
|
end
|
66
66
|
@data = resp.data
|
@@ -177,7 +177,7 @@ module Aws::S3
|
|
177
177
|
:retry
|
178
178
|
end
|
179
179
|
end
|
180
|
-
Aws::Plugins::UserAgent.
|
180
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
181
181
|
Aws::Waiters::Waiter.new(options).wait({})
|
182
182
|
end
|
183
183
|
end
|
@@ -203,6 +203,13 @@ module Aws::S3
|
|
203
203
|
# },
|
204
204
|
# ],
|
205
205
|
# target_prefix: "TargetPrefix", # required
|
206
|
+
# target_object_key_format: {
|
207
|
+
# simple_prefix: {
|
208
|
+
# },
|
209
|
+
# partitioned_prefix: {
|
210
|
+
# partition_date_source: "EventTime", # accepts EventTime, DeliveryTime
|
211
|
+
# },
|
212
|
+
# },
|
206
213
|
# },
|
207
214
|
# },
|
208
215
|
# content_md5: "ContentMD5",
|
@@ -220,12 +227,12 @@ module Aws::S3
|
|
220
227
|
# automatically.
|
221
228
|
# @option options [String] :checksum_algorithm
|
222
229
|
# Indicates the algorithm used to create the checksum for the object
|
223
|
-
# when
|
224
|
-
# functionality if
|
225
|
-
# must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
226
|
-
# sent. Otherwise, Amazon S3 fails the request with the HTTP
|
227
|
-
# `400 Bad Request`. For more information, see [Checking
|
228
|
-
# integrity][1] in the *Amazon S3 User Guide*.
|
230
|
+
# when you use the SDK. This header will not provide any additional
|
231
|
+
# functionality if you don't use the SDK. When you send this header,
|
232
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
233
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
234
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
235
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
229
236
|
#
|
230
237
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
231
238
|
# `ChecksumAlgorithm` parameter.
|
@@ -234,13 +241,13 @@ module Aws::S3
|
|
234
241
|
#
|
235
242
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
236
243
|
# @option options [String] :expected_bucket_owner
|
237
|
-
# The account ID of the expected bucket owner. If the
|
238
|
-
#
|
239
|
-
# Forbidden` (access denied).
|
244
|
+
# The account ID of the expected bucket owner. If the account ID that
|
245
|
+
# you provide does not match the actual owner of the bucket, the request
|
246
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
240
247
|
# @return [EmptyStructure]
|
241
248
|
def put(options = {})
|
242
249
|
options = options.merge(bucket: @bucket_name)
|
243
|
-
resp = Aws::Plugins::UserAgent.
|
250
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
244
251
|
@client.put_bucket_logging(options)
|
245
252
|
end
|
246
253
|
resp.data
|
@@ -75,7 +75,7 @@ module Aws::S3
|
|
75
75
|
#
|
76
76
|
# @return [self]
|
77
77
|
def load
|
78
|
-
resp = Aws::Plugins::UserAgent.
|
78
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
79
79
|
@client.get_bucket_notification_configuration(bucket: @bucket_name)
|
80
80
|
end
|
81
81
|
@data = resp.data
|
@@ -192,7 +192,7 @@ module Aws::S3
|
|
192
192
|
:retry
|
193
193
|
end
|
194
194
|
end
|
195
|
-
Aws::Plugins::UserAgent.
|
195
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
196
196
|
Aws::Waiters::Waiter.new(options).wait({})
|
197
197
|
end
|
198
198
|
end
|
@@ -266,16 +266,16 @@ module Aws::S3
|
|
266
266
|
# bucket. If this element is empty, notifications are turned off for the
|
267
267
|
# bucket.
|
268
268
|
# @option options [String] :expected_bucket_owner
|
269
|
-
# The account ID of the expected bucket owner. If the
|
270
|
-
#
|
271
|
-
# Forbidden` (access denied).
|
269
|
+
# The account ID of the expected bucket owner. If the account ID that
|
270
|
+
# you provide does not match the actual owner of the bucket, the request
|
271
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
272
272
|
# @option options [Boolean] :skip_destination_validation
|
273
273
|
# Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations.
|
274
274
|
# True or false value.
|
275
275
|
# @return [EmptyStructure]
|
276
276
|
def put(options = {})
|
277
277
|
options = options.merge(bucket: @bucket_name)
|
278
|
-
resp = Aws::Plugins::UserAgent.
|
278
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
279
279
|
@client.put_bucket_notification_configuration(options)
|
280
280
|
end
|
281
281
|
resp.data
|
@@ -54,7 +54,7 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp = Aws::Plugins::UserAgent.
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
58
|
@client.get_bucket_policy(bucket: @bucket_name)
|
59
59
|
end
|
60
60
|
@data = resp.data
|
@@ -171,7 +171,7 @@ module Aws::S3
|
|
171
171
|
:retry
|
172
172
|
end
|
173
173
|
end
|
174
|
-
Aws::Plugins::UserAgent.
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
175
175
|
Aws::Waiters::Waiter.new(options).wait({})
|
176
176
|
end
|
177
177
|
end
|
@@ -185,13 +185,19 @@ module Aws::S3
|
|
185
185
|
# })
|
186
186
|
# @param [Hash] options ({})
|
187
187
|
# @option options [String] :expected_bucket_owner
|
188
|
-
# The account ID of the expected bucket owner. If the
|
189
|
-
#
|
190
|
-
# Forbidden` (access denied).
|
188
|
+
# The account ID of the expected bucket owner. If the account ID that
|
189
|
+
# you provide does not match the actual owner of the bucket, the request
|
190
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
191
|
+
#
|
192
|
+
# <note markdown="1"> For directory buckets, this header is not supported in this API
|
193
|
+
# operation. If you specify this header, the request fails with the HTTP
|
194
|
+
# status code `501 Not Implemented`.
|
195
|
+
#
|
196
|
+
# </note>
|
191
197
|
# @return [EmptyStructure]
|
192
198
|
def delete(options = {})
|
193
199
|
options = options.merge(bucket: @bucket_name)
|
194
|
-
resp = Aws::Plugins::UserAgent.
|
200
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
195
201
|
@client.delete_bucket_policy(options)
|
196
202
|
end
|
197
203
|
resp.data
|
@@ -213,17 +219,42 @@ module Aws::S3
|
|
213
219
|
# For requests made using the Amazon Web Services Command Line Interface
|
214
220
|
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
215
221
|
# automatically.
|
222
|
+
#
|
223
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
224
|
+
#
|
225
|
+
# </note>
|
216
226
|
# @option options [String] :checksum_algorithm
|
217
227
|
# Indicates the algorithm used to create the checksum for the object
|
218
|
-
# when
|
219
|
-
# functionality if
|
220
|
-
# must be a corresponding `x-amz-checksum` or
|
221
|
-
# sent. Otherwise, Amazon S3 fails the request
|
222
|
-
# `400 Bad Request`.
|
223
|
-
#
|
228
|
+
# when you use the SDK. This header will not provide any additional
|
229
|
+
# functionality if you don't use the SDK. When you send this header,
|
230
|
+
# there must be a corresponding `x-amz-checksum-algorithm ` or
|
231
|
+
# `x-amz-trailer` header sent. Otherwise, Amazon S3 fails the request
|
232
|
+
# with the HTTP status code `400 Bad Request`.
|
233
|
+
#
|
234
|
+
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
235
|
+
# the supported algorithm from the following list:
|
236
|
+
#
|
237
|
+
# * `CRC32`
|
238
|
+
#
|
239
|
+
# * `CRC32C`
|
240
|
+
#
|
241
|
+
# * `SHA1`
|
242
|
+
#
|
243
|
+
# * `SHA256`
|
224
244
|
#
|
225
|
-
#
|
226
|
-
#
|
245
|
+
# For more information, see [Checking object integrity][1] in the
|
246
|
+
# *Amazon S3 User Guide*.
|
247
|
+
#
|
248
|
+
# If the individual checksum value you provide through
|
249
|
+
# `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
|
250
|
+
# set through `x-amz-sdk-checksum-algorithm`, Amazon S3 ignores any
|
251
|
+
# provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
|
252
|
+
# that matches the provided value in `x-amz-checksum-algorithm `.
|
253
|
+
#
|
254
|
+
# <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
255
|
+
# is the default checksum algorithm that's used for performance.
|
256
|
+
#
|
257
|
+
# </note>
|
227
258
|
#
|
228
259
|
#
|
229
260
|
#
|
@@ -231,16 +262,29 @@ module Aws::S3
|
|
231
262
|
# @option options [Boolean] :confirm_remove_self_bucket_access
|
232
263
|
# Set this parameter to true to confirm that you want to remove your
|
233
264
|
# permissions to change this bucket policy in the future.
|
265
|
+
#
|
266
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
267
|
+
#
|
268
|
+
# </note>
|
234
269
|
# @option options [required, String] :policy
|
235
270
|
# The bucket policy as a JSON document.
|
271
|
+
#
|
272
|
+
# For directory buckets, the only IAM action supported in the bucket
|
273
|
+
# policy is `s3express:CreateSession`.
|
236
274
|
# @option options [String] :expected_bucket_owner
|
237
|
-
# The account ID of the expected bucket owner. If the
|
238
|
-
#
|
239
|
-
# Forbidden` (access denied).
|
275
|
+
# The account ID of the expected bucket owner. If the account ID that
|
276
|
+
# you provide does not match the actual owner of the bucket, the request
|
277
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
278
|
+
#
|
279
|
+
# <note markdown="1"> For directory buckets, this header is not supported in this API
|
280
|
+
# operation. If you specify this header, the request fails with the HTTP
|
281
|
+
# status code `501 Not Implemented`.
|
282
|
+
#
|
283
|
+
# </note>
|
240
284
|
# @return [EmptyStructure]
|
241
285
|
def put(options = {})
|
242
286
|
options = options.merge(bucket: @bucket_name)
|
243
|
-
resp = Aws::Plugins::UserAgent.
|
287
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
244
288
|
@client.put_bucket_policy(options)
|
245
289
|
end
|
246
290
|
resp.data
|
@@ -15,7 +15,7 @@ module Aws
|
|
15
15
|
# Registers a block as a callback. This listener is called when a
|
16
16
|
# new bucket/region pair is added to the cache.
|
17
17
|
#
|
18
|
-
# S3
|
18
|
+
# Aws::S3.bucket_region_cache.bucket_added do |bucket_name, region_name|
|
19
19
|
# # ...
|
20
20
|
# end
|
21
21
|
#
|
@@ -59,6 +59,14 @@ module Aws
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
# @param [String] key
|
63
|
+
# @return [Boolean]
|
64
|
+
def key?(key)
|
65
|
+
@mutex.synchronize do
|
66
|
+
@regions.key?(key)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
62
70
|
# @api private
|
63
71
|
def clear
|
64
72
|
@mutex.synchronize { @regions = {} }
|
@@ -73,9 +81,5 @@ module Aws
|
|
73
81
|
alias to_h to_hash
|
74
82
|
|
75
83
|
end
|
76
|
-
|
77
|
-
# @api private
|
78
|
-
BUCKET_REGIONS = BucketRegionCache.new
|
79
|
-
|
80
84
|
end
|
81
85
|
end
|