aws-sdk-s3 1.103.0 → 1.202.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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +664 -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 +858 -116
  7. data/lib/aws-sdk-s3/bucket_acl.rb +32 -9
  8. data/lib/aws-sdk-s3/bucket_cors.rb +38 -13
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +43 -12
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +100 -13
  11. data/lib/aws-sdk-s3/bucket_logging.rb +35 -6
  12. data/lib/aws-sdk-s3/bucket_notification.rb +27 -9
  13. data/lib/aws-sdk-s3/bucket_policy.rb +79 -10
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +29 -7
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +35 -11
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +108 -17
  18. data/lib/aws-sdk-s3/bucket_website.rb +35 -11
  19. data/lib/aws-sdk-s3/client.rb +11799 -3636
  20. data/lib/aws-sdk-s3/client_api.rb +1201 -276
  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 +216 -70
  24. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  25. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  26. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  27. data/lib/aws-sdk-s3/customizations.rb +27 -29
  28. data/lib/aws-sdk-s3/default_executor.rb +103 -0
  29. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  30. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  31. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  32. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  33. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  34. data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
  35. data/lib/aws-sdk-s3/endpoint_provider.rb +716 -0
  36. data/lib/aws-sdk-s3/endpoints.rb +1518 -0
  37. data/lib/aws-sdk-s3/errors.rb +58 -0
  38. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  39. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  40. data/lib/aws-sdk-s3/file_downloader.rb +241 -87
  41. data/lib/aws-sdk-s3/file_uploader.rb +16 -13
  42. data/lib/aws-sdk-s3/legacy_signer.rb +2 -1
  43. data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
  44. data/lib/aws-sdk-s3/multipart_file_uploader.rb +108 -86
  45. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +110 -92
  46. data/lib/aws-sdk-s3/multipart_upload.rb +294 -19
  47. data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
  48. data/lib/aws-sdk-s3/multipart_upload_part.rb +297 -31
  49. data/lib/aws-sdk-s3/object.rb +2224 -269
  50. data/lib/aws-sdk-s3/object_acl.rb +59 -17
  51. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  52. data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -23
  53. data/lib/aws-sdk-s3/object_summary.rb +1915 -220
  54. data/lib/aws-sdk-s3/object_version.rb +450 -58
  55. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -44
  56. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  57. data/lib/aws-sdk-s3/plugins/arn.rb +0 -197
  58. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  59. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  60. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  61. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -55
  62. data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
  63. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  64. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
  65. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
  66. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
  67. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  68. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -68
  69. data/lib/aws-sdk-s3/plugins/s3_signer.rb +42 -111
  70. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +28 -9
  71. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
  72. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  73. data/lib/aws-sdk-s3/presigner.rb +32 -41
  74. data/lib/aws-sdk-s3/resource.rb +139 -12
  75. data/lib/aws-sdk-s3/transfer_manager.rb +304 -0
  76. data/lib/aws-sdk-s3/types.rb +10204 -5378
  77. data/lib/aws-sdk-s3.rb +35 -27
  78. data/sig/bucket.rbs +231 -0
  79. data/sig/bucket_acl.rbs +78 -0
  80. data/sig/bucket_cors.rbs +69 -0
  81. data/sig/bucket_lifecycle.rbs +88 -0
  82. data/sig/bucket_lifecycle_configuration.rbs +115 -0
  83. data/sig/bucket_logging.rbs +76 -0
  84. data/sig/bucket_notification.rbs +114 -0
  85. data/sig/bucket_policy.rbs +59 -0
  86. data/sig/bucket_request_payment.rbs +54 -0
  87. data/sig/bucket_tagging.rbs +65 -0
  88. data/sig/bucket_versioning.rbs +77 -0
  89. data/sig/bucket_website.rbs +93 -0
  90. data/sig/client.rbs +2586 -0
  91. data/sig/customizations/bucket.rbs +19 -0
  92. data/sig/customizations/object.rbs +38 -0
  93. data/sig/customizations/object_summary.rbs +35 -0
  94. data/sig/errors.rbs +44 -0
  95. data/sig/multipart_upload.rbs +120 -0
  96. data/sig/multipart_upload_part.rbs +109 -0
  97. data/sig/object.rbs +464 -0
  98. data/sig/object_acl.rbs +86 -0
  99. data/sig/object_summary.rbs +347 -0
  100. data/sig/object_version.rbs +143 -0
  101. data/sig/resource.rbs +141 -0
  102. data/sig/types.rbs +2868 -0
  103. data/sig/waiters.rbs +95 -0
  104. metadata +51 -16
  105. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  106. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -69
  107. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  108. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -73
  109. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -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, CRC64NVME
