aws-sdk-s3 1.48.0 → 1.169.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +1270 -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 +959 -106
- data/lib/aws-sdk-s3/bucket_acl.rb +64 -18
- data/lib/aws-sdk-s3/bucket_cors.rb +79 -18
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +66 -20
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +106 -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 +107 -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 +13765 -1019
- data/lib/aws-sdk-s3/client_api.rb +1137 -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 +592 -0
- data/lib/aws-sdk-s3/endpoints.rb +1392 -0
- data/lib/aws-sdk-s3/errors.rb +126 -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 +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 +82 -23
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +61 -21
- data/lib/aws-sdk-s3/multipart_upload.rb +265 -32
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +367 -45
- data/lib/aws-sdk-s3/object.rb +2475 -228
- 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 +2075 -203
- data/lib/aws-sdk-s3/object_version.rb +492 -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/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 +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 +44 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +35 -30
- 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/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 -99
- data/lib/aws-sdk-s3/presigner.rb +138 -59
- data/lib/aws-sdk-s3/resource.rb +155 -17
- data/lib/aws-sdk-s3/types.rb +12229 -4377
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +46 -32
- data/sig/bucket.rbs +216 -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 +2406 -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 +132 -0
- data/sig/types.rbs +2596 -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,32 @@ 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
|
+
# * `all_storage_classes_128K` - Objects smaller than 128 KB will not
|
47
|
+
# transition to any storage class by default.
|
48
|
+
#
|
49
|
+
# * `varies_by_storage_class` - Objects smaller than 128 KB will
|
50
|
+
# transition to Glacier Flexible Retrieval or Glacier Deep Archive
|
51
|
+
# storage classes. By default, all other storage classes will prevent
|
52
|
+
# transitions smaller than 128 KB.
|
53
|
+
#
|
54
|
+
# To customize the minimum object size for any transition you can add a
|
55
|
+
# filter that specifies a custom `ObjectSizeGreaterThan` or
|
56
|
+
# `ObjectSizeLessThan` in the body of your transition rule. Custom
|
57
|
+
# filters always take precedence over the default transition behavior.
|
58
|
+
# @return [String]
|
59
|
+
def transition_default_minimum_object_size
|
60
|
+
data[:transition_default_minimum_object_size]
|
61
|
+
end
|
62
|
+
|
39
63
|
# @!endgroup
|
40
64
|
|
41
65
|
# @return [Client]
|
@@ -50,7 +74,9 @@ module Aws::S3
|
|
50
74
|
#
|
51
75
|
# @return [self]
|
52
76
|
def load
|
53
|
-
resp =
|
77
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
78
|
+
@client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
|
79
|
+
end
|
54
80
|
@data = resp.data
|
55
81
|
self
|
56
82
|
end
|
@@ -76,7 +102,8 @@ module Aws::S3
|
|
76
102
|
# Waiter polls an API operation until a resource enters a desired
|
77
103
|
# state.
|
78
104
|
#
|
79
|
-
# @note The waiting operation is performed on a copy. The original resource
|
105
|
+
# @note The waiting operation is performed on a copy. The original resource
|
106
|
+
# remains unchanged.
|
80
107
|
#
|
81
108
|
# ## Basic Usage
|
82
109
|
#
|
@@ -89,13 +116,15 @@ module Aws::S3
|
|
89
116
|
#
|
90
117
|
# ## Example
|
91
118
|
#
|
92
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
119
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
120
|
+
# instance.state.name == 'running'
|
121
|
+
# end
|
93
122
|
#
|
94
123
|
# ## Configuration
|
95
124
|
#
|
96
125
|
# 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}:
|
126
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
127
|
+
# set by passing a block to {#wait_until}:
|
99
128
|
#
|
100
129
|
# # poll for ~25 seconds
|
101
130
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -126,17 +155,16 @@ module Aws::S3
|
|
126
155
|
# # resource did not enter the desired state in time
|
127
156
|
# end
|
128
157
|
#
|
158
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
129
159
|
#
|
130
|
-
# @
|
131
|
-
#
|
132
|
-
#
|
133
|
-
# because the waiter has entered a state that it will not transition
|
134
|
-
# 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.
|
135
163
|
#
|
136
164
|
# yet successful.
|
137
165
|
#
|
138
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
139
|
-
# 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.
|
140
168
|
#
|
141
169
|
# @raise [NotImplementedError] Raised when the resource does not
|
142
170
|
#
|
@@ -163,25 +191,36 @@ module Aws::S3
|
|
163
191
|
:retry
|
164
192
|
end
|
165
193
|
end
|
166
|
-
Aws::
|
194
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
195
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
196
|
+
end
|
167
197
|
end
|
168
198
|
|
169
199
|
# @!group Actions
|
170
200
|
|
171
201
|
# @example Request syntax with placeholder values
|
172
202
|
#
|
173
|
-
# bucket_lifecycle_configuration.delete(
|
203
|
+
# bucket_lifecycle_configuration.delete({
|
204
|
+
# expected_bucket_owner: "AccountId",
|
205
|
+
# })
|
174
206
|
# @param [Hash] options ({})
|
207
|
+
# @option options [String] :expected_bucket_owner
|
208
|
+
# The account ID of the expected bucket owner. If the account ID that
|
209
|
+
# you provide does not match the actual owner of the bucket, the request
|
210
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
175
211
|
# @return [EmptyStructure]
|
176
212
|
def delete(options = {})
|
177
213
|
options = options.merge(bucket: @bucket_name)
|
178
|
-
resp =
|
214
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
215
|
+
@client.delete_bucket_lifecycle(options)
|
216
|
+
end
|
179
217
|
resp.data
|
180
218
|
end
|
181
219
|
|
182
220
|
# @example Request syntax with placeholder values
|
183
221
|
#
|
184
222
|
# bucket_lifecycle_configuration.put({
|
223
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
|
185
224
|
# lifecycle_configuration: {
|
186
225
|
# rules: [ # required
|
187
226
|
# {
|
@@ -198,6 +237,8 @@ module Aws::S3
|
|
198
237
|
# key: "ObjectKey", # required
|
199
238
|
# value: "Value", # required
|
200
239
|
# },
|
240
|
+
# object_size_greater_than: 1,
|
241
|
+
# object_size_less_than: 1,
|
201
242
|
# and: {
|
202
243
|
# prefix: "Prefix",
|
203
244
|
# tags: [
|
@@ -206,6 +247,8 @@ module Aws::S3
|
|
206
247
|
# value: "Value", # required
|
207
248
|
# },
|
208
249
|
# ],
|
250
|
+
# object_size_greater_than: 1,
|
251
|
+
# object_size_less_than: 1,
|
209
252
|
# },
|
210
253
|
# },
|
211
254
|
# status: "Enabled", # required, accepts Enabled, Disabled
|
@@ -213,17 +256,19 @@ module Aws::S3
|
|
213
256
|
# {
|
214
257
|
# date: Time.now,
|
215
258
|
# days: 1,
|
216
|
-
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
|
259
|
+
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
|
217
260
|
# },
|
218
261
|
# ],
|
219
262
|
# noncurrent_version_transitions: [
|
220
263
|
# {
|
221
264
|
# noncurrent_days: 1,
|
222
|
-
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
|
265
|
+
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
|
266
|
+
# newer_noncurrent_versions: 1,
|
223
267
|
# },
|
224
268
|
# ],
|
225
269
|
# noncurrent_version_expiration: {
|
226
270
|
# noncurrent_days: 1,
|
271
|
+
# newer_noncurrent_versions: 1,
|
227
272
|
# },
|
228
273
|
# abort_incomplete_multipart_upload: {
|
229
274
|
# days_after_initiation: 1,
|
@@ -231,13 +276,53 @@ module Aws::S3
|
|
231
276
|
# },
|
232
277
|
# ],
|
233
278
|
# },
|
279
|
+
# expected_bucket_owner: "AccountId",
|
280
|
+
# transition_default_minimum_object_size: "varies_by_storage_class", # accepts varies_by_storage_class, all_storage_classes_128K
|
234
281
|
# })
|
235
282
|
# @param [Hash] options ({})
|
283
|
+
# @option options [String] :checksum_algorithm
|
284
|
+
# Indicates the algorithm used to create the checksum for the object
|
285
|
+
# when you use the SDK. This header will not provide any additional
|
286
|
+
# functionality if you don't use the SDK. When you send this header,
|
287
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
288
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
289
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
290
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
291
|
+
#
|
292
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
293
|
+
# `ChecksumAlgorithm` parameter.
|
294
|
+
#
|
295
|
+
#
|
296
|
+
#
|
297
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
236
298
|
# @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
|
237
|
-
#
|
299
|
+
# Container for lifecycle rules. You can add as many as 1,000 rules.
|
300
|
+
# @option options [String] :expected_bucket_owner
|
301
|
+
# The account ID of the expected bucket owner. If the account ID that
|
302
|
+
# you provide does not match the actual owner of the bucket, the request
|
303
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
304
|
+
# @option options [String] :transition_default_minimum_object_size
|
305
|
+
# Indicates which default minimum object size behavior is applied to the
|
306
|
+
# lifecycle configuration.
|
307
|
+
#
|
308
|
+
# * `all_storage_classes_128K` - Objects smaller than 128 KB will not
|
309
|
+
# transition to any storage class by default.
|
310
|
+
#
|
311
|
+
# * `varies_by_storage_class` - Objects smaller than 128 KB will
|
312
|
+
# transition to Glacier Flexible Retrieval or Glacier Deep Archive
|
313
|
+
# storage classes. By default, all other storage classes will prevent
|
314
|
+
# transitions smaller than 128 KB.
|
315
|
+
#
|
316
|
+
# To customize the minimum object size for any transition you can add a
|
317
|
+
# filter that specifies a custom `ObjectSizeGreaterThan` or
|
318
|
+
# `ObjectSizeLessThan` in the body of your transition rule. Custom
|
319
|
+
# filters always take precedence over the default transition behavior.
|
320
|
+
# @return [Types::PutBucketLifecycleConfigurationOutput]
|
238
321
|
def put(options = {})
|
239
322
|
options = options.merge(bucket: @bucket_name)
|
240
|
-
resp =
|
323
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
324
|
+
@client.put_bucket_lifecycle_configuration(options)
|
325
|
+
end
|
241
326
|
resp.data
|
242
327
|
end
|
243
328
|
|
@@ -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
|
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 object
|
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
|
|