aws-sdk-s3 1.10.0 → 1.208.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 (153) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1517 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  6. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  7. data/lib/aws-sdk-s3/bucket.rb +1062 -99
  8. data/lib/aws-sdk-s3/bucket_acl.rb +67 -17
  9. data/lib/aws-sdk-s3/bucket_cors.rb +80 -17
  10. data/lib/aws-sdk-s3/bucket_lifecycle.rb +71 -19
  11. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +126 -20
  12. data/lib/aws-sdk-s3/bucket_logging.rb +68 -18
  13. data/lib/aws-sdk-s3/bucket_notification.rb +56 -20
  14. data/lib/aws-sdk-s3/bucket_policy.rb +108 -17
  15. data/lib/aws-sdk-s3/bucket_region_cache.rb +11 -5
  16. data/lib/aws-sdk-s3/bucket_request_payment.rb +60 -15
  17. data/lib/aws-sdk-s3/bucket_tagging.rb +71 -17
  18. data/lib/aws-sdk-s3/bucket_versioning.rb +166 -17
  19. data/lib/aws-sdk-s3/bucket_website.rb +78 -17
  20. data/lib/aws-sdk-s3/client.rb +20068 -3879
  21. data/lib/aws-sdk-s3/client_api.rb +1957 -209
  22. data/lib/aws-sdk-s3/customizations/bucket.rb +57 -38
  23. data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
  24. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  25. data/lib/aws-sdk-s3/customizations/object.rb +338 -68
  26. data/lib/aws-sdk-s3/customizations/object_summary.rb +17 -0
  27. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  28. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  29. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  30. data/lib/aws-sdk-s3/customizations.rb +30 -27
  31. data/lib/aws-sdk-s3/default_executor.rb +103 -0
  32. data/lib/aws-sdk-s3/encryption/client.rb +29 -8
  33. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
  34. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +45 -5
  35. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  36. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +15 -2
  37. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  38. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +11 -3
  39. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  40. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  41. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  42. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +48 -11
  43. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  44. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  45. data/lib/aws-sdk-s3/encryption.rb +4 -0
  46. data/lib/aws-sdk-s3/encryptionV2/client.rb +645 -0
  47. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +68 -0
  48. data/lib/aws-sdk-s3/encryptionV2/decryption.rb +205 -0
  49. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +187 -0
  50. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  51. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +67 -0
  52. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  53. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  54. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  55. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +75 -0
  56. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  57. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +181 -0
  58. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  59. data/lib/aws-sdk-s3/encryptionV2/utils.rb +108 -0
  60. data/lib/aws-sdk-s3/encryptionV3/client.rb +885 -0
  61. data/lib/aws-sdk-s3/encryptionV3/decrypt_handler.rb +98 -0
  62. data/lib/aws-sdk-s3/encryptionV3/decryption.rb +244 -0
  63. data/lib/aws-sdk-s3/encryptionV3/default_cipher_provider.rb +159 -0
  64. data/lib/aws-sdk-s3/encryptionV3/default_key_provider.rb +35 -0
  65. data/lib/aws-sdk-s3/encryptionV3/encrypt_handler.rb +98 -0
  66. data/lib/aws-sdk-s3/encryptionV3/errors.rb +47 -0
  67. data/lib/aws-sdk-s3/encryptionV3/io_auth_decrypter.rb +60 -0
  68. data/lib/aws-sdk-s3/encryptionV3/io_decrypter.rb +35 -0
  69. data/lib/aws-sdk-s3/encryptionV3/io_encrypter.rb +84 -0
  70. data/lib/aws-sdk-s3/encryptionV3/key_provider.rb +28 -0
  71. data/lib/aws-sdk-s3/encryptionV3/kms_cipher_provider.rb +159 -0
  72. data/lib/aws-sdk-s3/encryptionV3/materials.rb +58 -0
  73. data/lib/aws-sdk-s3/encryptionV3/utils.rb +321 -0
  74. data/lib/aws-sdk-s3/encryption_v2.rb +24 -0
  75. data/lib/aws-sdk-s3/encryption_v3.rb +24 -0
  76. data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
  77. data/lib/aws-sdk-s3/endpoint_provider.rb +886 -0
  78. data/lib/aws-sdk-s3/endpoints.rb +1544 -0
  79. data/lib/aws-sdk-s3/errors.rb +181 -1
  80. data/lib/aws-sdk-s3/event_streams.rb +69 -0
  81. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  82. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  83. data/lib/aws-sdk-s3/file_downloader.rb +261 -82
  84. data/lib/aws-sdk-s3/file_part.rb +16 -13
  85. data/lib/aws-sdk-s3/file_uploader.rb +37 -22
  86. data/lib/aws-sdk-s3/legacy_signer.rb +19 -26
  87. data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
  88. data/lib/aws-sdk-s3/multipart_file_uploader.rb +142 -80
  89. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +191 -0
  90. data/lib/aws-sdk-s3/multipart_upload.rb +342 -31
  91. data/lib/aws-sdk-s3/multipart_upload_error.rb +5 -4
  92. data/lib/aws-sdk-s3/multipart_upload_part.rb +387 -47
  93. data/lib/aws-sdk-s3/object.rb +2733 -204
  94. data/lib/aws-sdk-s3/object_acl.rb +112 -25
  95. data/lib/aws-sdk-s3/object_copier.rb +9 -5
  96. data/lib/aws-sdk-s3/object_multipart_copier.rb +50 -23
  97. data/lib/aws-sdk-s3/object_summary.rb +2265 -181
  98. data/lib/aws-sdk-s3/object_version.rb +542 -74
  99. data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
  100. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  101. data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
  102. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +7 -43
  103. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +20 -3
  104. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  105. data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
  106. data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
  107. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
  108. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
  109. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
  110. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +62 -17
  111. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
  112. data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
  113. data/lib/aws-sdk-s3/plugins/md5s.rb +14 -67
  114. data/lib/aws-sdk-s3/plugins/redirects.rb +5 -1
  115. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  116. data/lib/aws-sdk-s3/plugins/s3_signer.rb +67 -93
  117. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  118. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +137 -0
  119. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +4 -1
  120. data/lib/aws-sdk-s3/presigned_post.rb +160 -99
  121. data/lib/aws-sdk-s3/presigner.rb +178 -81
  122. data/lib/aws-sdk-s3/resource.rb +164 -15
  123. data/lib/aws-sdk-s3/transfer_manager.rb +303 -0
  124. data/lib/aws-sdk-s3/types.rb +15981 -4168
  125. data/lib/aws-sdk-s3/waiters.rb +67 -1
  126. data/lib/aws-sdk-s3.rb +46 -31
  127. data/sig/bucket.rbs +231 -0
  128. data/sig/bucket_acl.rbs +78 -0
  129. data/sig/bucket_cors.rbs +69 -0
  130. data/sig/bucket_lifecycle.rbs +88 -0
  131. data/sig/bucket_lifecycle_configuration.rbs +115 -0
  132. data/sig/bucket_logging.rbs +76 -0
  133. data/sig/bucket_notification.rbs +114 -0
  134. data/sig/bucket_policy.rbs +59 -0
  135. data/sig/bucket_request_payment.rbs +54 -0
  136. data/sig/bucket_tagging.rbs +65 -0
  137. data/sig/bucket_versioning.rbs +77 -0
  138. data/sig/bucket_website.rbs +93 -0
  139. data/sig/client.rbs +2612 -0
  140. data/sig/customizations/bucket.rbs +19 -0
  141. data/sig/customizations/object.rbs +38 -0
  142. data/sig/customizations/object_summary.rbs +35 -0
  143. data/sig/errors.rbs +44 -0
  144. data/sig/multipart_upload.rbs +120 -0
  145. data/sig/multipart_upload_part.rbs +109 -0
  146. data/sig/object.rbs +464 -0
  147. data/sig/object_acl.rbs +86 -0
  148. data/sig/object_summary.rbs +347 -0
  149. data/sig/object_version.rbs +143 -0
  150. data/sig/resource.rbs +141 -0
  151. data/sig/types.rbs +2899 -0
  152. data/sig/waiters.rbs +95 -0
  153. metadata +97 -14
