aws-sdk-s3 1.61.1 → 1.166.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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1255 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  6. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  7. data/lib/aws-sdk-s3/bucket.rb +814 -112
  8. data/lib/aws-sdk-s3/bucket_acl.rb +54 -17
  9. data/lib/aws-sdk-s3/bucket_cors.rb +63 -20
  10. data/lib/aws-sdk-s3/bucket_lifecycle.rb +63 -19
  11. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +64 -19
  12. data/lib/aws-sdk-s3/bucket_logging.rb +58 -17
  13. data/lib/aws-sdk-s3/bucket_notification.rb +47 -20
  14. data/lib/aws-sdk-s3/bucket_policy.rb +104 -17
  15. data/lib/aws-sdk-s3/bucket_region_cache.rb +11 -5
  16. data/lib/aws-sdk-s3/bucket_request_payment.rb +53 -19
  17. data/lib/aws-sdk-s3/bucket_tagging.rb +60 -17
  18. data/lib/aws-sdk-s3/bucket_versioning.rb +106 -17
  19. data/lib/aws-sdk-s3/bucket_website.rb +64 -19
  20. data/lib/aws-sdk-s3/client.rb +11280 -3232
  21. data/lib/aws-sdk-s3/client_api.rb +1078 -197
  22. data/lib/aws-sdk-s3/customizations/bucket.rb +33 -45
  23. data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
  24. data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
  25. data/lib/aws-sdk-s3/customizations/object.rb +237 -39
  26. data/lib/aws-sdk-s3/customizations/object_summary.rb +10 -0
  27. data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
  28. data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
  29. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  30. data/lib/aws-sdk-s3/customizations.rb +27 -28
  31. data/lib/aws-sdk-s3/encryption/client.rb +25 -8
  32. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
  33. data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
  34. data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
  35. data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
  36. data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
  37. data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
  38. data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
  39. data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
  40. data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
  41. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +46 -11
  42. data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
  43. data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
  44. data/lib/aws-sdk-s3/encryption.rb +4 -0
  45. data/lib/aws-sdk-s3/encryptionV2/client.rb +570 -0
  46. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +223 -0
  47. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
  48. data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
  49. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
  50. data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
  51. data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
  52. data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
  53. data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
  54. data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
  55. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +173 -0
  56. data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
  57. data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
  58. data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
  59. data/lib/aws-sdk-s3/endpoint_parameters.rb +186 -0
  60. data/lib/aws-sdk-s3/endpoint_provider.rb +592 -0
  61. data/lib/aws-sdk-s3/endpoints.rb +2392 -0
  62. data/lib/aws-sdk-s3/errors.rb +27 -1
  63. data/lib/aws-sdk-s3/event_streams.rb +8 -1
  64. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  65. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  66. data/lib/aws-sdk-s3/file_downloader.rb +176 -44
  67. data/lib/aws-sdk-s3/file_part.rb +2 -0
  68. data/lib/aws-sdk-s3/file_uploader.rb +28 -8
  69. data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
  70. data/lib/aws-sdk-s3/multipart_file_uploader.rb +69 -13
  71. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +49 -18
  72. data/lib/aws-sdk-s3/multipart_upload.rb +242 -25
  73. data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
  74. data/lib/aws-sdk-s3/multipart_upload_part.rb +343 -31
  75. data/lib/aws-sdk-s3/object.rb +2240 -218
  76. data/lib/aws-sdk-s3/object_acl.rb +80 -21
  77. data/lib/aws-sdk-s3/object_copier.rb +9 -5
  78. data/lib/aws-sdk-s3/object_multipart_copier.rb +48 -22
  79. data/lib/aws-sdk-s3/object_summary.rb +1900 -178
  80. data/lib/aws-sdk-s3/object_version.rb +449 -59
  81. data/lib/aws-sdk-s3/plugins/accelerate.rb +17 -64
  82. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  83. data/lib/aws-sdk-s3/plugins/arn.rb +70 -0
  84. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +5 -41
  85. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +3 -6
  86. data/lib/aws-sdk-s3/plugins/dualstack.rb +7 -50
  87. data/lib/aws-sdk-s3/plugins/endpoints.rb +289 -0
  88. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +5 -4
  89. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
  90. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
  91. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +60 -15
  92. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +11 -27
  93. data/lib/aws-sdk-s3/plugins/location_constraint.rb +5 -1
  94. data/lib/aws-sdk-s3/plugins/md5s.rb +32 -26
  95. data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
  96. data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
  97. data/lib/aws-sdk-s3/plugins/s3_signer.rb +50 -88
  98. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  99. data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
  100. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +139 -0
  101. data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
  102. data/lib/aws-sdk-s3/presigned_post.rb +160 -103
  103. data/lib/aws-sdk-s3/presigner.rb +136 -61
  104. data/lib/aws-sdk-s3/resource.rb +120 -15
  105. data/lib/aws-sdk-s3/types.rb +9683 -4358
  106. data/lib/aws-sdk-s3/waiters.rb +67 -1
  107. data/lib/aws-sdk-s3.rb +40 -29
  108. data/sig/bucket.rbs +213 -0
  109. data/sig/bucket_acl.rbs +78 -0
  110. data/sig/bucket_cors.rbs +69 -0
  111. data/sig/bucket_lifecycle.rbs +88 -0
  112. data/sig/bucket_lifecycle_configuration.rbs +111 -0
  113. data/sig/bucket_logging.rbs +76 -0
  114. data/sig/bucket_notification.rbs +114 -0
  115. data/sig/bucket_policy.rbs +59 -0
  116. data/sig/bucket_request_payment.rbs +54 -0
  117. data/sig/bucket_tagging.rbs +65 -0
  118. data/sig/bucket_versioning.rbs +77 -0
  119. data/sig/bucket_website.rbs +93 -0
  120. data/sig/client.rbs +2397 -0
  121. data/sig/customizations/bucket.rbs +19 -0
  122. data/sig/customizations/object.rbs +38 -0
  123. data/sig/customizations/object_summary.rbs +35 -0
  124. data/sig/errors.rbs +34 -0
  125. data/sig/multipart_upload.rbs +111 -0
  126. data/sig/multipart_upload_part.rbs +105 -0
  127. data/sig/object.rbs +443 -0
  128. data/sig/object_acl.rbs +86 -0
  129. data/sig/object_summary.rbs +335 -0
  130. data/sig/object_version.rbs +137 -0
  131. data/sig/resource.rbs +130 -0
  132. data/sig/types.rbs +2585 -0
  133. data/sig/waiters.rbs +95 -0
  134. metadata +73 -15
  135. data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -211
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
@@ -52,7 +54,9 @@ module Aws::S3
52
54
  #
