aws-sdk-s3 1.21.0 → 1.117.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +930 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/bucket.rb +393 -75
  6. data/lib/aws-sdk-s3/bucket_acl.rb +57 -14
  7. data/lib/aws-sdk-s3/bucket_cors.rb +67 -13
  8. data/lib/aws-sdk-s3/bucket_lifecycle.rb +54 -15
  9. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +56 -15
  10. data/lib/aws-sdk-s3/bucket_logging.rb +52 -15
  11. data/lib/aws-sdk-s3/bucket_notification.rb +47 -17
  12. data/lib/aws-sdk-s3/bucket_policy.rb +51 -13
  13. data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
  14. data/lib/aws-sdk-s3/bucket_request_payment.rb +51 -12
  15. data/lib/aws-sdk-s3/bucket_tagging.rb +59 -13
  16. data/lib/aws-sdk-s3/bucket_versioning.rb +118 -12
  17. data/lib/aws-sdk-s3/bucket_website.rb +66 -13
  18. data/lib/aws-sdk-s3/client.rb +11422 -2518
  19. data/lib/aws-sdk-s3/client_api.rb +1196 -155
  20. data/lib/aws-sdk-s3/customizations/bucket.rb +53 -36
  21. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  22. data/lib/aws-sdk-s3/customizations/object.rb +200 -62
  23. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  24. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  25. data/lib/aws-sdk-s3/customizations.rb +4 -1
  26. data/lib/aws-sdk-s3/encryption/client.rb +23 -6
  27. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
  28. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  29. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  30. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  31. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  32. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +11 -3
  33. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  34. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  35. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  36. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
  37. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  38. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  39. data/lib/aws-sdk-s3/encryption.rb +4 -0
  40. data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
  41. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +222 -0
  42. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  43. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  44. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
  45. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  46. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  47. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  48. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  49. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  50. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
  51. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  52. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  53. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  54. data/lib/aws-sdk-s3/endpoint_parameters.rb +142 -0
  55. data/lib/aws-sdk-s3/endpoint_provider.rb +2020 -0
  56. data/lib/aws-sdk-s3/endpoints.rb +2149 -0
  57. data/lib/aws-sdk-s3/errors.rb +123 -1
  58. data/lib/aws-sdk-s3/event_streams.rb +20 -7
  59. data/lib/aws-sdk-s3/file_downloader.rb +17 -10
  60. data/lib/aws-sdk-s3/file_part.rb +11 -6
  61. data/lib/aws-sdk-s3/file_uploader.rb +33 -14
  62. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  63. data/lib/aws-sdk-s3/multipart_file_uploader.rb +78 -19
  64. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +54 -15
  65. data/lib/aws-sdk-s3/multipart_upload.rb +178 -28
  66. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  67. data/lib/aws-sdk-s3/multipart_upload_part.rb +237 -44
  68. data/lib/aws-sdk-s3/object.rb +897 -154
  69. data/lib/aws-sdk-s3/object_acl.rb +81 -20
  70. data/lib/aws-sdk-s3/object_copier.rb +2 -0
  71. data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
  72. data/lib/aws-sdk-s3/object_summary.rb +649 -139
  73. data/lib/aws-sdk-s3/object_version.rb +167 -65
  74. data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
  75. data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
  76. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +7 -43
  77. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +20 -3
  78. data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
  79. data/lib/aws-sdk-s3/plugins/endpoints.rb +262 -0
  80. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
  81. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
  82. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
  83. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
  84. data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
  85. data/lib/aws-sdk-s3/plugins/md5s.rb +34 -27
  86. data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
  87. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  88. data/lib/aws-sdk-s3/plugins/s3_signer.rb +55 -92
  89. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  90. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  91. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
  92. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  93. data/lib/aws-sdk-s3/presigned_post.rb +108 -56
  94. data/lib/aws-sdk-s3/presigner.rb +169 -77
  95. data/lib/aws-sdk-s3/resource.rb +45 -5
  96. data/lib/aws-sdk-s3/types.rb +8564 -3891
  97. data/lib/aws-sdk-s3/waiters.rb +67 -1
  98. data/lib/aws-sdk-s3.rb +16 -6
  99. metadata +37 -13
