aws-sdk-s3 1.172.0 → 1.176.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +36 -2
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +5 -0
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +20 -0
- data/lib/aws-sdk-s3/client.rb +1525 -892
- data/lib/aws-sdk-s3/client_api.rb +126 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +36 -0
- data/lib/aws-sdk-s3/endpoints.rb +42 -0
- data/lib/aws-sdk-s3/errors.rb +44 -0
- data/lib/aws-sdk-s3/multipart_upload.rb +33 -0
- data/lib/aws-sdk-s3/object.rb +77 -1
- data/lib/aws-sdk-s3/object_summary.rb +74 -0
- data/lib/aws-sdk-s3/object_version.rb +43 -0
- data/lib/aws-sdk-s3/presigner.rb +1 -0
- data/lib/aws-sdk-s3/resource.rb +9 -8
- data/lib/aws-sdk-s3/types.rb +823 -120
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/bucket.rbs +8 -3
- data/sig/client.rbs +50 -6
- data/sig/errors.rbs +8 -0
- data/sig/multipart_upload.rbs +3 -1
- data/sig/object.rbs +6 -1
- data/sig/object_summary.rbs +6 -1
- data/sig/object_version.rbs +4 -1
- data/sig/resource.rbs +2 -2
- data/sig/types.rbs +89 -3
- metadata +2 -2
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -66,7 +66,9 @@ module Aws::S3
|
|
66
66
|
# providing object expiration information. The value of the `rule-id` is
|
67
67
|
# URL-encoded.
|
68
68
|
#
|
69
|
-
# <note markdown="1">
|
69
|
+
# <note markdown="1"> Object expiration information is not returned in directory buckets and
|
70
|
+
# this header returns the value "`NotImplemented`" in all responses
|
71
|
+
# for directory buckets.
|
70
72
|
#
|
71
73
|
# </note>
|
72
74
|
#
|
@@ -1410,6 +1412,9 @@ module Aws::S3
|
|
1410
1412
|
# request_payer: "requester", # accepts requester
|
1411
1413
|
# bypass_governance_retention: false,
|
1412
1414
|
# expected_bucket_owner: "AccountId",
|
1415
|
+
# if_match: "IfMatch",
|
1416
|
+
# if_match_last_modified_time: Time.now,
|
1417
|
+
# if_match_size: 1,
|
1413
1418
|
# })
|
1414
1419
|
# @param [Hash] options ({})
|
1415
1420
|
# @option options [String] :mfa
|
@@ -1456,6 +1461,46 @@ module Aws::S3
|
|
1456
1461
|
# The account ID of the expected bucket owner. If the account ID that
|
1457
1462
|
# you provide does not match the actual owner of the bucket, the request
|
1458
1463
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
1464
|
+
# @option options [String] :if_match
|
1465
|
+
# The `If-Match` header field makes the request method conditional on
|
1466
|
+
# ETags. If the ETag value does not match, the operation returns a `412
|
1467
|
+
# Precondition Failed` error. If the ETag matches or if the object
|
1468
|
+
# doesn't exist, the operation will return a `204 Success (No Content)
|
1469
|
+
# response`.
|
1470
|
+
#
|
1471
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
1472
|
+
#
|
1473
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
1474
|
+
#
|
1475
|
+
# </note>
|
1476
|
+
#
|
1477
|
+
#
|
1478
|
+
#
|
1479
|
+
# [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
|
1480
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
|
1481
|
+
# If present, the object is deleted only if its modification times
|
1482
|
+
# matches the provided `Timestamp`. If the `Timestamp` values do not
|
1483
|
+
# match, the operation returns a `412 Precondition Failed` error. If the
|
1484
|
+
# `Timestamp` matches or if the object doesn’t exist, the operation
|
1485
|
+
# returns a `204 Success (No Content)` response.
|
1486
|
+
#
|
1487
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
1488
|
+
#
|
1489
|
+
# </note>
|
1490
|
+
# @option options [Integer] :if_match_size
|
1491
|
+
# If present, the object is deleted only if its size matches the
|
1492
|
+
# provided size in bytes. If the `Size` value does not match, the
|
1493
|
+
# operation returns a `412 Precondition Failed` error. If the `Size`
|
1494
|
+
# matches or if the object doesn’t exist, the operation returns a `204
|
1495
|
+
# Success (No Content)` response.
|
1496
|
+
#
|
1497
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
1498
|
+
#
|
1499
|
+
# </note>
|
1500
|
+
#
|
1501
|
+
# You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
|
1502
|
+
# `x-amz-if-match-size` conditional headers in conjunction with
|
1503
|
+
# each-other or individually.
|
1459
1504
|
# @return [Types::DeleteObjectOutput]
|
1460
1505
|
def delete(options = {})
|
1461
1506
|
options = options.merge(
|
@@ -2325,11 +2370,13 @@ module Aws::S3
|
|
2325
2370
|
# checksum_sha1: "ChecksumSHA1",
|
2326
2371
|
# checksum_sha256: "ChecksumSHA256",
|
2327
2372
|
# expires: Time.now,
|
2373
|
+
# if_match: "IfMatch",
|
2328
2374
|
# if_none_match: "IfNoneMatch",
|
2329
2375
|
# grant_full_control: "GrantFullControl",
|
2330
2376
|
# grant_read: "GrantRead",
|
2331
2377
|
# grant_read_acp: "GrantReadACP",
|
2332
2378
|
# grant_write_acp: "GrantWriteACP",
|
2379
|
+
# write_offset_bytes: 1,
|
2333
2380
|
# metadata: {
|
2334
2381
|
# "MetadataKey" => "MetadataValue",
|
2335
2382
|
# },
|
@@ -2548,6 +2595,25 @@ module Aws::S3
|
|
2548
2595
|
#
|
2549
2596
|
#
|
2550
2597
|
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
2598
|
+
# @option options [String] :if_match
|
2599
|
+
# Uploads the object only if the ETag (entity tag) value provided during
|
2600
|
+
# the WRITE operation matches the ETag of the object in S3. If the ETag
|
2601
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
2602
|
+
# error.
|
2603
|
+
#
|
2604
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
2605
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
2606
|
+
# fetch the object's ETag and retry the upload.
|
2607
|
+
#
|
2608
|
+
# Expects the ETag value as a string.
|
2609
|
+
#
|
2610
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
2611
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
2612
|
+
#
|
2613
|
+
#
|
2614
|
+
#
|
2615
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
2616
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
2551
2617
|
# @option options [String] :if_none_match
|
2552
2618
|
# Uploads the object only if the object key name does not already exist
|
2553
2619
|
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
@@ -2599,6 +2665,16 @@ module Aws::S3
|
|
2599
2665
|
# * This functionality is not supported for Amazon S3 on Outposts.
|
2600
2666
|
#
|
2601
2667
|
# </note>
|
2668
|
+
# @option options [Integer] :write_offset_bytes
|
2669
|
+
# Specifies the offset for appending data to existing objects in bytes.
|
2670
|
+
# The offset must be equal to the size of the existing object being
|
2671
|
+
# appended to. If no object exists, setting this header to 0 will create
|
2672
|
+
# a new object.
|
2673
|
+
#
|
2674
|
+
# <note markdown="1"> This functionality is only supported for objects in the Amazon S3
|
2675
|
+
# Express One Zone storage class in directory buckets.
|
2676
|
+
#
|
2677
|
+
# </note>
|
2602
2678
|
# @option options [Hash<String,String>] :metadata
|
2603
2679
|
# A map of metadata to store with the object in S3.
|
2604
2680
|
# @option options [String] :server_side_encryption
|
@@ -1060,6 +1060,9 @@ module Aws::S3
|
|
1060
1060
|
# request_payer: "requester", # accepts requester
|
1061
1061
|
# bypass_governance_retention: false,
|
1062
1062
|
# expected_bucket_owner: "AccountId",
|
1063
|
+
# if_match: "IfMatch",
|
1064
|
+
# if_match_last_modified_time: Time.now,
|
1065
|
+
# if_match_size: 1,
|
1063
1066
|
# })
|
1064
1067
|
# @param [Hash] options ({})
|
1065
1068
|
# @option options [String] :mfa
|
@@ -1106,6 +1109,46 @@ module Aws::S3
|
|
1106
1109
|
# The account ID of the expected bucket owner. If the account ID that
|
1107
1110
|
# you provide does not match the actual owner of the bucket, the request
|
1108
1111
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
1112
|
+
# @option options [String] :if_match
|
1113
|
+
# The `If-Match` header field makes the request method conditional on
|
1114
|
+
# ETags. If the ETag value does not match, the operation returns a `412
|
1115
|
+
# Precondition Failed` error. If the ETag matches or if the object
|
1116
|
+
# doesn't exist, the operation will return a `204 Success (No Content)
|
1117
|
+
# response`.
|
1118
|
+
#
|
1119
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
1120
|
+
#
|
1121
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
1122
|
+
#
|
1123
|
+
# </note>
|
1124
|
+
#
|
1125
|
+
#
|
1126
|
+
#
|
1127
|
+
# [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
|
1128
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
|
1129
|
+
# If present, the object is deleted only if its modification times
|
1130
|
+
# matches the provided `Timestamp`. If the `Timestamp` values do not
|
1131
|
+
# match, the operation returns a `412 Precondition Failed` error. If the
|
1132
|
+
# `Timestamp` matches or if the object doesn’t exist, the operation
|
1133
|
+
# returns a `204 Success (No Content)` response.
|
1134
|
+
#
|
1135
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
1136
|
+
#
|
1137
|
+
# </note>
|
1138
|
+
# @option options [Integer] :if_match_size
|
1139
|
+
# If present, the object is deleted only if its size matches the
|
1140
|
+
# provided size in bytes. If the `Size` value does not match, the
|
1141
|
+
# operation returns a `412 Precondition Failed` error. If the `Size`
|
1142
|
+
# matches or if the object doesn’t exist, the operation returns a `204
|
1143
|
+
# Success (No Content)` response.
|
1144
|
+
#
|
1145
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
1146
|
+
#
|
1147
|
+
# </note>
|
1148
|
+
#
|
1149
|
+
# You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
|
1150
|
+
# `x-amz-if-match-size` conditional headers in conjunction with
|
1151
|
+
# each-other or individually.
|
1109
1152
|
# @return [Types::DeleteObjectOutput]
|
1110
1153
|
def delete(options = {})
|
1111
1154
|
options = options.merge(
|
@@ -1975,11 +2018,13 @@ module Aws::S3
|
|
1975
2018
|
# checksum_sha1: "ChecksumSHA1",
|
1976
2019
|
# checksum_sha256: "ChecksumSHA256",
|
1977
2020
|
# expires: Time.now,
|
2021
|
+
# if_match: "IfMatch",
|
1978
2022
|
# if_none_match: "IfNoneMatch",
|
1979
2023
|
# grant_full_control: "GrantFullControl",
|
1980
2024
|
# grant_read: "GrantRead",
|
1981
2025
|
# grant_read_acp: "GrantReadACP",
|
1982
2026
|
# grant_write_acp: "GrantWriteACP",
|
2027
|
+
# write_offset_bytes: 1,
|
1983
2028
|
# metadata: {
|
1984
2029
|
# "MetadataKey" => "MetadataValue",
|
1985
2030
|
# },
|
@@ -2198,6 +2243,25 @@ module Aws::S3
|
|
2198
2243
|
#
|
2199
2244
|
#
|
2200
2245
|
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
2246
|
+
# @option options [String] :if_match
|
2247
|
+
# Uploads the object only if the ETag (entity tag) value provided during
|
2248
|
+
# the WRITE operation matches the ETag of the object in S3. If the ETag
|
2249
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
2250
|
+
# error.
|
2251
|
+
#
|
2252
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
2253
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
2254
|
+
# fetch the object's ETag and retry the upload.
|
2255
|
+
#
|
2256
|
+
# Expects the ETag value as a string.
|
2257
|
+
#
|
2258
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
2259
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
2260
|
+
#
|
2261
|
+
#
|
2262
|
+
#
|
2263
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
2264
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
2201
2265
|
# @option options [String] :if_none_match
|
2202
2266
|
# Uploads the object only if the object key name does not already exist
|
2203
2267
|
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
@@ -2249,6 +2313,16 @@ module Aws::S3
|
|
2249
2313
|
# * This functionality is not supported for Amazon S3 on Outposts.
|
2250
2314
|
#
|
2251
2315
|
# </note>
|
2316
|
+
# @option options [Integer] :write_offset_bytes
|
2317
|
+
# Specifies the offset for appending data to existing objects in bytes.
|
2318
|
+
# The offset must be equal to the size of the existing object being
|
2319
|
+
# appended to. If no object exists, setting this header to 0 will create
|
2320
|
+
# a new object.
|
2321
|
+
#
|
2322
|
+
# <note markdown="1"> This functionality is only supported for objects in the Amazon S3
|
2323
|
+
# Express One Zone storage class in directory buckets.
|
2324
|
+
#
|
2325
|
+
# </note>
|
2252
2326
|
# @option options [Hash<String,String>] :metadata
|
2253
2327
|
# A map of metadata to store with the object in S3.
|
2254
2328
|
# @option options [String] :server_side_encryption
|
@@ -257,6 +257,9 @@ module Aws::S3
|
|
257
257
|
# request_payer: "requester", # accepts requester
|
258
258
|
# bypass_governance_retention: false,
|
259
259
|
# expected_bucket_owner: "AccountId",
|
260
|
+
# if_match: "IfMatch",
|
261
|
+
# if_match_last_modified_time: Time.now,
|
262
|
+
# if_match_size: 1,
|
260
263
|
# })
|
261
264
|
# @param [Hash] options ({})
|
262
265
|
# @option options [String] :mfa
|
@@ -296,6 +299,46 @@ module Aws::S3
|
|
296
299
|
# The account ID of the expected bucket owner. If the account ID that
|
297
300
|
# you provide does not match the actual owner of the bucket, the request
|
298
301
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
302
|
+
# @option options [String] :if_match
|
303
|
+
# The `If-Match` header field makes the request method conditional on
|
304
|
+
# ETags. If the ETag value does not match, the operation returns a `412
|
305
|
+
# Precondition Failed` error. If the ETag matches or if the object
|
306
|
+
# doesn't exist, the operation will return a `204 Success (No Content)
|
307
|
+
# response`.
|
308
|
+
#
|
309
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
310
|
+
#
|
311
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
312
|
+
#
|
313
|
+
# </note>
|
314
|
+
#
|
315
|
+
#
|
316
|
+
#
|
317
|
+
# [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
|
318
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
|
319
|
+
# If present, the object is deleted only if its modification times
|
320
|
+
# matches the provided `Timestamp`. If the `Timestamp` values do not
|
321
|
+
# match, the operation returns a `412 Precondition Failed` error. If the
|
322
|
+
# `Timestamp` matches or if the object doesn’t exist, the operation
|
323
|
+
# returns a `204 Success (No Content)` response.
|
324
|
+
#
|
325
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
326
|
+
#
|
327
|
+
# </note>
|
328
|
+
# @option options [Integer] :if_match_size
|
329
|
+
# If present, the object is deleted only if its size matches the
|
330
|
+
# provided size in bytes. If the `Size` value does not match, the
|
331
|
+
# operation returns a `412 Precondition Failed` error. If the `Size`
|
332
|
+
# matches or if the object doesn’t exist, the operation returns a `204
|
333
|
+
# Success (No Content)` response.
|
334
|
+
#
|
335
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
336
|
+
#
|
337
|
+
# </note>
|
338
|
+
#
|
339
|
+
# You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
|
340
|
+
# `x-amz-if-match-size` conditional headers in conjunction with
|
341
|
+
# each-other or individually.
|
299
342
|
# @return [Types::DeleteObjectOutput]
|
300
343
|
def delete(options = {})
|
301
344
|
options = options.merge(
|
data/lib/aws-sdk-s3/presigner.rb
CHANGED
@@ -238,6 +238,7 @@ module Aws
|
|
238
238
|
credentials_provider: context[:sigv4_credentials] || context.config.credentials,
|
239
239
|
signing_algorithm: scheme_name.to_sym,
|
240
240
|
uri_escape_path: !!!auth_scheme['disableDoubleEncoding'],
|
241
|
+
normalize_path: !!!auth_scheme['disableNormalizePath'],
|
241
242
|
unsigned_headers: unsigned_headers,
|
242
243
|
apply_checksum_header: false
|
243
244
|
)
|
data/lib/aws-sdk-s3/resource.rb
CHANGED
@@ -43,11 +43,11 @@ module Aws::S3
|
|
43
43
|
# create_bucket_configuration: {
|
44
44
|
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
|
45
45
|
# location: {
|
46
|
-
# type: "AvailabilityZone", # accepts AvailabilityZone
|
46
|
+
# type: "AvailabilityZone", # accepts AvailabilityZone, LocalZone
|
47
47
|
# name: "LocationNameAsString",
|
48
48
|
# },
|
49
49
|
# bucket: {
|
50
|
-
# data_redundancy: "SingleAvailabilityZone", # accepts SingleAvailabilityZone
|
50
|
+
# data_redundancy: "SingleAvailabilityZone", # accepts SingleAvailabilityZone, SingleLocalZone
|
51
51
|
# type: "Directory", # accepts Directory
|
52
52
|
# },
|
53
53
|
# },
|
@@ -75,13 +75,14 @@ module Aws::S3
|
|
75
75
|
#
|
76
76
|
# <b>Directory buckets </b> - When you use this operation with a
|
77
77
|
# directory bucket, you must use path-style requests in the format
|
78
|
-
# `https://s3express-control.
|
78
|
+
# `https://s3express-control.region-code.amazonaws.com/bucket-name `.
|
79
79
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
80
|
-
# names must be unique in the chosen Availability Zone
|
81
|
-
# must also follow the format `
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
80
|
+
# names must be unique in the chosen Zone (Availability Zone or Local
|
81
|
+
# Zone). Bucket names must also follow the format `
|
82
|
+
# bucket-base-name--zone-id--x-s3` (for example, `
|
83
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
84
|
+
# naming restrictions, see [Directory bucket naming rules][2] in the
|
85
|
+
# *Amazon S3 User Guide*
|
85
86
|
#
|
86
87
|
#
|
87
88
|
#
|