aws-sdk-s3 1.103.0 → 1.202.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.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +664 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  6. data/lib/aws-sdk-s3/bucket.rb +858 -116
  7. data/lib/aws-sdk-s3/bucket_acl.rb +32 -9
  8. data/lib/aws-sdk-s3/bucket_cors.rb +38 -13
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +43 -12
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +100 -13
  11. data/lib/aws-sdk-s3/bucket_logging.rb +35 -6
  12. data/lib/aws-sdk-s3/bucket_notification.rb +27 -9
  13. data/lib/aws-sdk-s3/bucket_policy.rb +79 -10
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +29 -7
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +35 -11
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +108 -17
  18. data/lib/aws-sdk-s3/bucket_website.rb +35 -11
  19. data/lib/aws-sdk-s3/client.rb +11799 -3636
  20. data/lib/aws-sdk-s3/client_api.rb +1201 -276
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
  22. data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
  23. data/lib/aws-sdk-s3/customizations/object.rb +216 -70
  24. data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
  25. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  26. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  27. data/lib/aws-sdk-s3/customizations.rb +27 -29
  28. data/lib/aws-sdk-s3/default_executor.rb +103 -0
  29. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  30. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  31. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  32. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  33. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  34. data/lib/aws-sdk-s3/endpoint_parameters.rb +181 -0
  35. data/lib/aws-sdk-s3/endpoint_provider.rb +716 -0
  36. data/lib/aws-sdk-s3/endpoints.rb +1518 -0
  37. data/lib/aws-sdk-s3/errors.rb +58 -0
  38. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  39. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  40. data/lib/aws-sdk-s3/file_downloader.rb +241 -87
  41. data/lib/aws-sdk-s3/file_uploader.rb +16 -13
  42. data/lib/aws-sdk-s3/legacy_signer.rb +2 -1
  43. data/lib/aws-sdk-s3/multipart_download_error.rb +8 -0
  44. data/lib/aws-sdk-s3/multipart_file_uploader.rb +108 -86
  45. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +110 -92
  46. data/lib/aws-sdk-s3/multipart_upload.rb +294 -19
  47. data/lib/aws-sdk-s3/multipart_upload_error.rb +3 -4
  48. data/lib/aws-sdk-s3/multipart_upload_part.rb +297 -31
  49. data/lib/aws-sdk-s3/object.rb +2224 -269
  50. data/lib/aws-sdk-s3/object_acl.rb +59 -17
  51. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  52. data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -23
  53. data/lib/aws-sdk-s3/object_summary.rb +1915 -220
  54. data/lib/aws-sdk-s3/object_version.rb +450 -58
  55. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -44
  56. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  57. data/lib/aws-sdk-s3/plugins/arn.rb +0 -197
  58. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  59. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  60. data/lib/aws-sdk-s3/plugins/checksum_algorithm.rb +31 -0
  61. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -55
  62. data/lib/aws-sdk-s3/plugins/endpoints.rb +86 -0
  63. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  64. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +88 -0
  65. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +55 -18
  66. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
  67. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  68. data/lib/aws-sdk-s3/plugins/md5s.rb +10 -68
  69. data/lib/aws-sdk-s3/plugins/s3_signer.rb +42 -111
  70. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +28 -9
  71. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -1
  72. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  73. data/lib/aws-sdk-s3/presigner.rb +32 -41
  74. data/lib/aws-sdk-s3/resource.rb +139 -12
  75. data/lib/aws-sdk-s3/transfer_manager.rb +304 -0
  76. data/lib/aws-sdk-s3/types.rb +10204 -5378
  77. data/lib/aws-sdk-s3.rb +35 -27
  78. data/sig/bucket.rbs +231 -0
  79. data/sig/bucket_acl.rbs +78 -0
  80. data/sig/bucket_cors.rbs +69 -0
  81. data/sig/bucket_lifecycle.rbs +88 -0
  82. data/sig/bucket_lifecycle_configuration.rbs +115 -0
  83. data/sig/bucket_logging.rbs +76 -0
  84. data/sig/bucket_notification.rbs +114 -0
  85. data/sig/bucket_policy.rbs +59 -0
  86. data/sig/bucket_request_payment.rbs +54 -0
  87. data/sig/bucket_tagging.rbs +65 -0
  88. data/sig/bucket_versioning.rbs +77 -0
  89. data/sig/bucket_website.rbs +93 -0
  90. data/sig/client.rbs +2586 -0
  91. data/sig/customizations/bucket.rbs +19 -0
  92. data/sig/customizations/object.rbs +38 -0
  93. data/sig/customizations/object_summary.rbs +35 -0
  94. data/sig/errors.rbs +44 -0
  95. data/sig/multipart_upload.rbs +120 -0
  96. data/sig/multipart_upload_part.rbs +109 -0
  97. data/sig/object.rbs +464 -0
  98. data/sig/object_acl.rbs +86 -0
  99. data/sig/object_summary.rbs +347 -0
  100. data/sig/object_version.rbs +143 -0
  101. data/sig/resource.rbs +141 -0
  102. data/sig/types.rbs +2868 -0
  103. data/sig/waiters.rbs +95 -0
  104. metadata +51 -16
  105. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  106. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -69
  107. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  108. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -73
  109. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -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.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::Waiters::Waiter.new(options).wait({})
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,6 +207,7 @@ 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",
@@ -217,9 +222,10 @@ module Aws::S3
217
222
  # Contains the elements that set the ACL permissions for an object per
