aws-sdk-s3 1.150.0 → 1.169.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +110 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +12 -3
  5. data/lib/aws-sdk-s3/bucket.rb +252 -88
  6. data/lib/aws-sdk-s3/bucket_acl.rb +3 -3
  7. data/lib/aws-sdk-s3/bucket_cors.rb +4 -4
  8. data/lib/aws-sdk-s3/bucket_lifecycle.rb +4 -4
  9. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +42 -5
  10. data/lib/aws-sdk-s3/bucket_logging.rb +3 -3
  11. data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
  12. data/lib/aws-sdk-s3/bucket_policy.rb +8 -8
  13. data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
  14. data/lib/aws-sdk-s3/bucket_tagging.rb +4 -4
  15. data/lib/aws-sdk-s3/bucket_versioning.rb +5 -5
  16. data/lib/aws-sdk-s3/bucket_website.rb +4 -4
  17. data/lib/aws-sdk-s3/client.rb +1685 -668
  18. data/lib/aws-sdk-s3/client_api.rb +49 -4
  19. data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
  20. data/lib/aws-sdk-s3/customizations/object.rb +11 -5
  21. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  22. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  23. data/lib/aws-sdk-s3/customizations.rb +24 -38
  24. data/lib/aws-sdk-s3/encryption/client.rb +2 -2
  25. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
  26. data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
  27. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
  28. data/lib/aws-sdk-s3/endpoint_parameters.rb +21 -18
  29. data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
  30. data/lib/aws-sdk-s3/endpoints.rb +416 -1614
  31. data/lib/aws-sdk-s3/errors.rb +3 -0
  32. data/lib/aws-sdk-s3/file_downloader.rb +1 -1
  33. data/lib/aws-sdk-s3/file_uploader.rb +1 -1
  34. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +1 -1
  35. data/lib/aws-sdk-s3/multipart_upload.rb +31 -8
  36. data/lib/aws-sdk-s3/multipart_upload_part.rb +11 -11
  37. data/lib/aws-sdk-s3/object.rb +441 -158
  38. data/lib/aws-sdk-s3/object_acl.rb +3 -3
  39. data/lib/aws-sdk-s3/object_copier.rb +1 -1
  40. data/lib/aws-sdk-s3/object_summary.rb +403 -134
  41. data/lib/aws-sdk-s3/object_version.rb +53 -13
  42. data/lib/aws-sdk-s3/plugins/access_grants.rb +75 -5
  43. data/lib/aws-sdk-s3/plugins/endpoints.rb +24 -212
  44. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +7 -1
  45. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
  46. data/lib/aws-sdk-s3/resource.rb +37 -11
  47. data/lib/aws-sdk-s3/types.rb +1106 -401
  48. data/lib/aws-sdk-s3.rb +35 -31
  49. data/sig/bucket.rbs +4 -0
  50. data/sig/bucket_lifecycle_configuration.rbs +7 -3
  51. data/sig/client.rbs +49 -5
  52. data/sig/multipart_upload.rbs +1 -0
  53. data/sig/object.rbs +7 -0
  54. data/sig/object_summary.rbs +1 -0
  55. data/sig/object_version.rbs +6 -0
  56. data/sig/resource.rbs +7 -1
  57. data/sig/types.rbs +36 -2
  58. data/sig/waiters.rbs +12 -0
  59. metadata +7 -6
@@ -40,6 +40,26 @@ 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
+ # * `all_storage_classes_128K` - Objects smaller than 128 KB will not
47
+ # transition to any storage class by default.
48
+ #
49
+ # * `varies_by_storage_class` - Objects smaller than 128 KB will
50
+ # transition to Glacier Flexible Retrieval or Glacier Deep Archive
51
+ # storage classes. By default, all other storage classes will prevent
52
+ # transitions smaller than 128 KB.
53
+ #
54
+ # To customize the minimum object size for any transition you can add a
55
+ # filter that specifies a custom `ObjectSizeGreaterThan` or
56
+ # `ObjectSizeLessThan` in the body of your transition rule. Custom
57
+ # filters always take precedence over the default transition behavior.
58
+ # @return [String]
59
+ def transition_default_minimum_object_size
60
+ data[:transition_default_minimum_object_size]
61
+ end
62
+
43
63
  # @!endgroup
44
64
 
45
65
  # @return [Client]
@@ -54,7 +74,7 @@ module Aws::S3
54
74
  #
55
75
  # @return [self]
56
76
  def load
57
- resp = Aws::Plugins::UserAgent.feature('resource') do
77
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
78
  @client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
59
79
  end
60
80
  @data = resp.data
@@ -171,7 +191,7 @@ module Aws::S3
171
191
  :retry
172
192
  end
173
193
  end
174
- Aws::Plugins::UserAgent.feature('resource') do
194
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
175
195
  Aws::Waiters::Waiter.new(options).wait({})
176
196
  end