@@ -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 BucketTagging
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,6 +34,7 @@ module Aws::S3
30
34
  @bucket_name
31
35
  end
32
36
 
37
+ # Contains the tag set.
33
38
  # @return [Array<Types::Tag>]
34
39
  def tag_set
35
40
  data[:tag_set]
@@ -75,7 +80,8 @@ module Aws::S3
75
80
  # Waiter polls an API operation until a resource enters a desired
76
81
  # state.
77
82
  #
78
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
83
+ # @note The waiting operation is performed on a copy. The original resource
84
+ # remains unchanged.
79
85
  #
80
86
  # ## Basic Usage
81
87
  #
@@ -88,13 +94,15 @@ module Aws::S3
88
94
  #
89
95
  # ## Example
90
96
  #
91
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
97
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
98
+ # instance.state.name == 'running'
99
+ # end
92
100
  #
93
101
  # ## Configuration
94
102
  #
95
103
  # You can configure the maximum number of polling attempts, and the
96
- # delay (in seconds) between each polling attempt. The waiting condition is set
97
- # by passing a block to {#wait_until}:
104
+ # delay (in seconds) between each polling attempt. The waiting condition is
105
+ # set by passing a block to {#wait_until}:
98
106
  #
99
107
  # # poll for ~25 seconds
100
108
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -125,17 +133,16 @@ module Aws::S3
125
133
  # # resource did not enter the desired state in time
126
134
  # end
127
135
  #
136
+ # @yieldparam [Resource] resource to be used in the waiting condition.
128
137
  #
129
- # @yield param [Resource] resource to be used in the waiting condition
130
- #
131
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
132
- # because the waiter has entered a state that it will not transition
133
- # out of, preventing success.
138
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
139
+ # terminates because the waiter has entered a state that it will not
140
+ # transition out of, preventing success.
134
141
  #
135
142
  # yet successful.
136
143
  #
137
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
138
- # while polling for a resource that is not expected.
144
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
145
+ # encountered while polling for a resource that is not expected.
139
146
  #
140
147
  # @raise [NotImplementedError] Raised when the resource does not
141
148
  #
@@ -169,8 +176,14 @@ module Aws::S3
169
176
 
170
177
  # @example Request syntax with placeholder values
171
178
  #
172
- # bucket_tagging.delete()
179
+ # bucket_tagging.delete({
180
+ # expected_bucket_owner: "AccountId",
181
+ # })
173
182
  # @param [Hash] options ({})
183
+ # @option options [String] :expected_bucket_owner
184
+ # The account ID of the expected bucket owner. If the bucket is owned by
185
+ # a different account, the request fails with the HTTP status code `403
186
+ # Forbidden` (access denied).
174
187
  # @return [EmptyStructure]
175
188
  def delete(options = {})
176
189
  options = options.merge(bucket: @bucket_name)
@@ -182,6 +195,7 @@ module Aws::S3
182
195
  #
183
196
  # bucket_tagging.put({
184
197
  # content_md5: "ContentMD5",
198
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
185
199
  # tagging: { # required
186
200
  # tag_set: [ # required
187
201
  # {
@@ -190,10 +204,42 @@ module Aws::S3
190
204
  # },
191
205
  # ],
192
206
  # },
207
+ # expected_bucket_owner: "AccountId",
193
208
  # })
194
209
  # @param [Hash] options ({})
195
210
  # @option options [String] :content_md5
211
+ # The base64-encoded 128-bit MD5 digest of the data. You must use this
212
+ # header as a message integrity check to verify that the request body
213
+ # was not corrupted in transit. For more information, see [RFC 1864][1].
214
+ #
215
+ # For requests made using the Amazon Web Services Command Line Interface
216
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
217
+ # automatically.
218
+ #
219
+ #
220
+ #
221
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
222
+ # @option options [String] :checksum_algorithm
223
+ # Indicates the algorithm used to create the checksum for the object
224
+ # when using the SDK. This header will not provide any additional
225
+ # functionality if not using the SDK. When sending this header, there
226
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
227
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
228
+ # `400 Bad Request`. For more information, see [Checking object
229
+ # integrity][1] in the *Amazon S3 User Guide*.
230
+ #
231
+ # If you provide an individual checksum, Amazon S3 ignores any provided
232
+ # `ChecksumAlgorithm` parameter.
233
+ #
234
+ #
235
+ #
236
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
196
237
  # @option options [required, Types::Tagging] :tagging
