aws-sdk-s3 1.122.0 → 1.157.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +238 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  6. data/lib/aws-sdk-s3/bucket.rb +507 -114
  7. data/lib/aws-sdk-s3/bucket_acl.rb +18 -12
  8. data/lib/aws-sdk-s3/bucket_cors.rb +24 -16
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +24 -16
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +24 -16
  11. data/lib/aws-sdk-s3/bucket_logging.rb +25 -12
  12. data/lib/aws-sdk-s3/bucket_notification.rb +12 -6
  13. data/lib/aws-sdk-s3/bucket_policy.rb +70 -18
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +18 -12
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +24 -16
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +42 -32
  18. data/lib/aws-sdk-s3/bucket_website.rb +24 -16
  19. data/lib/aws-sdk-s3/client.rb +6048 -2781
  20. data/lib/aws-sdk-s3/client_api.rb +148 -20
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +3 -1
  22. data/lib/aws-sdk-s3/customizations/errors.rb +16 -3
  23. data/lib/aws-sdk-s3/customizations/object.rb +91 -18
  24. data/lib/aws-sdk-s3/customizations.rb +8 -0
  25. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  26. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  27. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  28. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  29. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  30. data/lib/aws-sdk-s3/endpoint_parameters.rb +44 -0
  31. data/lib/aws-sdk-s3/endpoint_provider.rb +111 -252
  32. data/lib/aws-sdk-s3/endpoints.rb +540 -0
  33. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  34. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  35. data/lib/aws-sdk-s3/file_downloader.rb +169 -44
  36. data/lib/aws-sdk-s3/file_uploader.rb +8 -6
  37. data/lib/aws-sdk-s3/multipart_file_uploader.rb +4 -4
  38. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +10 -7
  39. data/lib/aws-sdk-s3/multipart_upload.rb +81 -20
  40. data/lib/aws-sdk-s3/multipart_upload_part.rb +169 -38
  41. data/lib/aws-sdk-s3/object.rb +1571 -261
  42. data/lib/aws-sdk-s3/object_acl.rb +38 -18
  43. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  44. data/lib/aws-sdk-s3/object_multipart_copier.rb +42 -24
  45. data/lib/aws-sdk-s3/object_summary.rb +1422 -276
  46. data/lib/aws-sdk-s3/object_version.rb +344 -47
  47. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  48. data/lib/aws-sdk-s3/plugins/endpoints.rb +14 -2
  49. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
  50. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
  51. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  52. data/lib/aws-sdk-s3/plugins/md5s.rb +2 -1
  53. data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
  54. data/lib/aws-sdk-s3/presigned_post.rb +52 -43
  55. data/lib/aws-sdk-s3/presigner.rb +8 -4
  56. data/lib/aws-sdk-s3/resource.rb +89 -13
  57. data/lib/aws-sdk-s3/types.rb +4879 -1513
  58. data/lib/aws-sdk-s3.rb +1 -1
  59. data/sig/bucket.rbs +212 -0
  60. data/sig/bucket_acl.rbs +78 -0
  61. data/sig/bucket_cors.rbs +69 -0
  62. data/sig/bucket_lifecycle.rbs +88 -0
  63. data/sig/bucket_lifecycle_configuration.rbs +111 -0
  64. data/sig/bucket_logging.rbs +76 -0
  65. data/sig/bucket_notification.rbs +114 -0
  66. data/sig/bucket_policy.rbs +59 -0
  67. data/sig/bucket_request_payment.rbs +54 -0
  68. data/sig/bucket_tagging.rbs +65 -0
  69. data/sig/bucket_versioning.rbs +77 -0
  70. data/sig/bucket_website.rbs +93 -0
  71. data/sig/client.rbs +2381 -0
  72. data/sig/customizations/bucket.rbs +19 -0
  73. data/sig/customizations/object.rbs +38 -0
  74. data/sig/customizations/object_summary.rbs +35 -0
  75. data/sig/errors.rbs +34 -0
  76. data/sig/multipart_upload.rbs +110 -0
  77. data/sig/multipart_upload_part.rbs +105 -0
  78. data/sig/object.rbs +442 -0
  79. data/sig/object_acl.rbs +86 -0
  80. data/sig/object_summary.rbs +334 -0
  81. data/sig/object_version.rbs +137 -0
  82. data/sig/resource.rbs +127 -0
  83. data/sig/types.rbs +2568 -0
  84. data/sig/waiters.rbs +95 -0
  85. metadata +43 -11