177
197
  end
@@ -191,7 +211,7 @@ module Aws::S3
191
211
  # @return [EmptyStructure]
192
212
  def delete(options = {})
193
213
  options = options.merge(bucket: @bucket_name)
194
- resp = Aws::Plugins::UserAgent.feature('resource') do
214
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
195
215
  @client.delete_bucket_lifecycle(options)
196
216
  end
197
217
  resp.data
@@ -257,6 +277,7 @@ module Aws::S3
257
277
  # ],
258
278
  # },
259
279
  # expected_bucket_owner: "AccountId",
280
+ # transition_default_minimum_object_size: "varies_by_storage_class", # accepts varies_by_storage_class, all_storage_classes_128K
260
281
  # })
261
282
  # @param [Hash] options ({})
262
283
  # @option options [String] :checksum_algorithm
@@ -280,10 +301,26 @@ module Aws::S3
280
301
  # The account ID of the expected bucket owner. If the account ID that
281
302
  # you provide does not match the actual owner of the bucket, the request
282
303
  # fails with the HTTP status code `403 Forbidden` (access denied).
283
- # @return [EmptyStructure]
304
+ # @option options [String] :transition_default_minimum_object_size
305
+ # Indicates which default minimum object size behavior is applied to the
306
+ # lifecycle configuration.
307
+ #
308
+ # * `all_storage_classes_128K` - Objects smaller than 128 KB will not
309
+ # transition to any storage class by default.
310
+ #
311
+ # * `varies_by_storage_class` - Objects smaller than 128 KB will
312
+ # transition to Glacier Flexible Retrieval or Glacier Deep Archive
313
+ # storage classes. By default, all other storage classes will prevent
314
+ # transitions smaller than 128 KB.
315
+ #
316
+ # To customize the minimum object size for any transition you can add a
317
+ # filter that specifies a custom `ObjectSizeGreaterThan` or
318
+ # `ObjectSizeLessThan` in the body of your transition rule. Custom
319
+ # filters always take precedence over the default transition behavior.
320
+ # @return [Types::PutBucketLifecycleConfigurationOutput]
284
321
  def put(options = {})
285
322
  options = options.merge(bucket: @bucket_name)
286
- resp = Aws::Plugins::UserAgent.feature('resource') do
323
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
287
324
  @client.put_bucket_lifecycle_configuration(options)
288
325
  end
289
326
  resp.data
@@ -60,7 +60,7 @@ module Aws::S3
60
60
  #
61
61
  # @return [self]
62
62
  def load
63
- resp = Aws::Plugins::UserAgent.feature('resource') do
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.feature('resource') do
180
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
181
181
  Aws::Waiters::Waiter.new(options).wait({})
182
182
  end
183
183
  end
@@ -247,7 +247,7 @@ module Aws::S3
247
247
  # @return [EmptyStructure]
248
248
  def put(options = {})
249
249
  options = options.merge(bucket: @bucket_name)
250
- resp = Aws::Plugins::UserAgent.feature('resource') do
250
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
251
251
  @client.put_bucket_logging(options)
252
252
  end
253
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.feature('resource') do
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.feature('resource') do
195
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
196
196
  Aws::Waiters::Waiter.new(options).wait({})
197
197
  end
198
198
  end
@@ -275,7 +275,7 @@ module Aws::S3
275
275
  # @return [EmptyStructure]
276
276
  def put(options = {})
277
277
  options = options.merge(bucket: @bucket_name)
278
- resp = Aws::Plugins::UserAgent.feature('resource') do
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.feature('resource') do
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.feature('resource') do
174
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
175
175
  Aws::Waiters::Waiter.new(options).wait({})
176
176
  end
177
177
  end
@@ -197,7 +197,7 @@ module Aws::S3
197
197
  # @return [EmptyStructure]
198
198
  def delete(options = {})
199
199
  options = options.merge(bucket: @bucket_name)
200
- resp = Aws::Plugins::UserAgent.feature('resource') do
200
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
201
201
  @client.delete_bucket_policy(options)
202
202
  end
203
203
  resp.data
@@ -234,13 +234,13 @@ module Aws::S3
234
234
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
235
235
  # the supported algorithm from the following list:
236
236
  #
237
- # * CRC32
237
+ # * `CRC32`
238
238
  #
239
- # * CRC32C
239
+ # * `CRC32C`
240
240
  #
241
- # * SHA1
241
+ # * `SHA1`
242
242
  #
243
- # * SHA256
243
+ # * `SHA256`
244
244
  #
245
245
  # For more information, see [Checking object integrity][1] in the
246
246
  # *Amazon S3 User Guide*.
@@ -284,7 +284,7 @@ module Aws::S3
284
284
  # @return [EmptyStructure]
285
285
  def put(options = {})
286
286
  options = options.merge(bucket: @bucket_name)