198
211
  # confirm_remove_self_bucket_access: false,
199
212
  # policy: "Policy", # required
200
213
  # expected_bucket_owner: "AccountId",
@@ -206,19 +219,75 @@ 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 request
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
+ # * `CRC64NVME`
242
+ #
243
+ # * `SHA1`
244
+ #
245
+ # * `SHA256`
246
+ #
247
+ # For more information, see [Checking object integrity][1] in the
248
+ # *Amazon S3 User Guide*.
249
+ #
250
+ # If the individual checksum value you provide through
251
+ # `x-amz-checksum-algorithm ` doesn't match the checksum algorithm you
252
+ # set through `x-amz-sdk-checksum-algorithm`, Amazon S3 fails the
253
+ # request with a `BadDigest` error.
254
+ #
255
+ # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
256
+ # is the default checksum algorithm that's used for performance.
257
+ #
258
+ # </note>
259
+ #
260
+ #
261
+ #
262
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
209
263
  # @option options [Boolean] :confirm_remove_self_bucket_access
210
264
  # Set this parameter to true to confirm that you want to remove your
211
265
  # permissions to change this bucket policy in the future.
266
+ #
267
+ # <note markdown="1"> This functionality is not supported for directory buckets.
268
+ #
269
+ # </note>
212
270
  # @option options [required, String] :policy
213
271
  # The bucket policy as a JSON document.
272
+ #
273
+ # For directory buckets, the only IAM action supported in the bucket
274
+ # policy is `s3express:CreateSession`.
214
275
  # @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.
276
+ # The account ID of the expected bucket owner. If the account ID that
277
+ # you provide does not match the actual owner of the bucket, the request
278
+ # fails with the HTTP status code `403 Forbidden` (access denied).
279
+ #
280
+ # <note markdown="1"> For directory buckets, this header is not supported in this API
281
+ # operation. If you specify this header, the request fails with the HTTP
282
+ # status code `501 Not Implemented`.
283
+ #
284
+ # </note>
218
285
  # @return [EmptyStructure]
219
286
  def put(options = {})
220
287
  options = options.merge(bucket: @bucket_name)
221
- resp = @client.put_bucket_policy(options)
288
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
289
+ @client.put_bucket_policy(options)
290
+ end
222
291
  resp.data
223
292
  end
224
293
 
@@ -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
@@ -178,6 +182,7 @@ module Aws::S3
178
182
  #
179
183
  # bucket_request_payment.put({
180
184
  # content_md5: "ContentMD5",
185
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
181
186
  # request_payment_configuration: { # required
182
187
  # payer: "Requester", # required, accepts Requester, BucketOwner
183
188
  # },
@@ -185,7 +190,7 @@ module Aws::S3
185
190
  # })
186
191
  # @param [Hash] options ({})
187
192
  # @option options [String] :content_md5
188
- # The base64-encoded 128-bit MD5 digest of the data. You must use this
193
+ # The Base64 encoded 128-bit `MD5` digest of the data. You must use this
189
194
  # header as a message integrity check to verify that the request body
190
195
  # was not corrupted in transit. For more information, see [RFC 1864][1].
191
196
  #
@@ -196,16 +201,33 @@ module Aws::S3
196
201
  #
197
202
  #
198
203
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
204
+ # @option options [String] :checksum_algorithm
205
+ # Indicates the algorithm used to create the checksum for the request
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*.
212
+ #
213
+ # If you provide an individual checksum, Amazon S3 ignores any provided
214
+ # `ChecksumAlgorithm` parameter.
215
+ #
216
+ #
217
+ #
218
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
199
219
  # @option options [required, Types::RequestPaymentConfiguration] :request_payment_configuration
200
220
  # Container for Payer.
