aws-sdk-s3 1.109.0 → 1.156.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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +352 -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 +241 -0
  6. data/lib/aws-sdk-s3/bucket.rb +585 -110
  7. data/lib/aws-sdk-s3/bucket_acl.rb +28 -6
  8. data/lib/aws-sdk-s3/bucket_cors.rb +34 -10
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +34 -10
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +34 -10
  11. data/lib/aws-sdk-s3/bucket_logging.rb +35 -6
  12. data/lib/aws-sdk-s3/bucket_notification.rb +12 -6
  13. data/lib/aws-sdk-s3/bucket_policy.rb +78 -10
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +28 -6
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +34 -10
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +72 -14
  18. data/lib/aws-sdk-s3/bucket_website.rb +34 -10
  19. data/lib/aws-sdk-s3/client.rb +7900 -3252
  20. data/lib/aws-sdk-s3/client_api.rb +706 -228
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
  22. data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
  23. data/lib/aws-sdk-s3/customizations/object.rb +97 -21
  24. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  25. data/lib/aws-sdk-s3/customizations.rb +10 -0
  26. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  27. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  28. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  29. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  30. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  31. data/lib/aws-sdk-s3/endpoint_parameters.rb +186 -0
  32. data/lib/aws-sdk-s3/endpoint_provider.rb +592 -0
  33. data/lib/aws-sdk-s3/endpoints.rb +2689 -0
  34. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  35. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  36. data/lib/aws-sdk-s3/file_downloader.rb +170 -45
  37. data/lib/aws-sdk-s3/file_uploader.rb +11 -4
  38. data/lib/aws-sdk-s3/multipart_file_uploader.rb +30 -11
  39. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +46 -17
  40. data/lib/aws-sdk-s3/multipart_upload.rb +194 -19
  41. data/lib/aws-sdk-s3/multipart_upload_part.rb +280 -30
  42. data/lib/aws-sdk-s3/object.rb +1753 -266
  43. data/lib/aws-sdk-s3/object_acl.rb +49 -13
  44. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  45. data/lib/aws-sdk-s3/object_multipart_copier.rb +46 -22
  46. data/lib/aws-sdk-s3/object_summary.rb +1497 -221
  47. data/lib/aws-sdk-s3/object_version.rb +383 -58
  48. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -50
  49. data/lib/aws-sdk-s3/plugins/access_grants.rb +114 -0
  50. data/lib/aws-sdk-s3/plugins/arn.rb +0 -184
  51. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  52. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  53. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -49
  54. data/lib/aws-sdk-s3/plugins/endpoints.rb +274 -0
  55. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  56. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
  57. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
  58. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
  59. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  60. data/lib/aws-sdk-s3/plugins/md5s.rb +6 -3
  61. data/lib/aws-sdk-s3/plugins/s3_signer.rb +42 -126
  62. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  63. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  64. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  65. data/lib/aws-sdk-s3/presigner.rb +28 -37
  66. data/lib/aws-sdk-s3/resource.rb +89 -13
  67. data/lib/aws-sdk-s3/types.rb +6544 -4909
  68. data/lib/aws-sdk-s3.rb +5 -1
  69. data/sig/bucket.rbs +212 -0
  70. data/sig/bucket_acl.rbs +78 -0
  71. data/sig/bucket_cors.rbs +69 -0
  72. data/sig/bucket_lifecycle.rbs +88 -0
  73. data/sig/bucket_lifecycle_configuration.rbs +111 -0
  74. data/sig/bucket_logging.rbs +76 -0
  75. data/sig/bucket_notification.rbs +114 -0
  76. data/sig/bucket_policy.rbs +59 -0
  77. data/sig/bucket_request_payment.rbs +54 -0
  78. data/sig/bucket_tagging.rbs +65 -0
  79. data/sig/bucket_versioning.rbs +77 -0
  80. data/sig/bucket_website.rbs +93 -0
  81. data/sig/client.rbs +2381 -0
  82. data/sig/customizations/bucket.rbs +19 -0
  83. data/sig/customizations/object.rbs +38 -0
  84. data/sig/customizations/object_summary.rbs +35 -0
  85. data/sig/errors.rbs +34 -0
  86. data/sig/multipart_upload.rbs +110 -0
  87. data/sig/multipart_upload_part.rbs +105 -0
  88. data/sig/object.rbs +442 -0
  89. data/sig/object_acl.rbs +86 -0
  90. data/sig/object_summary.rbs +334 -0
  91. data/sig/object_version.rbs +137 -0
  92. data/sig/resource.rbs +127 -0
  93. data/sig/types.rbs +2568 -0
  94. data/sig/waiters.rbs +95 -0
  95. metadata +50 -16
  96. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  97. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -68
  98. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  99. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -74
  100. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -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
