aws-sdk-s3 1.30.1 → 1.112.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +883 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +69 -0
- data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +69 -0
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +74 -0
- data/lib/aws-sdk-s3/bucket.rb +298 -77
- data/lib/aws-sdk-s3/bucket_acl.rb +41 -14
- data/lib/aws-sdk-s3/bucket_cors.rb +51 -13
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +38 -15
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +40 -15
- data/lib/aws-sdk-s3/bucket_logging.rb +36 -15
- data/lib/aws-sdk-s3/bucket_notification.rb +44 -15
- data/lib/aws-sdk-s3/bucket_policy.rb +35 -13
- data/lib/aws-sdk-s3/bucket_region_cache.rb +2 -0
- data/lib/aws-sdk-s3/bucket_request_payment.rb +35 -12
- data/lib/aws-sdk-s3/bucket_tagging.rb +43 -13
- data/lib/aws-sdk-s3/bucket_versioning.rb +70 -12
- data/lib/aws-sdk-s3/bucket_website.rb +50 -13
- data/lib/aws-sdk-s3/client.rb +7889 -661
- data/lib/aws-sdk-s3/client_api.rb +436 -2
- data/lib/aws-sdk-s3/customizations/bucket.rb +59 -16
- data/lib/aws-sdk-s3/customizations/multipart_upload.rb +2 -0
- data/lib/aws-sdk-s3/customizations/object.rb +200 -62
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/types/list_object_versions_output.rb +2 -0
- data/lib/aws-sdk-s3/customizations.rb +4 -1
- data/lib/aws-sdk-s3/encryption/client.rb +23 -6
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +71 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +43 -5
- data/lib/aws-sdk-s3/encryption/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +13 -2
- data/lib/aws-sdk-s3/encryption/errors.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/io_decrypter.rb +11 -3
- data/lib/aws-sdk-s3/encryption/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryption/key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +34 -3
- data/lib/aws-sdk-s3/encryption/materials.rb +8 -6
- data/lib/aws-sdk-s3/encryption/utils.rb +25 -0
- data/lib/aws-sdk-s3/encryption.rb +4 -0
- data/lib/aws-sdk-s3/encryptionV2/client.rb +566 -0
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +222 -0
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +170 -0
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +40 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +65 -0
- data/lib/aws-sdk-s3/encryptionV2/errors.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +58 -0
- data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +37 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +73 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +31 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +169 -0
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +60 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +103 -0
- data/lib/aws-sdk-s3/encryption_v2.rb +23 -0
- data/lib/aws-sdk-s3/errors.rb +123 -1
- data/lib/aws-sdk-s3/event_streams.rb +20 -7
- data/lib/aws-sdk-s3/file_downloader.rb +17 -10
- data/lib/aws-sdk-s3/file_part.rb +11 -6
- data/lib/aws-sdk-s3/file_uploader.rb +33 -14
- data/lib/aws-sdk-s3/legacy_signer.rb +17 -25
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +53 -13
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +20 -7
- data/lib/aws-sdk-s3/multipart_upload.rb +64 -28
- data/lib/aws-sdk-s3/multipart_upload_error.rb +2 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +117 -43
- data/lib/aws-sdk-s3/object.rb +656 -152
- data/lib/aws-sdk-s3/object_acl.rb +65 -20
- data/lib/aws-sdk-s3/object_copier.rb +2 -0
- data/lib/aws-sdk-s3/object_multipart_copier.rb +2 -0
- data/lib/aws-sdk-s3/object_summary.rb +485 -138
- data/lib/aws-sdk-s3/object_version.rb +117 -60
- data/lib/aws-sdk-s3/plugins/accelerate.rb +38 -38
- data/lib/aws-sdk-s3/plugins/arn.rb +254 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +8 -8
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +25 -3
- data/lib/aws-sdk-s3/plugins/dualstack.rb +38 -33
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +4 -4
- data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +3 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +11 -3
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +73 -0
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +2 -0
- data/lib/aws-sdk-s3/plugins/md5s.rb +30 -28
- data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
- data/lib/aws-sdk-s3/plugins/redirects.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_host_id.rb +2 -0
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +89 -36
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +3 -1
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +118 -0
- data/lib/aws-sdk-s3/plugins/url_encoded_keys.rb +2 -0
- data/lib/aws-sdk-s3/presigned_post.rb +101 -49
- data/lib/aws-sdk-s3/presigner.rb +168 -66
- data/lib/aws-sdk-s3/resource.rb +41 -5
- data/lib/aws-sdk-s3/types.rb +6768 -1033
- data/lib/aws-sdk-s3/waiters.rb +67 -1
- data/lib/aws-sdk-s3.rb +12 -6
- metadata +37 -13
@@ -1,11 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
4
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
5
7
|
#
|
6
8
|
# WARNING ABOUT GENERATED CODE
|
7
9
|
|
8
10
|
module Aws::S3
|
11
|
+
|
9
12
|
class BucketVersioning
|
10
13
|
|
11
14
|
extend Aws::Deprecations
|
@@ -21,6 +24,7 @@ module Aws::S3
|
|
21
24
|
@bucket_name = extract_bucket_name(args, options)
|
22
25
|
@data = options.delete(:data)
|
23
26
|
@client = options.delete(:client) || Client.new(options)
|
27
|
+
@waiter_block_warned = false
|
24
28
|
end
|
25
29
|
|
26
30
|
# @!group Read-Only Attributes
|
@@ -85,7 +89,8 @@ module Aws::S3
|
|
85
89
|
# Waiter polls an API operation until a resource enters a desired
|
86
90
|
# state.
|
87
91
|
#
|
88
|
-
# @note The waiting operation is performed on a copy. The original resource
|
92
|
+
# @note The waiting operation is performed on a copy. The original resource
|
93
|
+
# remains unchanged.
|
89
94
|
#
|
90
95
|
# ## Basic Usage
|
91
96
|
#
|
@@ -98,13 +103,15 @@ module Aws::S3
|
|
98
103
|
#
|
99
104
|
# ## Example
|
100
105
|
#
|
101
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
106
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
107
|
+
# instance.state.name == 'running'
|
108
|
+
# end
|
102
109
|
#
|
103
110
|
# ## Configuration
|
104
111
|
#
|
105
112
|
# You can configure the maximum number of polling attempts, and the
|
106
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
107
|
-
# by passing a block to {#wait_until}:
|
113
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
114
|
+
# set by passing a block to {#wait_until}:
|
108
115
|
#
|
109
116
|
# # poll for ~25 seconds
|
110
117
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -135,17 +142,16 @@ module Aws::S3
|
|
135
142
|
# # resource did not enter the desired state in time
|
136
143
|
# end
|
137
144
|
#
|
145
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
138
146
|
#
|
139
|
-
# @
|
140
|
-
#
|
141
|
-
#
|
142
|
-
# because the waiter has entered a state that it will not transition
|
143
|
-
# out of, preventing success.
|
147
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
148
|
+
# terminates because the waiter has entered a state that it will not
|
149
|
+
# transition out of, preventing success.
|
144
150
|
#
|
145
151
|
# yet successful.
|
146
152
|
#
|
147
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
148
|
-
# while polling for a resource that is not expected.
|
153
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
154
|
+
# encountered while polling for a resource that is not expected.
|
149
155
|
#
|
150
156
|
# @raise [NotImplementedError] Raised when the resource does not
|
151
157
|
#
|
@@ -182,12 +188,29 @@ module Aws::S3
|
|
182
188
|
# bucket_versioning.enable({
|
183
189
|
# content_md5: "ContentMD5",
|
184
190
|
# mfa: "MFA",
|
191
|
+
# expected_bucket_owner: "AccountId",
|
185
192
|
# })
|
186
193
|
# @param [Hash] options ({})
|
187
194
|
# @option options [String] :content_md5
|
195
|
+
# >The base64-encoded 128-bit MD5 digest of the data. You must use
|
196
|
+
# this header as a message integrity check to verify that the request
|
197
|
+
# body was not corrupted in transit. For more information, see [RFC
|
198
|
+
# 1864][1].
|
199
|
+
#
|
200
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
201
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
202
|
+
# automatically.
|
203
|
+
#
|
204
|
+
#
|
205
|
+
#
|
206
|
+
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
188
207
|
# @option options [String] :mfa
|
189
208
|
# The concatenation of the authentication device's serial number, a
|
190
209
|
# space, and the value that is displayed on your authentication device.
|
210
|
+
# @option options [String] :expected_bucket_owner
|
211
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
212
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
213
|
+
# Denied)` error.
|
191
214
|
# @return [EmptyStructure]
|
192
215
|
def enable(options = {})
|
193
216
|
options = Aws::Util.deep_merge(options,
|
@@ -209,13 +232,31 @@ module Aws::S3
|
|
209
232
|
# mfa_delete: "Enabled", # accepts Enabled, Disabled
|
210
233
|
# status: "Enabled", # accepts Enabled, Suspended
|
211
234
|
# },
|
235
|
+
# expected_bucket_owner: "AccountId",
|
212
236
|
# })
|
213
237
|
# @param [Hash] options ({})
|
214
238
|
# @option options [String] :content_md5
|
239
|
+
# >The base64-encoded 128-bit MD5 digest of the data. You must use
|
240
|
+
# this header as a message integrity check to verify that the request
|
241
|
+
# body was not corrupted in transit. For more information, see [RFC
|
242
|
+
# 1864][1].
|
243
|
+
#
|
244
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
245
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
246
|
+
# automatically.
|
247
|
+
#
|
248
|
+
#
|
249
|
+
#
|
250
|
+
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
215
251
|
# @option options [String] :mfa
|
216
252
|
# The concatenation of the authentication device's serial number, a
|
217
253
|
# space, and the value that is displayed on your authentication device.
|
218
254
|
# @option options [required, Types::VersioningConfiguration] :versioning_configuration
|
255
|
+
# Container for setting the versioning state.
|
256
|
+
# @option options [String] :expected_bucket_owner
|
257
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
258
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
259
|
+
# Denied)` error.
|
219
260
|
# @return [EmptyStructure]
|
220
261
|
def put(options = {})
|
221
262
|
options = options.merge(bucket: @bucket_name)
|
@@ -228,12 +269,29 @@ module Aws::S3
|
|
228
269
|
# bucket_versioning.suspend({
|
229
270
|
# content_md5: "ContentMD5",
|
230
271
|
# mfa: "MFA",
|
272
|
+
# expected_bucket_owner: "AccountId",
|
231
273
|
# })
|
232
274
|
# @param [Hash] options ({})
|
233
275
|
# @option options [String] :content_md5
|
276
|
+
# >The base64-encoded 128-bit MD5 digest of the data. You must use
|
277
|
+
# this header as a message integrity check to verify that the request
|
278
|
+
# body was not corrupted in transit. For more information, see [RFC
|
279
|
+
# 1864][1].
|
280
|
+
#
|
281
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
282
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
283
|
+
# automatically.
|
284
|
+
#
|
285
|
+
#
|
286
|
+
#
|
287
|
+
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
234
288
|
# @option options [String] :mfa
|
235
289
|
# The concatenation of the authentication device's serial number, a
|
236
290
|
# space, and the value that is displayed on your authentication device.
|
291
|
+
# @option options [String] :expected_bucket_owner
|
292
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
293
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
294
|
+
# Denied)` error.
|
237
295
|
# @return [EmptyStructure]
|
238
296
|
def suspend(options = {})
|
239
297
|
options = Aws::Util.deep_merge(options,
|
@@ -1,11 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
4
|
-
# https://github.com/aws/aws-sdk-ruby/blob/
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
5
7
|
#
|
6
8
|
# WARNING ABOUT GENERATED CODE
|
7
9
|
|
8
10
|
module Aws::S3
|
11
|
+
|
9
12
|
class BucketWebsite
|
10
13
|
|
11
14
|
extend Aws::Deprecations
|
@@ -21,6 +24,7 @@ module Aws::S3
|
|
21
24
|
@bucket_name = extract_bucket_name(args, options)
|
22
25
|
@data = options.delete(:data)
|
23
26
|
@client = options.delete(:client) || Client.new(options)
|
27
|
+
@waiter_block_warned = false
|
24
28
|
end
|
25
29
|
|
26
30
|
# @!group Read-Only Attributes
|
@@ -30,21 +34,29 @@ module Aws::S3
|
|
30
34
|
@bucket_name
|
31
35
|
end
|
32
36
|
|
37
|
+
# Specifies the redirect behavior of all requests to a website endpoint
|
38
|
+
# of an Amazon S3 bucket.
|
33
39
|
# @return [Types::RedirectAllRequestsTo]
|
34
40
|
def redirect_all_requests_to
|
35
41
|
data[:redirect_all_requests_to]
|
36
42
|
end
|
37
43
|
|
44
|
+
# The name of the index document for the website (for example
|
45
|
+
# `index.html`).
|
38
46
|
# @return [Types::IndexDocument]
|
39
47
|
def index_document
|
40
48
|
data[:index_document]
|
41
49
|
end
|
42
50
|
|
51
|
+
# The object key name of the website error document to use for 4XX class
|
52
|
+
# errors.
|
43
53
|
# @return [Types::ErrorDocument]
|
44
54
|
def error_document
|
45
55
|
data[:error_document]
|
46
56
|
end
|
47
57
|
|
58
|
+
# Rules that define when a redirect is applied and the redirect
|
59
|
+
# behavior.
|
48
60
|
# @return [Array<Types::RoutingRule>]
|
49
61
|
def routing_rules
|
50
62
|
data[:routing_rules]
|
@@ -90,7 +102,8 @@ module Aws::S3
|
|
90
102
|
# Waiter polls an API operation until a resource enters a desired
|
91
103
|
# state.
|
92
104
|
#
|
93
|
-
# @note The waiting operation is performed on a copy. The original resource
|
105
|
+
# @note The waiting operation is performed on a copy. The original resource
|
106
|
+
# remains unchanged.
|
94
107
|
#
|
95
108
|
# ## Basic Usage
|
96
109
|
#
|
@@ -103,13 +116,15 @@ module Aws::S3
|
|
103
116
|
#
|
104
117
|
# ## Example
|
105
118
|
#
|
106
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
119
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
120
|
+
# instance.state.name == 'running'
|
121
|
+
# end
|
107
122
|
#
|
108
123
|
# ## Configuration
|
109
124
|
#
|
110
125
|
# You can configure the maximum number of polling attempts, and the
|
111
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
112
|
-
# by passing a block to {#wait_until}:
|
126
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
127
|
+
# set by passing a block to {#wait_until}:
|
113
128
|
#
|
114
129
|
# # poll for ~25 seconds
|
115
130
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -140,17 +155,16 @@ module Aws::S3
|
|
140
155
|
# # resource did not enter the desired state in time
|
141
156
|
# end
|
142
157
|
#
|
158
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
143
159
|
#
|
144
|
-
# @
|
145
|
-
#
|
146
|
-
#
|
147
|
-
# because the waiter has entered a state that it will not transition
|
148
|
-
# out of, preventing success.
|
160
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
161
|
+
# terminates because the waiter has entered a state that it will not
|
162
|
+
# transition out of, preventing success.
|
149
163
|
#
|
150
164
|
# yet successful.
|
151
165
|
#
|
152
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
153
|
-
# while polling for a resource that is not expected.
|
166
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
167
|
+
# encountered while polling for a resource that is not expected.
|
154
168
|
#
|
155
169
|
# @raise [NotImplementedError] Raised when the resource does not
|
156
170
|
#
|
@@ -184,8 +198,14 @@ module Aws::S3
|
|
184
198
|
|
185
199
|
# @example Request syntax with placeholder values
|
186
200
|
#
|
187
|
-
# bucket_website.delete(
|
201
|
+
# bucket_website.delete({
|
202
|
+
# expected_bucket_owner: "AccountId",
|
203
|
+
# })
|
188
204
|
# @param [Hash] options ({})
|
205
|
+
# @option options [String] :expected_bucket_owner
|
206
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
207
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
208
|
+
# Denied)` error.
|
189
209
|
# @return [EmptyStructure]
|
190
210
|
def delete(options = {})
|
191
211
|
options = options.merge(bucket: @bucket_name)
|
@@ -224,10 +244,27 @@ module Aws::S3
|
|
224
244
|
# },
|
225
245
|
# ],
|
226
246
|
# },
|
247
|
+
# expected_bucket_owner: "AccountId",
|
227
248
|
# })
|
228
249
|
# @param [Hash] options ({})
|
229
250
|
# @option options [String] :content_md5
|
251
|
+
# The base64-encoded 128-bit MD5 digest of the data. You must use this
|
252
|
+
# header as a message integrity check to verify that the request body
|
253
|
+
# was not corrupted in transit. For more information, see [RFC 1864][1].
|
254
|
+
#
|
255
|
+
# For requests made using the Amazon Web Services Command Line Interface
|
256
|
+
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
257
|
+
# automatically.
|
258
|
+
#
|
259
|
+
#
|
260
|
+
#
|
261
|
+
# [1]: http://www.ietf.org/rfc/rfc1864.txt
|
230
262
|
# @option options [required, Types::WebsiteConfiguration] :website_configuration
|
263
|
+
# Container for the request.
|
264
|
+
# @option options [String] :expected_bucket_owner
|
265
|
+
# The account ID of the expected bucket owner. If the bucket is owned by
|
266
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
267
|
+
# Denied)` error.
|
231
268
|
# @return [EmptyStructure]
|
232
269
|
def put(options = {})
|
233
270
|
options = options.merge(bucket: @bucket_name)
|