aws-sdk-s3 1.150.0 → 1.160.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 +65 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +12 -3
- data/lib/aws-sdk-s3/bucket.rb +89 -26
- 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_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 +632 -351
- data/lib/aws-sdk-s3/client_api.rb +27 -3
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/object.rb +5 -5
- 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/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 +24 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +3 -3
- data/lib/aws-sdk-s3/object.rb +66 -16
- 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 +38 -10
- data/lib/aws-sdk-s3/object_version.rb +40 -9
- data/lib/aws-sdk-s3/plugins/access_grants.rb +75 -5
- 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 +12 -10
- data/lib/aws-sdk-s3/types.rb +340 -62
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/bucket.rbs +1 -0
- data/sig/client.rbs +27 -1
- 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 +4 -1
- data/sig/types.rbs +15 -0
- data/sig/waiters.rbs +12 -0
- metadata +6 -6
@@ -37,7 +37,7 @@ module Aws
|
|
37
37
|
# objects smaller than the multipart threshold.
|
38
38
|
# @return [void]
|
39
39
|
def upload(source, options = {})
|
40
|
-
Aws::Plugins::UserAgent.
|
40
|
+
Aws::Plugins::UserAgent.metric('S3_TRANSFER') do
|
41
41
|
if File.size(source) >= multipart_threshold
|
42
42
|
MultipartFileUploader.new(@options).upload(source, options)
|
43
43
|
else
|
@@ -46,7 +46,7 @@ module Aws
|
|
46
46
|
# @option options [Integer] :thread_count (THREAD_COUNT)
|
47
47
|
# @return [Seahorse::Client::Response] - the CompleteMultipartUploadResponse
|
48
48
|
def upload(options = {}, &block)
|
49
|
-
Aws::Plugins::UserAgent.
|
49
|
+
Aws::Plugins::UserAgent.metric('S3_TRANSFER') do
|
50
50
|
upload_id = initiate_upload(options)
|
51
51
|
parts = upload_parts(upload_id, options, &block)
|
52
52
|
complete_upload(upload_id, parts, options)
|
@@ -227,7 +227,7 @@ module Aws::S3
|
|
227
227
|
:retry
|
228
228
|
end
|
229
229
|
end
|
230
|
-
Aws::Plugins::UserAgent.
|
230
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
231
231
|
Aws::Waiters::Waiter.new(options).wait({})
|
232
232
|
end
|
233
233
|
end
|
@@ -268,7 +268,7 @@ module Aws::S3
|
|
268
268
|
key: @object_key,
|
269
269
|
upload_id: @id
|
270
270
|
)
|
271
|
-
resp = Aws::Plugins::UserAgent.
|
271
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
272
272
|
@client.abort_multipart_upload(options)
|
273
273
|
end
|
274
274
|
resp.data
|
@@ -295,6 +295,7 @@ module Aws::S3
|
|
295
295
|
# checksum_sha256: "ChecksumSHA256",
|
296
296
|
# request_payer: "requester", # accepts requester
|
297
297
|
# expected_bucket_owner: "AccountId",
|
298
|
+
# if_none_match: "IfNoneMatch",
|
298
299
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
299
300
|
# sse_customer_key: "SSECustomerKey",
|
300
301
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
@@ -362,6 +363,25 @@ module Aws::S3
|
|
362
363
|
# The account ID of the expected bucket owner. If the account ID that
|
363
364
|
# you provide does not match the actual owner of the bucket, the request
|
364
365
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
366
|
+
# @option options [String] :if_none_match
|
367
|
+
# Uploads the object only if the object key name does not already exist
|
368
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
369
|
+
# Precondition Failed` error.
|
370
|
+
#
|
371
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
372
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
373
|
+
# re-initiate the multipart upload with `CreateMultipartUpload` and
|
374
|
+
# re-upload each part.
|
375
|
+
#
|
376
|
+
# Expects the '*' (asterisk) character.
|
377
|
+
#
|
378
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
379
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
380
|
+
#
|
381
|
+
#
|
382
|
+
#
|
383
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
384
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
365
385
|
# @option options [String] :sse_customer_algorithm
|
366
386
|
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
367
387
|
# This parameter is required only when the object was created using a
|
@@ -409,7 +429,7 @@ module Aws::S3
|
|
409
429
|
key: @object_key,
|
410
430
|
upload_id: @id
|
411
431
|
)
|
412
|
-
Aws::Plugins::UserAgent.
|
432
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
413
433
|
@client.complete_multipart_upload(options)
|
414
434
|
end
|
415
435
|
Object.new(
|
@@ -519,7 +539,7 @@ module Aws::S3
|
|
519
539
|
key: @object_key,
|
520
540
|
upload_id: @id
|
521
541
|
)
|
522
|
-
resp = Aws::Plugins::UserAgent.
|
542
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
523
543
|
@client.list_parts(options)
|
524
544
|
end
|
525
545
|
resp.each_page do |page|
|
@@ -262,7 +262,7 @@ module Aws::S3
|
|
262
262
|
:retry
|
263
263
|
end
|
264
264
|
end
|
265
|
-
Aws::Plugins::UserAgent.
|
265
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
266
266
|
Aws::Waiters::Waiter.new(options).wait({})
|
267
267
|
end
|
268
268
|
end
|
@@ -500,7 +500,7 @@ module Aws::S3
|
|
500
500
|
upload_id: @multipart_upload_id,
|
501
501
|
part_number: @part_number
|
502
502
|
)
|
503
|
-
resp = Aws::Plugins::UserAgent.
|
503
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
504
504
|
@client.upload_part_copy(options)
|
505
505
|
end
|
506
506
|
resp.data
|
@@ -650,7 +650,7 @@ module Aws::S3
|
|
650
650
|
upload_id: @multipart_upload_id,
|
651
651
|
part_number: @part_number
|
652
652
|
)
|
653
|
-
resp = Aws::Plugins::UserAgent.
|
653
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
654
654
|
@client.upload_part(options)
|
655
655
|
end
|
656
656
|
resp.data
|
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -500,7 +500,7 @@ module Aws::S3
|
|
500
500
|
#
|
501
501
|
# @return [self]
|
502
502
|
def load
|
503
|
-
resp = Aws::Plugins::UserAgent.
|
503
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
504
504
|
@client.head_object(
|
505
505
|
bucket: @bucket_name,
|
506
506
|
key: @key
|
@@ -550,7 +550,7 @@ module Aws::S3
|
|
550
550
|
options, params = separate_params_and_options(options)
|
551
551
|
waiter = Waiters::ObjectExists.new(options)
|
552
552
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
553
|
-
Aws::Plugins::UserAgent.
|
553
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
554
554
|
waiter.wait(params.merge(bucket: @bucket_name,
|
555
555
|
key: @key))
|
556
556
|
end
|
@@ -571,7 +571,7 @@ module Aws::S3
|
|
571
571
|
options, params = separate_params_and_options(options)
|
572
572
|
waiter = Waiters::ObjectNotExists.new(options)
|
573
573
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
574
|
-
Aws::Plugins::UserAgent.
|
574
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
575
575
|
waiter.wait(params.merge(bucket: @bucket_name,
|
576
576
|
key: @key))
|
577
577
|
end
|
@@ -676,7 +676,7 @@ module Aws::S3
|
|
676
676
|
:retry
|
677
677
|
end
|
678
678
|
end
|
679
|
-
Aws::Plugins::UserAgent.
|
679
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
680
680
|
Aws::Waiters::Waiter.new(options).wait({})
|
681
681
|
end
|
682
682
|
end
|
@@ -1346,7 +1346,7 @@ module Aws::S3
|
|
1346
1346
|
bucket: @bucket_name,
|
1347
1347
|
key: @key
|
1348
1348
|
)
|
1349
|
-
resp = Aws::Plugins::UserAgent.
|
1349
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1350
1350
|
@client.copy_object(options)
|
1351
1351
|
end
|
1352
1352
|
resp.data
|
@@ -1412,7 +1412,7 @@ module Aws::S3
|
|
1412
1412
|
bucket: @bucket_name,
|
1413
1413
|
key: @key
|
1414
1414
|
)
|
1415
|
-
resp = Aws::Plugins::UserAgent.
|
1415
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1416
1416
|
@client.delete_object(options)
|
1417
1417
|
end
|
1418
1418
|
resp.data
|
@@ -1662,13 +1662,22 @@ module Aws::S3
|
|
1662
1662
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
1663
1663
|
# @option options [String] :checksum_mode
|
1664
1664
|
# To retrieve the checksum, this mode must be enabled.
|
1665
|
+
#
|
1666
|
+
# In addition, if you enable checksum mode and the object is uploaded
|
1667
|
+
# with a [checksum][1] and encrypted with an Key Management Service
|
1668
|
+
# (KMS) key, you must have permission to use the `kms:Decrypt` action to
|
1669
|
+
# retrieve the checksum.
|
1670
|
+
#
|
1671
|
+
#
|
1672
|
+
#
|
1673
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
1665
1674
|
# @return [Types::GetObjectOutput]
|
1666
1675
|
def get(options = {}, &block)
|
1667
1676
|
options = options.merge(
|
1668
1677
|
bucket: @bucket_name,
|
1669
1678
|
key: @key
|
1670
1679
|
)
|
1671
|
-
resp = Aws::Plugins::UserAgent.
|
1680
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1672
1681
|
@client.get_object(options, &block)
|
1673
1682
|
end
|
1674
1683
|
resp.data
|
@@ -2153,7 +2162,7 @@ module Aws::S3
|
|
2153
2162
|
bucket: @bucket_name,
|
2154
2163
|
key: @key
|
2155
2164
|
)
|
2156
|
-
resp = Aws::Plugins::UserAgent.
|
2165
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
2157
2166
|
@client.create_multipart_upload(options)
|
2158
2167
|
end
|
2159
2168
|
MultipartUpload.new(
|
@@ -2182,6 +2191,7 @@ module Aws::S3
|
|
2182
2191
|
# checksum_sha1: "ChecksumSHA1",
|
2183
2192
|
# checksum_sha256: "ChecksumSHA256",
|
2184
2193
|
# expires: Time.now,
|
2194
|
+
# if_none_match: "IfNoneMatch",
|
2185
2195
|
# grant_full_control: "GrantFullControl",
|
2186
2196
|
# grant_read: "GrantRead",
|
2187
2197
|
# grant_read_acp: "GrantReadACP",
|
@@ -2396,6 +2406,24 @@ module Aws::S3
|
|
2396
2406
|
#
|
2397
2407
|
#
|
2398
2408
|
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
2409
|
+
# @option options [String] :if_none_match
|
2410
|
+
# Uploads the object only if the object key name does not already exist
|
2411
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
2412
|
+
# Precondition Failed` error.
|
2413
|
+
#
|
2414
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
2415
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
2416
|
+
# retry the upload.
|
2417
|
+
#
|
2418
|
+
# Expects the '*' (asterisk) character.
|
2419
|
+
#
|
2420
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
2421
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
2422
|
+
#
|
2423
|
+
#
|
2424
|
+
#
|
2425
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
2426
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
2399
2427
|
# @option options [String] :grant_full_control
|
2400
2428
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
2401
2429
|
# object.
|
@@ -2624,7 +2652,7 @@ module Aws::S3
|
|
2624
2652
|
bucket: @bucket_name,
|
2625
2653
|
key: @key
|
2626
2654
|
)
|
2627
|
-
resp = Aws::Plugins::UserAgent.
|
2655
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
2628
2656
|
@client.put_object(options)
|
2629
2657
|
end
|
2630
2658
|
resp.data
|
@@ -2765,7 +2793,7 @@ module Aws::S3
|
|
2765
2793
|
bucket: @bucket_name,
|
2766
2794
|
key: @key
|
2767
2795
|
)
|
2768
|
-
resp = Aws::Plugins::UserAgent.
|
2796
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
2769
2797
|
@client.restore_object(options)
|
2770
2798
|
end
|
2771
2799
|
resp.data
|
@@ -2779,6 +2807,12 @@ module Aws::S3
|
|
2779
2807
|
# if_none_match: "IfNoneMatch",
|
2780
2808
|
# if_unmodified_since: Time.now,
|
2781
2809
|
# range: "Range",
|
2810
|
+
# response_cache_control: "ResponseCacheControl",
|
2811
|
+
# response_content_disposition: "ResponseContentDisposition",
|
2812
|
+
# response_content_encoding: "ResponseContentEncoding",
|
2813
|
+
# response_content_language: "ResponseContentLanguage",
|
2814
|
+
# response_content_type: "ResponseContentType",
|
2815
|
+
# response_expires: Time.now,
|
2782
2816
|
# version_id: "ObjectVersionId",
|
2783
2817
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
2784
2818
|
# sse_customer_key: "SSECustomerKey",
|
@@ -2866,6 +2900,18 @@ module Aws::S3
|
|
2866
2900
|
# satisfiable, only the `ContentLength` is affected in the response. If
|
2867
2901
|
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
2868
2902
|
# Satisfiable` error.
|
2903
|
+
# @option options [String] :response_cache_control
|
2904
|
+
# Sets the `Cache-Control` header of the response.
|
2905
|
+
# @option options [String] :response_content_disposition
|
2906
|
+
# Sets the `Content-Disposition` header of the response.
|
2907
|
+
# @option options [String] :response_content_encoding
|
2908
|
+
# Sets the `Content-Encoding` header of the response.
|
2909
|
+
# @option options [String] :response_content_language
|
2910
|
+
# Sets the `Content-Language` header of the response.
|
2911
|
+
# @option options [String] :response_content_type
|
2912
|
+
# Sets the `Content-Type` header of the response.
|
2913
|
+
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
2914
|
+
# Sets the `Expires` header of the response.
|
2869
2915
|
# @option options [String] :version_id
|
2870
2916
|
# Version ID used to reference a specific version of the object.
|
2871
2917
|
#
|
@@ -2926,17 +2972,21 @@ module Aws::S3
|
|
2926
2972
|
# @option options [String] :checksum_mode
|
2927
2973
|
# To retrieve the checksum, this parameter must be enabled.
|
2928
2974
|
#
|
2929
|
-
# In addition, if you enable
|
2930
|
-
# with
|
2931
|
-
# KMS), you must have permission to use the `kms:Decrypt` action
|
2932
|
-
#
|
2975
|
+
# In addition, if you enable checksum mode and the object is uploaded
|
2976
|
+
# with a [checksum][1] and encrypted with an Key Management Service
|
2977
|
+
# (KMS) key, you must have permission to use the `kms:Decrypt` action to
|
2978
|
+
# retrieve the checksum.
|
2979
|
+
#
|
2980
|
+
#
|
2981
|
+
#
|
2982
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
2933
2983
|
# @return [Types::HeadObjectOutput]
|
2934
2984
|
def head(options = {})
|
2935
2985
|
options = options.merge(
|
2936
2986
|
bucket: @bucket_name,
|
2937
2987
|
key: @key
|
2938
2988
|
)
|
2939
|
-
resp = Aws::Plugins::UserAgent.
|
2989
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
2940
2990
|
@client.head_object(options)
|
2941
2991
|
end
|
2942
2992
|
resp.data
|
@@ -3154,7 +3204,7 @@ module Aws::S3
|
|
3154
3204
|
key: item.key
|
3155
3205
|
}
|
3156
3206
|
end
|
3157
|
-
Aws::Plugins::UserAgent.
|
3207
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
3158
3208
|
batch[0].client.delete_objects(params)
|
3159
3209
|
end
|
3160
3210
|
end
|
@@ -79,7 +79,7 @@ module Aws::S3
|
|
79
79
|
#
|
80
80
|
# @return [self]
|
81
81
|
def load
|
82
|
-
resp = Aws::Plugins::UserAgent.
|
82
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
83
83
|
@client.get_object_acl(
|
84
84
|
bucket: @bucket_name,
|
85
85
|
key: @object_key
|
@@ -199,7 +199,7 @@ module Aws::S3
|
|
199
199
|
:retry
|
200
200
|
end
|
201
201
|
end
|
202
|
-
Aws::Plugins::UserAgent.
|
202
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
203
203
|
Aws::Waiters::Waiter.new(options).wait({})
|
204
204
|
end
|
205
205
|
end
|
@@ -332,7 +332,7 @@ module Aws::S3
|
|
332
332
|
bucket: @bucket_name,
|
333
333
|
key: @object_key
|
334
334
|
)
|
335
|
-
resp = Aws::Plugins::UserAgent.
|
335
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
336
336
|
@client.put_object_acl(options)
|
337
337
|
end
|
338
338
|
resp.data
|
@@ -28,7 +28,7 @@ module Aws
|
|
28
28
|
options[:bucket] = target_bucket
|
29
29
|
options[:key] = target_key
|
30
30
|
options[:copy_source] = copy_source(source)
|
31
|
-
Aws::Plugins::UserAgent.
|
31
|
+
Aws::Plugins::UserAgent.metric('S3_TRANSFER') do
|
32
32
|
if options.delete(:multipart_copy)
|
33
33
|
apply_source_client(source, options)
|
34
34
|
ObjectMultipartCopier.new(@options).copy(options)
|
@@ -186,7 +186,7 @@ module Aws::S3
|
|
186
186
|
options, params = separate_params_and_options(options)
|
187
187
|
waiter = Waiters::ObjectExists.new(options)
|
188
188
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
189
|
-
Aws::Plugins::UserAgent.
|
189
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
190
190
|
waiter.wait(params.merge(bucket: @bucket_name,
|
191
191
|
key: @key))
|
192
192
|
end
|
@@ -207,7 +207,7 @@ module Aws::S3
|
|
207
207
|
options, params = separate_params_and_options(options)
|
208
208
|
waiter = Waiters::ObjectNotExists.new(options)
|
209
209
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
210
|
-
Aws::Plugins::UserAgent.
|
210
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
211
211
|
waiter.wait(params.merge(bucket: @bucket_name,
|
212
212
|
key: @key))
|
213
213
|
end
|
@@ -312,7 +312,7 @@ module Aws::S3
|
|
312
312
|
:retry
|
313
313
|
end
|
314
314
|
end
|
315
|
-
Aws::Plugins::UserAgent.
|
315
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
316
316
|
Aws::Waiters::Waiter.new(options).wait({})
|
317
317
|
end
|
318
318
|
end
|
@@ -982,7 +982,7 @@ module Aws::S3
|
|
982
982
|
bucket: @bucket_name,
|
983
983
|
key: @key
|
984
984
|
)
|
985
|
-
resp = Aws::Plugins::UserAgent.
|
985
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
986
986
|
@client.copy_object(options)
|
987
987
|
end
|
988
988
|
resp.data
|
@@ -1048,7 +1048,7 @@ module Aws::S3
|
|
1048
1048
|
bucket: @bucket_name,
|
1049
1049
|
key: @key
|
1050
1050
|
)
|
1051
|
-
resp = Aws::Plugins::UserAgent.
|
1051
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1052
1052
|
@client.delete_object(options)
|
1053
1053
|
end
|
1054
1054
|
resp.data
|
@@ -1298,13 +1298,22 @@ module Aws::S3
|
|
1298
1298
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
1299
1299
|
# @option options [String] :checksum_mode
|
1300
1300
|
# To retrieve the checksum, this mode must be enabled.
|
1301
|
+
#
|
1302
|
+
# In addition, if you enable checksum mode and the object is uploaded
|
1303
|
+
# with a [checksum][1] and encrypted with an Key Management Service
|
1304
|
+
# (KMS) key, you must have permission to use the `kms:Decrypt` action to
|
1305
|
+
# retrieve the checksum.
|
1306
|
+
#
|
1307
|
+
#
|
1308
|
+
#
|
1309
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
1301
1310
|
# @return [Types::GetObjectOutput]
|
1302
1311
|
def get(options = {}, &block)
|
1303
1312
|
options = options.merge(
|
1304
1313
|
bucket: @bucket_name,
|
1305
1314
|
key: @key
|
1306
1315
|
)
|
1307
|
-
resp = Aws::Plugins::UserAgent.
|
1316
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1308
1317
|
@client.get_object(options, &block)
|
1309
1318
|
end
|
1310
1319
|
resp.data
|
@@ -1789,7 +1798,7 @@ module Aws::S3
|
|
1789
1798
|
bucket: @bucket_name,
|
1790
1799
|
key: @key
|
1791
1800
|
)
|
1792
|
-
resp = Aws::Plugins::UserAgent.
|
1801
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1793
1802
|
@client.create_multipart_upload(options)
|
1794
1803
|
end
|
1795
1804
|
MultipartUpload.new(
|
@@ -1818,6 +1827,7 @@ module Aws::S3
|
|
1818
1827
|
# checksum_sha1: "ChecksumSHA1",
|
1819
1828
|
# checksum_sha256: "ChecksumSHA256",
|
1820
1829
|
# expires: Time.now,
|
1830
|
+
# if_none_match: "IfNoneMatch",
|
1821
1831
|
# grant_full_control: "GrantFullControl",
|
1822
1832
|
# grant_read: "GrantRead",
|
1823
1833
|
# grant_read_acp: "GrantReadACP",
|
@@ -2032,6 +2042,24 @@ module Aws::S3
|
|
2032
2042
|
#
|
2033
2043
|
#
|
2034
2044
|
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
2045
|
+
# @option options [String] :if_none_match
|
2046
|
+
# Uploads the object only if the object key name does not already exist
|
2047
|
+
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
2048
|
+
# Precondition Failed` error.
|
2049
|
+
#
|
2050
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
2051
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
2052
|
+
# retry the upload.
|
2053
|
+
#
|
2054
|
+
# Expects the '*' (asterisk) character.
|
2055
|
+
#
|
2056
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
2057
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
2058
|
+
#
|
2059
|
+
#
|
2060
|
+
#
|
2061
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
2062
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
2035
2063
|
# @option options [String] :grant_full_control
|
2036
2064
|
# Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
|
2037
2065
|
# object.
|
@@ -2260,7 +2288,7 @@ module Aws::S3
|
|
2260
2288
|
bucket: @bucket_name,
|
2261
2289
|
key: @key
|
2262
2290
|
)
|
2263
|
-
resp = Aws::Plugins::UserAgent.
|
2291
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
2264
2292
|
@client.put_object(options)
|
2265
2293
|
end
|
2266
2294
|
resp.data
|
@@ -2401,7 +2429,7 @@ module Aws::S3
|
|
2401
2429
|
bucket: @bucket_name,
|
2402
2430
|
key: @key
|
2403
2431
|
)
|
2404
|
-
resp = Aws::Plugins::UserAgent.
|
2432
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
2405
2433
|
@client.restore_object(options)
|
2406
2434
|
end
|
2407
2435
|
resp.data
|
@@ -2628,7 +2656,7 @@ module Aws::S3
|
|
2628
2656
|
key: item.key
|
2629
2657
|
}
|
2630
2658
|
end
|
2631
|
-
Aws::Plugins::UserAgent.
|
2659
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
2632
2660
|
batch[0].client.delete_objects(params)
|
2633
2661
|
end
|
2634
2662
|
end
|
@@ -243,7 +243,7 @@ module Aws::S3
|
|
243
243
|
:retry
|
244
244
|
end
|
245
245
|
end
|
246
|
-
Aws::Plugins::UserAgent.
|
246
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
247
247
|
Aws::Waiters::Waiter.new(options).wait({})
|
248
248
|
end
|
249
249
|
end
|
@@ -303,7 +303,7 @@ module Aws::S3
|
|
303
303
|
key: @object_key,
|
304
304
|
version_id: @id
|
305
305
|
)
|
306
|
-
resp = Aws::Plugins::UserAgent.
|
306
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
307
307
|
@client.delete_object(options)
|
308
308
|
end
|
309
309
|
resp.data
|
@@ -523,6 +523,15 @@ module Aws::S3
|
|
523
523
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
524
524
|
# @option options [String] :checksum_mode
|
525
525
|
# To retrieve the checksum, this mode must be enabled.
|
526
|
+
#
|
527
|
+
# In addition, if you enable checksum mode and the object is uploaded
|
528
|
+
# with a [checksum][1] and encrypted with an Key Management Service
|
529
|
+
# (KMS) key, you must have permission to use the `kms:Decrypt` action to
|
530
|
+
# retrieve the checksum.
|
531
|
+
#
|
532
|
+
#
|
533
|
+
#
|
534
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
526
535
|
# @return [Types::GetObjectOutput]
|
527
536
|
def get(options = {}, &block)
|
528
537
|
options = options.merge(
|
@@ -530,7 +539,7 @@ module Aws::S3
|
|
530
539
|
key: @object_key,
|
531
540
|
version_id: @id
|
532
541
|
)
|
533
|
-
resp = Aws::Plugins::UserAgent.
|
542
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
534
543
|
@client.get_object(options, &block)
|
535
544
|
end
|
536
545
|
resp.data
|
@@ -544,6 +553,12 @@ module Aws::S3
|
|
544
553
|
# if_none_match: "IfNoneMatch",
|
545
554
|
# if_unmodified_since: Time.now,
|
546
555
|
# range: "Range",
|
556
|
+
# response_cache_control: "ResponseCacheControl",
|
557
|
+
# response_content_disposition: "ResponseContentDisposition",
|
558
|
+
# response_content_encoding: "ResponseContentEncoding",
|
559
|
+
# response_content_language: "ResponseContentLanguage",
|
560
|
+
# response_content_type: "ResponseContentType",
|
561
|
+
# response_expires: Time.now,
|
547
562
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
548
563
|
# sse_customer_key: "SSECustomerKey",
|
549
564
|
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
@@ -630,6 +645,18 @@ module Aws::S3
|
|
630
645
|
# satisfiable, only the `ContentLength` is affected in the response. If
|
631
646
|
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
632
647
|
# Satisfiable` error.
|
648
|
+
# @option options [String] :response_cache_control
|
649
|
+
# Sets the `Cache-Control` header of the response.
|
650
|
+
# @option options [String] :response_content_disposition
|
651
|
+
# Sets the `Content-Disposition` header of the response.
|
652
|
+
# @option options [String] :response_content_encoding
|
653
|
+
# Sets the `Content-Encoding` header of the response.
|
654
|
+
# @option options [String] :response_content_language
|
655
|
+
# Sets the `Content-Language` header of the response.
|
656
|
+
# @option options [String] :response_content_type
|
657
|
+
# Sets the `Content-Type` header of the response.
|
658
|
+
# @option options [Time,DateTime,Date,Integer,String] :response_expires
|
659
|
+
# Sets the `Expires` header of the response.
|
633
660
|
# @option options [String] :sse_customer_algorithm
|
634
661
|
# Specifies the algorithm to use when encrypting the object (for
|
635
662
|
# example, AES256).
|
@@ -683,10 +710,14 @@ module Aws::S3
|
|
683
710
|
# @option options [String] :checksum_mode
|
684
711
|
# To retrieve the checksum, this parameter must be enabled.
|
685
712
|
#
|
686
|
-
# In addition, if you enable
|
687
|
-
# with
|
688
|
-
# KMS), you must have permission to use the `kms:Decrypt` action
|
689
|
-
#
|
713
|
+
# In addition, if you enable checksum mode and the object is uploaded
|
714
|
+
# with a [checksum][1] and encrypted with an Key Management Service
|
715
|
+
# (KMS) key, you must have permission to use the `kms:Decrypt` action to
|
716
|
+
# retrieve the checksum.
|
717
|
+
#
|
718
|
+
#
|
719
|
+
#
|
720
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
690
721
|
# @return [Types::HeadObjectOutput]
|
691
722
|
def head(options = {})
|
692
723
|
options = options.merge(
|
@@ -694,7 +725,7 @@ module Aws::S3
|
|
694
725
|
key: @object_key,
|
695
726
|
version_id: @id
|
696
727
|
)
|
697
|
-
resp = Aws::Plugins::UserAgent.
|
728
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
698
729
|
@client.head_object(options)
|
699
730
|
end
|
700
731
|
resp.data
|
@@ -868,7 +899,7 @@ module Aws::S3
|
|
868
899
|
version_id: item.id
|
869
900
|
}
|
870
901
|
end
|
871
|
-
Aws::Plugins::UserAgent.
|
902
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
872
903
|
batch[0].client.delete_objects(params)
|
873
904
|
end
|
874
905
|
end
|