@@ -54,7 +54,9 @@ module Aws::S3
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = @client.get_bucket_tagging(bucket: @bucket_name)
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
+ @client.get_bucket_tagging(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::Waiters::Waiter.new(options).wait({})
174
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
175
+ Aws::Waiters::Waiter.new(options).wait({})
176
+ end
173
177
  end
174
178
 
175
179
  # @!group Actions
@@ -181,13 +185,15 @@ module Aws::S3
181
185
  # })
182
186
  # @param [Hash] options ({})
183
187
  # @option options [String] :expected_bucket_owner
184
- # The account ID of the expected bucket owner. If the bucket is owned by
185
- # a different account, the request fails with the HTTP status code `403
186
- # 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).
187
191
  # @return [EmptyStructure]
188
192
  def delete(options = {})
189
193
  options = options.merge(bucket: @bucket_name)
190
- resp = @client.delete_bucket_tagging(options)
194
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
195
+ @client.delete_bucket_tagging(options)
196
+ end
191
197
  resp.data
192
198
  end
193
199
 
@@ -221,12 +227,12 @@ module Aws::S3
221
227
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
222
228
  # @option options [String] :checksum_algorithm
223
229
  # Indicates the algorithm used to create the checksum for the object
224
- # when using the SDK. This header will not provide any additional
225
- # functionality if not using the SDK. When sending this header, there
226
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
227
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
228
- # `400 Bad Request`. For more information, see [Checking object
229
- # 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*.
230
236
  #
231
237
  # If you provide an individual checksum, Amazon S3 ignores any provided
232
238
  # `ChecksumAlgorithm` parameter.
@@ -237,13 +243,15 @@ module Aws::S3
237
243
  # @option options [required, Types::Tagging] :tagging
238
244
  # Container for the `TagSet` and `Tag` elements.
239
245
  # @option options [String] :expected_bucket_owner
240
- # The account ID of the expected bucket owner. If the bucket is owned by
241
- # a different account, the request fails with the HTTP status code `403
242
- # Forbidden` (access denied).
246
+ # The account ID of the expected bucket owner. If the account ID that
247
+ # you provide does not match the actual owner of the bucket, the request
248
+ # fails with the HTTP status code `403 Forbidden` (access denied).
243
249
  # @return [EmptyStructure]
244
250
  def put(options = {})
245
251
  options = options.merge(bucket: @bucket_name)
246
- resp = @client.put_bucket_tagging(options)
252
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
253
+ @client.put_bucket_tagging(options)
254
+ end
247
255
  resp.data
248
256
  end
249
257
 
@@ -63,7 +63,9 @@ module Aws::S3
63
63
  #
64
64
  # @return [self]
65
65
  def load
66
- resp = @client.get_bucket_versioning(bucket: @bucket_name)
66
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
67
+ @client.get_bucket_versioning(bucket: @bucket_name)
68
+ end
67
69
  @data = resp.data
68
70
  self
69
71
  end
@@ -178,7 +180,9 @@ module Aws::S3
178
180
  :retry
179
181
  end
180
182
  end
181
- Aws::Waiters::Waiter.new(options).wait({})
183
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
184
+ Aws::Waiters::Waiter.new(options).wait({})
185
+ end
182
186
  end
183
187
 
184
188
  # @!group Actions
@@ -207,12 +211,12 @@ module Aws::S3
207
211
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
208
212
  # @option options [String] :checksum_algorithm
209
213
  # Indicates the algorithm used to create the checksum for the object
210
- # when using the SDK. This header will not provide any additional
211
- # functionality if not using the SDK. When sending this header, there
212
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
213
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
214
- # `400 Bad Request`. For more information, see [Checking object
215
- # integrity][1] in the *Amazon S3 User Guide*.
214
+ # when you use the SDK. This header will not provide any additional
215
+ # functionality if you don't use the SDK. When you send this header,
216
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
217
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
218
+ # status code `400 Bad Request`. For more information, see [Checking
219
+ # object integrity][1] in the *Amazon S3 User Guide*.
216
220
  #
217
221
  # If you provide an individual checksum, Amazon S3 ignores any provided
218
222
  # `ChecksumAlgorithm` parameter.
@@ -224,9 +228,9 @@ module Aws::S3
224
228
  # The concatenation of the authentication device's serial number, a
225
229
  # space, and the value that is displayed on your authentication device.
226
230
  # @option options [String] :expected_bucket_owner
227
- # The account ID of the expected bucket owner. If the bucket is owned by
228
- # a different account, the request fails with the HTTP status code `403
229
- # Forbidden` (access denied).
231
+ # The account ID of the expected bucket owner. If the account ID that
232
+ # you provide does not match the actual owner of the bucket, the request
233
+ # fails with the HTTP status code `403 Forbidden` (access denied).
230
234
  # @return [EmptyStructure]
231
235
  def enable(options = {})
232
236
  options = Aws::Util.deep_merge(options,
@@ -235,7 +239,9 @@ module Aws::S3
235
239
  status: "Enabled"
236
240
  }
237
241
  )
