aws-sdk-s3 1.147.0 → 1.156.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +68 -2
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +241 -0
- data/lib/aws-sdk-s3/bucket.rb +12 -12
- 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 +4 -4
- 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 +4 -4
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- 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 +214 -143
- data/lib/aws-sdk-s3/client_api.rb +11 -2
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
- data/lib/aws-sdk-s3/customizations/object.rb +5 -5
- data/lib/aws-sdk-s3/customizations.rb +4 -1
- 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 +8 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
- data/lib/aws-sdk-s3/endpoints.rb +100 -1
- data/lib/aws-sdk-s3/express_credentials_provider.rb +27 -4
- 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 +4 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +3 -3
- data/lib/aws-sdk-s3/object.rb +30 -12
- 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_multipart_copier.rb +10 -8
- data/lib/aws-sdk-s3/object_summary.rb +10 -10
- data/lib/aws-sdk-s3/object_version.rb +23 -5
- data/lib/aws-sdk-s3/plugins/access_grants.rb +114 -0
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +8 -2
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/presigner.rb +1 -0
- data/lib/aws-sdk-s3/resource.rb +2 -2
- data/lib/aws-sdk-s3/types.rb +48 -17
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/client.rbs +21 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/object.rbs +6 -0
- data/sig/object_version.rbs +6 -0
- data/sig/resource.rbs +3 -0
- data/sig/types.rbs +6 -0
- data/sig/waiters.rbs +12 -0
- metadata +12 -7
- data/lib/aws-sdk-s3/express_credentials_cache.rb +0 -30
@@ -15,22 +15,67 @@ module Aws
|
|
15
15
|
|
16
16
|
def call(context)
|
17
17
|
@handler.call(context).on(200) do |response|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
return response if streaming_output?(context.operation.output)
|
19
|
+
|
20
|
+
error = check_for_error(context)
|
21
|
+
return response unless error
|
22
|
+
|
23
|
+
context.http_response.status_code = 500
|
24
|
+
response.data = nil
|
25
|
+
response.error = error
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
# Streaming outputs are not subject to 200 errors.
|
32
|
+
def streaming_output?(output)
|
33
|
+
if (payload = output[:payload_member])
|
34
|
+
# checking ref and shape
|
35
|
+
payload['streaming'] || payload.shape['streaming'] ||
|
36
|
+
payload.eventstream
|
37
|
+
else
|
38
|
+
false
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Checks if the output shape is a structure shape and has members that
|
43
|
+
# are in the body for the case of a payload and a normal structure. A
|
44
|
+
# non-structure shape will not have members in the body. In the case
|
45
|
+
# of a string or blob, the body contents would have been checked first
|
46
|
+
# before this method is called in incomplete_xml_body?.
|
47
|
+
def members_in_body?(output)
|
48
|
+
shape =
|
49
|
+
if output[:payload_member]
|
50
|
+
output[:payload_member].shape
|
51
|
+
else
|
52
|
+
output.shape
|
22
53
|
end
|
54
|
+
|
55
|
+
if structure_shape?(shape)
|
56
|
+
shape.members.any? { |_, k| k.location.nil? }
|
57
|
+
else
|
58
|
+
false
|
23
59
|
end
|
24
60
|
end
|
25
61
|
|
62
|
+
def structure_shape?(shape)
|
63
|
+
shape.is_a?(Seahorse::Model::Shapes::StructureShape)
|
64
|
+
end
|
65
|
+
|
66
|
+
# Must have a member in the body and have the start of an XML Tag.
|
67
|
+
# Other incomplete xml bodies will result in an XML ParsingError.
|
68
|
+
def incomplete_xml_body?(xml, output)
|
69
|
+
members_in_body?(output) && !xml.match(/<\w/)
|
70
|
+
end
|
71
|
+
|
26
72
|
def check_for_error(context)
|
27
73
|
xml = context.http_response.body_contents
|
28
|
-
if xml.match(
|
74
|
+
if xml.match(/\?>\s*<Error>/)
|
29
75
|
error_code = xml.match(/<Code>(.+?)<\/Code>/)[1]
|
30
76
|
error_message = xml.match(/<Message>(.+?)<\/Message>/)[1]
|
31
77
|
S3::Errors.error_class(error_code).new(context, error_message)
|
32
|
-
elsif
|
33
|
-
# Other incomplete xml bodies will result in XML ParsingError
|
78
|
+
elsif incomplete_xml_body?(xml, context.operation.output)
|
34
79
|
Seahorse::Client::NetworkingError.new(
|
35
80
|
S3::Errors
|
36
81
|
.error_class('InternalError')
|
@@ -40,15 +85,7 @@ module Aws
|
|
40
85
|
end
|
41
86
|
end
|
42
87
|
|
43
|
-
handler(
|
44
|
-
Handler,
|
45
|
-
step: :sign,
|
46
|
-
operations: [
|
47
|
-
:complete_multipart_upload,
|
48
|
-
:copy_object,
|
49
|
-
:upload_part_copy,
|
50
|
-
]
|
51
|
-
)
|
88
|
+
handler(Handler, step: :sign)
|
52
89
|
end
|
53
90
|
end
|
54
91
|
end
|
@@ -4,6 +4,11 @@ require 'aws-sigv4'
|
|
4
4
|
|
5
5
|
module Aws
|
6
6
|
module S3
|
7
|
+
# @api private
|
8
|
+
def self.bucket_region_cache
|
9
|
+
@bucket_region_cache ||= BucketRegionCache.new
|
10
|
+
end
|
11
|
+
|
7
12
|
module Plugins
|
8
13
|
# This plugin used to have a V4 signer but it was removed in favor of
|
9
14
|
# generic Sign plugin that uses endpoint auth scheme.
|
@@ -51,7 +56,7 @@ module Aws
|
|
51
56
|
private
|
52
57
|
|
53
58
|
def check_for_cached_region(context, bucket)
|
54
|
-
cached_region = S3
|
59
|
+
cached_region = Aws::S3.bucket_region_cache[bucket]
|
55
60
|
if cached_region &&
|
56
61
|
cached_region != context.config.region &&
|
57
62
|
!S3Signer.custom_endpoint?(context)
|
@@ -97,7 +102,7 @@ module Aws
|
|
97
102
|
end
|
98
103
|
|
99
104
|
def update_bucket_cache(context, actual_region)
|
100
|
-
S3
|
105
|
+
Aws::S3.bucket_region_cache[context.params[:bucket]] = actual_region
|
101
106
|
end
|
102
107
|
|
103
108
|
def fips_region?(resp)
|
data/lib/aws-sdk-s3/presigner.rb
CHANGED
@@ -200,6 +200,7 @@ module Aws
|
|
200
200
|
req.handlers.remove(Aws::Plugins::Sign::Handler)
|
201
201
|
req.handlers.remove(Seahorse::Client::Plugins::ContentLength::Handler)
|
202
202
|
req.handlers.remove(Aws::Rest::ContentTypeHandler)
|
203
|
+
req.handlers.remove(Aws::Plugins::InvocationId::Handler)
|
203
204
|
|
204
205
|
req.handle(step: :send) do |context|
|
205
206
|
# if an endpoint was not provided, force secure or insecure
|
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(
|
@@ -194,7 +194,7 @@ module Aws::S3
|
|
194
194
|
def buckets(options = {})
|
195
195
|
batches = Enumerator.new do |y|
|
196
196
|
batch = []
|
197
|
-
resp = Aws::Plugins::UserAgent.
|
197
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
198
198
|
@client.list_buckets(options)
|
199
199
|
end
|
200
200
|
resp.data.buckets.each do |b|
|
data/lib/aws-sdk-s3/types.rb
CHANGED
@@ -3299,7 +3299,7 @@ module Aws::S3
|
|
3299
3299
|
|
3300
3300
|
# @!attribute [rw] credentials
|
3301
3301
|
# The established temporary security credentials for the created
|
3302
|
-
# session
|
3302
|
+
# session.
|
3303
3303
|
# @return [Types::SessionCredentials]
|
3304
3304
|
#
|
3305
3305
|
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateSessionOutput AWS API Documentation
|
@@ -8452,6 +8452,30 @@ module Aws::S3
|
|
8452
8452
|
# Not Satisfiable` error.
|
8453
8453
|
# @return [String]
|
8454
8454
|
#
|
8455
|
+
# @!attribute [rw] response_cache_control
|
8456
|
+
# Sets the `Cache-Control` header of the response.
|
8457
|
+
# @return [String]
|
8458
|
+
#
|
8459
|
+
# @!attribute [rw] response_content_disposition
|
8460
|
+
# Sets the `Content-Disposition` header of the response.
|
8461
|
+
# @return [String]
|
8462
|
+
#
|
8463
|
+
# @!attribute [rw] response_content_encoding
|
8464
|
+
# Sets the `Content-Encoding` header of the response.
|
8465
|
+
# @return [String]
|
8466
|
+
#
|
8467
|
+
# @!attribute [rw] response_content_language
|
8468
|
+
# Sets the `Content-Language` header of the response.
|
8469
|
+
# @return [String]
|
8470
|
+
#
|
8471
|
+
# @!attribute [rw] response_content_type
|
8472
|
+
# Sets the `Content-Type` header of the response.
|
8473
|
+
# @return [String]
|
8474
|
+
#
|
8475
|
+
# @!attribute [rw] response_expires
|
8476
|
+
# Sets the `Expires` header of the response.
|
8477
|
+
# @return [Time]
|
8478
|
+
#
|
8455
8479
|
# @!attribute [rw] version_id
|
8456
8480
|
# Version ID used to reference a specific version of the object.
|
8457
8481
|
#
|
@@ -8543,6 +8567,12 @@ module Aws::S3
|
|
8543
8567
|
:if_unmodified_since,
|
8544
8568
|
:key,
|
8545
8569
|
:range,
|
8570
|
+
:response_cache_control,
|
8571
|
+
:response_content_disposition,
|
8572
|
+
:response_content_encoding,
|
8573
|
+
:response_content_language,
|
8574
|
+
:response_content_type,
|
8575
|
+
:response_expires,
|
8546
8576
|
:version_id,
|
8547
8577
|
:sse_customer_algorithm,
|
8548
8578
|
:sse_customer_key,
|
@@ -8559,10 +8589,11 @@ module Aws::S3
|
|
8559
8589
|
#
|
8560
8590
|
# @!attribute [rw] suffix
|
8561
8591
|
# A suffix that is appended to a request that is for a directory on
|
8562
|
-
# the website endpoint (
|
8563
|
-
# you make a request to samplebucket/images
|
8564
|
-
# will be for the object with the key name
|
8565
|
-
# suffix must not be empty and must not
|
8592
|
+
# the website endpoint. (For example, if the suffix is `index.html`
|
8593
|
+
# and you make a request to `samplebucket/images/`, the data that is
|
8594
|
+
# returned will be for the object with the key name
|
8595
|
+
# `images/index.html`.) The suffix must not be empty and must not
|
8596
|
+
# include a slash character.
|
8566
8597
|
#
|
8567
8598
|
# Replacement must be made for object keys containing special
|
8568
8599
|
# characters (such as carriage returns) when using XML requests. For
|
@@ -10122,7 +10153,7 @@ module Aws::S3
|
|
10122
10153
|
# Encoding type used by Amazon S3 to encode object keys in the
|
10123
10154
|
# response. If using `url`, non-ASCII characters used in an object's
|
10124
10155
|
# key name will be URL encoded. For example, the object
|
10125
|
-
#
|
10156
|
+
# `test_file(3).png` will appear as `test_file%283%29.png`.
|
10126
10157
|
# @return [String]
|
10127
10158
|
#
|
10128
10159
|
# @!attribute [rw] request_charged
|
@@ -10478,7 +10509,7 @@ module Aws::S3
|
|
10478
10509
|
# Encoding type used by Amazon S3 to encode object keys in the
|
10479
10510
|
# response. If using `url`, non-ASCII characters used in an object's
|
10480
10511
|
# key name will be URL encoded. For example, the object
|
10481
|
-
#
|
10512
|
+
# `test_file(3).png` will appear as `test_file%283%29.png`.
|
10482
10513
|
# @return [String]
|
10483
10514
|
#
|
10484
10515
|
# @!attribute [rw] max_keys
|
@@ -11173,10 +11204,10 @@ module Aws::S3
|
|
11173
11204
|
# @return [Integer]
|
11174
11205
|
#
|
11175
11206
|
# @!attribute [rw] newer_noncurrent_versions
|
11176
|
-
# Specifies how many
|
11177
|
-
#
|
11178
|
-
#
|
11179
|
-
#
|
11207
|
+
# Specifies how many noncurrent versions Amazon S3 will retain. You
|
11208
|
+
# can specify up to 100 noncurrent versions to retain. Amazon S3 will
|
11209
|
+
# permanently delete any additional noncurrent versions beyond the
|
11210
|
+
# specified number to retain. For more information about noncurrent
|
11180
11211
|
# versions, see [Lifecycle configuration elements][1] in the *Amazon
|
11181
11212
|
# S3 User Guide*.
|
11182
11213
|
#
|
@@ -11220,12 +11251,12 @@ module Aws::S3
|
|
11220
11251
|
# @return [String]
|
11221
11252
|
#
|
11222
11253
|
# @!attribute [rw] newer_noncurrent_versions
|
11223
|
-
# Specifies how many
|
11224
|
-
#
|
11225
|
-
#
|
11226
|
-
#
|
11227
|
-
#
|
11228
|
-
# S3 User Guide*.
|
11254
|
+
# Specifies how many noncurrent versions Amazon S3 will retain in the
|
11255
|
+
# same storage class before transitioning objects. You can specify up
|
11256
|
+
# to 100 noncurrent versions to retain. Amazon S3 will transition any
|
11257
|
+
# additional noncurrent versions beyond the specified number to
|
11258
|
+
# retain. For more information about noncurrent versions, see
|
11259
|
+
# [Lifecycle configuration elements][1] in the *Amazon S3 User Guide*.
|
11229
11260
|
#
|
11230
11261
|
#
|
11231
11262
|
#
|
data/lib/aws-sdk-s3.rb
CHANGED
data/sig/client.rbs
CHANGED
@@ -14,6 +14,8 @@ module Aws
|
|
14
14
|
def self.new: (
|
15
15
|
?credentials: untyped,
|
16
16
|
?region: String,
|
17
|
+
?access_grants: bool,
|
18
|
+
?access_grants_credentials_provider: untyped,
|
17
19
|
?access_key_id: String,
|
18
20
|
?active_endpoint_cache: bool,
|
19
21
|
?adaptive_retry_wait_to_fill: bool,
|
@@ -60,6 +62,7 @@ module Aws
|
|
60
62
|
?sdk_ua_app_id: String,
|
61
63
|
?secret_access_key: String,
|
62
64
|
?session_token: String,
|
65
|
+
?sigv4a_signing_region_set: Array[String],
|
63
66
|
?stub_responses: untyped,
|
64
67
|
?token_provider: untyped,
|
65
68
|
?use_accelerate_endpoint: bool,
|
@@ -961,6 +964,12 @@ module Aws
|
|
961
964
|
?if_unmodified_since: ::Time,
|
962
965
|
key: ::String,
|
963
966
|
?range: ::String,
|
967
|
+
?response_cache_control: ::String,
|
968
|
+
?response_content_disposition: ::String,
|
969
|
+
?response_content_encoding: ::String,
|
970
|
+
?response_content_language: ::String,
|
971
|
+
?response_content_type: ::String,
|
972
|
+
?response_expires: ::Time,
|
964
973
|
?version_id: ::String,
|
965
974
|
?sse_customer_algorithm: ::String,
|
966
975
|
?sse_customer_key: ::String,
|
@@ -2326,6 +2335,12 @@ module Aws
|
|
2326
2335
|
?if_unmodified_since: ::Time,
|
2327
2336
|
key: ::String,
|
2328
2337
|
?range: ::String,
|
2338
|
+
?response_cache_control: ::String,
|
2339
|
+
?response_content_disposition: ::String,
|
2340
|
+
?response_content_encoding: ::String,
|
2341
|
+
?response_content_language: ::String,
|
2342
|
+
?response_content_type: ::String,
|
2343
|
+
?response_expires: ::Time,
|
2329
2344
|
?version_id: ::String,
|
2330
2345
|
?sse_customer_algorithm: ::String,
|
2331
2346
|
?sse_customer_key: ::String,
|
@@ -2344,6 +2359,12 @@ module Aws
|
|
2344
2359
|
?if_unmodified_since: ::Time,
|
2345
2360
|
key: ::String,
|
2346
2361
|
?range: ::String,
|
2362
|
+
?response_cache_control: ::String,
|
2363
|
+
?response_content_disposition: ::String,
|
2364
|
+
?response_content_encoding: ::String,
|
2365
|
+
?response_content_language: ::String,
|
2366
|
+
?response_content_type: ::String,
|
2367
|
+
?response_expires: ::Time,
|
2347
2368
|
?version_id: ::String,
|
2348
2369
|
?sse_customer_algorithm: ::String,
|
2349
2370
|
?sse_customer_key: ::String,
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Aws
|
2
|
+
module S3
|
3
|
+
class Bucket
|
4
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Bucket.html#clear!-instance_method
|
5
|
+
def clear!: () -> void
|
6
|
+
|
7
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Bucket.html#delete!-instance_method
|
8
|
+
def delete!: (?max_attempts: ::Integer, ?initial_wait: ::Float) -> void
|
9
|
+
| (?Hash[Symbol, untyped]) -> void
|
10
|
+
|
11
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Bucket.html#url-instance_method
|
12
|
+
def url: (?virtual_host: boolish, ?secure: boolish) -> String
|
13
|
+
| (?Hash[Symbol, untyped]) -> String
|
14
|
+
|
15
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Bucket.html#presigned_post-instance_method
|
16
|
+
def presigned_post: (Hash[Symbol, untyped]) -> untyped
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Aws
|
2
|
+
module S3
|
3
|
+
class Object
|
4
|
+
alias size content_length
|
5
|
+
|
6
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#copy_from-instance_method
|
7
|
+
def copy_from: (untyped source, ?Hash[Symbol, untyped] options) -> void
|
8
|
+
| ...
|
9
|
+
|
10
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#copy_to-instance_method
|
11
|
+
def copy_to: (untyped target, ?Hash[Symbol, untyped] options) -> void
|
12
|
+
|
13
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#move_to-instance_method
|
14
|
+
def move_to: (untyped target, ?Hash[Symbol, untyped] options) -> void
|
15
|
+
|
16
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#presigned_post-instance_method
|
17
|
+
def presigned_post: (?Hash[Symbol, untyped]) -> untyped
|
18
|
+
|
19
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#presigned_url-instance_method
|
20
|
+
def presigned_url: (Symbol | String method, ?Hash[Symbol, untyped] params) -> String
|
21
|
+
|
22
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#presigned_request-instance_method
|
23
|
+
def presigned_request: (Symbol | String method, ?Hash[Symbol, untyped] params) -> [String, Hash[String, String]]
|
24
|
+
|
25
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#public_url-instance_method
|
26
|
+
def public_url: (?Hash[Symbol, untyped] options) -> String
|
27
|
+
|
28
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#upload_stream-instance_method
|
29
|
+
def upload_stream: (?Hash[Symbol, untyped] options) { (IO write_stream) -> void } -> bool
|
30
|
+
|
31
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#upload_file-instance_method
|
32
|
+
def upload_file: (untyped source, ?Hash[Symbol, untyped] options) ?{ (untyped response) -> void } -> bool
|
33
|
+
|
34
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Object.html#download_file-instance_method
|
35
|
+
def download_file: (String destination, ?Hash[Symbol, untyped] options) -> bool
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Aws
|
2
|
+
module S3
|
3
|
+
class ObjectSummary
|
4
|
+
alias content_length size
|
5
|
+
|
6
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/ObjectSummary.html#copy_from-instance_method
|
7
|
+
def copy_from: (untyped source, ?Hash[Symbol, untyped] options) -> void
|
8
|
+
| ...
|
9
|
+
|
10
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/ObjectSummary.html#copy_to-instance_method
|
11
|
+
def copy_to: (untyped target, ?Hash[Symbol, untyped] options) -> void
|
12
|
+
|
13
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/ObjectSummary.html#move_to-instance_method
|
14
|
+
def move_to: (untyped target, ?Hash[Symbol, untyped] options) -> void
|
15
|
+
|
16
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/ObjectSummary.html#presigned_post-instance_method
|
17
|
+
def presigned_post: (Hash[Symbol, untyped]) -> untyped
|
18
|
+
|
19
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/ObjectSummary.html#presigned_url-instance_method
|
20
|
+
def presigned_url: (Symbol | String method, ?Hash[Symbol, untyped] params) -> String
|
21
|
+
|
22
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/ObjectSummary.html#public_url-instance_method
|
23
|
+
def public_url: (?Hash[Symbol, untyped] options) -> String
|
24
|
+
|
25
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/ObjectSummary.html#upload_file-instance_method
|
26
|
+
def upload_file: (untyped source, ?Hash[Symbol, untyped] options) ?{ (untyped response) -> void } -> bool
|
27
|
+
|
28
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/ObjectSummary.html#upload_stream-instance_method
|
29
|
+
def upload_stream: (?Hash[Symbol, untyped] options) { (IO write_stream) -> void } -> bool
|
30
|
+
|
31
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/ObjectSummary.html#download_file-instance_method
|
32
|
+
def download_file: (String destination, ?Hash[Symbol, untyped] options) -> bool
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/sig/object.rbs
CHANGED
@@ -397,6 +397,12 @@ module Aws
|
|
397
397
|
?if_none_match: ::String,
|
398
398
|
?if_unmodified_since: ::Time,
|
399
399
|
?range: ::String,
|
400
|
+
?response_cache_control: ::String,
|
401
|
+
?response_content_disposition: ::String,
|
402
|
+
?response_content_encoding: ::String,
|
403
|
+
?response_content_language: ::String,
|
404
|
+
?response_content_type: ::String,
|
405
|
+
?response_expires: ::Time,
|
400
406
|
?version_id: ::String,
|
401
407
|
?sse_customer_algorithm: ::String,
|
402
408
|
?sse_customer_key: ::String,
|
data/sig/object_version.rbs
CHANGED
@@ -102,6 +102,12 @@ module Aws
|
|
102
102
|
?if_none_match: ::String,
|
103
103
|
?if_unmodified_since: ::Time,
|
104
104
|
?range: ::String,
|
105
|
+
?response_cache_control: ::String,
|
106
|
+
?response_content_disposition: ::String,
|
107
|
+
?response_content_encoding: ::String,
|
108
|
+
?response_content_language: ::String,
|
109
|
+
?response_content_type: ::String,
|
110
|
+
?response_expires: ::Time,
|
105
111
|
?sse_customer_algorithm: ::String,
|
106
112
|
?sse_customer_key: ::String,
|
107
113
|
?sse_customer_key_md5: ::String,
|
data/sig/resource.rbs
CHANGED
@@ -14,6 +14,8 @@ module Aws
|
|
14
14
|
?client: Client,
|
15
15
|
?credentials: untyped,
|
16
16
|
?region: String,
|
17
|
+
?access_grants: bool,
|
18
|
+
?access_grants_credentials_provider: untyped,
|
17
19
|
?access_key_id: String,
|
18
20
|
?active_endpoint_cache: bool,
|
19
21
|
?adaptive_retry_wait_to_fill: bool,
|
@@ -60,6 +62,7 @@ module Aws
|
|
60
62
|
?sdk_ua_app_id: String,
|
61
63
|
?secret_access_key: String,
|
62
64
|
?session_token: String,
|
65
|
+
?sigv4a_signing_region_set: Array[String],
|
63
66
|
?stub_responses: untyped,
|
64
67
|
?token_provider: untyped,
|
65
68
|
?use_accelerate_endpoint: bool,
|
data/sig/types.rbs
CHANGED
@@ -1132,6 +1132,12 @@ module Aws::S3
|
|
1132
1132
|
attr_accessor if_unmodified_since: ::Time
|
1133
1133
|
attr_accessor key: ::String
|
1134
1134
|
attr_accessor range: ::String
|
1135
|
+
attr_accessor response_cache_control: ::String
|
1136
|
+
attr_accessor response_content_disposition: ::String
|
1137
|
+
attr_accessor response_content_encoding: ::String
|
1138
|
+
attr_accessor response_content_language: ::String
|
1139
|
+
attr_accessor response_content_type: ::String
|
1140
|
+
attr_accessor response_expires: ::Time
|
1135
1141
|
attr_accessor version_id: ::String
|
1136
1142
|
attr_accessor sse_customer_algorithm: ::String
|
1137
1143
|
attr_accessor sse_customer_key: ::String
|
data/sig/waiters.rbs
CHANGED
@@ -43,6 +43,12 @@ module Aws
|
|
43
43
|
?if_unmodified_since: ::Time,
|
44
44
|
key: ::String,
|
45
45
|
?range: ::String,
|
46
|
+
?response_cache_control: ::String,
|
47
|
+
?response_content_disposition: ::String,
|
48
|
+
?response_content_encoding: ::String,
|
49
|
+
?response_content_language: ::String,
|
50
|
+
?response_content_type: ::String,
|
51
|
+
?response_expires: ::Time,
|
46
52
|
?version_id: ::String,
|
47
53
|
?sse_customer_algorithm: ::String,
|
48
54
|
?sse_customer_key: ::String,
|
@@ -67,6 +73,12 @@ module Aws
|
|
67
73
|
?if_unmodified_since: ::Time,
|
68
74
|
key: ::String,
|
69
75
|
?range: ::String,
|
76
|
+
?response_cache_control: ::String,
|
77
|
+
?response_content_disposition: ::String,
|
78
|
+
?response_content_encoding: ::String,
|
79
|
+
?response_content_language: ::String,
|
80
|
+
?response_content_type: ::String,
|
81
|
+
?response_expires: ::Time,
|
70
82
|
?version_id: ::String,
|
71
83
|
?sse_customer_algorithm: ::String,
|
72
84
|
?sse_customer_key: ::String,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.156.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.5'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: aws-sdk-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: '3'
|
48
48
|
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 3.
|
50
|
+
version: 3.201.0
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version: '3'
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 3.
|
60
|
+
version: 3.201.0
|
61
61
|
description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
|
62
62
|
This gem is part of the AWS SDK for Ruby.
|
63
63
|
email:
|
@@ -70,6 +70,8 @@ files:
|
|
70
70
|
- LICENSE.txt
|
71
71
|
- VERSION
|
72
72
|
- lib/aws-sdk-s3.rb
|
73
|
+
- lib/aws-sdk-s3/access_grants_credentials.rb
|
74
|
+
- lib/aws-sdk-s3/access_grants_credentials_provider.rb
|
73
75
|
- lib/aws-sdk-s3/bucket.rb
|
74
76
|
- lib/aws-sdk-s3/bucket_acl.rb
|
75
77
|
- lib/aws-sdk-s3/bucket_cors.rb
|
@@ -127,7 +129,6 @@ files:
|
|
127
129
|
- lib/aws-sdk-s3/errors.rb
|
128
130
|
- lib/aws-sdk-s3/event_streams.rb
|
129
131
|
- lib/aws-sdk-s3/express_credentials.rb
|
130
|
-
- lib/aws-sdk-s3/express_credentials_cache.rb
|
131
132
|
- lib/aws-sdk-s3/express_credentials_provider.rb
|
132
133
|
- lib/aws-sdk-s3/file_downloader.rb
|
133
134
|
- lib/aws-sdk-s3/file_part.rb
|
@@ -145,6 +146,7 @@ files:
|
|
145
146
|
- lib/aws-sdk-s3/object_summary.rb
|
146
147
|
- lib/aws-sdk-s3/object_version.rb
|
147
148
|
- lib/aws-sdk-s3/plugins/accelerate.rb
|
149
|
+
- lib/aws-sdk-s3/plugins/access_grants.rb
|
148
150
|
- lib/aws-sdk-s3/plugins/arn.rb
|
149
151
|
- lib/aws-sdk-s3/plugins/bucket_dns.rb
|
150
152
|
- lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb
|
@@ -182,6 +184,9 @@ files:
|
|
182
184
|
- sig/bucket_versioning.rbs
|
183
185
|
- sig/bucket_website.rbs
|
184
186
|
- sig/client.rbs
|
187
|
+
- sig/customizations/bucket.rbs
|
188
|
+
- sig/customizations/object.rbs
|
189
|
+
- sig/customizations/object_summary.rbs
|
185
190
|
- sig/errors.rbs
|
186
191
|
- sig/multipart_upload.rbs
|
187
192
|
- sig/multipart_upload_part.rbs
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Aws
|
4
|
-
module S3
|
5
|
-
# @api private
|
6
|
-
class ExpressCredentialsCache
|
7
|
-
def initialize
|
8
|
-
@credentials = {}
|
9
|
-
@mutex = Mutex.new
|
10
|
-
end
|
11
|
-
|
12
|
-
def [](bucket_name)
|
13
|
-
@mutex.synchronize { @credentials[bucket_name] }
|
14
|
-
end
|
15
|
-
|
16
|
-
def []=(bucket_name, credential_provider)
|
17
|
-
@mutex.synchronize do
|
18
|
-
@credentials[bucket_name] = credential_provider
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def clear
|
23
|
-
@mutex.synchronize { @credentials = {} }
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
# @api private
|
28
|
-
EXPRESS_CREDENTIALS_CACHE = ExpressCredentialsCache.new
|
29
|
-
end
|
30
|
-
end
|