@@ -1,11 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
8
10
  module Aws::S3
11
+
9
12
  class BucketVersioning
10
13
 
11
14
  extend Aws::Deprecations
@@ -21,6 +24,7 @@ module Aws::S3
21
24
  @bucket_name = extract_bucket_name(args, options)
22
25
  @data = options.delete(:data)
23
26
  @client = options.delete(:client) || Client.new(options)
27
+ @waiter_block_warned = false
24
28
  end
25
29
 
26
30
  # @!group Read-Only Attributes
@@ -59,7 +63,9 @@ module Aws::S3
59
63
  #
60
64
  # @return [self]
61
65
  def load
62
- 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
63
69
  @data = resp.data
64
70
  self
65
71
  end
@@ -85,7 +91,8 @@ module Aws::S3
85
91
  # Waiter polls an API operation until a resource enters a desired
86
92
  # state.
87
93
  #
88
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
94
+ # @note The waiting operation is performed on a copy. The original resource
95
+ # remains unchanged.
89
96
  #
90
97
  # ## Basic Usage
91
98
  #
@@ -98,13 +105,15 @@ module Aws::S3
98
105
  #
99
106
  # ## Example
100
107
  #
101
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
108
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
109
+ # instance.state.name == 'running'
110
+ # end
102
111
  #
