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