aws-sdk-s3 1.87.0 → 1.143.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1106 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/bucket.rb +605 -114
  6. data/lib/aws-sdk-s3/bucket_acl.rb +36 -11
  7. data/lib/aws-sdk-s3/bucket_cors.rb +40 -15
  8. data/lib/aws-sdk-s3/bucket_lifecycle.rb +42 -15
  9. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +43 -13
  10. data/lib/aws-sdk-s3/bucket_logging.rb +40 -11
  11. data/lib/aws-sdk-s3/bucket_notification.rb +30 -12
  12. data/lib/aws-sdk-s3/bucket_policy.rb +82 -13
  13. data/lib/aws-sdk-s3/bucket_request_payment.rb +35 -13
  14. data/lib/aws-sdk-s3/bucket_tagging.rb +38 -13
  15. data/lib/aws-sdk-s3/bucket_versioning.rb +82 -21
  16. data/lib/aws-sdk-s3/bucket_website.rb +38 -13
  17. data/lib/aws-sdk-s3/client.rb +8666 -3425
  18. data/lib/aws-sdk-s3/client_api.rb +774 -225
  19. data/lib/aws-sdk-s3/customizations/bucket.rb +31 -50
  20. data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
  21. data/lib/aws-sdk-s3/customizations/object.rb +211 -37
  22. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  23. data/lib/aws-sdk-s3/customizations.rb +7 -0
  24. data/lib/aws-sdk-s3/encryption/client.rb +7 -3
  25. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
  26. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  27. data/lib/aws-sdk-s3/encryptionV2/client.rb +7 -3
  28. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -4
  29. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +3 -3
  30. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +0 -4
  31. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  32. data/lib/aws-sdk-s3/endpoint_parameters.rb +178 -0
  33. data/lib/aws-sdk-s3/endpoint_provider.rb +591 -0
  34. data/lib/aws-sdk-s3/endpoints.rb +2590 -0
  35. data/lib/aws-sdk-s3/errors.rb +1 -1
  36. data/lib/aws-sdk-s3/event_streams.rb +1 -1
  37. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  38. data/lib/aws-sdk-s3/express_credentials_cache.rb +30 -0
  39. data/lib/aws-sdk-s3/express_credentials_provider.rb +36 -0
  40. data/lib/aws-sdk-s3/file_downloader.rb +171 -41
  41. data/lib/aws-sdk-s3/file_uploader.rb +14 -7
  42. data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -8
  43. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +41 -14
  44. data/lib/aws-sdk-s3/multipart_upload.rb +198 -23
  45. data/lib/aws-sdk-s3/multipart_upload_part.rb +285 -34
  46. data/lib/aws-sdk-s3/object.rb +1824 -266
  47. data/lib/aws-sdk-s3/object_acl.rb +58 -19
  48. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  49. data/lib/aws-sdk-s3/object_multipart_copier.rb +41 -19
  50. data/lib/aws-sdk-s3/object_summary.rb +1579 -299
  51. data/lib/aws-sdk-s3/object_version.rb +372 -64
  52. data/lib/aws-sdk-s3/plugins/accelerate.rb +1 -39
  53. data/lib/aws-sdk-s3/plugins/arn.rb +25 -142
  54. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  55. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  56. data/lib/aws-sdk-s3/plugins/dualstack.rb +2 -49
  57. data/lib/aws-sdk-s3/plugins/endpoints.rb +274 -0
  58. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +3 -1
  59. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +91 -0
  60. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +1 -1
  61. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +8 -31
  62. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  63. data/lib/aws-sdk-s3/plugins/md5s.rb +6 -3
  64. data/lib/aws-sdk-s3/plugins/s3_signer.rb +35 -102
  65. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  66. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  67. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  68. data/lib/aws-sdk-s3/presigner.rb +43 -51
  69. data/lib/aws-sdk-s3/resource.rb +102 -6
  70. data/lib/aws-sdk-s3/types.rb +7404 -5114
  71. data/lib/aws-sdk-s3/waiters.rb +1 -1
  72. data/lib/aws-sdk-s3.rb +6 -2
  73. data/sig/bucket.rbs +212 -0
  74. data/sig/bucket_acl.rbs +78 -0
  75. data/sig/bucket_cors.rbs +69 -0
  76. data/sig/bucket_lifecycle.rbs +88 -0
  77. data/sig/bucket_lifecycle_configuration.rbs +111 -0
  78. data/sig/bucket_logging.rbs +76 -0
  79. data/sig/bucket_notification.rbs +114 -0
  80. data/sig/bucket_policy.rbs +59 -0
  81. data/sig/bucket_request_payment.rbs +54 -0
  82. data/sig/bucket_tagging.rbs +65 -0
  83. data/sig/bucket_versioning.rbs +77 -0
  84. data/sig/bucket_website.rbs +93 -0
  85. data/sig/client.rbs +2360 -0
  86. data/sig/errors.rbs +34 -0
  87. data/sig/multipart_upload.rbs +110 -0
  88. data/sig/multipart_upload_part.rbs +105 -0
  89. data/sig/object.rbs +436 -0
  90. data/sig/object_acl.rbs +86 -0
  91. data/sig/object_summary.rbs +334 -0
  92. data/sig/object_version.rbs +131 -0
  93. data/sig/resource.rbs +124 -0
  94. data/sig/types.rbs +2562 -0
  95. data/sig/waiters.rbs +83 -0
  96. metadata +51 -17
  97. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -62
  98. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -71
