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.
- checksums.yaml +5 -5
- data/CHANGELOG.md +1352 -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 +1005 -106
- data/lib/aws-sdk-s3/bucket_acl.rb +65 -18
- data/lib/aws-sdk-s3/bucket_cors.rb +80 -18
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +71 -20
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +126 -21
- data/lib/aws-sdk-s3/bucket_logging.rb +68 -16
- data/lib/aws-sdk-s3/bucket_notification.rb +52 -20
- data/lib/aws-sdk-s3/bucket_policy.rb +108 -17
- data/lib/aws-sdk-s3/bucket_region_cache.rb +11 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +60 -15
- data/lib/aws-sdk-s3/bucket_tagging.rb +71 -18
- data/lib/aws-sdk-s3/bucket_versioning.rb +133 -17
- data/lib/aws-sdk-s3/bucket_website.rb +78 -21
- data/lib/aws-sdk-s3/client.rb +14517 -941
- data/lib/aws-sdk-s3/client_api.rb +1296 -197
- data/lib/aws-sdk-s3/customizations/bucket.rb +56 -37
- 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 +288 -68
- 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 +28 -7
- 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 +181 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +716 -0
- data/lib/aws-sdk-s3/endpoints.rb +1434 -0
- data/lib/aws-sdk-s3/errors.rb +170 -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 +161 -46
- data/lib/aws-sdk-s3/file_part.rb +11 -6
- data/lib/aws-sdk-s3/file_uploader.rb +39 -18
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +104 -27
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +61 -21
- data/lib/aws-sdk-s3/multipart_upload.rb +342 -32
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +384 -46
- data/lib/aws-sdk-s3/object.rb +2600 -231
- data/lib/aws-sdk-s3/object_acl.rb +103 -25
- 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 +2174 -204
- data/lib/aws-sdk-s3/object_version.rb +539 -80
- 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 +7 -43
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +20 -3
- data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
- data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
- data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +62 -17
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +44 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +14 -70
- 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 +63 -94
- 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 -99
- data/lib/aws-sdk-s3/presigner.rb +141 -62
- data/lib/aws-sdk-s3/resource.rb +156 -17
- data/lib/aws-sdk-s3/types.rb +13021 -4106
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +46 -32
- data/sig/bucket.rbs +222 -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 +115 -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 +2472 -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 +42 -0
- data/sig/multipart_upload.rbs +120 -0
- data/sig/multipart_upload_part.rbs +109 -0
- data/sig/object.rbs +459 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +345 -0
- data/sig/object_version.rbs +143 -0
- data/sig/resource.rbs +134 -0
- data/sig/types.rbs +2712 -0
- data/sig/waiters.rbs +95 -0
- 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/
|
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 BucketLifecycleConfiguration
|
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,12 +34,37 @@ module Aws::S3
|
|
30
34
|
@bucket_name
|
31
35
|
end
|
32
36
|
|
33
|
-
|
37
|
+
# Container for a lifecycle rule.
|
34
38
|
# @return [Array<Types::LifecycleRule>]
|
35
39
|
def rules
|
36
40
|
data[:rules]
|
37
41
|
end
|
38
42
|
|
43
|
+
# Indicates which default minimum object size behavior is applied to the
|
44
|
+
# lifecycle configuration.
|
45
|
+
#
|
46
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It isn't
|
47
|
+
# supported for directory bucket lifecycle configurations.
|
48
|
+
#
|
49
|
+
# </note>
|
50
|
+
#
|
51
|
+
# * `all_storage_classes_128K` - Objects smaller than 128 KB will not
|
52
|
+
# transition to any storage class by default.
|
53
|
+
#
|
54
|
+
# * `varies_by_storage_class` - Objects smaller than 128 KB will
|
55
|
+
# transition to Glacier Flexible Retrieval or Glacier Deep Archive
|
56
|
+
# storage classes. By default, all other storage classes will prevent
|
57
|
+
# transitions smaller than 128 KB.
|
58
|
+
#
|
59
|
+
# To customize the minimum object size for any transition you can add a
|
60
|
+
# filter that specifies a custom `ObjectSizeGreaterThan` or
|
61
|
+
# `ObjectSizeLessThan` in the body of your transition rule. Custom
|
62
|
+
# filters always take precedence over the default transition behavior.
|
63
|
+
# @return [String]
|
64
|
+
def transition_default_minimum_object_size
|
65
|
+
data[:transition_default_minimum_object_size]
|
66
|
+
end
|
67
|
+
|
39
68
|
# @!endgroup
|
40
69
|
|
41
70
|
# @return [Client]
|
@@ -50,7 +79,9 @@ module Aws::S3
|
|
50
79
|
#
|
51
80
|
# @return [self]
|
52
81
|
def load
|
53
|
-
resp =
|
82
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
83
|
+
@client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
|
84
|
+
end
|
54
85
|
@data = resp.data
|
55
86
|
self
|
56
87
|
end
|
@@ -76,7 +107,8 @@ module Aws::S3
|
|
76
107
|
# Waiter polls an API operation until a resource enters a desired
|
77
108
|
# state.
|
78
109
|
#
|
79
|
-
# @note The waiting operation is performed on a copy. The original resource
|
110
|
+
# @note The waiting operation is performed on a copy. The original resource
|
111
|
+
# remains unchanged.
|
80
112
|
#
|
81
113
|
# ## Basic Usage
|
82
114
|
#
|
@@ -89,13 +121,15 @@ module Aws::S3
|
|
89
121
|
#
|
90
122
|
# ## Example
|
91
123
|
#
|
92
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
124
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
125
|
+
# instance.state.name == 'running'
|
126
|
+
# end
|
93
127
|
#
|
94
128
|
# ## Configuration
|
95
129
|
#
|
96
130
|
# You can configure the maximum number of polling attempts, and the
|
97
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
98
|
-
# by passing a block to {#wait_until}:
|
131
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
132
|
+
# set by passing a block to {#wait_until}:
|
99
133
|
#
|
100
134
|
# # poll for ~25 seconds
|
101
135
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -126,17 +160,16 @@ module Aws::S3
|
|
126
160
|
# # resource did not enter the desired state in time
|
127
161
|
# end
|
128
162
|
#
|
163
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
129
164
|
#
|
130
|
-
# @
|
131
|
-
#
|
132
|
-
#
|
133
|
-
# because the waiter has entered a state that it will not transition
|
134
|
-
# out of, preventing success.
|
165
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
166
|
+
# terminates because the waiter has entered a state that it will not
|
167
|
+
# transition out of, preventing success.
|
135
168
|
#
|
136
169
|
# yet successful.
|
137
170
|
#
|
138
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
139
|
-
# while polling for a resource that is not expected.
|
171
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
172
|
+
# encountered while polling for a resource that is not expected.
|
140
173
|
#
|
141
174
|
# @raise [NotImplementedError] Raised when the resource does not
|
142
175
|
#
|
@@ -163,25 +196,41 @@ module Aws::S3
|
|
163
196
|
:retry
|
164
197
|
end
|
165
198
|
end
|
166
|
-
Aws::
|
199
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
200
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
201
|
+
end
|
167
202
|
end
|
168
203
|
|
169
204
|
# @!group Actions
|
170
205
|
|
171
206
|
# @example Request syntax with placeholder values
|
172
207
|
#
|
173
|
-
# bucket_lifecycle_configuration.delete(
|
208
|
+
# bucket_lifecycle_configuration.delete({
|
209
|
+
# expected_bucket_owner: "AccountId",
|
210
|
+
# })
|
174
211
|
# @param [Hash] options ({})
|
212
|
+
# @option options [String] :expected_bucket_owner
|
213
|
+
# The account ID of the expected bucket owner. If the account ID that
|
214
|
+
# you provide does not match the actual owner of the bucket, the request
|
215
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
216
|
+
#
|
217
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It is not
|
218
|
+
# supported for directory bucket lifecycle configurations.
|
219
|
+
#
|
220
|
+
# </note>
|
175
221
|
# @return [EmptyStructure]
|
176
222
|
def delete(options = {})
|
177
223
|
options = options.merge(bucket: @bucket_name)
|
178
|
-
resp =
|
224
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
225
|
+
@client.delete_bucket_lifecycle(options)
|
226
|
+
end
|
179
227
|
resp.data
|
180
228
|
end
|
181
229
|
|
182
230
|
# @example Request syntax with placeholder values
|
183
231
|
#
|
184
232
|
# bucket_lifecycle_configuration.put({
|
233
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
185
234
|
# lifecycle_configuration: {
|
186
235
|
# rules: [ # required
|
187
236
|
# {
|
@@ -198,6 +247,8 @@ module Aws::S3
|
|
198
247
|
# key: "ObjectKey", # required
|
199
248
|
# value: "Value", # required
|
200
249
|
# },
|
250
|
+
# object_size_greater_than: 1,
|
251
|
+
# object_size_less_than: 1,
|
201
252
|
# and: {
|
202
253
|
# prefix: "Prefix",
|
203
254
|
# tags: [
|
@@ -206,6 +257,8 @@ module Aws::S3
|
|
206
257
|
# value: "Value", # required
|
207
258
|
# },
|
208
259
|
# ],
|
260
|
+
# object_size_greater_than: 1,
|
261
|
+
# object_size_less_than: 1,
|
209
262
|
# },
|
210
263
|
# },
|
211
264
|
# status: "Enabled", # required, accepts Enabled, Disabled
|
@@ -213,17 +266,19 @@ module Aws::S3
|
|
213
266
|
# {
|
214
267
|
# date: Time.now,
|
215
268
|
# days: 1,
|
216
|
-
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
|
269
|
+
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
|
217
270
|
# },
|
218
271
|
# ],
|
219
272
|
# noncurrent_version_transitions: [
|
220
273
|
# {
|
221
274
|
# noncurrent_days: 1,
|
222
|
-
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
|
275
|
+
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
|
276
|
+
# newer_noncurrent_versions: 1,
|
223
277
|
# },
|
224
278
|
# ],
|
225
279
|
# noncurrent_version_expiration: {
|
226
280
|
# noncurrent_days: 1,
|
281
|
+
# newer_noncurrent_versions: 1,
|
227
282
|
# },
|
228
283
|
# abort_incomplete_multipart_upload: {
|
229
284
|
# days_after_initiation: 1,
|
@@ -231,13 +286,63 @@ module Aws::S3
|
|
231
286
|
# },
|
232
287
|
# ],
|
233
288
|
# },
|
289
|
+
# expected_bucket_owner: "AccountId",
|
290
|
+
# transition_default_minimum_object_size: "varies_by_storage_class", # accepts varies_by_storage_class, all_storage_classes_128K
|
234
291
|
# })
|
235
292
|
# @param [Hash] options ({})
|
293
|
+
# @option options [String] :checksum_algorithm
|
294
|
+
# Indicates the algorithm used to create the checksum for the request
|
295
|
+
# when you use the SDK. This header will not provide any additional
|
296
|
+
# functionality if you don't use the SDK. When you send this header,
|
297
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
298
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
299
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
300
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
301
|
+
#
|
302
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
303
|
+
# `ChecksumAlgorithm` parameter.
|
304
|
+
#
|
305
|
+
#
|
306
|
+
#
|
307
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
236
308
|
# @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
|
237
|
-
#
|
309
|
+
# Container for lifecycle rules. You can add as many as 1,000 rules.
|
310
|
+
# @option options [String] :expected_bucket_owner
|
311
|
+
# The account ID of the expected bucket owner. If the account ID that
|
312
|
+
# you provide does not match the actual owner of the bucket, the request
|
313
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
314
|
+
#
|
315
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It is not
|
316
|
+
# supported for directory bucket lifecycle configurations.
|
317
|
+
#
|
318
|
+
# </note>
|
319
|
+
# @option options [String] :transition_default_minimum_object_size
|
320
|
+
# Indicates which default minimum object size behavior is applied to the
|
321
|
+
# lifecycle configuration.
|
322
|
+
#
|
323
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It is not
|
324
|
+
# supported for directory bucket lifecycle configurations.
|
325
|
+
#
|
326
|
+
# </note>
|
327
|
+
#
|
328
|
+
# * `all_storage_classes_128K` - Objects smaller than 128 KB will not
|
329
|
+
# transition to any storage class by default.
|
330
|
+
#
|
331
|
+
# * `varies_by_storage_class` - Objects smaller than 128 KB will
|
332
|
+
# transition to Glacier Flexible Retrieval or Glacier Deep Archive
|
333
|
+
# storage classes. By default, all other storage classes will prevent
|
334
|
+
# transitions smaller than 128 KB.
|
335
|
+
#
|
336
|
+
# To customize the minimum object size for any transition you can add a
|
337
|
+
# filter that specifies a custom `ObjectSizeGreaterThan` or
|
338
|
+
# `ObjectSizeLessThan` in the body of your transition rule. Custom
|
339
|
+
# filters always take precedence over the default transition behavior.
|
340
|
+
# @return [Types::PutBucketLifecycleConfigurationOutput]
|
238
341
|
def put(options = {})
|
239
342
|
options = options.merge(bucket: @bucket_name)
|
240
|
-
resp =
|
343
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
344
|
+
@client.put_bucket_lifecycle_configuration(options)
|
345
|
+
end
|
241
346
|
resp.data
|
242
347
|
end
|
243
348
|
|
@@ -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/
|
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 BucketLogging
|
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,7 +34,13 @@ module Aws::S3
|
|
30
34
|
@bucket_name
|
31
35
|
end
|
32
36
|
|
33
|
-
|
37
|
+
# Describes where logs are stored and the prefix that Amazon S3 assigns
|
38
|
+
# to all log object keys for a bucket. For more information, see [PUT
|
39
|
+
# Bucket logging][1] in the *Amazon S3 API Reference*.
|
40
|
+
#
|
41
|
+
#
|
42
|
+
#
|
43
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html
|
34
44
|
# @return [Types::LoggingEnabled]
|
35
45
|
def logging_enabled
|
36
46
|
data[:logging_enabled]
|
@@ -50,7 +60,9 @@ module Aws::S3
|
|
50
60
|
#
|
51
61
|
# @return [self]
|
52
62
|
def load
|
53
|
-
resp =
|
63
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
64
|
+
@client.get_bucket_logging(bucket: @bucket_name)
|
65
|
+
end
|
54
66
|
@data = resp.data
|
55
67
|
self
|
56
68
|
end
|
@@ -76,7 +88,8 @@ module Aws::S3
|
|
76
88
|
# Waiter polls an API operation until a resource enters a desired
|
77
89
|
# state.
|
78
90
|
#
|
79
|
-
# @note The waiting operation is performed on a copy. The original resource
|
91
|
+
# @note The waiting operation is performed on a copy. The original resource
|
92
|
+
# remains unchanged.
|
80
93
|
#
|
81
94
|
# ## Basic Usage
|
82
95
|
#
|
@@ -89,13 +102,15 @@ module Aws::S3
|
|
89
102
|
#
|
90
103
|
# ## Example
|
91
104
|
#
|
92
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
105
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
106
|
+
# instance.state.name == 'running'
|
107
|
+
# end
|
93
108
|
#
|
94
109
|
# ## Configuration
|
95
110
|
#
|
96
111
|
# You can configure the maximum number of polling attempts, and the
|
97
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
98
|
-
# by passing a block to {#wait_until}:
|
112
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
113
|
+
# set by passing a block to {#wait_until}:
|
99
114
|
#
|
100
115
|
# # poll for ~25 seconds
|
101
116
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -126,17 +141,16 @@ module Aws::S3
|
|
126
141
|
# # resource did not enter the desired state in time
|
127
142
|
# end
|
128
143
|
#
|
144
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
129
145
|
#
|
130
|
-
# @
|
131
|
-
#
|
132
|
-
#
|
133
|
-
# because the waiter has entered a state that it will not transition
|
134
|
-
# out of, preventing success.
|
146
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
147
|
+
# terminates because the waiter has entered a state that it will not
|
148
|
+
# transition out of, preventing success.
|
135
149
|
#
|
136
150
|
# yet successful.
|
137
151
|
#
|
138
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
139
|
-
# while polling for a resource that is not expected.
|
152
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
153
|
+
# encountered while polling for a resource that is not expected.
|
140
154
|
#
|
141
155
|
# @raise [NotImplementedError] Raised when the resource does not
|
142
156
|
#
|
@@ -163,7 +177,9 @@ module Aws::S3
|
|
163
177
|
:retry
|
164
178
|
end
|
165
179
|
end
|
166
|
-
Aws::
|
180
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
181
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
182
|
+
end
|
167
183
|
end
|
168
184
|
|
169
185
|
# @!group Actions
|
@@ -187,17 +203,53 @@ module Aws::S3
|
|
187
203
|
# },
|
188
204
|
# ],
|
189
205
|
# target_prefix: "TargetPrefix", # required
|
206
|
+
# target_object_key_format: {
|
207
|
+
# simple_prefix: {
|
208
|
+
# },
|
209
|
+
# partitioned_prefix: {
|
210
|
+
# partition_date_source: "EventTime", # accepts EventTime, DeliveryTime
|
211
|
+
# },
|
212
|
+
# },
|
190
213
|
# },
|
191
214
|
# },
|
192
215
|
# content_md5: "ContentMD5",
|
216
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
217
|
+
# expected_bucket_owner: "AccountId",
|
193
218
|
# })
|
194
219
|
# @param [Hash] options ({})
|
195
220
|
# @option options [required, Types::BucketLoggingStatus] :bucket_logging_status
|
221
|
+
# Container for logging status information.
|
196
222
|
# @option options [String] :content_md5
|
223
|
+
# The MD5 hash of the `PutBucketLogging` request body.
|
224
|
+
#
|
225
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
226
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
227
|
+
# automatically.
|
228
|
+
# @option options [String] :checksum_algorithm
|
229
|
+
# Indicates the algorithm used to create the checksum for the request
|
230
|
+
# when you use the SDK. This header will not provide any additional
|
231
|
+
# functionality if you don't use the SDK. When you send this header,
|
232
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
233
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
234
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
235
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
236
|
+
#
|
237
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
238
|
+
# `ChecksumAlgorithm` parameter.
|
239
|
+
#
|
240
|
+
#
|
241
|
+
#
|
242
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
243
|
+
# @option options [String] :expected_bucket_owner
|
244
|
+
# The account ID of the expected bucket owner. If the account ID that
|
245
|
+
# you provide does not match the actual owner of the bucket, the request
|
246
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
197
247
|
# @return [EmptyStructure]
|
198
248
|
def put(options = {})
|
199
249
|
options = options.merge(bucket: @bucket_name)
|
200
|
-
resp =
|
250
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
251
|
+
@client.put_bucket_logging(options)
|
252
|
+
end
|
201
253
|
resp.data
|
202
254
|
end
|
203
255
|
|
@@ -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/
|
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 BucketNotification
|
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
|
@@ -44,13 +48,19 @@ module Aws::S3
|
|
44
48
|
data[:queue_configurations]
|
45
49
|
end
|
46
50
|
|
47
|
-
# Describes the
|
48
|
-
#
|
51
|
+
# Describes the Lambda functions to invoke and the events for which to
|
52
|
+
# invoke them.
|
49
53
|
# @return [Array<Types::LambdaFunctionConfiguration>]
|
50
54
|
def lambda_function_configurations
|
51
55
|
data[:lambda_function_configurations]
|
52
56
|
end
|
53
57
|
|
58
|
+
# Enables delivery of events to Amazon EventBridge.
|
59
|
+
# @return [Types::EventBridgeConfiguration]
|
60
|
+
def event_bridge_configuration
|
61
|
+
data[:event_bridge_configuration]
|
62
|
+
end
|
63
|
+
|
54
64
|
# @!endgroup
|
55
65
|
|
56
66
|
# @return [Client]
|
@@ -65,7 +75,9 @@ module Aws::S3
|
|
65
75
|
#
|
66
76
|
# @return [self]
|
67
77
|
def load
|
68
|
-
resp =
|
78
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
79
|
+
@client.get_bucket_notification_configuration(bucket: @bucket_name)
|
80
|
+
end
|
69
81
|
@data = resp.data
|
70
82
|
self
|
71
83
|
end
|
@@ -91,7 +103,8 @@ module Aws::S3
|
|
91
103
|
# Waiter polls an API operation until a resource enters a desired
|
92
104
|
# state.
|
93
105
|
#
|
94
|
-
# @note The waiting operation is performed on a copy. The original resource
|
106
|
+
# @note The waiting operation is performed on a copy. The original resource
|
107
|
+
# remains unchanged.
|
95
108
|
#
|
96
109
|
# ## Basic Usage
|
97
110
|
#
|
@@ -104,13 +117,15 @@ module Aws::S3
|
|
104
117
|
#
|
105
118
|
# ## Example
|
106
119
|
#
|
107
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
120
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
121
|
+
# instance.state.name == 'running'
|
122
|
+
# end
|
108
123
|
#
|
109
124
|
# ## Configuration
|
110
125
|
#
|
111
126
|
# You can configure the maximum number of polling attempts, and the
|
112
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
113
|
-
# by passing a block to {#wait_until}:
|
127
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
128
|
+
# set by passing a block to {#wait_until}:
|
114
129
|
#
|
115
130
|
# # poll for ~25 seconds
|
116
131
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -141,17 +156,16 @@ module Aws::S3
|
|
141
156
|
# # resource did not enter the desired state in time
|
142
157
|
# end
|
143
158
|
#
|
159
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
144
160
|
#
|
145
|
-
# @
|
146
|
-
#
|
147
|
-
#
|
148
|
-
# because the waiter has entered a state that it will not transition
|
149
|
-
# out of, preventing success.
|
161
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
162
|
+
# terminates because the waiter has entered a state that it will not
|
163
|
+
# transition out of, preventing success.
|
150
164
|
#
|
151
165
|
# yet successful.
|
152
166
|
#
|
153
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
154
|
-
# while polling for a resource that is not expected.
|
167
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
168
|
+
# encountered while polling for a resource that is not expected.
|
155
169
|
#
|
156
170
|
# @raise [NotImplementedError] Raised when the resource does not
|
157
171
|
#
|
@@ -178,7 +192,9 @@ module Aws::S3
|
|
178
192
|
:retry
|
179
193
|
end
|
180
194
|
end
|
181
|
-
Aws::
|
195
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
196
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
197
|
+
end
|
182
198
|
end
|
183
199
|
|
184
200
|
# @!group Actions
|
@@ -191,7 +207,7 @@ module Aws::S3
|
|
191
207
|
# {
|
192
208
|
# id: "NotificationId",
|
193
209
|
# topic_arn: "TopicArn", # required
|
194
|
-
# events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:Post, s3:ObjectRestore:Completed
|
210
|
+
# events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:*, s3:ObjectRestore:Post, s3:ObjectRestore:Completed, s3:Replication:*, s3:Replication:OperationFailedReplication, s3:Replication:OperationNotTracked, s3:Replication:OperationMissedThreshold, s3:Replication:OperationReplicatedAfterThreshold, s3:ObjectRestore:Delete, s3:LifecycleTransition, s3:IntelligentTiering, s3:ObjectAcl:Put, s3:LifecycleExpiration:*, s3:LifecycleExpiration:Delete, s3:LifecycleExpiration:DeleteMarkerCreated, s3:ObjectTagging:*, s3:ObjectTagging:Put, s3:ObjectTagging:Delete
|
195
211
|
# filter: {
|
196
212
|
# key: {
|
197
213
|
# filter_rules: [
|
@@ -208,7 +224,7 @@ module Aws::S3
|
|
208
224
|
# {
|
209
225
|
# id: "NotificationId",
|
210
226
|
# queue_arn: "QueueArn", # required
|
211
|
-
# events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:Post, s3:ObjectRestore:Completed
|
227
|
+
# events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:*, s3:ObjectRestore:Post, s3:ObjectRestore:Completed, s3:Replication:*, s3:Replication:OperationFailedReplication, s3:Replication:OperationNotTracked, s3:Replication:OperationMissedThreshold, s3:Replication:OperationReplicatedAfterThreshold, s3:ObjectRestore:Delete, s3:LifecycleTransition, s3:IntelligentTiering, s3:ObjectAcl:Put, s3:LifecycleExpiration:*, s3:LifecycleExpiration:Delete, s3:LifecycleExpiration:DeleteMarkerCreated, s3:ObjectTagging:*, s3:ObjectTagging:Put, s3:ObjectTagging:Delete
|
212
228
|
# filter: {
|
213
229
|
# key: {
|
214
230
|
# filter_rules: [
|
@@ -225,7 +241,7 @@ module Aws::S3
|
|
225
241
|
# {
|
226
242
|
# id: "NotificationId",
|
227
243
|
# lambda_function_arn: "LambdaFunctionArn", # required
|
228
|
-
# events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:Post, s3:ObjectRestore:Completed
|
244
|
+
# events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated, s3:ObjectRestore:*, s3:ObjectRestore:Post, s3:ObjectRestore:Completed, s3:Replication:*, s3:Replication:OperationFailedReplication, s3:Replication:OperationNotTracked, s3:Replication:OperationMissedThreshold, s3:Replication:OperationReplicatedAfterThreshold, s3:ObjectRestore:Delete, s3:LifecycleTransition, s3:IntelligentTiering, s3:ObjectAcl:Put, s3:LifecycleExpiration:*, s3:LifecycleExpiration:Delete, s3:LifecycleExpiration:DeleteMarkerCreated, s3:ObjectTagging:*, s3:ObjectTagging:Put, s3:ObjectTagging:Delete
|
229
245
|
# filter: {
|
230
246
|
# key: {
|
231
247
|
# filter_rules: [
|
@@ -238,14 +254,30 @@ module Aws::S3
|
|
238
254
|
# },
|
239
255
|
# },
|
240
256
|
# ],
|
257
|
+
# event_bridge_configuration: {
|
258
|
+
# },
|
241
259
|
# },
|
260
|
+
# expected_bucket_owner: "AccountId",
|
261
|
+
# skip_destination_validation: false,
|
242
262
|
# })
|
243
263
|
# @param [Hash] options ({})
|
244
264
|
# @option options [required, Types::NotificationConfiguration] :notification_configuration
|
265
|
+
# A container for specifying the notification configuration of the
|
266
|
+
# bucket. If this element is empty, notifications are turned off for the
|
267
|
+
# bucket.
|
268
|
+
# @option options [String] :expected_bucket_owner
|
269
|
+
# The account ID of the expected bucket owner. If the account ID that
|
270
|
+
# you provide does not match the actual owner of the bucket, the request
|
271
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
272
|
+
# @option options [Boolean] :skip_destination_validation
|
273
|
+
# Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations.
|
274
|
+
# True or false value.
|
245
275
|
# @return [EmptyStructure]
|
246
276
|
def put(options = {})
|
247
277
|
options = options.merge(bucket: @bucket_name)
|
248
|
-
resp =
|
278
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
279
|
+
@client.put_bucket_notification_configuration(options)
|
280
|
+
end
|
249
281
|
resp.data
|
250
282
|
end
|
251
283
|
|