aws-sdk-s3 1.79.1 → 1.212.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 +1548 -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 +900 -98
- data/lib/aws-sdk-s3/bucket_acl.rb +44 -10
- data/lib/aws-sdk-s3/bucket_cors.rb +51 -11
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +53 -8
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +107 -9
- data/lib/aws-sdk-s3/bucket_logging.rb +43 -6
- data/lib/aws-sdk-s3/bucket_notification.rb +32 -9
- data/lib/aws-sdk-s3/bucket_policy.rb +90 -6
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +38 -8
- data/lib/aws-sdk-s3/bucket_tagging.rb +46 -7
- data/lib/aws-sdk-s3/bucket_versioning.rb +127 -9
- data/lib/aws-sdk-s3/bucket_website.rb +46 -7
- data/lib/aws-sdk-s3/client.rb +13729 -3146
- data/lib/aws-sdk-s3/client_api.rb +1604 -277
- data/lib/aws-sdk-s3/customizations/bucket.rb +31 -47
- data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
- data/lib/aws-sdk-s3/customizations/object.rb +253 -82
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +28 -29
- data/lib/aws-sdk-s3/default_executor.rb +103 -0
- data/lib/aws-sdk-s3/encryption/client.rb +9 -5
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +15 -9
- data/lib/aws-sdk-s3/encryptionV2/client.rb +105 -26
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +7 -165
- data/lib/aws-sdk-s3/encryptionV2/decryption.rb +205 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +20 -3
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +2 -4
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +18 -6
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +5 -0
- data/lib/aws-sdk-s3/encryptionV3/client.rb +885 -0
- data/lib/aws-sdk-s3/encryptionV3/decrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/decryption.rb +244 -0
- data/lib/aws-sdk-s3/encryptionV3/default_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/default_key_provider.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/encrypt_handler.rb +98 -0
- data/lib/aws-sdk-s3/encryptionV3/errors.rb +47 -0
- data/lib/aws-sdk-s3/encryptionV3/io_auth_decrypter.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV3/io_decrypter.rb +35 -0
- data/lib/aws-sdk-s3/encryptionV3/io_encrypter.rb +84 -0
- data/lib/aws-sdk-s3/encryptionV3/key_provider.rb +28 -0
- data/lib/aws-sdk-s3/encryptionV3/kms_cipher_provider.rb +159 -0
- data/lib/aws-sdk-s3/encryptionV3/materials.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV3/utils.rb +321 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +1 -0
- data/lib/aws-sdk-s3/encryption_v3.rb +24 -0
- data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +889 -0
- data/lib/aws-sdk-s3/endpoints.rb +1544 -0
- data/lib/aws-sdk-s3/errors.rb +80 -1
- data/lib/aws-sdk-s3/event_streams.rb +1 -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 +258 -82
- data/lib/aws-sdk-s3/file_uploader.rb +25 -14
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -26
- data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +111 -86
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +110 -92
- data/lib/aws-sdk-s3/multipart_upload.rb +304 -14
- data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +344 -20
- data/lib/aws-sdk-s3/object.rb +2457 -225
- data/lib/aws-sdk-s3/object_acl.rb +76 -15
- data/lib/aws-sdk-s3/object_copier.rb +7 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -23
- data/lib/aws-sdk-s3/object_summary.rb +2033 -169
- data/lib/aws-sdk-s3/object_version.rb +470 -53
- data/lib/aws-sdk-s3/plugins/accelerate.rb +1 -39
- 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 +3 -41
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
- data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +44 -0
- data/lib/aws-sdk-s3/plugins/dualstack.rb +2 -49
- data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +3 -1
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +1 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +87 -26
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +8 -26
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +10 -68
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +48 -88
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +28 -9
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
- data/lib/aws-sdk-s3/presigned_post.rb +99 -78
- data/lib/aws-sdk-s3/presigner.rb +50 -42
- data/lib/aws-sdk-s3/resource.rb +144 -15
- data/lib/aws-sdk-s3/transfer_manager.rb +321 -0
- data/lib/aws-sdk-s3/types.rb +12223 -4723
- data/lib/aws-sdk-s3/waiters.rb +1 -1
- data/lib/aws-sdk-s3.rb +37 -28
- data/sig/bucket.rbs +231 -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 +2612 -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 +44 -0
- data/sig/multipart_upload.rbs +120 -0
- data/sig/multipart_upload_part.rbs +109 -0
- data/sig/object.rbs +464 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +347 -0
- data/sig/object_version.rbs +143 -0
- data/sig/resource.rbs +141 -0
- data/sig/types.rbs +2899 -0
- data/sig/waiters.rbs +95 -0
- metadata +74 -16
- data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -212
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -34,7 +34,7 @@ module Aws::S3
|
|
|
34
34
|
@bucket_name
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
# Container for the bucket owner's
|
|
37
|
+
# Container for the bucket owner's ID.
|
|
38
38
|
# @return [Types::Owner]
|
|
39
39
|
def owner
|
|
40
40
|
data[:owner]
|
|
@@ -60,7 +60,9 @@ module Aws::S3
|
|
|
60
60
|
#
|
|
61
61
|
# @return [self]
|
|
62
62
|
def load
|
|
63
|
-
resp =
|
|
63
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
64
|
+
@client.get_bucket_acl(bucket: @bucket_name)
|
|
65
|
+
end
|
|
64
66
|
@data = resp.data
|
|
65
67
|
self
|
|
66
68
|
end
|
|
@@ -175,7 +177,9 @@ module Aws::S3
|
|
|
175
177
|
:retry
|
|
176
178
|
end
|
|
177
179
|
end
|
|
178
|
-
Aws::
|
|
180
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
181
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
182
|
+
end
|
|
179
183
|
end
|
|
180
184
|
|
|
181
185
|
# @!group Actions
|
|
@@ -203,11 +207,13 @@ module Aws::S3
|
|
|
203
207
|
# },
|
|
204
208
|
# },
|
|
205
209
|
# content_md5: "ContentMD5",
|
|
210
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
206
211
|
# grant_full_control: "GrantFullControl",
|
|
207
212
|
# grant_read: "GrantRead",
|
|
208
213
|
# grant_read_acp: "GrantReadACP",
|
|
209
214
|
# grant_write: "GrantWrite",
|
|
210
215
|
# grant_write_acp: "GrantWriteACP",
|
|
216
|
+
# expected_bucket_owner: "AccountId",
|
|
211
217
|
# })
|
|
212
218
|
# @param [Hash] options ({})
|
|
213
219
|
# @option options [String] :acl
|
|
@@ -216,13 +222,33 @@ module Aws::S3
|
|
|
216
222
|
# Contains the elements that set the ACL permissions for an object per
|
|
217
223
|
# grantee.
|
|
218
224
|
# @option options [String] :content_md5
|
|
219
|
-
# The
|
|
220
|
-
# used as a message integrity check to verify that the request body
|
|
221
|
-
# not corrupted in transit. For more information, go to [RFC
|
|
225
|
+
# The Base64 encoded 128-bit `MD5` digest of the data. This header must
|
|
226
|
+
# be used as a message integrity check to verify that the request body
|
|
227
|
+
# was not corrupted in transit. For more information, go to [RFC
|
|
228
|
+
# 1864.][1]
|
|
229
|
+
#
|
|
230
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
|
231
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
|
232
|
+
# automatically.
|
|
222
233
|
#
|
|
223
234
|
#
|
|
224
235
|
#
|
|
225
236
|
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
|
237
|
+
# @option options [String] :checksum_algorithm
|
|
238
|
+
# Indicates the algorithm used to create the checksum for the request
|
|
239
|
+
# when you use the SDK. This header will not provide any additional
|
|
240
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
241
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
242
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
243
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
|
244
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
|
245
|
+
#
|
|
246
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
247
|
+
# `ChecksumAlgorithm` parameter.
|
|
248
|
+
#
|
|
249
|
+
#
|
|
250
|
+
#
|
|
251
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
226
252
|
# @option options [String] :grant_full_control
|
|
227
253
|
# Allows grantee the read, write, read ACP, and write ACP permissions on
|
|
228
254
|
# the bucket.
|
|
@@ -231,14 +257,22 @@ module Aws::S3
|
|
|
231
257
|
# @option options [String] :grant_read_acp
|
|
232
258
|
# Allows grantee to read the bucket ACL.
|
|
233
259
|
# @option options [String] :grant_write
|
|
234
|
-
# Allows grantee to create
|
|
235
|
-
#
|
|
260
|
+
# Allows grantee to create new objects in the bucket.
|
|
261
|
+
#
|
|
262
|
+
# For the bucket and object owners of existing objects, also allows
|
|
263
|
+
# deletions and overwrites of those objects.
|
|
236
264
|
# @option options [String] :grant_write_acp
|
|
237
265
|
# Allows grantee to write the ACL for the applicable bucket.
|
|
266
|
+
# @option options [String] :expected_bucket_owner
|
|
267
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
268
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
269
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
238
270
|
# @return [EmptyStructure]
|
|
239
271
|
def put(options = {})
|
|
240
272
|
options = options.merge(bucket: @bucket_name)
|
|
241
|
-
resp =
|
|
273
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
274
|
+
@client.put_bucket_acl(options)
|
|
275
|
+
end
|
|
242
276
|
resp.data
|
|
243
277
|
end
|
|
244
278
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -55,7 +55,9 @@ module Aws::S3
|
|
|
55
55
|
#
|
|
56
56
|
# @return [self]
|
|
57
57
|
def load
|
|
58
|
-
resp =
|
|
58
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
59
|
+
@client.get_bucket_cors(bucket: @bucket_name)
|
|
60
|
+
end
|
|
59
61
|
@data = resp.data
|
|
60
62
|
self
|
|
61
63
|
end
|
|
@@ -170,19 +172,29 @@ module Aws::S3
|
|
|
170
172
|
:retry
|
|
171
173
|
end
|
|
172
174
|
end
|
|
173
|
-
Aws::
|
|
175
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
176
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
177
|
+
end
|
|
174
178
|
end
|
|
175
179
|
|
|
176
180
|
# @!group Actions
|
|
177
181
|
|
|
178
182
|
# @example Request syntax with placeholder values
|
|
179
183
|
#
|
|
180
|
-
# bucket_cors.delete(
|
|
184
|
+
# bucket_cors.delete({
|
|
185
|
+
# expected_bucket_owner: "AccountId",
|
|
186
|
+
# })
|
|
181
187
|
# @param [Hash] options ({})
|
|
188
|
+
# @option options [String] :expected_bucket_owner
|
|
189
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
190
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
191
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
182
192
|
# @return [EmptyStructure]
|
|
183
193
|
def delete(options = {})
|
|
184
194
|
options = options.merge(bucket: @bucket_name)
|
|
185
|
-
resp =
|
|
195
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
196
|
+
@client.delete_bucket_cors(options)
|
|
197
|
+
end
|
|
186
198
|
resp.data
|
|
187
199
|
end
|
|
188
200
|
|
|
@@ -192,6 +204,7 @@ module Aws::S3
|
|
|
192
204
|
# cors_configuration: { # required
|
|
193
205
|
# cors_rules: [ # required
|
|
194
206
|
# {
|
|
207
|
+
# id: "ID",
|
|
195
208
|
# allowed_headers: ["AllowedHeader"],
|
|
196
209
|
# allowed_methods: ["AllowedMethod"], # required
|
|
197
210
|
# allowed_origins: ["AllowedOrigin"], # required
|
|
@@ -201,29 +214,56 @@ module Aws::S3
|
|
|
201
214
|
# ],
|
|
202
215
|
# },
|
|
203
216
|
# content_md5: "ContentMD5",
|
|
217
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
218
|
+
# expected_bucket_owner: "AccountId",
|
|
204
219
|
# })
|
|
205
220
|
# @param [Hash] options ({})
|
|
206
221
|
# @option options [required, Types::CORSConfiguration] :cors_configuration
|
|
207
222
|
# Describes the cross-origin access configuration for objects in an
|
|
208
223
|
# Amazon S3 bucket. For more information, see [Enabling Cross-Origin
|
|
209
|
-
# Resource Sharing][1] in the *Amazon
|
|
210
|
-
# Guide*.
|
|
224
|
+
# Resource Sharing][1] in the *Amazon S3 User Guide*.
|
|
211
225
|
#
|
|
212
226
|
#
|
|
213
227
|
#
|
|
214
228
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
|
|
215
229
|
# @option options [String] :content_md5
|
|
216
|
-
# The
|
|
217
|
-
# used as a message integrity check to verify that the request body
|
|
218
|
-
# not corrupted in transit. For more information, go to [RFC
|
|
230
|
+
# The Base64 encoded 128-bit `MD5` digest of the data. This header must
|
|
231
|
+
# be used as a message integrity check to verify that the request body
|
|
232
|
+
# was not corrupted in transit. For more information, go to [RFC
|
|
233
|
+
# 1864.][1]
|
|
234
|
+
#
|
|
235
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
|
236
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
|
237
|
+
# automatically.
|
|
219
238
|
#
|
|
220
239
|
#
|
|
221
240
|
#
|
|
222
241
|
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
|
242
|
+
# @option options [String] :checksum_algorithm
|
|
243
|
+
# Indicates the algorithm used to create the checksum for the request
|
|
244
|
+
# when you use the SDK. This header will not provide any additional
|
|
245
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
246
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
247
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
248
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
|
249
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
|
250
|
+
#
|
|
251
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
252
|
+
# `ChecksumAlgorithm` parameter.
|
|
253
|
+
#
|
|
254
|
+
#
|
|
255
|
+
#
|
|
256
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
257
|
+
# @option options [String] :expected_bucket_owner
|
|
258
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
259
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
260
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
223
261
|
# @return [EmptyStructure]
|
|
224
262
|
def put(options = {})
|
|
225
263
|
options = options.merge(bucket: @bucket_name)
|
|
226
|
-
resp =
|
|
264
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
265
|
+
@client.put_bucket_cors(options)
|
|
266
|
+
end
|
|
227
267
|
resp.data
|
|
228
268
|
end
|
|
229
269
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -54,7 +54,9 @@ module Aws::S3
|
|
|
54
54
|
#
|
|
55
55
|
# @return [self]
|
|
56
56
|
def load
|
|
57
|
-
resp =
|
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
58
|
+
@client.get_bucket_lifecycle(bucket: @bucket_name)
|
|
59
|
+
end
|
|
58
60
|
@data = resp.data
|
|
59
61
|
self
|
|
60
62
|
end
|
|
@@ -169,19 +171,34 @@ module Aws::S3
|
|
|
169
171
|
:retry
|
|
170
172
|
end
|
|
171
173
|
end
|
|
172
|
-
Aws::
|
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
175
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
176
|
+
end
|
|
173
177
|
end
|
|
174
178
|
|
|
175
179
|
# @!group Actions
|
|
176
180
|
|
|
177
181
|
# @example Request syntax with placeholder values
|
|
178
182
|
#
|
|
179
|
-
# bucket_lifecycle.delete(
|
|
183
|
+
# bucket_lifecycle.delete({
|
|
184
|
+
# expected_bucket_owner: "AccountId",
|
|
185
|
+
# })
|
|
180
186
|
# @param [Hash] options ({})
|
|
187
|
+
# @option options [String] :expected_bucket_owner
|
|
188
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
189
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
190
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
191
|
+
#
|
|
192
|
+
# <note markdown="1"> This parameter applies to general purpose buckets only. It is not
|
|
193
|
+
# supported for directory bucket lifecycle configurations.
|
|
194
|
+
#
|
|
195
|
+
# </note>
|
|
181
196
|
# @return [EmptyStructure]
|
|
182
197
|
def delete(options = {})
|
|
183
198
|
options = options.merge(bucket: @bucket_name)
|
|
184
|
-
resp =
|
|
199
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
200
|
+
@client.delete_bucket_lifecycle(options)
|
|
201
|
+
end
|
|
185
202
|
resp.data
|
|
186
203
|
end
|
|
187
204
|
|
|
@@ -189,6 +206,7 @@ module Aws::S3
|
|
|
189
206
|
#
|
|
190
207
|
# bucket_lifecycle.put({
|
|
191
208
|
# content_md5: "ContentMD5",
|
|
209
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
192
210
|
# lifecycle_configuration: {
|
|
193
211
|
# rules: [ # required
|
|
194
212
|
# {
|
|
@@ -203,14 +221,16 @@ module Aws::S3
|
|
|
203
221
|
# transition: {
|
|
204
222
|
# date: Time.now,
|
|
205
223
|
# days: 1,
|
|
206
|
-
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
|
|
224
|
+
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
|
|
207
225
|
# },
|
|
208
226
|
# noncurrent_version_transition: {
|
|
209
227
|
# noncurrent_days: 1,
|
|
210
|
-
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
|
|
228
|
+
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
|
|
229
|
+
# newer_noncurrent_versions: 1,
|
|
211
230
|
# },
|
|
212
231
|
# noncurrent_version_expiration: {
|
|
213
232
|
# noncurrent_days: 1,
|
|
233
|
+
# newer_noncurrent_versions: 1,
|
|
214
234
|
# },
|
|
215
235
|
# abort_incomplete_multipart_upload: {
|
|
216
236
|
# days_after_initiation: 1,
|
|
@@ -218,14 +238,39 @@ module Aws::S3
|
|
|
218
238
|
# },
|
|
219
239
|
# ],
|
|
220
240
|
# },
|
|
241
|
+
# expected_bucket_owner: "AccountId",
|
|
221
242
|
# })
|
|
222
243
|
# @param [Hash] options ({})
|
|
223
244
|
# @option options [String] :content_md5
|
|
245
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
|
246
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
|
247
|
+
# automatically.
|
|
248
|
+
# @option options [String] :checksum_algorithm
|
|
249
|
+
# Indicates the algorithm used to create the checksum for the request
|
|
250
|
+
# when you use the SDK. This header will not provide any additional
|
|
251
|
+
# functionality if you don't use the SDK. When you send this header,
|
|
252
|
+
# there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
|
|
253
|
+
# header sent. Otherwise, Amazon S3 fails the request with the HTTP
|
|
254
|
+
# status code `400 Bad Request`. For more information, see [Checking
|
|
255
|
+
# object integrity][1] in the *Amazon S3 User Guide*.
|
|
256
|
+
#
|
|
257
|
+
# If you provide an individual checksum, Amazon S3 ignores any provided
|
|
258
|
+
# `ChecksumAlgorithm` parameter.
|
|
259
|
+
#
|
|
260
|
+
#
|
|
261
|
+
#
|
|
262
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
|
224
263
|
# @option options [Types::LifecycleConfiguration] :lifecycle_configuration
|
|
264
|
+
# @option options [String] :expected_bucket_owner
|
|
265
|
+
# The account ID of the expected bucket owner. If the account ID that
|
|
266
|
+
# you provide does not match the actual owner of the bucket, the request
|
|
267
|
+
# fails with the HTTP status code `403 Forbidden` (access denied).
|
|
225
268
|
# @return [EmptyStructure]
|
|
226
269
|
def put(options = {})
|
|
227
270
|
options = options.merge(bucket: @bucket_name)
|
|
228
|
-
resp =
|
|
271
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
272
|
+
@client.put_bucket_lifecycle(options)
|
|
273
|
+
end
|
|
229
274
|
resp.data
|
|
230
275
|
end
|
|
231
276
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -40,6 +40,31 @@ module Aws::S3
|
|
|
40
40
|
data[:rules]
|
|
41
41
|
end
|
|
42
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
|
+
|
|
43
68
|
# @!endgroup
|
|
44
69
|
|
|
45
70
|
# @return [Client]
|
|
@@ -54,7 +79,9 @@ module Aws::S3
|
|
|
54
79
|
#
|
|
55
80
|
# @return [self]
|
|
56
81
|
def load
|
|
57
|
-
resp =
|
|
82
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
83
|
+
@client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
|
|
84
|
+
end
|
|
58
85
|
@data = resp.data
|
|
59
86
|
self
|
|
60
87
|
end
|
|
@@ -169,25 +196,41 @@ module Aws::S3
|
|
|
169
196
|
:retry
|
|
170
197
|
end
|
|
171
198
|
end
|
|
172
|
-
Aws::
|
|
199
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
200
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
201
|
+
end
|
|
173
202
|
end
|
|
174
203
|
|
|
175
204
|
# @!group Actions
|
|
176
205
|
|
|
177
206
|
# @example Request syntax with placeholder values
|
|
178
207
|
#
|
|
179
|
-
# bucket_lifecycle_configuration.delete(
|
|
208
|
+
# bucket_lifecycle_configuration.delete({
|
|
209
|
+
# expected_bucket_owner: "AccountId",
|
|
210
|
+
# })
|
|
180
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>
|
|
181
221
|
# @return [EmptyStructure]
|
|
182
222
|
def delete(options = {})
|
|
183
223
|
options = options.merge(bucket: @bucket_name)
|
|
184
|
-
resp =
|
|
224
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
225
|
+
@client.delete_bucket_lifecycle(options)
|
|
226
|
+
end
|
|
185
227
|
resp.data
|
|
186
228
|
end
|
|
187
229
|
|
|
188
230
|
# @example Request syntax with placeholder values
|
|
189
231
|
#
|
|
190
232
|
# bucket_lifecycle_configuration.put({
|
|
233
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
191
234
|
# lifecycle_configuration: {
|
|
192
235
|
# rules: [ # required
|
|
193
236
|
# {
|
|
@@ -204,6 +247,8 @@ module Aws::S3
|
|
|
204
247
|
# key: "ObjectKey", # required
|
|
205
248
|
# value: "Value", # required
|
|
206
249
|
# },
|
|
250
|
+
# object_size_greater_than: 1,
|
|
251
|
+
# object_size_less_than: 1,
|
|
207
252
|
# and: {
|
|
208
253
|
# prefix: "Prefix",
|
|
209
254
|
# tags: [
|
|
@@ -212,6 +257,8 @@ module Aws::S3
|
|
|
212
257
|
# value: "Value", # required
|
|
213
258
|
# },
|
|
214
259
|
# ],
|
|
260
|
+
# object_size_greater_than: 1,
|
|
261
|
+
# object_size_less_than: 1,
|
|
215
262
|
# },
|
|
216
263
|
# },
|
|
217
264
|
# status: "Enabled", # required, accepts Enabled, Disabled
|
|
@@ -219,17 +266,19 @@ module Aws::S3
|
|
|
219
266
|
# {
|
|
220
267
|
# date: Time.now,
|
|
221
268
|
# days: 1,
|
|
222
|
-
# 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
|
|
223
270
|
# },
|
|
224
271
|
# ],
|
|
225
272
|
# noncurrent_version_transitions: [
|
|
226
273
|
# {
|
|
227
274
|
# noncurrent_days: 1,
|
|
228
|
-
# 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,
|
|
229
277
|
# },
|
|
230
278
|
# ],
|
|
231
279
|
# noncurrent_version_expiration: {
|
|
232
280
|
# noncurrent_days: 1,
|
|
281
|
+
# newer_noncurrent_versions: 1,
|
|
233
282
|
# },
|
|
234
283
|
# abort_incomplete_multipart_upload: {
|
|
235
284
|
# days_after_initiation: 1,
|
|
@@ -237,14 +286,63 @@ module Aws::S3
|
|
|
237
286
|
# },
|
|
238
287
|
# ],
|
|
239
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
|
|
240
291
|
# })
|
|
241
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
|
|
242
308
|
# @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
|
|
243
309
|
# Container for lifecycle rules. You can add as many as 1,000 rules.
|
|
244
|
-
# @
|
|
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]
|
|
245
341
|
def put(options = {})
|
|
246
342
|
options = options.merge(bucket: @bucket_name)
|
|
247
|
-
resp =
|
|
343
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
344
|
+
@client.put_bucket_lifecycle_configuration(options)
|
|
345
|
+
end
|
|
248
346
|
resp.data
|
|
249
347
|
end
|
|
250
348
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# WARNING ABOUT GENERATED CODE
|
|
4
4
|
#
|
|
5
5
|
# This file is generated. See the contributing guide for more information:
|
|
6
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
7
7
|
#
|
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
|
9
9
|
|
|
@@ -36,8 +36,7 @@ module Aws::S3
|
|
|
36
36
|
|
|
37
37
|
# Describes where logs are stored and the prefix that Amazon S3 assigns
|
|
38
38
|
# to all log object keys for a bucket. For more information, see [PUT
|
|
39
|
-
# Bucket logging][1] in the *Amazon
|
|
40
|
-
# Reference*.
|
|
39
|
+
# Bucket logging][1] in the *Amazon S3 API Reference*.
|
|
41
40
|
#
|
|
42
41
|
#
|
|
43
42
|
#
|
|
@@ -61,7 +60,9 @@ module Aws::S3
|
|
|
61
60
|
#
|
|
62
61
|
# @return [self]
|
|
63
62
|
def load
|
|
64
|
-
resp =
|
|
63
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
64
|
+
@client.get_bucket_logging(bucket: @bucket_name)
|
|
65
|
+
end
|
|
65
66
|
@data = resp.data
|
|
66
67
|
self
|
|
67
68
|
end
|
|
@@ -176,7 +177,9 @@ module Aws::S3
|
|
|
176
177
|
:retry
|
|
177
178
|
end
|
|
178
179
|
end
|
|
179
|
-
Aws::
|
|
180
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
181
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
|
182
|
+
end
|
|
180
183
|
end
|
|
181
184
|
|
|
182
185
|
# @!group Actions
|
|
@@ -200,19 +203,53 @@ module Aws::S3
|
|
|
200
203
|
# },
|
|
201
204
|
# ],
|
|
202
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
|
+
# },
|
|
203
213
|
# },
|
|
204
214
|
# },
|
|
205
215
|
# content_md5: "ContentMD5",
|
|
216
|
+
# checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
|
|
217
|
+
# expected_bucket_owner: "AccountId",
|
|
206
218
|
# })
|
|
207
219
|
# @param [Hash] options ({})
|
|
208
220
|
# @option options [required, Types::BucketLoggingStatus] :bucket_logging_status
|
|
209
221
|
# Container for logging status information.
|
|
210
222
|
# @option options [String] :content_md5
|
|
211
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).
|
|
212
247
|
# @return [EmptyStructure]
|
|
213
248
|
def put(options = {})
|
|
214
249
|
options = options.merge(bucket: @bucket_name)
|
|
215
|
-
resp =
|
|
250
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
|
251
|
+
@client.put_bucket_logging(options)
|
|
252
|
+
end
|
|
216
253
|
resp.data
|
|
217
254
|
end
|
|
218
255
|
|