@@ -203,6 +207,7 @@ module Aws::S3
203
207
  # },
204
208
  # },
205
209
  # content_md5: "ContentMD5",
210
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
206
211
  # grant_full_control: "GrantFullControl",
207
212
  # grant_read: "GrantRead",
208
213
  # grant_read_acp: "GrantReadACP",
@@ -228,6 +233,21 @@ module Aws::S3
228
233
  #
229
234
  #
230
235
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
236
+ # @option options [String] :checksum_algorithm
237
+ # Indicates the algorithm used to create the checksum for the object
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
+ #
245
+ # If you provide an individual checksum, Amazon S3 ignores any provided
246
+ # `ChecksumAlgorithm` parameter.
247
+ #
248
+ #
249
+ #
250
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
231
251
  # @option options [String] :grant_full_control
232
252
  # Allows grantee the read, write, read ACP, and write ACP permissions on
233
253
  # the bucket.
@@ -243,13 +263,15 @@ module Aws::S3
243
263
  # @option options [String] :grant_write_acp
244
264
  # Allows grantee to write the ACL for the applicable bucket.
245
265
  # @option options [String] :expected_bucket_owner
246
- # The account ID of the expected bucket owner. If the bucket is owned by
247
- # a different account, the request will fail with an HTTP `403 (Access
248
- # Denied)` error.
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).
249
269
  # @return [EmptyStructure]
250
270
  def put(options = {})
251
271
  options = options.merge(bucket: @bucket_name)
252
- resp = @client.put_bucket_acl(options)
272
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
273
+ @client.put_bucket_acl(options)
274
+ end
253
275
  resp.data
254
276
  end
255
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 will fail with an HTTP `403 (Access
187
- # Denied)` error.
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
 
@@ -208,6 +214,7 @@ module Aws::S3
208
214
  # ],
209
215
  # },
210
216
  # content_md5: "ContentMD5",
217
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
211
218
  # expected_bucket_owner: "AccountId",
212
219
  # })
213
220
  # @param [Hash] options ({})
@@ -231,14 +238,31 @@ module Aws::S3
231
238
  #
232
239
  #
233
240
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
241
+ # @option options [String] :checksum_algorithm
242
+ # Indicates the algorithm used to create the checksum for the object
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
+ #
250
+ # If you provide an individual checksum, Amazon S3 ignores any provided
251
+ # `ChecksumAlgorithm` parameter.
252
+ #
253
+ #
254
+ #
255
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
234
256
  # @option options [String] :expected_bucket_owner
235
- # The account ID of the expected bucket owner. If the bucket is owned by
236
- # a different account, the request will fail with an HTTP `403 (Access
237
- # Denied)` error.
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).
238
260
  # @return [EmptyStructure]
239
261
  def put(options = {})
240
262
  options = options.merge(bucket: @bucket_name)
241
- resp = @client.put_bucket_cors(options)
263
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
264
+ @client.put_bucket_cors(options)
265
+ end
242
266
  resp.data
243
267
  end
244
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 will fail with an HTTP `403 (Access
186
- # Denied)` error.
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
 
@@ -195,6 +201,7 @@ module Aws::S3
195
201
  #
196
202
  # bucket_lifecycle.put({
197
203
  # content_md5: "ContentMD5",
204
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
198
205
  # lifecycle_configuration: {
199
206
  # rules: [ # required
200
207
  # {
@@ -233,15 +240,32 @@ module Aws::S3
233
240
  # For requests made using the Amazon Web Services Command Line Interface
234
241
  # (CLI) or Amazon Web Services SDKs, this field is calculated
235
242
  # automatically.
243
+ # @option options [String] :checksum_algorithm
244
+ # Indicates the algorithm used to create the checksum for the object
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*.
251
+ #
252
+ # If you provide an individual checksum, Amazon S3 ignores any provided
253
+ # `ChecksumAlgorithm` parameter.
254
+ #
255
+ #
256
+ #
257
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
236
258
  # @option options [Types::LifecycleConfiguration] :lifecycle_configuration
237
259
  # @option options [String] :expected_bucket_owner
238
- # The account ID of the expected bucket owner. If the bucket is owned by
239
- # a different account, the request will fail with an HTTP `403 (Access
240
- # Denied)` error.
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).
241
263
  # @return [EmptyStructure]
242
264
  def put(options = {})
243
265
  options = options.merge(bucket: @bucket_name)
