aws-sdk-s3 1.122.0 → 1.157.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.
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
@@ -60,7 +60,9 @@ module Aws::S3
60
60
  #
61
61
  # @return [self]
62
62
  def load
63
- resp = @client.get_bucket_acl(bucket: @bucket_name)
63
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') 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::Waiters::Waiter.new(options).wait({})
180
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
181
+ Aws::Waiters::Waiter.new(options).wait({})
182
+ end
179
183
  end
180
184
 
181
185
  # @!group Actions
@@ -231,12 +235,12 @@ module Aws::S3
231
235
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
232
236
  # @option options [String] :checksum_algorithm
233
237
  # Indicates the algorithm used to create the checksum for the object
234
- # when using the SDK. This header will not provide any additional
235
- # functionality if not using the SDK. When sending this header, there
236
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
237
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
238
- # `400 Bad Request`. For more information, see [Checking object
239
- # 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*.
240
244
  #
241
245
  # If you provide an individual checksum, Amazon S3 ignores any provided
242
246
  # `ChecksumAlgorithm` parameter.
@@ -259,13 +263,15 @@ module Aws::S3
259
263
  # @option options [String] :grant_write_acp
260
264
  # Allows grantee to write the ACL for the applicable bucket.
261
265
  # @option options [String] :expected_bucket_owner
262
- # The account ID of the expected bucket owner. If the bucket is owned by
263
- # a different account, the request fails with the HTTP status code `403
264
- # 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).
265
269
  # @return [EmptyStructure]
266
270
  def put(options = {})
267
271
  options = options.merge(bucket: @bucket_name)
268
- resp = @client.put_bucket_acl(options)
272
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') 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 = @client.get_bucket_cors(bucket: @bucket_name)
58
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') 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::Waiters::Waiter.new(options).wait({})
175
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
176
+ Aws::Waiters::Waiter.new(options).wait({})
177
+ end
174
178
  end
175
179
 
176
180
  # @!group Actions
@@ -182,13 +186,15 @@ module Aws::S3
182
186
  # })
183
187
  # @param [Hash] options ({})
184
188
  # @option options [String] :expected_bucket_owner
185
- # The account ID of the expected bucket owner. If the bucket is owned by
186
- # a different account, the request fails with the HTTP status code `403
187
- # 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).
188
192
  # @return [EmptyStructure]
189
193
  def delete(options = {})
190
194
  options = options.merge(bucket: @bucket_name)
191
- resp = @client.delete_bucket_cors(options)
195
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
196
+ @client.delete_bucket_cors(options)
197
+ end
192
198
  resp.data
193
199
  end
194
200
 
@@ -234,12 +240,12 @@ module Aws::S3
234
240
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
235
241
  # @option options [String] :checksum_algorithm
236
242
  # Indicates the algorithm used to create the checksum for the object
237
- # when using the SDK. This header will not provide any additional
238
- # functionality if not using the SDK. When sending this header, there
239
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
240
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
241
- # `400 Bad Request`. For more information, see [Checking object
242
- # 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*.
243
249
  #
244
250
  # If you provide an individual checksum, Amazon S3 ignores any provided
245
251
  # `ChecksumAlgorithm` parameter.
@@ -248,13 +254,15 @@ module Aws::S3
248
254
  #
249
255
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
250
256
  # @option options [String] :expected_bucket_owner
251
- # The account ID of the expected bucket owner. If the bucket is owned by
252
- # a different account, the request fails with the HTTP status code `403
253
- # 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).
254
260
  # @return [EmptyStructure]
255
261
  def put(options = {})
256
262
  options = options.merge(bucket: @bucket_name)
257
- resp = @client.put_bucket_cors(options)
263
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') 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 = @client.get_bucket_lifecycle(bucket: @bucket_name)
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') 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::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_lifecycle(options)
194
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
195
+ @client.delete_bucket_lifecycle(options)
196
+ end
191
197
  resp.data
192
198
  end
193
199
 
@@ -236,12 +242,12 @@ module Aws::S3
236
242
  # automatically.
237
243
  # @option options [String] :checksum_algorithm
238
244
  # Indicates the algorithm used to create the checksum for the object
239
- # when using the SDK. This header will not provide any additional
240
- # functionality if not using the SDK. When sending this header, there
241
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
242
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
243
- # `400 Bad Request`. For more information, see [Checking object
244
- # integrity][1] in the *Amazon S3 User Guide*.
245
+ # when you use the SDK. This header will not provide any additional
246
+ # functionality if you don't use the SDK. When you send this header,
247
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
248
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
249
+ # status code `400 Bad Request`. For more information, see [Checking
250
+ # object integrity][1] in the *Amazon S3 User Guide*.
245
251
  #
246
252
  # If you provide an individual checksum, Amazon S3 ignores any provided
247
253
  # `ChecksumAlgorithm` parameter.
@@ -251,13 +257,15 @@ module Aws::S3
251
257
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
252
258
  # @option options [Types::LifecycleConfiguration] :lifecycle_configuration
253
259
  # @option options [String] :expected_bucket_owner
