aws-sdk-s3 1.61.1 → 1.166.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1255 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
- data/lib/aws-sdk-s3/bucket.rb +814 -112
- data/lib/aws-sdk-s3/bucket_acl.rb +54 -17
- data/lib/aws-sdk-s3/bucket_cors.rb +63 -20
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +63 -19
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +64 -19
- data/lib/aws-sdk-s3/bucket_logging.rb +58 -17
- data/lib/aws-sdk-s3/bucket_notification.rb +47 -20
- data/lib/aws-sdk-s3/bucket_policy.rb +104 -17
- data/lib/aws-sdk-s3/bucket_region_cache.rb +11 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +53 -19
- data/lib/aws-sdk-s3/bucket_tagging.rb +60 -17
- data/lib/aws-sdk-s3/bucket_versioning.rb +106 -17
- data/lib/aws-sdk-s3/bucket_website.rb +64 -19
- data/lib/aws-sdk-s3/client.rb +11280 -3232
- data/lib/aws-sdk-s3/client_api.rb +1078 -197
- data/lib/aws-sdk-s3/customizations/bucket.rb +33 -45
- data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
- data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
- data/lib/aws-sdk-s3/customizations/object.rb +237 -39
- data/lib/aws-sdk-s3/customizations/object_summary.rb +10 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +27 -28
- data/lib/aws-sdk-s3/encryption/client.rb +25 -8
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
- data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
- data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
- data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +46 -11
- data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
- data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
- data/lib/aws-sdk-s3/encryption.rb +4 -0
- data/lib/aws-sdk-s3/encryptionV2/client.rb +570 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +223 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
- data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +173 -0
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +186 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +592 -0
- data/lib/aws-sdk-s3/endpoints.rb +2392 -0
- data/lib/aws-sdk-s3/errors.rb +27 -1
- data/lib/aws-sdk-s3/event_streams.rb +8 -1
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
- data/lib/aws-sdk-s3/file_downloader.rb +176 -44
- data/lib/aws-sdk-s3/file_part.rb +2 -0
- data/lib/aws-sdk-s3/file_uploader.rb +28 -8
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +69 -13
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +49 -18
- data/lib/aws-sdk-s3/multipart_upload.rb +242 -25
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +343 -31
- data/lib/aws-sdk-s3/object.rb +2240 -218
- data/lib/aws-sdk-s3/object_acl.rb +80 -21
- data/lib/aws-sdk-s3/object_copier.rb +9 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -22
- data/lib/aws-sdk-s3/object_summary.rb +1900 -178
- data/lib/aws-sdk-s3/object_version.rb +449 -59
- data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
- data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
- data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +5 -41
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +3 -6
- data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
- data/lib/aws-sdk-s3/plugins/endpoints.rb +289 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +60 -15
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +11 -27
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +32 -26
- data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +50 -88
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
- data/lib/aws-sdk-s3/presigned_post.rb +160 -103
- data/lib/aws-sdk-s3/presigner.rb +136 -61
- data/lib/aws-sdk-s3/resource.rb +120 -15
- data/lib/aws-sdk-s3/types.rb +9683 -4358
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +40 -29
- data/sig/bucket.rbs +213 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +111 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2397 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/errors.rbs +34 -0
- data/sig/multipart_upload.rbs +111 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +443 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +335 -0
- data/sig/object_version.rbs +137 -0
- data/sig/resource.rbs +130 -0
- data/sig/types.rbs +2585 -0
- data/sig/waiters.rbs +95 -0
- metadata +73 -15
- data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -211
|
@@ -1,7 +1,9 @@
|
|
|
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/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
5
7
|
#
|
|
6
8
|
# WARNING ABOUT GENERATED CODE
|
|
7
9
|
|
|
@@ -61,7 +63,9 @@ module Aws::S3
|
|
|
61
63
|
#
|
|
62
64
|
# @return [self]
|
|
63
65
|
def load
|
|
64
|
-
resp =
|
|
66
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
67
|
+
@client.get_bucket_versioning(bucket: @bucket_name)
|
|
68
|
+
end
|
|
65
69
|
@data = resp.data
|
|
66
70
|
self
|
|
67
71
|
end
|
|
@@ -87,7 +91,8 @@ module Aws::S3
|
|
|
87
91
|
# Waiter polls an API operation until a resource enters a desired
|
|
88
92
|
# state.
|
|
89
93
|
#
|
|
90
|
-
# @note The waiting operation is performed on a copy. The original resource
|
|
94
|
+
# @note The waiting operation is performed on a copy. The original resource
|
|
95
|
+
# remains unchanged.
|
|
91
96
|
#
|
|
92
97
|
# ## Basic Usage
|
|
93
98
|
#
|
|
@@ -100,13 +105,15 @@ module Aws::S3
|
|
|
100
105
|
#
|
|
101
106
|
# ## Example
|
|
102
107
|
#
|
|
103
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
|
108
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
|
109
|
+
# instance.state.name == 'running'
|
|
110
|
+
# end
|
|
104
111
|
#
|
|
105
112
|
# ## Configuration
|
|
106
113
|
#
|
|
107
114
|
# You can configure the maximum number of polling attempts, and the
|
|
108
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
|
109
|
-
# 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}:
|
|
110
117
|
#
|
|
111
118
|
# # poll for ~25 seconds
|
|
112
119
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
|
@@ -137,17 +144,16 @@ module Aws::S3
|
|
|
137
144
|
# # resource did not enter the desired state in time
|
|
138
145
|
# end
|
|
139
146
|
#
|
|
147
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
|
140
148
|
#
|
|
141
|
-
# @
|
|
142
|
-
#
|
|
143
|
-
#
|
|
144
|
-
# because the waiter has entered a state that it will not transition
|
|
145
|
-
# 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.
|
|
146
152
|
#
|
|
147
153
|
# yet successful.
|
|
148
154
|
#
|
|
149
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
|
150
|
-
# 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.
|
|
151
157
|
#
|
|
152
158
|
# @raise [NotImplementedError] Raised when the resource does not
|
|
153
159
|
#
|
|
@@ -174,7 +180,9 @@ module Aws::S3
|
|
|
174
180
|
:retry
|
|
175
181
|
end
|
|
176
182
|
end
|
|
177
|
-
Aws::
|
|
183
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
184
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
185
|
+
end
|
|
178
186
|
end
|
|
179
187
|
|
|
180
188
|
# @!group Actions
|
|
@@ -183,7 +191,9 @@ module Aws::S3
|
|
|
183
191
|
#
|
|
184
192
|
# bucket_versioning.enable({
|
|
185
193
|
# content_md5: "ContentMD5",
|
|
194
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
186
195
|
# mfa: "MFA",
|
|
196
|
+
# expected_bucket_owner: "AccountId",
|
|
187
197
|
# })
|
|
188
198
|
# @param [Hash] options ({})
|
|
189
199
|
# @option options [String] :content_md5
|
|
@@ -192,12 +202,35 @@ module Aws::S3
|
|
|
192
202
|
# body was not corrupted in transit. For more information, see [RFC
|
|
193
203
|
# 1864][1].
|
|
194
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
|
+
#
|
|
195
209
|
#
|
|
196
210
|
#
|
|
197
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 object
|
|
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
|
|
198
227
|
# @option options [String] :mfa
|
|
199
228
|
# The concatenation of the authentication device's serial number, a
|
|
200
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).
|
|
201
234
|
# @return [EmptyStructure]
|
|
202
235
|
def enable(options = {})
|
|
203
236
|
options = Aws::Util.deep_merge(options,
|
|
@@ -206,7 +239,9 @@ module Aws::S3
|
|
|
206
239
|
status: "Enabled"
|
|
207
240
|
}
|
|
208
241
|
)
|
|
209
|
-
resp =
|
|
242
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
243
|
+
@client.put_bucket_versioning(options)
|
|
244
|
+
end
|
|
210
245
|
resp.data
|
|
211
246
|
end
|
|
212
247
|
|
|
@@ -214,11 +249,13 @@ module Aws::S3
|
|
|
214
249
|
#
|
|
215
250
|
# bucket_versioning.put({
|
|
216
251
|
# content_md5: "ContentMD5",
|
|
252
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
217
253
|
# mfa: "MFA",
|
|
218
254
|
# versioning_configuration: { # required
|
|
219
255
|
# mfa_delete: "Enabled", # accepts Enabled, Disabled
|
|
220
256
|
# status: "Enabled", # accepts Enabled, Suspended
|
|
221
257
|
# },
|
|
258
|
+
# expected_bucket_owner: "AccountId",
|
|
222
259
|
# })
|
|
223
260
|
# @param [Hash] options ({})
|
|
224
261
|
# @option options [String] :content_md5
|
|
@@ -227,18 +264,43 @@ module Aws::S3
|
|
|
227
264
|
# body was not corrupted in transit. For more information, see [RFC
|
|
228
265
|
# 1864][1].
|
|
229
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
|
+
#
|
|
230
271
|
#
|
|
231
272
|
#
|
|
232
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 object
|
|
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
|
|
233
289
|
# @option options [String] :mfa
|
|
234
290
|
# The concatenation of the authentication device's serial number, a
|
|
235
291
|
# space, and the value that is displayed on your authentication device.
|
|
236
292
|
# @option options [required, Types::VersioningConfiguration] :versioning_configuration
|
|
237
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).
|
|
238
298
|
# @return [EmptyStructure]
|
|
239
299
|
def put(options = {})
|
|
240
300
|
options = options.merge(bucket: @bucket_name)
|
|
241
|
-
resp =
|
|
301
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
302
|
+
@client.put_bucket_versioning(options)
|
|
303
|
+
end
|
|
242
304
|
resp.data
|
|
243
305
|
end
|
|
244
306
|
|
|
@@ -246,7 +308,9 @@ module Aws::S3
|
|
|
246
308
|
#
|
|
247
309
|
# bucket_versioning.suspend({
|
|
248
310
|
# content_md5: "ContentMD5",
|
|
311
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
249
312
|
# mfa: "MFA",
|
|
313
|
+
# expected_bucket_owner: "AccountId",
|
|
250
314
|
# })
|
|
251
315
|
# @param [Hash] options ({})
|
|
252
316
|
# @option options [String] :content_md5
|
|
@@ -255,12 +319,35 @@ module Aws::S3
|
|
|
255
319
|
# body was not corrupted in transit. For more information, see [RFC
|
|
256
320
|
# 1864][1].
|
|
257
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
|
+
#
|
|
258
326
|
#
|
|
259
327
|
#
|
|
260
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 object
|
|
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
|
|
261
344
|
# @option options [String] :mfa
|
|
262
345
|
# The concatenation of the authentication device's serial number, a
|
|
263
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).
|
|
264
351
|
# @return [EmptyStructure]
|
|
265
352
|
def suspend(options = {})
|
|
266
353
|
options = Aws::Util.deep_merge(options,
|
|
@@ -269,7 +356,9 @@ module Aws::S3
|
|
|
269
356
|
status: "Suspended"
|
|
270
357
|
}
|
|
271
358
|
)
|
|
272
|
-
resp =
|
|
359
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
360
|
+
@client.put_bucket_versioning(options)
|
|
361
|
+
end
|
|
273
362
|
resp.data
|
|
274
363
|
end
|
|
275
364
|
|
|
@@ -1,7 +1,9 @@
|
|
|
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/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
5
7
|
#
|
|
6
8
|
# WARNING ABOUT GENERATED CODE
|
|
7
9
|
|
|
@@ -39,13 +41,15 @@ module Aws::S3
|
|
|
39
41
|
data[:redirect_all_requests_to]
|
|
40
42
|
end
|
|
41
43
|
|
|
42
|
-
# The name of the index document for the website
|
|
44
|
+
# The name of the index document for the website (for example
|
|
45
|
+
# `index.html`).
|
|
43
46
|
# @return [Types::IndexDocument]
|
|
44
47
|
def index_document
|
|
45
48
|
data[:index_document]
|
|
46
49
|
end
|
|
47
50
|
|
|
48
|
-
# The name of the error document for
|
|
51
|
+
# The object key name of the website error document to use for 4XX class
|
|
52
|
+
# errors.
|
|
49
53
|
# @return [Types::ErrorDocument]
|
|
50
54
|
def error_document
|
|
51
55
|
data[:error_document]
|
|
@@ -72,7 +76,9 @@ module Aws::S3
|
|
|
72
76
|
#
|
|
73
77
|
# @return [self]
|
|
74
78
|
def load
|
|
75
|
-
resp =
|
|
79
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
80
|
+
@client.get_bucket_website(bucket: @bucket_name)
|
|
81
|
+
end
|
|
76
82
|
@data = resp.data
|
|
77
83
|
self
|
|
78
84
|
end
|
|
@@ -98,7 +104,8 @@ module Aws::S3
|
|
|
98
104
|
# Waiter polls an API operation until a resource enters a desired
|
|
99
105
|
# state.
|
|
100
106
|
#
|
|
101
|
-
# @note The waiting operation is performed on a copy. The original resource
|
|
107
|
+
# @note The waiting operation is performed on a copy. The original resource
|
|
108
|
+
# remains unchanged.
|
|
102
109
|
#
|
|
103
110
|
# ## Basic Usage
|
|
104
111
|
#
|
|
@@ -111,13 +118,15 @@ module Aws::S3
|
|
|
111
118
|
#
|
|
112
119
|
# ## Example
|
|
113
120
|
#
|
|
114
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
|
121
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
|
122
|
+
# instance.state.name == 'running'
|
|
123
|
+
# end
|
|
115
124
|
#
|
|
116
125
|
# ## Configuration
|
|
117
126
|
#
|
|
118
127
|
# You can configure the maximum number of polling attempts, and the
|
|
119
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
|
120
|
-
# 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}:
|
|
121
130
|
#
|
|
122
131
|
# # poll for ~25 seconds
|
|
123
132
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
|
@@ -148,17 +157,16 @@ module Aws::S3
|
|
|
148
157
|
# # resource did not enter the desired state in time
|
|
149
158
|
# end
|
|
150
159
|
#
|
|
160
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
|
151
161
|
#
|
|
152
|
-
# @
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
# because the waiter has entered a state that it will not transition
|
|
156
|
-
# 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.
|
|
157
165
|
#
|
|
158
166
|
# yet successful.
|
|
159
167
|
#
|
|
160
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
|
161
|
-
# 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.
|
|
162
170
|
#
|
|
163
171
|
# @raise [NotImplementedError] Raised when the resource does not
|
|
164
172
|
#
|
|
@@ -185,19 +193,29 @@ module Aws::S3
|
|
|
185
193
|
:retry
|
|
186
194
|
end
|
|
187
195
|
end
|
|
188
|
-
Aws::
|
|
196
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
197
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
198
|
+
end
|
|
189
199
|
end
|
|
190
200
|
|
|
191
201
|
# @!group Actions
|
|
192
202
|
|
|
193
203
|
# @example Request syntax with placeholder values
|
|
194
204
|
#
|
|
195
|
-
# bucket_website.delete(
|
|
205
|
+
# bucket_website.delete({
|
|
206
|
+
# expected_bucket_owner: "AccountId",
|
|
207
|
+
# })
|
|
196
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).
|
|
197
213
|
# @return [EmptyStructure]
|
|
198
214
|
def delete(options = {})
|
|
199
215
|
options = options.merge(bucket: @bucket_name)
|
|
200
|
-
resp =
|
|
216
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
217
|
+
@client.delete_bucket_website(options)
|
|
218
|
+
end
|
|
201
219
|
resp.data
|
|
202
220
|
end
|
|
203
221
|
|
|
@@ -205,6 +223,7 @@ module Aws::S3
|
|
|
205
223
|
#
|
|
206
224
|
# bucket_website.put({
|
|
207
225
|
# content_md5: "ContentMD5",
|
|
226
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
|
208
227
|
# website_configuration: { # required
|
|
209
228
|
# error_document: {
|
|
210
229
|
# key: "ObjectKey", # required
|
|
@@ -232,6 +251,7 @@ module Aws::S3
|
|
|
232
251
|
# },
|
|
233
252
|
# ],
|
|
234
253
|
# },
|
|
254
|
+
# expected_bucket_owner: "AccountId",
|
|
235
255
|
# })
|
|
236
256
|
# @param [Hash] options ({})
|
|
237
257
|
# @option options [String] :content_md5
|
|
@@ -239,15 +259,40 @@ module Aws::S3
|
|
|
239
259
|
# header as a message integrity check to verify that the request body
|
|
240
260
|
# was not corrupted in transit. For more information, see [RFC 1864][1].
|
|
241
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
|
+
#
|
|
242
266
|
#
|
|
243
267
|
#
|
|
244
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 object
|
|
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
|
|
245
284
|
# @option options [required, Types::WebsiteConfiguration] :website_configuration
|
|
246
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).
|
|
247
290
|
# @return [EmptyStructure]
|
|
248
291
|
def put(options = {})
|
|
249
292
|
options = options.merge(bucket: @bucket_name)
|
|
250
|
-
resp =
|
|
293
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
294
|
+
@client.put_bucket_website(options)
|
|
295
|
+
end
|
|
251
296
|
resp.data
|
|
252
297
|
end
|
|
253
298
|
|