238
+ # Container for the `TagSet` and `Tag` elements.
239
+ # @option options [String] :expected_bucket_owner
240
+ # The account ID of the expected bucket owner. If the bucket is owned by
241
+ # a different account, the request fails with the HTTP status code `403
242
+ # Forbidden` (access denied).
197
243
  # @return [EmptyStructure]
198
244
  def put(options = {})
199
245
  options = options.merge(bucket: @bucket_name)
@@ -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
@@ -85,7 +89,8 @@ module Aws::S3
85
89
  # Waiter polls an API operation until a resource enters a desired
86
90
  # state.
87
91
  #
88
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
92
+ # @note The waiting operation is performed on a copy. The original resource
93
+ # remains unchanged.
89
94
  #
90
95
  # ## Basic Usage
91
96
  #
@@ -98,13 +103,15 @@ module Aws::S3
98
103
  #
99
104
  # ## Example
100
105
  #
101
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
106
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
107
+ # instance.state.name == 'running'
108
+ # end
102
109
  #
103
110
  # ## Configuration
104
111
  #
105
112
  # 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}:
113
+ # delay (in seconds) between each polling attempt. The waiting condition is
114
+ # set by passing a block to {#wait_until}:
108
115
  #
109
116
  # # poll for ~25 seconds
110
117
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -135,17 +142,16 @@ module Aws::S3
135
142
  # # resource did not enter the desired state in time
136
143
  # end
137
144
  #
145
+ # @yieldparam [Resource] resource to be used in the waiting condition.
138
146
  #
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.
147
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
148
+ # terminates because the waiter has entered a state that it will not
149
+ # transition out of, preventing success.
144
150
  #
145
151
  # yet successful.
146
152
  #
147
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
148
- # while polling for a resource that is not expected.
153
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
154
+ # encountered while polling for a resource that is not expected.
149
155
  #
150
156
  # @raise [NotImplementedError] Raised when the resource does not
151
157
  #
@@ -181,13 +187,46 @@ module Aws::S3
181
187
  #
182
188
  # bucket_versioning.enable({
183
189
  # content_md5: "ContentMD5",
190
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
184
191
  # mfa: "MFA",
192
+ # expected_bucket_owner: "AccountId",
185
193
  # })
186
194
  # @param [Hash] options ({})
187
195
  # @option options [String] :content_md5
196
+ # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
197
+ # this header as a message integrity check to verify that the request
198
+ # body was not corrupted in transit. For more information, see [RFC
199
+ # 1864][1].
200
+ #
201
+ # For requests made using the Amazon Web Services Command Line Interface
202
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
203
+ # automatically.
204
+ #
205
+ #
206
+ #
207
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
208
+ # @option options [String] :checksum_algorithm
209
+ # Indicates the algorithm used to create the checksum for the object
210
+ # when using the SDK. This header will not provide any additional
211
+ # functionality if not using the SDK. When sending this header, there
212
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
213
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
214
+ # `400 Bad Request`. For more information, see [Checking object
215
+ # integrity][1] in the *Amazon S3 User Guide*.
216
+ #
217
+ # If you provide an individual checksum, Amazon S3 ignores any provided
218
+ # `ChecksumAlgorithm` parameter.
219
+ #
220
+ #
221
+ #
222
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
188
223
  # @option options [String] :mfa
189
224
  # The concatenation of the authentication device's serial number, a
190
225
  # space, and the value that is displayed on your authentication device.
226
+ # @option options [String] :expected_bucket_owner
227
+ # The account ID of the expected bucket owner. If the bucket is owned by
228
+ # a different account, the request fails with the HTTP status code `403
229
+ # Forbidden` (access denied).
191
230
  # @return [EmptyStructure]
192
231
  def enable(options = {})