238
- resp = @client.put_bucket_versioning(options)
242
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
243
+ @client.put_bucket_versioning(options)
244
+ end
239
245
  resp.data
240
246
  end
241
247
 
@@ -267,12 +273,12 @@ module Aws::S3
267
273
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
268
274
  # @option options [String] :checksum_algorithm
269
275
  # Indicates the algorithm used to create the checksum for the object
270
- # when using the SDK. This header will not provide any additional
271
- # functionality if not using the SDK. When sending this header, there
272
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
273
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
274
- # `400 Bad Request`. For more information, see [Checking object
275
- # integrity][1] in the *Amazon S3 User Guide*.
276
+ # when you use the SDK. This header will not provide any additional
277
+ # functionality if you don't use the SDK. When you send this header,
278
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
279
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
280
+ # status code `400 Bad Request`. For more information, see [Checking
281
+ # object integrity][1] in the *Amazon S3 User Guide*.
276
282
  #
277
283
  # If you provide an individual checksum, Amazon S3 ignores any provided
278
284
  # `ChecksumAlgorithm` parameter.
@@ -286,13 +292,15 @@ module Aws::S3
286
292
  # @option options [required, Types::VersioningConfiguration] :versioning_configuration
287
293
  # Container for setting the versioning state.
288
294
  # @option options [String] :expected_bucket_owner
289
- # The account ID of the expected bucket owner. If the bucket is owned by
290
- # a different account, the request fails with the HTTP status code `403
291
- # Forbidden` (access denied).
295
+ # The account ID of the expected bucket owner. If the account ID that
296
+ # you provide does not match the actual owner of the bucket, the request
297
+ # fails with the HTTP status code `403 Forbidden` (access denied).
292
298
  # @return [EmptyStructure]
293
299
  def put(options = {})
294
300
  options = options.merge(bucket: @bucket_name)
295
- resp = @client.put_bucket_versioning(options)
301
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
302
+ @client.put_bucket_versioning(options)
303
+ end
296
304
  resp.data
297
305
  end
298
306
 
@@ -320,12 +328,12 @@ module Aws::S3
320
328
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
321
329
  # @option options [String] :checksum_algorithm
322
330
  # Indicates the algorithm used to create the checksum for the object
323
- # when using the SDK. This header will not provide any additional
324
- # functionality if not using the SDK. When sending this header, there
325
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
326
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
327
- # `400 Bad Request`. For more information, see [Checking object
328
- # integrity][1] in the *Amazon S3 User Guide*.
331
+ # when you use the SDK. This header will not provide any additional
332
+ # functionality if you don't use the SDK. When you send this header,
333
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
334
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
335
+ # status code `400 Bad Request`. For more information, see [Checking
336
+ # object integrity][1] in the *Amazon S3 User Guide*.
329
337
  #
330
338
  # If you provide an individual checksum, Amazon S3 ignores any provided
331
339
  # `ChecksumAlgorithm` parameter.
@@ -337,9 +345,9 @@ module Aws::S3
337
345
  # The concatenation of the authentication device's serial number, a
338
346
  # space, and the value that is displayed on your authentication device.
339
347
  # @option options [String] :expected_bucket_owner