@@ -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/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -60,7 +60,9 @@ module Aws::S3
60
60
  #
61
61
  # @return [self]
62
62
  def load
63
- resp = @client.get_bucket_acl(bucket: @bucket_name)
63
+ resp = Aws::Plugins::UserAgent.feature('resource') 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::Waiters::Waiter.new(options).wait({})
180
+ Aws::Plugins::UserAgent.feature('resource') do
181
+ Aws::Waiters::Waiter.new(options).wait({})
182
+ end
179
183
  end
180
184
 
181
185
  # @!group Actions
@@ -203,6 +207,7 @@ module Aws::S3
203
207
  # },
204
208
  # },
205
209
  # content_md5: "ContentMD5",
210
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
206
211
  # grant_full_control: "GrantFullControl",
207
212
  # grant_read: "GrantRead",
208
213
  # grant_read_acp: "GrantReadACP",
@@ -221,12 +226,28 @@ module Aws::S3
221
226
  # used as a message integrity check to verify that the request body was
222
227
  # not corrupted in transit. For more information, go to [RFC 1864.][1]
223
228
  #
224
- # For requests made using the AWS Command Line Interface (CLI) or AWS
225
- # SDKs, this field is calculated automatically.
229
+ # For requests made using the Amazon Web Services Command Line Interface
230
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
231
+ # automatically.
226
232
  #
227
233
  #
228
234
  #
229
235
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
236
+ # @option options [String] :checksum_algorithm
237
+ # Indicates the algorithm used to create the checksum for the object
238
+ # when you use the SDK. This header will not provide any additional
239
+ # functionality if you don't use the SDK. When you send this header,
240
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
241
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
242
+ # status code `400 Bad Request`. For more information, see [Checking
243
+ # object integrity][1] in the *Amazon S3 User Guide*.
244
+ #
245
+ # If you provide an individual checksum, Amazon S3 ignores any provided
246
+ # `ChecksumAlgorithm` parameter.
247
+ #
248
+ #
249
+ #
250
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
230
251
  # @option options [String] :grant_full_control
231
252
  # Allows grantee the read, write, read ACP, and write ACP permissions on
232
253
  # the bucket.
@@ -235,18 +256,22 @@ module Aws::S3
235
256
  # @option options [String] :grant_read_acp
236
257
  # Allows grantee to read the bucket ACL.
237
258
  # @option options [String] :grant_write
238
- # Allows grantee to create, overwrite, and delete any object in the
239
- # bucket.
259
+ # Allows grantee to create new objects in the bucket.
260
+ #
261
+ # For the bucket and object owners of existing objects, also allows
262
+ # deletions and overwrites of those objects.
240
263
  # @option options [String] :grant_write_acp