287
- resp = Aws::Plugins::UserAgent.feature('resource') do
287
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
288
288
  @client.put_bucket_policy(options)
289
289
  end
290
290
  resp.data
@@ -54,7 +54,7 @@ module Aws::S3
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = Aws::Plugins::UserAgent.feature('resource') do
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
58
  @client.get_bucket_request_payment(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.feature('resource') do
174
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
175
175
  Aws::Waiters::Waiter.new(options).wait({})
176
176
  end
177
177
  end
@@ -225,7 +225,7 @@ module Aws::S3
225
225
  # @return [EmptyStructure]
226
226
  def put(options = {})
227
227
  options = options.merge(bucket: @bucket_name)
228
- resp = Aws::Plugins::UserAgent.feature('resource') do
228
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
229
229
  @client.put_bucket_request_payment(options)
230
230
  end
231
231
  resp.data
@@ -54,7 +54,7 @@ module Aws::S3
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = Aws::Plugins::UserAgent.feature('resource') do
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
58
  @client.get_bucket_tagging(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.feature('resource') do
174
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
175
175
  Aws::Waiters::Waiter.new(options).wait({})
176
176
  end
177
177
  end
@@ -191,7 +191,7 @@ module Aws::S3
191
191
  # @return [EmptyStructure]
192
192
  def delete(options = {})
193
193
  options = options.merge(bucket: @bucket_name)
194
- resp = Aws::Plugins::UserAgent.feature('resource') do
194
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
195
195
  @client.delete_bucket_tagging(options)
196
196
  end
197
197
  resp.data
@@ -249,7 +249,7 @@ module Aws::S3
249
249
  # @return [EmptyStructure]
250
250
  def put(options = {})
251
251
  options = options.merge(bucket: @bucket_name)
252
- resp = Aws::Plugins::UserAgent.feature('resource') do
252
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
253
253
  @client.put_bucket_tagging(options)
254
254
  end
255
255
  resp.data
@@ -63,7 +63,7 @@ module Aws::S3
63
63
  #
64
64
  # @return [self]
65
65
  def load
66
- resp = Aws::Plugins::UserAgent.feature('resource') do
66
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
67
67
  @client.get_bucket_versioning(bucket: @bucket_name)
68
68
  end
69
69
  @data = resp.data
@@ -180,7 +180,7 @@ module Aws::S3
180
180
  :retry
181
181
  end
182
182
  end
183
- Aws::Plugins::UserAgent.feature('resource') do
183
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
184
184
  Aws::Waiters::Waiter.new(options).wait({})
185
185
  end
186
186
  end
@@ -239,7 +239,7 @@ module Aws::S3
239
239
  status: "Enabled"
240
240
  }
241
241
  )
242
- resp = Aws::Plugins::UserAgent.feature('resource') do
242
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
243
243
  @client.put_bucket_versioning(options)
244
244
  end
245
245
  resp.data
@@ -298,7 +298,7 @@ module Aws::S3
298
298
  # @return [EmptyStructure]
299
299
  def put(options = {})
300
300
  options = options.merge(bucket: @bucket_name)
301
- resp = Aws::Plugins::UserAgent.feature('resource') do
301
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
302
302
  @client.put_bucket_versioning(options)
303
303
  end
304
304
  resp.data
@@ -356,7 +356,7 @@ module Aws::S3
356
356
  status: "Suspended"
357
357
  }
358
358
  )
359
- resp = Aws::Plugins::UserAgent.feature('resource') do
359
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
360
360
  @client.put_bucket_versioning(options)
361
361
  end
362
362
  resp.data
@@ -76,7 +76,7 @@ module Aws::S3
76
76
  #
77
77
  # @return [self]
78
78
  def load
79
- resp = Aws::Plugins::UserAgent.feature('resource') do
79
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
80
80
  @client.get_bucket_website(bucket: @bucket_name)
81
81
  end
82
82
  @data = resp.data
@@ -193,7 +193,7 @@ module Aws::S3
193
193
  :retry
194
194
  end
195
195
  end
196
- Aws::Plugins::UserAgent.feature('resource') do
196
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
197
197
  Aws::Waiters::Waiter.new(options).wait({})
198
198
  end
199
199
  end
@@ -213,7 +213,7 @@ module Aws::S3
213
213
  # @return [EmptyStructure]
214
214
  def delete(options = {})
215
215
  options = options.merge(bucket: @bucket_name)
216
- resp = Aws::Plugins::UserAgent.feature('resource') do
216
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
217
217
  @client.delete_bucket_website(options)
218
218
  end
219
219
  resp.data
@@ -290,7 +290,7 @@ module Aws::S3
290
290
  # @return [EmptyStructure]
291
291
  def put(options = {})
292
292
  options = options.merge(bucket: @bucket_name)
293
- resp = Aws::Plugins::UserAgent.feature('resource') do
293
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
294
294
  @client.put_bucket_website(options)
295
295
  end
296
296
  resp.data