201
221
  # @option options [String] :expected_bucket_owner
202
- # The account ID of the expected bucket owner. If the bucket is owned by
203
- # a different account, the request will fail with an HTTP `403 (Access
204
- # Denied)` error.
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).
205
225
  # @return [EmptyStructure]
206
226
  def put(options = {})
207
227
  options = options.merge(bucket: @bucket_name)
208
- 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
209
231
  resp.data
210
232
  end
211
233
 
@@ -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 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_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
 
@@ -195,6 +201,7 @@ module Aws::S3
195
201
  #
196
202
  # bucket_tagging.put({
197
203
  # content_md5: "ContentMD5",
204
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
198
205
  # tagging: { # required
199
206
  # tag_set: [ # required
200
207
  # {
@@ -207,7 +214,7 @@ module Aws::S3
207
214
  # })
208
215
  # @param [Hash] options ({})
209
216
  # @option options [String] :content_md5
210
- # The base64-encoded 128-bit MD5 digest of the data. You must use this
217
+ # The Base64 encoded 128-bit `MD5` digest of the data. You must use this
211
218
  # header as a message integrity check to verify that the request body
212
219
  # was not corrupted in transit. For more information, see [RFC 1864][1].
213
220
  #
@@ -218,16 +225,33 @@ module Aws::S3
218
225
  #
219
226
  #
220
227
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
228
+ # @option options [String] :checksum_algorithm
229
+ # Indicates the algorithm used to create the checksum for the request
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
221
243
  # @option options [required, Types::Tagging] :tagging
222
244
  # Container for the `TagSet` and `Tag` elements.
223
245
  # @option options [String] :expected_bucket_owner
224
- # The account ID of the expected bucket owner. If the bucket is owned by
225
- # a different account, the request will fail with an HTTP `403 (Access
226
- # Denied)` error.
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).
227
249
  # @return [EmptyStructure]
228
250
  def put(options = {})
229
251
  options = options.merge(bucket: @bucket_name)
230
- resp = @client.put_bucket_tagging(options)
252
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
253
+ @client.put_bucket_tagging(options)
254
+ end
231
255
  resp.data
232
256
  end
233
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
@@ -187,12 +191,13 @@ module Aws::S3
187
191
  #
188
192
  # bucket_versioning.enable({
189
193
  # content_md5: "ContentMD5",
194
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
190
195
  # mfa: "MFA",
191
196
  # expected_bucket_owner: "AccountId",
192
197
  # })
193
198
  # @param [Hash] options ({})
194
199
  # @option options [String] :content_md5
195
- # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
200
+ # &gt;The Base64 encoded 128-bit `MD5` digest of the data. You must use
196
201
  # this header as a message integrity check to verify that the request
197
202
  # body was not corrupted in transit. For more information, see [RFC
198
203
  # 1864][1].
@@ -204,13 +209,39 @@ module Aws::S3
204
209
  #
205
210
  #
206
211
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
212
+ # @option options [String] :checksum_algorithm
213
+ # Indicates the algorithm used to create the checksum for the request
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*.
220
+ #
221
+ # If you provide an individual checksum, Amazon S3 ignores any provided
222
+ # `ChecksumAlgorithm` parameter.
223
+ #
224
+ #
225
+ #
226
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
207
227
  # @option options [String] :mfa
208
228
  # The concatenation of the authentication device's serial number, a
209
229
  # space, and the value that is displayed on your authentication device.
230
+ # The serial number is the number that uniquely identifies the MFA
231
+ # device. For physical MFA devices, this is the unique serial number
232
+ # that's provided with the device. For virtual MFA devices, the serial
233
+ # number is the device ARN. For more information, see [Enabling
234
+ # versioning on buckets][1] and [Configuring MFA delete][2] in the
235
+ # *Amazon Simple Storage Service User Guide*.
236
+ #
237
+ #
238
+ #
239
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html
240
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiFactorAuthenticationDelete.html
210
241
  # @option options [String] :expected_bucket_owner
211
- # The account ID of the expected bucket owner. If the bucket is owned by
212
- # a different account, the request will fail with an HTTP `403 (Access
213
- # Denied)` error.
242
+ # The account ID of the expected bucket owner. If the account ID that
243
+ # you provide does not match the actual owner of the bucket, the request
244
+ # fails with the HTTP status code `403 Forbidden` (access denied).
214
245
  # @return [EmptyStructure]