103
112
  # ## Configuration
104
113
  #
105
114
  # You can configure the maximum number of polling attempts, and the
106
- # delay (in seconds) between each polling attempt. The waiting condition is set
107
- # by passing a block to {#wait_until}:
115
+ # delay (in seconds) between each polling attempt. The waiting condition is
116
+ # set by passing a block to {#wait_until}:
108
117
  #
109
118
  # # poll for ~25 seconds
110
119
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -135,17 +144,16 @@ module Aws::S3
135
144
  # # resource did not enter the desired state in time
136
145
  # end
137
146
  #
147
+ # @yieldparam [Resource] resource to be used in the waiting condition.
138
148
  #
139
- # @yield param [Resource] resource to be used in the waiting condition
140
- #
141
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
142
- # because the waiter has entered a state that it will not transition
143
- # out of, preventing success.
149
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
150
+ # terminates because the waiter has entered a state that it will not
151
+ # transition out of, preventing success.
144
152
  #
145
153
  # yet successful.
146
154
  #
147
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
148
- # while polling for a resource that is not expected.
155
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
156
+ # encountered while polling for a resource that is not expected.
149
157
  #
150
158
  # @raise [NotImplementedError] Raised when the resource does not
151
159
  #
@@ -172,7 +180,9 @@ module Aws::S3
172
180
  :retry
173
181
  end
174
182
  end
175
- Aws::Waiters::Waiter.new(options).wait({})
183
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
184
+ Aws::Waiters::Waiter.new(options).wait({})
185
+ end
176
186
  end
177
187
 
178
188
  # @!group Actions
@@ -181,13 +191,57 @@ module Aws::S3
181
191
  #
182
192
  # bucket_versioning.enable({
183
193
  # content_md5: "ContentMD5",
194
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
184
195
  # mfa: "MFA",
196
+ # expected_bucket_owner: "AccountId",
185
197
  # })
186
198
  # @param [Hash] options ({})
187
199
  # @option options [String] :content_md5
200
+ # >The Base64 encoded 128-bit `MD5` digest of the data. You must use
201
+ # this header as a message integrity check to verify that the request
202
+ # body was not corrupted in transit. For more information, see [RFC
203
+ # 1864][1].
204
+ #
205
+ # For requests made using the Amazon Web Services Command Line Interface
206
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
207
+ # automatically.
208
+ #
209
+ #
210
+ #
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
188
227
  # @option options [String] :mfa
189
228
  # The concatenation of the authentication device's serial number, a
190
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
241
+ # @option options [String] :expected_bucket_owner
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).
191
245
  # @return [EmptyStructure]
192
246
  def enable(options = {})
193
247
  options = Aws::Util.deep_merge(options,
@@ -196,7 +250,9 @@ module Aws::S3
196
250
  status: "Enabled"
197
251
  }
198
252
  )
199
- resp = @client.put_bucket_versioning(options)
253
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
254
+ @client.put_bucket_versioning(options)
255
+ end
200
256
  resp.data
201
257
  end
202
258
 
@@ -204,22 +260,69 @@ module Aws::S3
204
260
  #
205
261
  # bucket_versioning.put({
206
262
  # content_md5: "ContentMD5",
263
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
207
264
  # mfa: "MFA",
208
265
  # versioning_configuration: { # required
209
266
  # mfa_delete: "Enabled", # accepts Enabled, Disabled
210
267
  # status: "Enabled", # accepts Enabled, Suspended
