aws-sdk-s3 1.150.0 → 1.169.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +110 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +12 -3
- data/lib/aws-sdk-s3/bucket.rb +252 -88
- data/lib/aws-sdk-s3/bucket_acl.rb +3 -3
- data/lib/aws-sdk-s3/bucket_cors.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +42 -5
- data/lib/aws-sdk-s3/bucket_logging.rb +3 -3
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +8 -8
- data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +4 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +5 -5
- data/lib/aws-sdk-s3/bucket_website.rb +4 -4
- data/lib/aws-sdk-s3/client.rb +1685 -668
- data/lib/aws-sdk-s3/client_api.rb +49 -4
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/object.rb +11 -5
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations.rb +24 -38
- data/lib/aws-sdk-s3/encryption/client.rb +2 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/endpoint_parameters.rb +21 -18
- data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
- data/lib/aws-sdk-s3/endpoints.rb +416 -1614
- data/lib/aws-sdk-s3/errors.rb +3 -0
- data/lib/aws-sdk-s3/file_downloader.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_upload.rb +31 -8
- data/lib/aws-sdk-s3/multipart_upload_part.rb +11 -11
- data/lib/aws-sdk-s3/object.rb +441 -158
- data/lib/aws-sdk-s3/object_acl.rb +3 -3
- data/lib/aws-sdk-s3/object_copier.rb +1 -1
- data/lib/aws-sdk-s3/object_summary.rb +403 -134
- data/lib/aws-sdk-s3/object_version.rb +53 -13
- data/lib/aws-sdk-s3/plugins/access_grants.rb +75 -5
- data/lib/aws-sdk-s3/plugins/endpoints.rb +24 -212
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +7 -1
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3/resource.rb +37 -11
- data/lib/aws-sdk-s3/types.rb +1106 -401
- data/lib/aws-sdk-s3.rb +35 -31
- data/sig/bucket.rbs +4 -0
- data/sig/bucket_lifecycle_configuration.rbs +7 -3
- data/sig/client.rbs +49 -5
- data/sig/multipart_upload.rbs +1 -0
- data/sig/object.rbs +7 -0
- data/sig/object_summary.rbs +1 -0
- data/sig/object_version.rbs +6 -0
- data/sig/resource.rbs +7 -1
- data/sig/types.rbs +36 -2
- data/sig/waiters.rbs +12 -0
- metadata +7 -6
data/lib/aws-sdk-s3/resource.rb
CHANGED
@@ -166,7 +166,7 @@ module Aws::S3
|
|
166
166
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
167
167
|
# @return [Bucket]
|
168
168
|
def create_bucket(options = {})
|
169
|
-
Aws::Plugins::UserAgent.
|
169
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
170
170
|
@client.create_bucket(options)
|
171
171
|
end
|
172
172
|
Bucket.new(
|
@@ -188,23 +188,49 @@ module Aws::S3
|
|
188
188
|
|
189
189
|
# @example Request syntax with placeholder values
|
190
190
|
#
|
191
|
-
# s3.buckets(
|
191
|
+
# buckets = s3.buckets({
|
192
|
+
# prefix: "Prefix",
|
193
|
+
# bucket_region: "BucketRegion",
|
194
|
+
# })
|
192
195
|
# @param [Hash] options ({})
|
196
|
+
# @option options [String] :prefix
|
197
|
+
# Limits the response to bucket names that begin with the specified
|
198
|
+
# bucket name prefix.
|
199
|
+
# @option options [String] :bucket_region
|
200
|
+
# Limits the response to buckets that are located in the specified
|
201
|
+
# Amazon Web Services Region. The Amazon Web Services Region must be
|
202
|
+
# expressed according to the Amazon Web Services Region code, such as
|
203
|
+
# `us-west-2` for the US West (Oregon) Region. For a list of the valid
|
204
|
+
# values for all of the Amazon Web Services Regions, see [Regions and
|
205
|
+
# Endpoints][1].
|
206
|
+
#
|
207
|
+
# <note markdown="1"> Requests made to a Regional endpoint that is different from the
|
208
|
+
# `bucket-region` parameter are not supported. For example, if you want
|
209
|
+
# to limit the response to your buckets in Region `us-west-2`, the
|
210
|
+
# request must be made to an endpoint in Region `us-west-2`.
|
211
|
+
#
|
212
|
+
# </note>
|
213
|
+
#
|
214
|
+
#
|
215
|
+
#
|
216
|
+
# [1]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
|
193
217
|
# @return [Bucket::Collection]
|
194
218
|
def buckets(options = {})
|
195
219
|
batches = Enumerator.new do |y|
|
196
|
-
|
197
|
-
resp = Aws::Plugins::UserAgent.feature('resource') do
|
220
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
198
221
|
@client.list_buckets(options)
|
199
222
|
end
|
200
|
-
resp.
|
201
|
-
batch
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
223
|
+
resp.each_page do |page|
|
224
|
+
batch = []
|
225
|
+
page.data.buckets.each do |b|
|
226
|
+
batch << Bucket.new(
|
227
|
+
name: b.name,
|
228
|
+
data: b,
|
229
|
+
client: @client
|
230
|
+
)
|
231
|
+
end
|
232
|
+
y.yield(batch)
|
206
233
|
end
|
207
|
-
y.yield(batch)
|
208
234
|
end
|
209
235
|
Bucket::Collection.new(batches)
|
210
236
|
end
|