53
55
  # @return [self]
54
56
  def load
55
- resp = @client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
+ @client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
59
+ end
56
60
  @data = resp.data
57
61
  self
58
62
  end
@@ -78,7 +82,8 @@ module Aws::S3
78
82
  # Waiter polls an API operation until a resource enters a desired
79
83
  # state.
80
84
  #
81
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
85
+ # @note The waiting operation is performed on a copy. The original resource
86
+ # remains unchanged.
82
87
  #
83
88
  # ## Basic Usage
84
89
  #
@@ -91,13 +96,15 @@ module Aws::S3
91
96
  #
92
97
  # ## Example
93
98
  #
94
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
99
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
100
+ # instance.state.name == 'running'
101
+ # end
95
102
  #
96
103
  # ## Configuration
97
104
  #
98
105
  # You can configure the maximum number of polling attempts, and the
99
- # delay (in seconds) between each polling attempt. The waiting condition is set
100
- # by passing a block to {#wait_until}:
106
+ # delay (in seconds) between each polling attempt. The waiting condition is
107
+ # set by passing a block to {#wait_until}:
101
108
  #
102
109
  # # poll for ~25 seconds
103
110
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -128,17 +135,16 @@ module Aws::S3
128
135
  # # resource did not enter the desired state in time
129
136
  # end
130
137
  #
138
+ # @yieldparam [Resource] resource to be used in the waiting condition.
131
139
  #
132
- # @yield param [Resource] resource to be used in the waiting condition
133
- #
134
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
135
- # because the waiter has entered a state that it will not transition
136
- # out of, preventing success.
140
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
141
+ # terminates because the waiter has entered a state that it will not
142
+ # transition out of, preventing success.
137
143
  #
138
144
  # yet successful.
139
145
  #
140
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
141
- # while polling for a resource that is not expected.
146
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
147
+ # encountered while polling for a resource that is not expected.
142
148
  #
143
149
  # @raise [NotImplementedError] Raised when the resource does not
144
150
  #
@@ -165,25 +171,36 @@ module Aws::S3
165
171
  :retry
166
172
  end
167
173
  end
168
- Aws::Waiters::Waiter.new(options).wait({})
174
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
175
+ Aws::Waiters::Waiter.new(options).wait({})
176
+ end
169
177
  end