211
268
  # },
269
+ # expected_bucket_owner: "AccountId",
212
270
  # })
213
271
  # @param [Hash] options ({})
214
272
  # @option options [String] :content_md5
273
+ # >The Base64 encoded 128-bit `MD5` digest of the data. You must use
274
+ # this header as a message integrity check to verify that the request
275
+ # body was not corrupted in transit. For more information, see [RFC
276
+ # 1864][1].
277
+ #
278
+ # For requests made using the Amazon Web Services Command Line Interface
279
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
280
+ # automatically.
281
+ #
282
+ #
283
+ #
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
215
300
  # @option options [String] :mfa
216
301
  # The concatenation of the authentication device's serial number, a
217
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
218
314
  # @option options [required, Types::VersioningConfiguration] :versioning_configuration
315
+ # Container for setting the versioning state.
316
+ # @option options [String] :expected_bucket_owner
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).
219
320
  # @return [EmptyStructure]
220
321
  def put(options = {})
221
322
  options = options.merge(bucket: @bucket_name)
222
- resp = @client.put_bucket_versioning(options)
323
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
324
+ @client.put_bucket_versioning(options)
325
+ end
223
326
  resp.data
224
327
  end
225
328
 
@@ -227,13 +330,57 @@ module Aws::S3
227
330
  #
228
331
  # bucket_versioning.suspend({
229
332
  # content_md5: "ContentMD5",
333
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
230
334
  # mfa: "MFA",
335
+ # expected_bucket_owner: "AccountId",
231
336
  # })
232
337
  # @param [Hash] options ({})
233
338
  # @option options [String] :content_md5
339
+ # >The Base64 encoded 128-bit `MD5` digest of the data. You must use
340
+ # this header as a message integrity check to verify that the request
341
+ # body was not corrupted in transit. For more information, see [RFC
342
+ # 1864][1].
343
+ #
344
+ # For requests made using the Amazon Web Services Command Line Interface
345
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
346
+ # automatically.
347
+ #
348
+ #
349
+ #
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
234
366
  # @option options [String] :mfa
235
367
  # The concatenation of the authentication device's serial number, a
236
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
380
+ # @option options [String] :expected_bucket_owner
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).
237
384
  # @return [EmptyStructure]
238
385
  def suspend(options = {})
239
386
  options = Aws::Util.deep_merge(options,
@@ -242,7 +389,9 @@ module Aws::S3
242
389
  status: "Suspended"
243
390
  }
244
391
  )
245
- resp = @client.put_bucket_versioning(options)
392
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
393
+ @client.put_bucket_versioning(options)
394
+ end
246
395
  resp.data
247
396
  end
248
397
 
@@ -1,11 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
8
10
  module Aws::S3
11
+
9
12
  class BucketWebsite
10
13
 
11
14
  extend Aws::Deprecations
@@ -21,6 +24,7 @@ module Aws::S3
21
24
  @bucket_name = extract_bucket_name(args, options)
22
25
  @data = options.delete(:data)
23
26
  @client = options.delete(:client) || Client.new(options)
27
+ @waiter_block_warned = false
24
28
  end
25
29
 
26
30
  # @!group Read-Only Attributes
@@ -30,21 +34,29 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
37
+ # Specifies the redirect behavior of all requests to a website endpoint
38
+ # of an Amazon S3 bucket.
33
39
  # @return [Types::RedirectAllRequestsTo]
34
40
  def redirect_all_requests_to
35
41
  data[:redirect_all_requests_to]
36
42
  end
37
43
 
44
+ # The name of the index document for the website (for example
45
+ # `index.html`).
38
46
  # @return [Types::IndexDocument]
39
47
  def index_document
40
48
  data[:index_document]
41
49
  end
42
50
 
51
+ # The object key name of the website error document to use for 4XX class
52
+ # errors.
43
53
  # @return [Types::ErrorDocument]
44
54
  def error_document
45
55
  data[:error_document]
46
56
  end
47
57
 
58
+ # Rules that define when a redirect is applied and the redirect
59
+ # behavior.
48
60
  # @return [Array<Types::RoutingRule>]
49
61
  def routing_rules
50
62
  data[:routing_rules]
@@ -64,7 +76,9 @@ module Aws::S3
64
76
  #
65
77
  # @return [self]
66
78
  def load
67
- 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
68
82
  @data = resp.data