215
246
  def enable(options = {})
216
247
  options = Aws::Util.deep_merge(options,
@@ -219,7 +250,9 @@ module Aws::S3
219
250
  status: "Enabled"
220
251
  }
221
252
  )
222
- resp = @client.put_bucket_versioning(options)
253
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
254
+ @client.put_bucket_versioning(options)
255
+ end
223
256
  resp.data
224
257
  end
225
258
 
@@ -227,6 +260,7 @@ module Aws::S3
227
260
  #
228
261
  # bucket_versioning.put({
229
262
  # content_md5: "ContentMD5",
263
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
230
264
  # mfa: "MFA",
231
265
  # versioning_configuration: { # required
232
266
  # mfa_delete: "Enabled", # accepts Enabled, Disabled
@@ -236,7 +270,7 @@ module Aws::S3
236
270
  # })
237
271
  # @param [Hash] options ({})
238
272
  # @option options [String] :content_md5
239
- # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
273
+ # &gt;The Base64 encoded 128-bit `MD5` digest of the data. You must use
240
274
  # this header as a message integrity check to verify that the request
241
275
  # body was not corrupted in transit. For more information, see [RFC
242
276
  # 1864][1].
@@ -248,19 +282,47 @@ module Aws::S3
248
282
  #
249
283
  #
250
284
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
285
+ # @option options [String] :checksum_algorithm
286
+ # Indicates the algorithm used to create the checksum for the request
287
+ # when you use the SDK. This header will not provide any additional
288
+ # functionality if you don't use the SDK. When you send this header,
289
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
290
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
291
+ # status code `400 Bad Request`. For more information, see [Checking
292
+ # object integrity][1] in the *Amazon S3 User Guide*.
293
+ #
294
+ # If you provide an individual checksum, Amazon S3 ignores any provided
295
+ # `ChecksumAlgorithm` parameter.
296
+ #
297
+ #
298
+ #
299
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
251
300
  # @option options [String] :mfa
252
301
  # The concatenation of the authentication device's serial number, a
253
302
  # space, and the value that is displayed on your authentication device.
303
+ # The serial number is the number that uniquely identifies the MFA
304
+ # device. For physical MFA devices, this is the unique serial number
305
+ # that's provided with the device. For virtual MFA devices, the serial
306
+ # number is the device ARN. For more information, see [Enabling
307
+ # versioning on buckets][1] and [Configuring MFA delete][2] in the
308
+ # *Amazon Simple Storage Service User Guide*.
309
+ #
310
+ #
311
+ #
312
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html
313
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiFactorAuthenticationDelete.html
254
314
  # @option options [required, Types::VersioningConfiguration] :versioning_configuration
255
315
  # Container for setting the versioning state.
256
316
  # @option options [String] :expected_bucket_owner
257
- # The account ID of the expected bucket owner. If the bucket is owned by
258
- # a different account, the request will fail with an HTTP `403 (Access
259
- # Denied)` error.
317
+ # The account ID of the expected bucket owner. If the account ID that
318
+ # you provide does not match the actual owner of the bucket, the request
319
+ # fails with the HTTP status code `403 Forbidden` (access denied).
260
320
  # @return [EmptyStructure]
261
321
  def put(options = {})
262
322
  options = options.merge(bucket: @bucket_name)
263
- resp = @client.put_bucket_versioning(options)
323
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
324
+ @client.put_bucket_versioning(options)
325
+ end
264
326
  resp.data
265
327
  end
266
328
 
@@ -268,12 +330,13 @@ module Aws::S3
268
330
  #
269
331
  # bucket_versioning.suspend({
270
332
  # content_md5: "ContentMD5",
333
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
271
334
  # mfa: "MFA",
272
335
  # expected_bucket_owner: "AccountId",
273
336
  # })
274
337
  # @param [Hash] options ({})
275
338
  # @option options [String] :content_md5
276
- # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
339
+ # &gt;The Base64 encoded 128-bit `MD5` digest of the data. You must use
277
340
  # this header as a message integrity check to verify that the request