241
264
  # Allows grantee to write the ACL for the applicable bucket.
242
265
  # @option options [String] :expected_bucket_owner
243
- # The account id of the expected bucket owner. If the bucket is owned by
244
- # a different account, the request will fail with an HTTP `403 (Access
245
- # Denied)` error.
266
+ # The account ID of the expected bucket owner. If the account ID that
267
+ # you provide does not match the actual owner of the bucket, the request
268
+ # fails with the HTTP status code `403 Forbidden` (access denied).
246
269
  # @return [EmptyStructure]
247
270
  def put(options = {})
248
271
  options = options.merge(bucket: @bucket_name)
249
- resp = @client.put_bucket_acl(options)
272
+ resp = Aws::Plugins::UserAgent.feature('resource') do
273
+ @client.put_bucket_acl(options)
274
+ end
250
275
  resp.data
251
276
  end
252
277
 
@@ -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/master/CONTRIBUTING.md
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 = @client.get_bucket_cors(bucket: @bucket_name)
58
+ resp = Aws::Plugins::UserAgent.feature('resource') do
59
+ @client.get_bucket_cors(bucket: @bucket_name)
60
+ end
59
61
  @data = resp.data
60
62
  self
61
63
  end
@@ -170,7 +172,9 @@ module Aws::S3
170
172
  :retry
171
173
  end
172
174
  end
173
- Aws::Waiters::Waiter.new(options).wait({})
175
+ Aws::Plugins::UserAgent.feature('resource') do
176
+ Aws::Waiters::Waiter.new(options).wait({})
177
+ end
174
178
  end
175
179
 
176
180
  # @!group Actions
@@ -182,13 +186,15 @@ module Aws::S3
182
186
  # })
183
187
  # @param [Hash] options ({})
184
188
  # @option options [String] :expected_bucket_owner
185
- # The account id of the expected bucket owner. If the bucket is owned by
186
- # a different account, the request will fail with an HTTP `403 (Access
187
- # Denied)` error.
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).
188
192
  # @return [EmptyStructure]
189
193
  def delete(options = {})
190
194
  options = options.merge(bucket: @bucket_name)
191
- resp = @client.delete_bucket_cors(options)
195
+ resp = Aws::Plugins::UserAgent.feature('resource') do
196
+ @client.delete_bucket_cors(options)
197
+ end
192
198
  resp.data
193
199
  end
194
200
 
@@ -198,6 +204,7 @@ module Aws::S3
198
204
  # cors_configuration: { # required
199
205
  # cors_rules: [ # required
200
206
  # {
207
+ # id: "ID",
201
208
  # allowed_headers: ["AllowedHeader"],
202
209
  # allowed_methods: ["AllowedMethod"], # required
203
210
  # allowed_origins: ["AllowedOrigin"], # required
@@ -207,14 +214,14 @@ module Aws::S3
207
214
  # ],
208
215
  # },
209
216
  # content_md5: "ContentMD5",
217
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
210
218
  # expected_bucket_owner: "AccountId",
211
219
  # })
212
220
  # @param [Hash] options ({})
213
221
  # @option options [required, Types::CORSConfiguration] :cors_configuration
214
222
  # Describes the cross-origin access configuration for objects in an
215
223
  # Amazon S3 bucket. For more information, see [Enabling Cross-Origin
216
- # Resource Sharing][1] in the *Amazon Simple Storage Service Developer
217
- # Guide*.
224
+ # Resource Sharing][1] in the *Amazon S3 User Guide*.
218
225
  #
219
226
  #
220
227
  #
@@ -224,20 +231,38 @@ module Aws::S3
224
231
  # used as a message integrity check to verify that the request body was
225
232
  # not corrupted in transit. For more information, go to [RFC 1864.][1]
226
233
  #
227
- # For requests made using the AWS Command Line Interface (CLI) or AWS
228
- # SDKs, this field is calculated automatically.
234
+ # For requests made using the Amazon Web Services Command Line Interface
235
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
236
+ # automatically.
229
237
  #
230
238
  #
231
239
  #