218
223
  # grantee.
219
224
  # @option options [String] :content_md5
220
- # The base64-encoded 128-bit MD5 digest of the data. This header must be
221
- # used as a message integrity check to verify that the request body was
222
- # not corrupted in transit. For more information, go to [RFC 1864.][1]
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]
223
229
  #
224
230
  # For requests made using the Amazon Web Services Command Line Interface
225
231
  # (CLI) or Amazon Web Services SDKs, this field is calculated
@@ -228,6 +234,21 @@ module Aws::S3
228
234
  #
229
235
  #
230
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
231
252
  # @option options [String] :grant_full_control
232
253
  # Allows grantee the read, write, read ACP, and write ACP permissions on
233
254
  # the bucket.
@@ -243,13 +264,15 @@ module Aws::S3
243
264
  # @option options [String] :grant_write_acp
244
265
  # Allows grantee to write the ACL for the applicable bucket.
245
266
  # @option options [String] :expected_bucket_owner
246
- # The account ID of the expected bucket owner. If the bucket is owned by
247
- # a different account, the request will fail with an HTTP `403 (Access
248
- # Denied)` error.
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).
249
270
  # @return [EmptyStructure]
250
271
  def put(options = {})
251
272
  options = options.merge(bucket: @bucket_name)
252
- resp = @client.put_bucket_acl(options)
273
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
274
+ @client.put_bucket_acl(options)
275
+ end
253
276
  resp.data
254
277
  end
255
278
 
@@ -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.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,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.metric('RESOURCE_MODEL') 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.metric('RESOURCE_MODEL') do
196
+ @client.delete_bucket_cors(options)
197
+ end
192
198
  resp.data
193
199
  end
194
200
 
@@ -208,6 +214,7 @@ module Aws::S3
208
214
  # ],
209
215
  # },
210
216
  # content_md5: "ContentMD5",
217
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
211
218
  # expected_bucket_owner: "AccountId",
212
219
  # })
213
220
  # @param [Hash] options ({})
@@ -220,9 +227,10 @@ module Aws::S3
220
227
  #
221
228
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
222
229
  # @option options [String] :content_md5
223
- # The base64-encoded 128-bit MD5 digest of the data. This header must be
224
- # used as a message integrity check to verify that the request body was
225
- # not corrupted in transit. For more information, go to [RFC 1864.][1]
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]
226
234
  #
227
235
  # For requests made using the Amazon Web Services Command Line Interface
228
236
  # (CLI) or Amazon Web Services SDKs, this field is calculated
@@ -231,14 +239,31 @@ module Aws::S3
231
239
  #
232
240
  #
233
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
234
257
  # @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.
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).
238
261
  # @return [EmptyStructure]
239
262
  def put(options = {})
240
263
  options = options.merge(bucket: @bucket_name)
241
- resp = @client.put_bucket_cors(options)
264
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
265
+ @client.put_bucket_cors(options)
266
+ end
242
267
  resp.data
243
268
  end
244
269
 
@@ -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.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,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.metric('RESOURCE_MODEL') do
175
+ Aws::Waiters::Waiter.new(options).wait({})
176
+ end
173
177
  end
174
178
 
175
179
  # @!group Actions
@@ -181,13 +185,20 @@ 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).
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>
187
196
  # @return [EmptyStructure]
188
197
  def delete(options = {})
189
198
  options = options.merge(bucket: @bucket_name)
190
- resp = @client.delete_bucket_lifecycle(options)
199
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
200
+ @client.delete_bucket_lifecycle(options)
201
+ end
191
202
  resp.data
192
203
  end
193
204
 
