aws-sdk-s3 1.169.0 → 1.177.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.
@@ -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"> This functionality is not supported for directory buckets.
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(
@@ -71,9 +71,9 @@ module Aws
71
71
 
72
72
  def check_for_error(context)
73
73
  xml = context.http_response.body_contents
74
- if xml.match(/\?>\s*<Error>/)
75
- error_code = xml.match(/<Code>(.+?)<\/Code>/)[1]
76
- error_message = xml.match(/<Message>(.+?)<\/Message>/)[1]
74
+ if xml.match(/<\?xml\s[^>]*\?>\s*<Error>/)
75
+ error_code = xml.match(%r{<Code>(.+?)</Code>})[1]
76
+ error_message = xml.match(%r{<Message>(.+?)</Message>})[1]
77
77
  S3::Errors.error_class(error_code).new(context, error_message)
78
78
  elsif incomplete_xml_body?(xml, context.operation.output)
79
79
  Seahorse::Client::NetworkingError.new(
@@ -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
  )
@@ -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.region_code.amazonaws.com/bucket-name `.
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. Bucket names
81
- # must also follow the format ` bucket_base_name--az_id--x-s3` (for
82
- # example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
83
- # bucket naming restrictions, see [Directory bucket naming rules][2] in
84
- # the *Amazon S3 User Guide*
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
  #