232
240
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
241
+ # @option options [String] :checksum_algorithm
242
+ # Indicates the algorithm used to create the checksum for the object
243
+ # when you use the SDK. This header will not provide any additional
244
+ # functionality if you don't use the SDK. When you send this header,
245
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
246
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
247
+ # status code `400 Bad Request`. For more information, see [Checking
248
+ # object integrity][1] in the *Amazon S3 User Guide*.
249
+ #
250
+ # If you provide an individual checksum, Amazon S3 ignores any provided
251
+ # `ChecksumAlgorithm` parameter.
252
+ #
253
+ #
254
+ #
255
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
233
256
  # @option options [String] :expected_bucket_owner
234
- # The account id of the expected bucket owner. If the bucket is owned by
235
- # a different account, the request will fail with an HTTP `403 (Access
236
- # Denied)` error.
257
+ # The account ID of the expected bucket owner. If the account ID that
258
+ # you provide does not match the actual owner of the bucket, the request
259
+ # fails with the HTTP status code `403 Forbidden` (access denied).
237
260
  # @return [EmptyStructure]
238
261
  def put(options = {})
239
262
  options = options.merge(bucket: @bucket_name)
240
- resp = @client.put_bucket_cors(options)
263
+ resp = Aws::Plugins::UserAgent.feature('resource') do
264
+ @client.put_bucket_cors(options)
265
+ end
241
266
  resp.data
242
267
  end
243
268
 
@@ -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/master/CONTRIBUTING.md
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 = @client.get_bucket_lifecycle(bucket: @bucket_name)
57
+ resp = Aws::Plugins::UserAgent.feature('resource') do
58
+ @client.get_bucket_lifecycle(bucket: @bucket_name)
59
+ end
58
60
  @data = resp.data
59
61
  self
60
62
  end
@@ -169,7 +171,9 @@ module Aws::S3
169
171
  :retry
170
172
  end
171
173
  end
172
- Aws::Waiters::Waiter.new(options).wait({})
174
+ Aws::Plugins::UserAgent.feature('resource') do
175
+ Aws::Waiters::Waiter.new(options).wait({})
176
+ end
173
177
  end
174
178
 
175
179
  # @!group Actions
@@ -181,13 +185,15 @@ module Aws::S3
181
185
  # })
182
186
  # @param [Hash] options ({})
183
187
  # @option options [String] :expected_bucket_owner
184
- # The account id of the expected bucket owner. If the bucket is owned by
185
- # a different account, the request will fail with an HTTP `403 (Access
186
- # Denied)` error.
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).
187
191
  # @return [EmptyStructure]
188
192
  def delete(options = {})
189
193
  options = options.merge(bucket: @bucket_name)
190
- resp = @client.delete_bucket_lifecycle(options)
194
+ resp = Aws::Plugins::UserAgent.feature('resource') do
195
+ @client.delete_bucket_lifecycle(options)
196
+ end
191
197
  resp.data
192
198
  end
193
199
 
@@ -195,6 +201,7 @@ module Aws::S3
195
201
  #
196
202
  # bucket_lifecycle.put({
197
203
  # content_md5: "ContentMD5",
204
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
198
205
  # lifecycle_configuration: {
199
206
  # rules: [ # required
200
207
  # {
@@ -209,14 +216,16 @@ module Aws::S3
209
216
  # transition: {
210
217
  # date: Time.now,
211
218
  # days: 1,
212
- # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
219
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
213
220
  # },
214
221
  # noncurrent_version_transition: {
215
222
  # noncurrent_days: 1,
216
- # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
223
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
224
+ # newer_noncurrent_versions: 1,
217
225
  # },
218
226
  # noncurrent_version_expiration: {
219
227
  # noncurrent_days: 1,
228
+ # newer_noncurrent_versions: 1,
220
229
  # },
221
230
  # abort_incomplete_multipart_upload: {
222
231
  # days_after_initiation: 1,
@@ -228,17 +237,35 @@ module Aws::S3
228
237
  # })
229
238
  # @param [Hash] options ({})
230
239
  # @option options [String] :content_md5