254
- # The account ID of the expected bucket owner. If the bucket is owned by
255
- # a different account, the request fails with the HTTP status code `403
256
- # Forbidden` (access denied).
260
+ # The account ID of the expected bucket owner. If the account ID that
261
+ # you provide does not match the actual owner of the bucket, the request
262
+ # fails with the HTTP status code `403 Forbidden` (access denied).
257
263
  # @return [EmptyStructure]
258
264
  def put(options = {})
259
265
  options = options.merge(bucket: @bucket_name)
260
- resp = @client.put_bucket_lifecycle(options)
266
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') 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 = @client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') 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::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_lifecycle(options)
194
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
195
+ @client.delete_bucket_lifecycle(options)
196
+ end
191
197
  resp.data
192
198
  end
193
199
 
@@ -255,12 +261,12 @@ module Aws::S3
255
261
  # @param [Hash] options ({})
256
262
  # @option options [String] :checksum_algorithm
257
263
  # Indicates the algorithm used to create the checksum for the object
258
- # when using the SDK. This header will not provide any additional
259
- # functionality if not using the SDK. When sending this header, there
260
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
261
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
262
- # `400 Bad Request`. For more information, see [Checking object
263
- # integrity][1] in the *Amazon S3 User Guide*.
264
+ # when you use the SDK. This header will not provide any additional
265
+ # functionality if you don't use the SDK. When you send this header,
266
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
267
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
268
+ # status code `400 Bad Request`. For more information, see [Checking
269
+ # object integrity][1] in the *Amazon S3 User Guide*.
264
270
  #
265
271
  # If you provide an individual checksum, Amazon S3 ignores any provided
266
272
  # `ChecksumAlgorithm` parameter.
@@ -271,13 +277,15 @@ module Aws::S3
271
277
  # @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
272
278
  # Container for lifecycle rules. You can add as many as 1,000 rules.
273
279
  # @option options [String] :expected_bucket_owner
274
- # The account ID of the expected bucket owner. If the bucket is owned by
275
- # a different account, the request fails with the HTTP status code `403
276
- # Forbidden` (access denied).
280
+ # The account ID of the expected bucket owner. If the account ID that
281
+ # you provide does not match the actual owner of the bucket, the request
282
+ # fails with the HTTP status code `403 Forbidden` (access denied).
277
283
  # @return [EmptyStructure]
278
284
  def put(options = {})
279
285
  options = options.merge(bucket: @bucket_name)
280
- resp = @client.put_bucket_lifecycle_configuration(options)
286
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') 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 = @client.get_bucket_logging(bucket: @bucket_name)
63
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') 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::Waiters::Waiter.new(options).wait({})
180
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
181
+ Aws::Waiters::Waiter.new(options).wait({})
182
+ end
179
183
  end
180
184
 
181
185
  # @!group Actions
@@ -199,6 +203,13 @@ module Aws::S3
199
203
  # },
200
204
  # ],
201
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
+ # },
202
213
  # },
203
214
  # },
204
215
  # content_md5: "ContentMD5",
@@ -216,12 +227,12 @@ module Aws::S3
216
227
  # automatically.
217
228
  # @option options [String] :checksum_algorithm
218
229
  # Indicates the algorithm used to create the checksum for the object
219
- # when using the SDK. This header will not provide any additional
220
- # functionality if not using the SDK. When sending this header, there
221
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
222
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
223
- # `400 Bad Request`. For more information, see [Checking object
224
- # 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*.
225
236
  #
226
237
  # If you provide an individual checksum, Amazon S3 ignores any provided
227
238
  # `ChecksumAlgorithm` parameter.
@@ -230,13 +241,15 @@ module Aws::S3
230
241
  #
231
242
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
232
243
  # @option options [String] :expected_bucket_owner
233
- # The account ID of the expected bucket owner. If the bucket is owned by
234
- # a different account, the request fails with the HTTP status code `403
235
- # 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).
236
247
  # @return [EmptyStructure]
237
248
  def put(options = {})
238
249
  options = options.merge(bucket: @bucket_name)
239
- resp = @client.put_bucket_logging(options)
250
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
251
+ @client.put_bucket_logging(options)
252
+ end
240
253
  resp.data
241
254
  end
242
255
 
@@ -75,7 +75,9 @@ module Aws::S3
75
75
  #
76
76
  # @return [self]
77
77
  def load
78
- resp = @client.get_bucket_notification_configuration(bucket: @bucket_name)
78
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
79
+ @client.get_bucket_notification_configuration(bucket: @bucket_name)
80
+ end
79
81
  @data = resp.data
80
82
  self
81
83
  end
@@ -190,7 +192,9 @@ module Aws::S3
190
192
  :retry
191
193
  end
192
194
  end
193
- Aws::Waiters::Waiter.new(options).wait({})
195
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
196
+ Aws::Waiters::Waiter.new(options).wait({})
197
+ end
194
198
  end
195
199
 
196
200
  # @!group Actions
@@ -262,16 +266,18 @@ module Aws::S3
262
266
  # bucket. If this element is empty, notifications are turned off for the
263
267
  # bucket.
264
268
  # @option options [String] :expected_bucket_owner