170
178
 
171
179
  # @!group Actions
172
180
 
173
181
  # @example Request syntax with placeholder values
174
182
  #
175
- # bucket_lifecycle_configuration.delete()
183
+ # bucket_lifecycle_configuration.delete({
184
+ # expected_bucket_owner: "AccountId",
185
+ # })
176
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).
177
191
  # @return [EmptyStructure]
178
192
  def delete(options = {})
179
193
  options = options.merge(bucket: @bucket_name)
180
- resp = @client.delete_bucket_lifecycle(options)
194
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
195
+ @client.delete_bucket_lifecycle(options)
196
+ end
181
197
  resp.data
182
198
  end
183
199
 
184
200
  # @example Request syntax with placeholder values
185
201
  #
186
202
  # bucket_lifecycle_configuration.put({
203
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
187
204
  # lifecycle_configuration: {
188
205
  # rules: [ # required
189
206
  # {
@@ -200,6 +217,8 @@ module Aws::S3
200
217
  # key: "ObjectKey", # required
201
218
  # value: "Value", # required
202
219
  # },
220
+ # object_size_greater_than: 1,
221
+ # object_size_less_than: 1,
203
222
  # and: {
204
223
  # prefix: "Prefix",
205
224
  # tags: [
@@ -208,6 +227,8 @@ module Aws::S3
208
227
  # value: "Value", # required
209
228
  # },
210
229
  # ],
230
+ # object_size_greater_than: 1,
231
+ # object_size_less_than: 1,
211
232
  # },
212
233
  # },
213
234
  # status: "Enabled", # required, accepts Enabled, Disabled
@@ -215,17 +236,19 @@ module Aws::S3
215
236
  # {
216
237
  # date: Time.now,
217
238
  # days: 1,
218
- # 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
219
240
  # },
220
241
  # ],
221
242
  # noncurrent_version_transitions: [
222
243
  # {
223
244
  # noncurrent_days: 1,
224
- # 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,
225
247
  # },
226
248
  # ],
227
249
  # noncurrent_version_expiration: {
228
250
  # noncurrent_days: 1,
251
+ # newer_noncurrent_versions: 1,
229
252
  # },
230
253
  # abort_incomplete_multipart_upload: {
231
254
  # days_after_initiation: 1,
@@ -233,14 +256,36 @@ module Aws::S3
233
256
  # },
234
257
  # ],
235
258
  # },
259
+ # expected_bucket_owner: "AccountId",
236
260
  # })
237
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
238
277
  # @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
239
278
  # Container for lifecycle rules. You can add as many as 1,000 rules.
279
+ # @option options [String] :expected_bucket_owner
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).
240
283
  # @return [EmptyStructure]
241
284
  def put(options = {})
242
285
  options = options.merge(bucket: @bucket_name)
243
- resp = @client.put_bucket_lifecycle_configuration(options)
286
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
287
+ @client.put_bucket_lifecycle_configuration(options)
288
+ end
244
289
  resp.data
245
290
  end
246
291
 
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
@@ -34,8 +36,7 @@ module Aws::S3
34
36
 
35
37
  # Describes where logs are stored and the prefix that Amazon S3 assigns
36
38
  # to all log object keys for a bucket. For more information, see [PUT
37
- # Bucket logging][1] in the *Amazon Simple Storage Service API
38
- # Reference*.
39
+ # Bucket logging][1] in the *Amazon S3 API Reference*.
39
40
  #
40
41
  #
41
42
  #
@@ -59,7 +60,9 @@ module Aws::S3
59
60
  #
60
61
  # @return [self]
61
62
  def load
62
- 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
63
66
  @data = resp.data
64
67
  self
65
68
  end
@@ -85,7 +88,8 @@ module Aws::S3
85
88
  # Waiter polls an API operation until a resource enters a desired
86
89
  # state.
87
90
  #
88
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
91
+ # @note The waiting operation is performed on a copy. The original resource
92
+ # remains unchanged.
89
93
  #
90
94
  # ## Basic Usage
91
95
  #
@@ -98,13 +102,15 @@ module Aws::S3
98
102
  #
99
103
  # ## Example
100
104
  #
101
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
105
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
106
+ # instance.state.name == 'running'
107
+ # end
102
108
  #
103
109
  # ## Configuration
104
110
  #
105
111
  # You can configure the maximum number of polling attempts, and the