@@ -195,6 +206,7 @@ module Aws::S3
195
206
  #
196
207
  # bucket_lifecycle.put({
197
208
  # content_md5: "ContentMD5",
209
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
198
210
  # lifecycle_configuration: {
199
211
  # rules: [ # required
200
212
  # {
@@ -209,14 +221,16 @@ module Aws::S3
209
221
  # transition: {
210
222
  # date: Time.now,
211
223
  # days: 1,
212
- # 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
213
225
  # },
214
226
  # noncurrent_version_transition: {
215
227
  # noncurrent_days: 1,
216
- # 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,
217
230
  # },
218
231
  # noncurrent_version_expiration: {
219
232
  # noncurrent_days: 1,
233
+ # newer_noncurrent_versions: 1,
220
234
  # },
221
235
  # abort_incomplete_multipart_upload: {
222
236
  # days_after_initiation: 1,
@@ -231,15 +245,32 @@ module Aws::S3
231
245
  # For requests made using the Amazon Web Services Command Line Interface
232
246
  # (CLI) or Amazon Web Services SDKs, this field is calculated
233
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
234
263
  # @option options [Types::LifecycleConfiguration] :lifecycle_configuration
235
264
  # @option options [String] :expected_bucket_owner
236
- # The account ID of the expected bucket owner. If the bucket is owned by
237
- # a different account, the request will fail with an HTTP `403 (Access
238
- # Denied)` error.
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).
239
268
  # @return [EmptyStructure]
240
269
  def put(options = {})
241
270
  options = options.merge(bucket: @bucket_name)
242
- resp = @client.put_bucket_lifecycle(options)
271
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
272
+ @client.put_bucket_lifecycle(options)
273
+ end
243
274
  resp.data
244
275
  end
245
276
 
@@ -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 = @client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
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,7 +196,9 @@ module Aws::S3
169
196
  :retry
170
197
  end
171
198
  end
172
- Aws::Waiters::Waiter.new(options).wait({})
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
@@ -181,19 +210,27 @@ module Aws::S3
181
210
  # })
182
211
  # @param [Hash] options ({})
183
212
  # @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.
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>
187
221
  # @return [EmptyStructure]
188
222
  def delete(options = {})
189
223
  options = options.merge(bucket: @bucket_name)
190
- resp = @client.delete_bucket_lifecycle(options)
224
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
225
+ @client.delete_bucket_lifecycle(options)
226
+ end
191
227
  resp.data
192
228
  end
193
229
 
194
230
  # @example Request syntax with placeholder values
195
231
  #
196
232
  # bucket_lifecycle_configuration.put({
233
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
197
234
  # lifecycle_configuration: {
198
235
  # rules: [ # required
199
236
  # {
@@ -210,6 +247,8 @@ module Aws::S3
210
247
  # key: "ObjectKey", # required
211
248
  # value: "Value", # required
212
249
  # },
250
+ # object_size_greater_than: 1,
251
+ # object_size_less_than: 1,
213
252
  # and: {
214
253
  # prefix: "Prefix",
215
254
  # tags: [
@@ -218,6 +257,8 @@ module Aws::S3
218
257
  # value: "Value", # required
219
258
  # },
220
259
  # ],
260
+ # object_size_greater_than: 1,
261
+ # object_size_less_than: 1,
221
262
  # },
222
263
  # },
223
264
  # status: "Enabled", # required, accepts Enabled, Disabled
@@ -225,17 +266,19 @@ module Aws::S3
225
266
  # {
226
267
  # date: Time.now,
227
268
  # days: 1,
228
- # 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
229
270
  # },
230
271
  # ],
231
272
  # noncurrent_version_transitions: [
232
273
  # {
233
274
  # noncurrent_days: 1,
234
- # 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,
235
277
  # },
236
278
  # ],
237
279
  # noncurrent_version_expiration: {
238
280
  # noncurrent_days: 1,
281
+ # newer_noncurrent_versions: 1,
239
282
  # },
240
283
  # abort_incomplete_multipart_upload: {
241
284
  # days_after_initiation: 1,
@@ -244,18 +287,62 @@ module Aws::S3
244
287
  # ],
245
288
  # },
246
289
  # expected_bucket_owner: "AccountId",
290
+ # transition_default_minimum_object_size: "varies_by_storage_class", # accepts varies_by_storage_class, all_storage_classes_128K
247
291
  # })
248
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
249
308
  # @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
250
309
  # Container for lifecycle rules. You can add as many as 1,000 rules.
251
310
  # @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.