69
83
  self
70
84
  end
@@ -90,7 +104,8 @@ module Aws::S3
90
104
  # Waiter polls an API operation until a resource enters a desired
91
105
  # state.
92
106
  #
93
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
107
+ # @note The waiting operation is performed on a copy. The original resource
108
+ # remains unchanged.
94
109
  #
95
110
  # ## Basic Usage
96
111
  #
@@ -103,13 +118,15 @@ module Aws::S3
103
118
  #
104
119
  # ## Example
105
120
  #
106
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
121
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
122
+ # instance.state.name == 'running'
123
+ # end
107
124
  #
108
125
  # ## Configuration
109
126
  #
110
127
  # You can configure the maximum number of polling attempts, and the
111
- # delay (in seconds) between each polling attempt. The waiting condition is set
112
- # by passing a block to {#wait_until}:
128
+ # delay (in seconds) between each polling attempt. The waiting condition is
129
+ # set by passing a block to {#wait_until}:
113
130
  #
114
131
  # # poll for ~25 seconds
115
132
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -140,17 +157,16 @@ module Aws::S3
140
157
  # # resource did not enter the desired state in time
141
158
  # end
142
159
  #
160
+ # @yieldparam [Resource] resource to be used in the waiting condition.
143
161
  #
144
- # @yield param [Resource] resource to be used in the waiting condition
145
- #
146
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
147
- # because the waiter has entered a state that it will not transition
148
- # out of, preventing success.
162
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
163
+ # terminates because the waiter has entered a state that it will not
164
+ # transition out of, preventing success.
149
165
  #
150
166
  # yet successful.
151
167
  #
152
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
153
- # while polling for a resource that is not expected.
168
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
169
+ # encountered while polling for a resource that is not expected.
154
170
  #
155
171
  # @raise [NotImplementedError] Raised when the resource does not
156
172
  #
@@ -177,19 +193,29 @@ module Aws::S3
177
193
  :retry
178
194
  end
179
195
  end
180
- Aws::Waiters::Waiter.new(options).wait({})
196
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
197
+ Aws::Waiters::Waiter.new(options).wait({})
198
+ end
181
199
  end
182
200
 
183
201
  # @!group Actions
184
202
 
185
203
  # @example Request syntax with placeholder values
186
204
  #
187
- # bucket_website.delete()
205
+ # bucket_website.delete({
206
+ # expected_bucket_owner: "AccountId",
207
+ # })
188
208
  # @param [Hash] options ({})
209
+ # @option options [String] :expected_bucket_owner
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).
189
213
  # @return [EmptyStructure]
190
214
  def delete(options = {})
191
215
  options = options.merge(bucket: @bucket_name)
192
- resp = @client.delete_bucket_website(options)
216
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
217
+ @client.delete_bucket_website(options)
218
+ end
193
219
  resp.data
194
220
  end
195
221
 
@@ -197,6 +223,7 @@ module Aws::S3
197
223
  #
198
224
  # bucket_website.put({
199
225
  # content_md5: "ContentMD5",
226
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
200
227
  # website_configuration: { # required
201
228
  # error_document: {
202
229
  # key: "ObjectKey", # required
@@ -224,14 +251,48 @@ module Aws::S3
224
251
  # },
225
252
  # ],
226
253
  # },
254
+ # expected_bucket_owner: "AccountId",
227
255
  # })
228
256
  # @param [Hash] options ({})
229
257
  # @option options [String] :content_md5
258
+ # The Base64 encoded 128-bit `MD5` digest of the data. You must use this
259
+ # header as a message integrity check to verify that the request body
260
+ # was not corrupted in transit. For more information, see [RFC 1864][1].
261
+ #
262
+ # For requests made using the Amazon Web Services Command Line Interface
263
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
264
+ # automatically.
265
+ #
266
+ #
267
+ #
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
230
284
  # @option options [required, Types::WebsiteConfiguration] :website_configuration
285
+ # Container for the request.
286
+ # @option options [String] :expected_bucket_owner
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).
231
290
  # @return [EmptyStructure]
232
291
  def put(options = {})
233
292
  options = options.merge(bucket: @bucket_name)
234
- resp = @client.put_bucket_website(options)
293
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
294
+ @client.put_bucket_website(options)
295
+ end
235
296
  resp.data
236
297
  end
237
298