106
- # delay (in seconds) between each polling attempt. The waiting condition is set
107
- # by passing a block to {#wait_until}:
112
+ # delay (in seconds) between each polling attempt. The waiting condition is
113
+ # set by passing a block to {#wait_until}:
108
114
  #
109
115
  # # poll for ~25 seconds
110
116
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -135,17 +141,16 @@ module Aws::S3
135
141
  # # resource did not enter the desired state in time
136
142
  # end
137
143
  #
144
+ # @yieldparam [Resource] resource to be used in the waiting condition.
138
145
  #
139
- # @yield param [Resource] resource to be used in the waiting condition
140
- #
141
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
142
- # because the waiter has entered a state that it will not transition
143
- # out of, preventing success.
146
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
147
+ # terminates because the waiter has entered a state that it will not
148
+ # transition out of, preventing success.
144
149
  #
145
150
  # yet successful.
146
151
  #
147
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
148
- # while polling for a resource that is not expected.
152
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
153
+ # encountered while polling for a resource that is not expected.
149
154
  #
150
155
  # @raise [NotImplementedError] Raised when the resource does not
151
156
  #
@@ -172,7 +177,9 @@ module Aws::S3
172
177
  :retry
173
178
  end
174
179
  end
175
- Aws::Waiters::Waiter.new(options).wait({})
180
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
181
+ Aws::Waiters::Waiter.new(options).wait({})
182
+ end
176
183
  end
177
184
 
178
185
  # @!group Actions
@@ -196,19 +203,53 @@ module Aws::S3
196
203
  # },
197
204
  # ],
198
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
+ # },
199
213
  # },
200
214
  # },
201
215
  # content_md5: "ContentMD5",
216
+ # checksum_algorithm: "CRC32", # accepts CRC32, CRC32C, SHA1, SHA256
217
+ # expected_bucket_owner: "AccountId",
202
218
  # })
203
219
  # @param [Hash] options ({})
204
220
  # @option options [required, Types::BucketLoggingStatus] :bucket_logging_status
205
221
  # Container for logging status information.
206
222
  # @option options [String] :content_md5
207
223
  # The MD5 hash of the `PutBucketLogging` request body.
224
+ #
225
+ # For requests made using the Amazon Web Services Command Line Interface
226
+ # (CLI) or Amazon Web Services SDKs, this field is calculated
227
+ # automatically.
228
+ # @option options [String] :checksum_algorithm
229
+ # Indicates the algorithm used to create the checksum for the object
230
+ # when you use the SDK. This header will not provide any additional
231
+ # functionality if you don't use the SDK. When you send this header,
232
+ # there must be a corresponding `x-amz-checksum` or `x-amz-trailer`
233
+ # header sent. Otherwise, Amazon S3 fails the request with the HTTP
234
+ # status code `400 Bad Request`. For more information, see [Checking
235
+ # object integrity][1] in the *Amazon S3 User Guide*.
236
+ #
237
+ # If you provide an individual checksum, Amazon S3 ignores any provided
238
+ # `ChecksumAlgorithm` parameter.
239
+ #
240
+ #
241
+ #
242
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
243
+ # @option options [String] :expected_bucket_owner
244
+ # The account ID of the expected bucket owner. If the account ID that
245
+ # you provide does not match the actual owner of the bucket, the request
246
+ # fails with the HTTP status code `403 Forbidden` (access denied).
208
247
  # @return [EmptyStructure]
209
248
  def put(options = {})
210
249
  options = options.merge(bucket: @bucket_name)
211
- resp = @client.put_bucket_logging(options)
250
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
251
+ @client.put_bucket_logging(options)
252
+ end
212
253
  resp.data
213
254
  end
214
255
 
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
4
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
5
7
  #
6
8
  # WARNING ABOUT GENERATED CODE
7
9
 
@@ -46,13 +48,19 @@ module Aws::S3
46
48
  data[:queue_configurations]
47
49
  end
48
50
 
49
- # Describes the AWS Lambda functions to invoke and the events for which
50
- # to invoke them.
51
+ # Describes the Lambda functions to invoke and the events for which to
52
+ # invoke them.
51
53
  # @return [Array<Types::LambdaFunctionConfiguration>]
52
54
  def lambda_function_configurations
53
55
  data[:lambda_function_configurations]
54
56
  end
55
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
+
56
64
  # @!endgroup
57
65
 
58
66
  # @return [Client]
@@ -67,7 +75,9 @@ module Aws::S3
67
75
  #
68
76
  # @return [self]
69
77
  def load
70
- 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
71
81
  @data = resp.data