193
232
  options = Aws::Util.deep_merge(options,
@@ -204,18 +243,52 @@ module Aws::S3
204
243
  #
205
244
  # bucket_versioning.put({
206
245
  # content_md5: "ContentMD5",
246
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
207
247
  # mfa: "MFA",
208
248
  # versioning_configuration: { # required
209
249
  # mfa_delete: "Enabled", # accepts Enabled, Disabled
210
250
  # status: "Enabled", # accepts Enabled, Suspended
211
251
  # },
252
+ # expected_bucket_owner: "AccountId",
212
253
  # })
213
254
  # @param [Hash] options ({})
214
255
  # @option options [String] :content_md5
256
+ # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
257
+ # this header as a message integrity check to verify that the request
258
+ # body was not corrupted in transit. For more information, see [RFC
259
+ # 1864][1].
260
+ #
261
+ # For requests made using the Amazon Web Services Command Line Interface
262
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
263
+ # automatically.
264
+ #
265
+ #
266
+ #
267
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
268
+ # @option options [String] :checksum_algorithm
269
+ # Indicates the algorithm used to create the checksum for the object
270
+ # when using the SDK. This header will not provide any additional
271
+ # functionality if not using the SDK. When sending this header, there
272
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
273
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
274
+ # `400 Bad Request`. For more information, see [Checking object
275
+ # integrity][1] in the *Amazon S3 User Guide*.
276
+ #
277
+ # If you provide an individual checksum, Amazon S3 ignores any provided
278
+ # `ChecksumAlgorithm` parameter.
279
+ #
280
+ #
281
+ #
282
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
215
283
  # @option options [String] :mfa
216
284
  # The concatenation of the authentication device's serial number, a
217
285
  # space, and the value that is displayed on your authentication device.
218
286
  # @option options [required, Types::VersioningConfiguration] :versioning_configuration
287
+ # Container for setting the versioning state.
288
+ # @option options [String] :expected_bucket_owner
289
+ # The account ID of the expected bucket owner. If the bucket is owned by
290
+ # a different account, the request fails with the HTTP status code `403
291
+ # Forbidden` (access denied).
219
292
  # @return [EmptyStructure]
220
293
  def put(options = {})
221
294
  options = options.merge(bucket: @bucket_name)
@@ -227,13 +300,46 @@ module Aws::S3
227
300
  #
228
301
  # bucket_versioning.suspend({
229
302
  # content_md5: "ContentMD5",
303
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
230
304
  # mfa: "MFA",
305
+ # expected_bucket_owner: "AccountId",
231
306
  # })
232
307
  # @param [Hash] options ({})
233
308
  # @option options [String] :content_md5
309
+ # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
310
+ # this header as a message integrity check to verify that the request
311
+ # body was not corrupted in transit. For more information, see [RFC
312
+ # 1864][1].
313
+ #
314
+ # For requests made using the Amazon Web Services Command Line Interface
315
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
316
+ # automatically.
317
+ #
318
+ #
319
+ #
320
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
321
+ # @option options [String] :checksum_algorithm
322
+ # Indicates the algorithm used to create the checksum for the object
323
+ # when using the SDK. This header will not provide any additional
324
+ # functionality if not using the SDK. When sending this header, there
325
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
326
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
327
+ # `400 Bad Request`. For more information, see [Checking object
328
+ # integrity][1] in the *Amazon S3 User Guide*.
329
+ #
330
+ # If you provide an individual checksum, Amazon S3 ignores any provided
331
+ # `ChecksumAlgorithm` parameter.
332
+ #
333
+ #
334
+ #
335
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
234
336
  # @option options [String] :mfa
235
337
  # The concatenation of the authentication device's serial number, a
236
338
  # space, and the value that is displayed on your authentication device.
339
+ # @option options [String] :expected_bucket_owner
340
+ # The account ID of the expected bucket owner. If the bucket is owned by
341
+ # a different account, the request fails with the HTTP status code `403
342
+ # Forbidden` (access denied).
237
343
  # @return [EmptyStructure]
238
344
  def suspend(options = {})
239
345
  options = Aws::Util.deep_merge(options,
@@ -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]
@@ -90,7 +102,8 @@ module Aws::S3
90
102
  # Waiter polls an API operation until a resource enters a desired
91
103
  # state.
92
104
  #
93
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
105
+ # @note The waiting operation is performed on a copy. The original resource
106
+ # remains unchanged.
94
107
  #
95
108
  # ## Basic Usage
96
109
  #
@@ -103,13 +116,15 @@ module Aws::S3
103
116
  #
104
117
  # ## Example
105
118
  #
106
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
119
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
120
+ # instance.state.name == 'running'
121
+ # end
107
122
  #
108
123
  # ## Configuration
109
124
  #
110
125
  # 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}:
126
+ # delay (in seconds) between each polling attempt. The waiting condition is
127
+ # set by passing a block to {#wait_until}:
113
128
  #
114
129
  # # poll for ~25 seconds
115
130
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -140,17 +155,16 @@ module Aws::S3
140
155
  # # resource did not enter the desired state in time
141
156
  # end
142
157
  #
158
+ # @yieldparam [Resource] resource to be used in the waiting condition.
143
159
  #
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.
160
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
161
+ # terminates because the waiter has entered a state that it will not
162
+ # transition out of, preventing success.
149
163
  #
150
164
  # yet successful.
151
165
  #
152
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
153
- # while polling for a resource that is not expected.
166
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
167
+ # encountered while polling for a resource that is not expected.
154
168
  #
155
169
  # @raise [NotImplementedError] Raised when the resource does not
156
170
  #
@@ -184,8 +198,14 @@ module Aws::S3
184
198
 
185
199
  # @example Request syntax with placeholder values
186
200
  #
187
- # bucket_website.delete()
201
+ # bucket_website.delete({
202
+ # expected_bucket_owner: "AccountId",
203
+ # })
188
204
  # @param [Hash] options ({})
205
+ # @option options [String] :expected_bucket_owner
206
+ # The account ID of the expected bucket owner. If the bucket is owned by
207
+ # a different account, the request fails with the HTTP status code `403
208
+ # Forbidden` (access denied).
189
209
  # @return [EmptyStructure]
190
210
  def delete(options = {})
191
211
  options = options.merge(bucket: @bucket_name)
@@ -197,6 +217,7 @@ module Aws::S3
197
217
  #
198
218
  # bucket_website.put({
199
219
  # content_md5: "ContentMD5",
220
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
200
221
  # website_configuration: { # required
201
222
  # error_document: {
202
223
  # key: "ObjectKey", # required
@@ -224,10 +245,42 @@ module Aws::S3
224
245
  # },
225
246
  # ],
226
247
  # },
248
+ # expected_bucket_owner: "AccountId",
227
249
  # })
228
250
  # @param [Hash] options ({})
229
251
  # @option options [String] :content_md5
252
+ # The base64-encoded 128-bit MD5 digest of the data. You must use this
253
+ # header as a message integrity check to verify that the request body
254
+ # was not corrupted in transit. For more information, see [RFC 1864][1].
255
+ #
256
+ # For requests made using the Amazon Web Services Command Line Interface
257
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
258
+ # automatically.
259
+ #
260
+ #
261
+ #
262
+ # [1]: http://www.ietf.org/rfc/rfc1864.txt
263
+ # @option options [String] :checksum_algorithm
264
+ # Indicates the algorithm used to create the checksum for the object
265
+ # when using the SDK. This header will not provide any additional
266
+ # functionality if not using the SDK. When sending this header, there
267
+ # must be a corresponding `x-amz-checksum` or `x-amz-trailer` header
268
+ # sent. Otherwise, Amazon S3 fails the request with the HTTP status code
269
+ # `400 Bad Request`. For more information, see [Checking object
270
+ # integrity][1] in the *Amazon S3 User Guide*.
271
+ #
272
+ # If you provide an individual checksum, Amazon S3 ignores any provided
273
+ # `ChecksumAlgorithm` parameter.
274
+ #
275
+ #
276
+ #
277
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
230
278
  # @option options [required, Types::WebsiteConfiguration] :website_configuration
279
+ # Container for the request.
280
+ # @option options [String] :expected_bucket_owner
281
+ # The account ID of the expected bucket owner. If the bucket is owned by
282
+ # a different account, the request fails with the HTTP status code `403
283
+ # Forbidden` (access denied).
231
284
  # @return [EmptyStructure]
232
285
  def put(options = {})
233
286
  options = options.merge(bucket: @bucket_name)