265
- # The account ID of the expected bucket owner. If the bucket is owned by
266
- # a different account, the request fails with the HTTP status code `403
267
- # 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).
268
272
  # @option options [Boolean] :skip_destination_validation
269
273
  # Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations.
270
274
  # True or false value.
271
275
  # @return [EmptyStructure]
272
276
  def put(options = {})
273
277
  options = options.merge(bucket: @bucket_name)
274
- resp = @client.put_bucket_notification_configuration(options)
278
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
279
+ @client.put_bucket_notification_configuration(options)
280
+ end
275
281
  resp.data
276
282
  end
277
283
 
@@ -54,7 +54,9 @@ module Aws::S3
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = @client.get_bucket_policy(bucket: @bucket_name)
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
+ @client.get_bucket_policy(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,21 @@ 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).
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>
187
197
  # @return [EmptyStructure]
188
198
  def delete(options = {})
189
199
  options = options.merge(bucket: @bucket_name)
190
- resp = @client.delete_bucket_policy(options)
200
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
201
+ @client.delete_bucket_policy(options)
202
+ end
191
203
  resp.data
192
204
  end
193
205
 
@@ -207,17 +219,42 @@ module Aws::S3
207
219
  # For requests made using the Amazon Web Services Command Line Interface
208
220
  # (CLI) or Amazon Web Services SDKs, this field is calculated
209
221
  # automatically.
222
+ #
223
+ # <note markdown="1"> This functionality is not supported for directory buckets.
224
+ #
225
+ # </note>
210
226
  # @option options [String] :checksum_algorithm
211
227
  # Indicates the algorithm used to create the checksum for the object
212
- # when using the SDK. This header will not provide any additional
213
- # functionality if not using the SDK. When sending this header, there
214
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
215
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
216
- # `400 Bad Request`. For more information, see [Checking object
217
- # integrity][1] in the *Amazon S3 User Guide*.
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
218
242
  #
219
- # If you provide an individual checksum, Amazon S3 ignores any provided
220
- # `ChecksumAlgorithm` parameter.
243
+ # * SHA256
244
+ #
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>
221
258
  #
222
259
  #
223
260
  #
@@ -225,16 +262,31 @@ module Aws::S3
225
262
  # @option options [Boolean] :confirm_remove_self_bucket_access
226
263
  # Set this parameter to true to confirm that you want to remove your
227
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>
228
269
  # @option options [required, String] :policy
229
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`.
230
274
  # @option options [String] :expected_bucket_owner
231
- # The account ID of the expected bucket owner. If the bucket is owned by
232
- # a different account, the request fails with the HTTP status code `403
233
- # 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>
234
284
  # @return [EmptyStructure]
235
285
  def put(options = {})
236
286
  options = options.merge(bucket: @bucket_name)
237
- resp = @client.put_bucket_policy(options)
287
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
288
+ @client.put_bucket_policy(options)
289
+ end
238
290
  resp.data
239
291
  end
240
292
 
@@ -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::BUCKET_REGIONS.bucket_added do |bucket_name, region_name|
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
@@ -54,7 +54,9 @@ module Aws::S3
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = @client.get_bucket_request_payment(bucket: @bucket_name)
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
+ @client.get_bucket_request_payment(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
@@ -199,12 +203,12 @@ module Aws::S3
199
203
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
200
204
  # @option options [String] :checksum_algorithm
201
205
  # Indicates the algorithm used to create the checksum for the object
202
- # when using the SDK. This header will not provide any additional
203
- # functionality if not using the SDK. When sending this header, there
204
- # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
205
- # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
206
- # `400 Bad Request`. For more information, see [Checking object
207
- # integrity][1] in the *Amazon S3 User Guide*.
206
+ # when you use the SDK. This header will not provide any additional
207
+ # functionality if you don't use the SDK. When you send this header,
208
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
209
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
210
+ # status code `400 Bad Request`. For more information, see [Checking
211
+ # object integrity][1] in the *Amazon S3 User Guide*.
208
212
  #
209
213
  # If you provide an individual checksum, Amazon S3 ignores any provided
210
214
  # `ChecksumAlgorithm` parameter.
@@ -215,13 +219,15 @@ module Aws::S3
215
219
  # @option options [required, Types::RequestPaymentConfiguration] :request_payment_configuration
216
220
  # Container for Payer.
217
221
  # @option options [String] :expected_bucket_owner
218
- # The account ID of the expected bucket owner. If the bucket is owned by
219
- # a different account, the request fails with the HTTP status code `403
220
- # Forbidden` (access denied).
222
+ # The account ID of the expected bucket owner. If the account ID that
223
+ # you provide does not match the actual owner of the bucket, the request
224
+ # fails with the HTTP status code `403 Forbidden` (access denied).
221
225
  # @return [EmptyStructure]
222
226
  def put(options = {})
223
227
  options = options.merge(bucket: @bucket_name)
224
- resp = @client.put_bucket_request_payment(options)
228
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
229
+ @client.put_bucket_request_payment(options)
230
+ end
225
231
  resp.data
226
232
  end
227
233