231
- # For requests made using the AWS Command Line Interface (CLI) or AWS
232
- # SDKs, this field is calculated automatically.
240
+ # For requests made using the Amazon Web Services Command Line Interface
241
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
242
+ # automatically.
243
+ # @option options [String] :checksum_algorithm
244
+ # Indicates the algorithm used to create the checksum for the object
245
+ # when you use the SDK. This header will not provide any additional
246
+ # functionality if you don't use the SDK. When you send this header,
247
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
248
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
249
+ # status code `400 Bad Request`. For more information, see [Checking
250
+ # object integrity][1] in the *Amazon S3 User Guide*.
251
+ #
252
+ # If you provide an individual checksum, Amazon S3 ignores any provided
253
+ # `ChecksumAlgorithm` parameter.
254
+ #
255
+ #
256
+ #
257
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
233
258
  # @option options [Types::LifecycleConfiguration] :lifecycle_configuration
234
259
  # @option options [String] :expected_bucket_owner
235
- # The account id of the expected bucket owner. If the bucket is owned by
236
- # a different account, the request will fail with an HTTP `403 (Access
237
- # Denied)` error.
260
+ # The account ID of the expected bucket owner. If the account ID that
261
+ # you provide does not match the actual owner of the bucket, the request
262
+ # fails with the HTTP status code `403 Forbidden` (access denied).
238
263
  # @return [EmptyStructure]
239
264
  def put(options = {})
240
265
  options = options.merge(bucket: @bucket_name)
241
- resp = @client.put_bucket_lifecycle(options)
266
+ resp = Aws::Plugins::UserAgent.feature('resource') do
267
+ @client.put_bucket_lifecycle(options)
268
+ end
242
269
  resp.data
243
270
  end
244
271
 
@@ -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/master/CONTRIBUTING.md
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 = @client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
57
+ resp = Aws::Plugins::UserAgent.feature('resource') do
58
+ @client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
59
+ end
58
60
  @data = resp.data
59
61
  self
60
62
  end
@@ -169,7 +171,9 @@ module Aws::S3
169
171
  :retry
170
172
  end
171
173
  end
172
- Aws::Waiters::Waiter.new(options).wait({})
174
+ Aws::Plugins::UserAgent.feature('resource') do
175
+ Aws::Waiters::Waiter.new(options).wait({})
176
+ end
173
177
  end
174
178
 
175
179
  # @!group Actions
@@ -181,19 +185,22 @@ module Aws::S3
181
185
  # })
182
186
  # @param [Hash] options ({})
183
187
  # @option options [String] :expected_bucket_owner
184
- # The account id of the expected bucket owner. If the bucket is owned by
185
- # a different account, the request will fail with an HTTP `403 (Access
186
- # Denied)` error.
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).
187
191
  # @return [EmptyStructure]
188
192
  def delete(options = {})
189
193
  options = options.merge(bucket: @bucket_name)
190
- resp = @client.delete_bucket_lifecycle(options)
194
+ resp = Aws::Plugins::UserAgent.feature('resource') do
195
+ @client.delete_bucket_lifecycle(options)
196
+ end
191
197
  resp.data
192
198
  end
193
199
 
194
200
  # @example Request syntax with placeholder values
195
201
  #
196
202
  # bucket_lifecycle_configuration.put({
203
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
197
204
  # lifecycle_configuration: {
198
205
  # rules: [ # required
199
206
  # {
@@ -210,6 +217,8 @@ module Aws::S3
210
217
  # key: "ObjectKey", # required
211
218
  # value: "Value", # required
212
219
  # },
220
+ # object_size_greater_than: 1,
221
+ # object_size_less_than: 1,
213
222
  # and: {
214
223
  # prefix: "Prefix",
215
224
  # tags: [
@@ -218,6 +227,8 @@ module Aws::S3
218
227
  # value: "Value", # required
219
228
  # },
220
229
  # ],
230
+ # object_size_greater_than: 1,
231
+ # object_size_less_than: 1,
221
232
  # },
222
233
  # },
223
234
  # status: "Enabled", # required, accepts Enabled, Disabled