72
82
  self
73
83
  end
@@ -93,7 +103,8 @@ module Aws::S3
93
103
  # Waiter polls an API operation until a resource enters a desired
94
104
  # state.
95
105
  #
96
- # @note The waiting operation is performed on a copy. The original resource remains unchanged
106
+ # @note The waiting operation is performed on a copy. The original resource
107
+ # remains unchanged.
97
108
  #
98
109
  # ## Basic Usage
99
110
  #
@@ -106,13 +117,15 @@ module Aws::S3
106
117
  #
107
118
  # ## Example
108
119
  #
109
- # instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
120
+ # instance.wait_until(max_attempts:10, delay:5) do |instance|
121
+ # instance.state.name == 'running'
122
+ # end
110
123
  #
111
124
  # ## Configuration
112
125
  #
113
126
  # You can configure the maximum number of polling attempts, and the
114
- # delay (in seconds) between each polling attempt. The waiting condition is set
115
- # by passing a block to {#wait_until}:
127
+ # delay (in seconds) between each polling attempt. The waiting condition is
128
+ # set by passing a block to {#wait_until}:
116
129
  #
117
130
  # # poll for ~25 seconds
118
131
  # resource.wait_until(max_attempts:5,delay:5) {|resource|...}
@@ -143,17 +156,16 @@ module Aws::S3
143
156
  # # resource did not enter the desired state in time
144
157
  # end
145
158
  #
159
+ # @yieldparam [Resource] resource to be used in the waiting condition.
146
160
  #
147
- # @yield param [Resource] resource to be used in the waiting condition
148
- #
149
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
150
- # because the waiter has entered a state that it will not transition
151
- # out of, preventing success.
161
+ # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
162
+ # terminates because the waiter has entered a state that it will not
163
+ # transition out of, preventing success.
152
164
  #
153
165
  # yet successful.
154
166
  #
155
- # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
156
- # while polling for a resource that is not expected.
167
+ # @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
168
+ # encountered while polling for a resource that is not expected.
157
169
  #
158
170
  # @raise [NotImplementedError] Raised when the resource does not
159
171
  #
@@ -180,7 +192,9 @@ module Aws::S3
180
192
  :retry
181
193
  end
182
194
  end
183
- Aws::Waiters::Waiter.new(options).wait({})
195
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
196
+ Aws::Waiters::Waiter.new(options).wait({})
197
+ end
184
198
  end
185
199
 
186
200
  # @!group Actions
@@ -193,7 +207,7 @@ module Aws::S3
193
207
  # {
194
208
  # id: "NotificationId",
195
209
  # topic_arn: "TopicArn", # required
196
- # 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
197
211
  # filter: {
198
212
  # key: {
199
213
  # filter_rules: [
@@ -210,7 +224,7 @@ module Aws::S3
210
224
  # {
211
225
  # id: "NotificationId",
212
226
  # queue_arn: "QueueArn", # required
213
- # 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
214
228
  # filter: {
215
229
  # key: {
216
230
  # filter_rules: [
@@ -227,7 +241,7 @@ module Aws::S3
227
241
  # {
228
242
  # id: "NotificationId",
229
243
  # lambda_function_arn: "LambdaFunctionArn", # required
230
- # 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
231
245
  # filter: {
232
246
  # key: {
233
247
  # filter_rules: [
@@ -240,17 +254,30 @@ module Aws::S3
240
254
  # },
241
255
  # },
242
256
  # ],
257
+ # event_bridge_configuration: {
258
+ # },
243
259
  # },
260
+ # expected_bucket_owner: "AccountId",
261
+ # skip_destination_validation: false,
244
262
  # })
245
263
  # @param [Hash] options ({})
246
264
  # @option options [required, Types::NotificationConfiguration] :notification_configuration
247
265
  # A container for specifying the notification configuration of the
248
266
  # bucket. If this element is empty, notifications are turned off for the
249
267
  # bucket.
268
+ # @option options [String] :expected_bucket_owner
269
+ # The account ID of the expected bucket owner. If the account ID that
270
+ # you provide does not match the actual owner of the bucket, the request
271
+ # fails with the HTTP status code `403 Forbidden` (access denied).
272
+ # @option options [Boolean] :skip_destination_validation
273
+ # Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations.
274
+ # True or false value.
250
275
  # @return [EmptyStructure]
251
276
  def put(options = {})
252
277
  options = options.merge(bucket: @bucket_name)
253
- 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
254
281
  resp.data
255
282
  end
256
283