244
- resp = @client.put_bucket_lifecycle(options)
266
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
267
+ @client.put_bucket_lifecycle(options)
268
+ end
245
269
  resp.data
246
270
  end
247
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,19 +185,22 @@ 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 will fail with an HTTP `403 (Access
186
- # Denied)` error.
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
 
194
200
  # @example Request syntax with placeholder values
195
201
  #
196
202
  # bucket_lifecycle_configuration.put({
203
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
197
204
  # lifecycle_configuration: {
198
205
  # rules: [ # required
199
206
  # {
@@ -252,16 +259,33 @@ module Aws::S3
252
259
  # expected_bucket_owner: "AccountId",
253
260
  # })
254
261
  # @param [Hash] options ({})
262
+ # @option options [String] :checksum_algorithm
263
+ # Indicates the algorithm used to create the checksum for the object
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*.
270
+ #
271
+ # If you provide an individual checksum, Amazon S3 ignores any provided
272
+ # `ChecksumAlgorithm` parameter.
273
+ #
274
+ #
275
+ #
276
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
255
277
  # @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
256
278
  # Container for lifecycle rules. You can add as many as 1,000 rules.
257
279
  # @option options [String] :expected_bucket_owner
258
- # The account ID of the expected bucket owner. If the bucket is owned by
259
- # a different account, the request will fail with an HTTP `403 (Access
260
- # Denied)` error.
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).
261
283
  # @return [EmptyStructure]
262
284
  def put(options = {})
263
285
  options = options.merge(bucket: @bucket_name)
264
- 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
265
289
  resp.data
266
290
  end
267
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,9 +203,17 @@ 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
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
205
217
  # expected_bucket_owner: "AccountId",
206
218
  # })
207
219
  # @param [Hash] options ({})
@@ -213,14 +225,31 @@ module Aws::S3
213
225
  # For requests made using the Amazon Web Services Command Line Interface
214
226
  # (CLI) or Amazon Web Services SDKs, this field is calculated
215
227
  # automatically.
228
+ # @option options [String] :checksum_algorithm
229
+ # Indicates the algorithm used to create the checksum for the object
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*.
236
+ #
237
+ # If you provide an individual checksum, Amazon S3 ignores any provided
238
+ # `ChecksumAlgorithm` parameter.
239
+ #
240
+ #
241
+ #
242
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
216
243
  # @option options [String] :expected_bucket_owner
217
- # The account ID of the expected bucket owner. If the bucket is owned by
218
- # a different account, the request will fail with an HTTP `403 (Access
219
- # Denied)` error.
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).
220
247
  # @return [EmptyStructure]
221
248
  def put(options = {})
222
249
  options = options.merge(bucket: @bucket_name)
223
- resp = @client.put_bucket_logging(options)
250
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
251
+ @client.put_bucket_logging(options)
252
+ end
224
253
  resp.data
225
254
  end
226
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 will fail with an HTTP `403 (Access
267
- # Denied)` error.
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 will fail with an HTTP `403 (Access
186
- # Denied)` error.
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
 
@@ -195,6 +207,7 @@ module Aws::S3
195
207
  #
196
208
  # bucket_policy.put({
197
209
  # content_md5: "ContentMD5",
210
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
198
211
  # confirm_remove_self_bucket_access: false,
199
212
  # policy: "Policy", # required
200
213
  # expected_bucket_owner: "AccountId",
@@ -206,19 +219,74 @@ module Aws::S3
206
219
  # For requests made using the Amazon Web Services Command Line Interface
207
220
  # (CLI) or Amazon Web Services SDKs, this field is calculated
208
221
  # automatically.
222
+ #
223
+ # <note markdown="1"> This functionality is not supported for directory buckets.
224
+ #
225
+ # </note>
226
+ # @option options [String] :checksum_algorithm
227
+ # Indicates the algorithm used to create the checksum for the object
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
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>
258
+ #
259
+ #
260
+ #
261
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
209
262
  # @option options [Boolean] :confirm_remove_self_bucket_access
210
263
  # Set this parameter to true to confirm that you want to remove your
211
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>
212
269
  # @option options [required, String] :policy
213
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`.
214
274
  # @option options [String] :expected_bucket_owner
215
- # The account ID of the expected bucket owner. If the bucket is owned by
216
- # a different account, the request will fail with an HTTP `403 (Access
217
- # Denied)` error.
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>
218
284
  # @return [EmptyStructure]
219
285
  def put(options = {})
220
286
  options = options.merge(bucket: @bucket_name)
221
- resp = @client.put_bucket_policy(options)
287
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
288
+ @client.put_bucket_policy(options)
289
+ end
222
290
  resp.data
223
291
  end
224
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