340
- # The account ID of the expected bucket owner. If the bucket is owned by
341
- # a different account, the request fails with the HTTP status code `403
342
- # Forbidden` (access denied).
348
+ # The account ID of the expected bucket owner. If the account ID that
349
+ # you provide does not match the actual owner of the bucket, the request
350
+ # fails with the HTTP status code `403 Forbidden` (access denied).
343
351
  # @return [EmptyStructure]
344
352
  def suspend(options = {})
345
353
  options = Aws::Util.deep_merge(options,
@@ -348,7 +356,9 @@ module Aws::S3
348
356
  status: "Suspended"
349
357
  }
350
358
  )
351
- resp = @client.put_bucket_versioning(options)
359
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
360
+ @client.put_bucket_versioning(options)
361
+ end
352
362
  resp.data
353
363
  end
354
364
 
@@ -76,7 +76,9 @@ module Aws::S3
76
76
  #
77
77
  # @return [self]
78
78
  def load
79
- resp = @client.get_bucket_website(bucket: @bucket_name)
79
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
80
+ @client.get_bucket_website(bucket: @bucket_name)
81
+ end
80
82
  @data = resp.data
81
83
  self
82
84
  end
@@ -191,7 +193,9 @@ module Aws::S3
191
193
  :retry
192
194
  end
193
195
  end
194
- Aws::Waiters::Waiter.new(options).wait({})
196
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
197
+ Aws::Waiters::Waiter.new(options).wait({})
198
+ end
195
199
  end
196
200
 
197
201
  # @!group Actions
@@ -203,13 +207,15 @@ module Aws::S3
203
207
  # })
204
208
  # @param [Hash] options ({})
205
209
  # @option options [String] :expected_bucket_owner
206
- # The account ID of the expected bucket owner. If the bucket is owned by
207
- # a different account, the request fails with the HTTP status code `403
208
- # Forbidden` (access denied).
210
+ # The account ID of the expected bucket owner. If the account ID that
211
+ # you provide does not match the actual owner of the bucket, the request
212
+ # fails with the HTTP status code `403 Forbidden` (access denied).
209
213
  # @return [EmptyStructure]
210
214
  def delete(options = {})
211
215
  options = options.merge(bucket: @bucket_name)
212
- resp = @client.delete_bucket_website(options)
216
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
217
+ @client.delete_bucket_website(options)
218
+ end
213
219
  resp.data
214
220
  end
215
221
 
@@ -262,12 +268,12 @@ module Aws::S3
262
268
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
263
269
  # @option options [String] :checksum_algorithm
264
270
  # Indicates the algorithm used to create the checksum for the object
265
- # when using the SDK. This header will not provide any additional
266
- # functionality if not using the SDK. When sending this header, there
267
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
268
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
269
- # `400 Bad Request`. For more information, see [Checking object
270
- # integrity][1] in the *Amazon S3 User Guide*.
271
+ # when you use the SDK. This header will not provide any additional
272
+ # functionality if you don't use the SDK. When you send this header,
273
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
274
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
275
+ # status code `400 Bad Request`. For more information, see [Checking
276
+ # object integrity][1] in the *Amazon S3 User Guide*.
271
277
  #
272
278
  # If you provide an individual checksum, Amazon S3 ignores any provided
273
279
  # `ChecksumAlgorithm` parameter.
@@ -278,13 +284,15 @@ module Aws::S3
278
284
  # @option options [required, Types::WebsiteConfiguration] :website_configuration
279
285
  # Container for the request.
280
286
  # @option options [String] :expected_bucket_owner
281
- # The account ID of the expected bucket owner. If the bucket is owned by
282
- # a different account, the request fails with the HTTP status code `403
283
- # Forbidden` (access denied).
287
+ # The account ID of the expected bucket owner. If the account ID that
288
+ # you provide does not match the actual owner of the bucket, the request
289
+ # fails with the HTTP status code `403 Forbidden` (access denied).
284
290
  # @return [EmptyStructure]
285
291
  def put(options = {})
286
292
  options = options.merge(bucket: @bucket_name)
287
- resp = @client.put_bucket_website(options)
293
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
294
+ @client.put_bucket_website(options)
295
+ end
288
296
  resp.data
289
297
  end
290
298