278
341
  # body was not corrupted in transit. For more information, see [RFC
279
342
  # 1864][1].
@@ -285,13 +348,39 @@ module Aws::S3
285
348
  #
286
349
  #
287
350
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
351
+ # @option options [String] :checksum_algorithm
352
+ # Indicates the algorithm used to create the checksum for the request
353
+ # when you use the SDK. This header will not provide any additional
354
+ # functionality if you don't use the SDK. When you send this header,
355
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
356
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
357
+ # status code `400 Bad Request`. For more information, see [Checking
358
+ # object integrity][1] in the *Amazon S3 User Guide*.
359
+ #
360
+ # If you provide an individual checksum, Amazon S3 ignores any provided
361
+ # `ChecksumAlgorithm` parameter.
362
+ #
363
+ #
364
+ #
365
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
288
366
  # @option options [String] :mfa
289
367
  # The concatenation of the authentication device's serial number, a
290
368
  # space, and the value that is displayed on your authentication device.
369
+ # The serial number is the number that uniquely identifies the MFA
370
+ # device. For physical MFA devices, this is the unique serial number
371
+ # that's provided with the device. For virtual MFA devices, the serial
372
+ # number is the device ARN. For more information, see [Enabling
373
+ # versioning on buckets][1] and [Configuring MFA delete][2] in the
374
+ # *Amazon Simple Storage Service User Guide*.
375
+ #
376
+ #
377
+ #
378
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html
379
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiFactorAuthenticationDelete.html
291
380
  # @option options [String] :expected_bucket_owner
292
- # The account ID of the expected bucket owner. If the bucket is owned by
293
- # a different account, the request will fail with an HTTP `403 (Access
294
- # Denied)` error.
381
+ # The account ID of the expected bucket owner. If the account ID that
382
+ # you provide does not match the actual owner of the bucket, the request
383
+ # fails with the HTTP status code `403 Forbidden` (access denied).
295
384
  # @return [EmptyStructure]
296
385
  def suspend(options = {})
297
386
  options = Aws::Util.deep_merge(options,
@@ -300,7 +389,9 @@ module Aws::S3
300
389
  status: "Suspended"
301
390
  }
302
391
  )
303
- resp = @client.put_bucket_versioning(options)
392
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
393
+ @client.put_bucket_versioning(options)
394
+ end
304
395
  resp.data
305
396
  end
306
397
 
@@ -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 will fail with an HTTP `403 (Access
208
- # Denied)` error.
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
 
@@ -217,6 +223,7 @@ module Aws::S3
217
223
  #
218
224
  # bucket_website.put({
219
225
  # content_md5: "ContentMD5",
226
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
220
227
  # website_configuration: { # required
221
228
  # error_document: {
222
229
  # key: "ObjectKey", # required
@@ -248,7 +255,7 @@ module Aws::S3
248
255
  # })
249
256
  # @param [Hash] options ({})
250
257
  # @option options [String] :content_md5
251
- # The base64-encoded 128-bit MD5 digest of the data. You must use this
258
+ # The Base64 encoded 128-bit `MD5` digest of the data. You must use this
252
259
  # header as a message integrity check to verify that the request body
253
260
  # was not corrupted in transit. For more information, see [RFC 1864][1].
254
261
  #
@@ -259,16 +266,33 @@ module Aws::S3
259
266
  #
260
267
  #
261
268
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
269
+ # @option options [String] :checksum_algorithm
270
+ # Indicates the algorithm used to create the checksum for the request
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*.
277
+ #
278
+ # If you provide an individual checksum, Amazon S3 ignores any provided
279
+ # `ChecksumAlgorithm` parameter.
280
+ #
281
+ #
282
+ #
283
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
262
284
  # @option options [required, Types::WebsiteConfiguration] :website_configuration
263
285
  # Container for the request.
264
286
  # @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.
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).
268
290
  # @return [EmptyStructure]
269
291
  def put(options = {})
270
292
  options = options.merge(bucket: @bucket_name)
271
- resp = @client.put_bucket_website(options)
293
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
294
+ @client.put_bucket_website(options)
295
+ end
272
296
  resp.data
273
297
  end
274
298