@@ -225,17 +236,19 @@ module Aws::S3
225
236
  # {
226
237
  # date: Time.now,
227
238
  # days: 1,
228
- # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
239
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
229
240
  # },
230
241
  # ],
231
242
  # noncurrent_version_transitions: [
232
243
  # {
233
244
  # noncurrent_days: 1,
234
- # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE
245
+ # storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, DEEP_ARCHIVE, GLACIER_IR
246
+ # newer_noncurrent_versions: 1,
235
247
  # },
236
248
  # ],
237
249
  # noncurrent_version_expiration: {
238
250
  # noncurrent_days: 1,
251
+ # newer_noncurrent_versions: 1,
239
252
  # },
240
253
  # abort_incomplete_multipart_upload: {
241
254
  # days_after_initiation: 1,
@@ -246,16 +259,33 @@ module Aws::S3
246
259
  # expected_bucket_owner: "AccountId",
247
260
  # })
248
261
  # @param [Hash] options ({})
262
+ # @option options [String] :checksum_algorithm
263
+ # Indicates the algorithm used to create the checksum for the object
264
+ # when you use the SDK. This header will not provide any additional
265
+ # functionality if you don't use the SDK. When you send this header,
266
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
267
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
268
+ # status code `400 Bad Request`. For more information, see [Checking
269
+ # object integrity][1] in the *Amazon S3 User Guide*.
270
+ #
271
+ # If you provide an individual checksum, Amazon S3 ignores any provided
272
+ # `ChecksumAlgorithm` parameter.
273
+ #
274
+ #
275
+ #
276
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
249
277
  # @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
250
278
  # Container for lifecycle rules. You can add as many as 1,000 rules.
251
279
  # @option options [String] :expected_bucket_owner
252
- # The account id of the expected bucket owner. If the bucket is owned by
253
- # a different account, the request will fail with an HTTP `403 (Access
254
- # Denied)` error.
280
+ # The account ID of the expected bucket owner. If the account ID that
281
+ # you provide does not match the actual owner of the bucket, the request
282
+ # fails with the HTTP status code `403 Forbidden` (access denied).
255
283
  # @return [EmptyStructure]
256
284
  def put(options = {})
257
285
  options = options.merge(bucket: @bucket_name)
258
- resp = @client.put_bucket_lifecycle_configuration(options)
286
+ resp = Aws::Plugins::UserAgent.feature('resource') do
287
+ @client.put_bucket_lifecycle_configuration(options)
288
+ end
259
289
  resp.data
260
290
  end
261
291
 
@@ -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/master/CONTRIBUTING.md
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 Simple Storage Service API
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 = @client.get_bucket_logging(bucket: @bucket_name)
63
+ resp = Aws::Plugins::UserAgent.feature('resource') 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::Waiters::Waiter.new(options).wait({})
180
+ Aws::Plugins::UserAgent.feature('resource') do
181
+ Aws::Waiters::Waiter.new(options).wait({})
182
+ end
180
183
  end
181
184
 
182
185
  # @!group Actions
@@ -200,9 +203,17 @@ 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
206
217
  # expected_bucket_owner: "AccountId",
207
218
  # })
208
219
  # @param [Hash] options ({})
@@ -211,16 +222,34 @@ module Aws::S3
211
222
  # @option options [String] :content_md5
212
223
  # The MD5 hash of the `PutBucketLogging` request body.
213
224
  #
214
- # For requests made using the AWS Command Line Interface (CLI) or AWS
215
- # SDKs, this field is calculated automatically.
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
216
243
  # @option options [String] :expected_bucket_owner
217
- # The account id of the expected bucket owner. If the bucket is owned by
218
- # a different account, the request will fail with an HTTP `403 (Access
219
- # Denied)` error.
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).
220
247
  # @return [EmptyStructure]
221
248
  def put(options = {})
222
249
  options = options.merge(bucket: @bucket_name)
223
- resp = @client.put_bucket_logging(options)
250
+ resp = Aws::Plugins::UserAgent.feature('resource') do
251
+ @client.put_bucket_logging(options)
252
+ end
224
253
  resp.data
225
254
  end
226
255