255
- # @return [EmptyStructure]
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]
256
341
  def put(options = {})
257
342
  options = options.merge(bucket: @bucket_name)
258
- resp = @client.put_bucket_lifecycle_configuration(options)
343
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
344
+ @client.put_bucket_lifecycle_configuration(options)
345
+ end
259
346
  resp.data
260
347
  end
261
348
 
@@ -60,7 +60,9 @@ module Aws::S3
60
60
  #
61
61
  # @return [self]
62
62
  def load
63
- resp = @client.get_bucket_logging(bucket: @bucket_name)
63
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
64
+ @client.get_bucket_logging(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.metric('RESOURCE_MODEL') do
181
+ Aws::Waiters::Waiter.new(options).wait({})
182
+ end
179
183
  end
180
184
 
181
185
  # @!group Actions
@@ -199,9 +203,17 @@ module Aws::S3
199
203
  # },
200
204
  # ],
201
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
+ # },
202
213
  # },
203
214
  # },
204
215
  # content_md5: "ContentMD5",
216
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256, CRC64NVME
205
217
  # expected_bucket_owner: "AccountId",
206
218
  # })
207
219
  # @param [Hash] options ({})
@@ -213,14 +225,31 @@ module Aws::S3
213
225
  # For requests made using the Amazon Web Services Command Line Interface
214
226
  # (CLI) or Amazon Web Services SDKs, this field is calculated
215
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
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.metric('RESOURCE_MODEL') do
251
+ @client.put_bucket_logging(options)
252
+ end
224
253
  resp.data
225
254
  end
226
255
 
@@ -55,6 +55,12 @@ module Aws::S3
55
55
  data[:lambda_function_configurations]
56
56
  end
57
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
+
58
64
  # @!endgroup
59
65
 
60
66
  # @return [Client]
@@ -69,7 +75,9 @@ module Aws::S3
69
75
  #
70
76
  # @return [self]
71
77
  def load
72
- resp = @client.get_bucket_notification_configuration(bucket: @bucket_name)
78
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
79
+ @client.get_bucket_notification_configuration(bucket: @bucket_name)
80
+ end
73
81
  @data = resp.data
74
82
  self
75
83
  end
@@ -184,7 +192,9 @@ module Aws::S3
184
192
  :retry
185
193
  end
186
194
  end
187
- Aws::Waiters::Waiter.new(options).wait({})
195
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
196
+ Aws::Waiters::Waiter.new(options).wait({})
197
+ end
188
198
  end
189
199
 
190
200
  # @!group Actions
@@ -197,7 +207,7 @@ module Aws::S3
197
207
  # {
198
208
  # id: "NotificationId",
199
209
  # topic_arn: "TopicArn", # required
200
- # 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
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
201
211
  # filter: {
202
212
  # key: {
203
213
  # filter_rules: [
@@ -214,7 +224,7 @@ module Aws::S3
214
224
  # {
215
225
  # id: "NotificationId",
216
226
  # queue_arn: "QueueArn", # required
217
- # 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
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
218
228
  # filter: {
219
229
  # key: {
220
230
  # filter_rules: [
@@ -231,7 +241,7 @@ module Aws::S3
231
241
  # {
232
242
  # id: "NotificationId",
233
243
  # lambda_function_arn: "LambdaFunctionArn", # required
234
- # 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
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
235
245
  # filter: {
236
246
  # key: {
237
247
  # filter_rules: [
@@ -244,8 +254,11 @@ module Aws::S3
244
254
  # },
245
255
  # },
246
256
  # ],
257
+ # event_bridge_configuration: {
258
+ # },
247
259
  # },
248
260
  # expected_bucket_owner: "AccountId",
261
+ # skip_destination_validation: false,
249
262
  # })
250
263
  # @param [Hash] options ({})
251
264
  # @option options [required, Types::NotificationConfiguration] :notification_configuration
@@ -253,13 +266,18 @@ module Aws::S3
253
266
  # bucket. If this element is empty, notifications are turned off for the
254
267
  # bucket.
255
268
  # @option options [String] :expected_bucket_owner
256
- # The account ID of the expected bucket owner. If the bucket is owned by
257
- # a different account, the request will fail with an HTTP `403 (Access
258
- # Denied)` error.
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.
259
275
  # @return [EmptyStructure]
260
276
  def put(options = {})
261
277
  options = options.merge(bucket: @bucket_name)
262
- resp = @client.put_bucket_notification_configuration(options)
278
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
279
+ @client.put_bucket_notification_configuration(options)
280
+ end
263
281
  resp.data
264
282
  end
265
283