aws-sdk-s3 1.167.0 → 1.176.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,12 +29,16 @@ module Aws::S3
29
29
  # ## Error Classes
30
30
  # * {BucketAlreadyExists}
31
31
  # * {BucketAlreadyOwnedByYou}
32
+ # * {EncryptionTypeMismatch}
32
33
  # * {InvalidObjectState}
34
+ # * {InvalidRequest}
35
+ # * {InvalidWriteOffset}
33
36
  # * {NoSuchBucket}
34
37
  # * {NoSuchKey}
35
38
  # * {NoSuchUpload}
36
39
  # * {ObjectAlreadyInActiveTierError}
37
40
  # * {ObjectNotInActiveTierError}
41
+ # * {TooManyParts}
38
42
  #
39
43
  # Additionally, error classes are dynamically generated for service errors based on the error code
40
44
  # if they are not defined above.
@@ -62,6 +66,16 @@ module Aws::S3
62
66
  end
63
67
  end
64
68
 
69
+ class EncryptionTypeMismatch < ServiceError
70
+
71
+ # @param [Seahorse::Client::RequestContext] context
72
+ # @param [String] message
73
+ # @param [Aws::S3::Types::EncryptionTypeMismatch] data
74
+ def initialize(context, message, data = Aws::EmptyStructure.new)
75
+ super(context, message, data)
76
+ end
77
+ end
78
+
65
79
  class InvalidObjectState < ServiceError
66
80
 
67
81
  # @param [Seahorse::Client::RequestContext] context
@@ -82,6 +96,26 @@ module Aws::S3
82
96
  end
83
97
  end
84
98
 
99
+ class InvalidRequest < ServiceError
100
+
101
+ # @param [Seahorse::Client::RequestContext] context
102
+ # @param [String] message
103
+ # @param [Aws::S3::Types::InvalidRequest] data
104
+ def initialize(context, message, data = Aws::EmptyStructure.new)
105
+ super(context, message, data)
106
+ end
107
+ end
108
+
109
+ class InvalidWriteOffset < ServiceError
110
+
111
+ # @param [Seahorse::Client::RequestContext] context
112
+ # @param [String] message
113
+ # @param [Aws::S3::Types::InvalidWriteOffset] data
114
+ def initialize(context, message, data = Aws::EmptyStructure.new)
115
+ super(context, message, data)
116
+ end
117
+ end
118
+
85
119
  class NoSuchBucket < ServiceError
86
120
 
87
121
  # @param [Seahorse::Client::RequestContext] context
@@ -132,6 +166,16 @@ module Aws::S3
132
166
  end
133
167
  end
134
168
 
169
+ class TooManyParts < ServiceError
170
+
171
+ # @param [Seahorse::Client::RequestContext] context
172
+ # @param [String] message
173
+ # @param [Aws::S3::Types::TooManyParts] data
174
+ def initialize(context, message, data = Aws::EmptyStructure.new)
175
+ super(context, message, data)
176
+ end
177
+ end
178
+
135
179
  end
136
180
  end
137
181
 
@@ -239,6 +239,7 @@ module Aws::S3
239
239
  # multipart_upload.abort({
240
240
  # request_payer: "requester", # accepts requester
241
241
  # expected_bucket_owner: "AccountId",
242
+ # if_match_initiated_time: Time.now,
242
243
  # })
243
244
  # @param [Hash] options ({})
244
245
  # @option options [String] :request_payer
@@ -261,6 +262,17 @@ module Aws::S3
261
262
  # The account ID of the expected bucket owner. If the account ID that
262
263
  # you provide does not match the actual owner of the bucket, the request
263
264
  # fails with the HTTP status code `403 Forbidden` (access denied).
265
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_initiated_time
266
+ # If present, this header aborts an in progress multipart upload only if
267
+ # it was initiated on the provided timestamp. If the initiated timestamp
268
+ # of the multipart upload does not match the provided value, the
269
+ # operation returns a `412 Precondition Failed` error. If the initiated
270
+ # timestamp matches or if the multipart upload doesn’t exist, the
271
+ # operation returns a `204 Success (No Content)` response.
272
+ #
273
+ # <note markdown="1"> This functionality is only supported for directory buckets.
274
+ #
275
+ # </note>
264
276
  # @return [Types::AbortMultipartUploadOutput]
265
277
  def abort(options = {})
266
278
  options = options.merge(
@@ -295,6 +307,7 @@ module Aws::S3
295
307
  # checksum_sha256: "ChecksumSHA256",
296
308
  # request_payer: "requester", # accepts requester
297
309
  # expected_bucket_owner: "AccountId",
310
+ # if_match: "IfMatch",
298
311
  # if_none_match: "IfNoneMatch",
299
312
  # sse_customer_algorithm: "SSECustomerAlgorithm",
300
313
  # sse_customer_key: "SSECustomerKey",
@@ -363,6 +376,26 @@ module Aws::S3
363
376
  # The account ID of the expected bucket owner. If the account ID that
364
377
  # you provide does not match the actual owner of the bucket, the request
365
378
  # fails with the HTTP status code `403 Forbidden` (access denied).
379
+ # @option options [String] :if_match
380
+ # Uploads the object only if the ETag (entity tag) value provided during
381
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
382
+ # values do not match, the operation returns a `412 Precondition Failed`
383
+ # error.
384
+ #
385
+ # If a conflicting operation occurs during the upload S3 returns a `409
386
+ # ConditionalRequestConflict` response. On a 409 failure you should
387
+ # fetch the object's ETag, re-initiate the multipart upload with
388
+ # `CreateMultipartUpload`, and re-upload each part.
389
+ #
390
+ # Expects the ETag value as a string.
391
+ #
392
+ # For more information about conditional requests, see [RFC 7232][1], or
393
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
394
+ #
395
+ #
396
+ #
397
+ # [1]: https://tools.ietf.org/html/rfc7232
398
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
366
399
  # @option options [String] :if_none_match
367
400
  # Uploads the object only if the object key name does not already exist
368
401
  # in the bucket specified. Otherwise, Amazon S3 returns a `412
@@ -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
  #
@@ -1073,17 +1075,17 @@ module Aws::S3
1073
1075
  # * To encrypt new object copies to a directory bucket with SSE-KMS, we
1074
1076
  # recommend you specify SSE-KMS as the directory bucket's default
1075
1077
  # encryption configuration with a KMS key (specifically, a [customer
1076
- # managed key][4]). [Amazon Web Services managed key][5] (`aws/s3`)
1077
- # isn't supported. Your SSE-KMS configuration can only support 1
1078
- # [customer managed key][4] per directory bucket for the lifetime of
1079
- # the bucket. After you specify a customer managed key for SSE-KMS,
1080
- # you can't override the customer managed key for the bucket's
1081
- # SSE-KMS configuration. Then, when you perform a `CopyObject`
1082
- # operation and want to specify server-side encryption settings for
1083
- # new object copies with SSE-KMS in the encryption-related request
1084
- # headers, you must ensure the encryption key is the same customer
1085
- # managed key that you specified for the directory bucket's default
1086
- # encryption configuration.
1078
+ # managed key][4]). The [Amazon Web Services managed key][5]
1079
+ # (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
1080
+ # support 1 [customer managed key][4] per directory bucket for the
1081
+ # lifetime of the bucket. After you specify a customer managed key for
1082
+ # SSE-KMS, you can't override the customer managed key for the
1083
+ # bucket's SSE-KMS configuration. Then, when you perform a
1084
+ # `CopyObject` operation and want to specify server-side encryption
1085
+ # settings for new object copies with SSE-KMS in the
1086
+ # encryption-related request headers, you must ensure the encryption
1087
+ # key is the same customer managed key that you specified for the
1088
+ # directory bucket's default encryption configuration.
1087
1089
  #
1088
1090
  #
1089
1091
  #
@@ -1191,14 +1193,19 @@ module Aws::S3
1191
1193
  # Guide*.
1192
1194
  #
1193
1195
  # **Directory buckets** - If you specify `x-amz-server-side-encryption`
1194
- # with `aws:kms`, you must specify the `
1195
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
1196
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
1197
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
1198
- # key ID or key ARN. The key alias format of the KMS key isn't
1199
- # supported. Your SSE-KMS configuration can only support 1 [customer
1200
- # managed key][2] per directory bucket for the lifetime of the bucket.
1201
- # [Amazon Web Services managed key][3] (`aws/s3`) isn't supported.
1196
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
1197
+ # header is implicitly assigned the ID of the KMS symmetric encryption
1198
+ # customer managed key that's configured for your directory bucket's
1199
+ # default encryption setting. If you want to specify the `
1200
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
1201
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
1202
+ # customer managed key that's configured for your directory bucket's
1203
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
1204
+ # Request` error. Only use the key ID or key ARN. The key alias format
1205
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
1206
+ # support 1 [customer managed key][2] per directory bucket for the
1207
+ # lifetime of the bucket. The [Amazon Web Services managed key][3]
1208
+ # (`aws/s3`) isn't supported.
1202
1209
  #
1203
1210
  #
1204
1211
  #
@@ -1405,6 +1412,9 @@ module Aws::S3
1405
1412
  # request_payer: "requester", # accepts requester
1406
1413
  # bypass_governance_retention: false,
1407
1414
  # expected_bucket_owner: "AccountId",
1415
+ # if_match: "IfMatch",
1416
+ # if_match_last_modified_time: Time.now,
1417
+ # if_match_size: 1,
1408
1418
  # })
1409
1419
  # @param [Hash] options ({})
1410
1420
  # @option options [String] :mfa
@@ -1451,6 +1461,46 @@ module Aws::S3
1451
1461
  # The account ID of the expected bucket owner. If the account ID that
1452
1462
  # you provide does not match the actual owner of the bucket, the request
1453
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.
1454
1504
  # @return [Types::DeleteObjectOutput]
1455
1505
  def delete(options = {})
1456
1506
  options = options.merge(
@@ -2176,14 +2226,19 @@ module Aws::S3
2176
2226
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
2177
2227
  #
2178
2228
  # **Directory buckets** - If you specify `x-amz-server-side-encryption`
2179
- # with `aws:kms`, you must specify the `
2180
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
2181
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
2182
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
2183
- # key ID or key ARN. The key alias format of the KMS key isn't
2184
- # supported. Your SSE-KMS configuration can only support 1 [customer
2185
- # managed key][1] per directory bucket for the lifetime of the bucket.
2186
- # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
2229
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
2230
+ # header is implicitly assigned the ID of the KMS symmetric encryption
2231
+ # customer managed key that's configured for your directory bucket's
2232
+ # default encryption setting. If you want to specify the `
2233
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
2234
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
2235
+ # customer managed key that's configured for your directory bucket's
2236
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
2237
+ # Request` error. Only use the key ID or key ARN. The key alias format
2238
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
2239
+ # support 1 [customer managed key][1] per directory bucket for the
2240
+ # lifetime of the bucket. The [Amazon Web Services managed key][2]
2241
+ # (`aws/s3`) isn't supported.
2187
2242
  #
2188
2243
  #
2189
2244
  #
@@ -2315,11 +2370,13 @@ module Aws::S3
2315
2370
  # checksum_sha1: "ChecksumSHA1",
2316
2371
  # checksum_sha256: "ChecksumSHA256",
2317
2372
  # expires: Time.now,
2373
+ # if_match: "IfMatch",
2318
2374
  # if_none_match: "IfNoneMatch",
2319
2375
  # grant_full_control: "GrantFullControl",
2320
2376
  # grant_read: "GrantRead",
2321
2377
  # grant_read_acp: "GrantReadACP",
2322
2378
  # grant_write_acp: "GrantWriteACP",
2379
+ # write_offset_bytes: 1,
2323
2380
  # metadata: {
2324
2381
  # "MetadataKey" => "MetadataValue",
2325
2382
  # },
@@ -2423,10 +2480,11 @@ module Aws::S3
2423
2480
  # information about REST request authentication, see [REST
2424
2481
  # Authentication][1].
2425
2482
  #
2426
- # <note markdown="1"> The `Content-MD5` header is required for any request to upload an
2427
- # object with a retention period configured using Amazon S3 Object Lock.
2428
- # For more information about Amazon S3 Object Lock, see [Amazon S3
2429
- # Object Lock Overview][2] in the *Amazon S3 User Guide*.
2483
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2484
+ # for any request to upload an object with a retention period configured
2485
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2486
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2487
+ # Guide*.
2430
2488
  #
2431
2489
  # </note>
2432
2490
  #
@@ -2437,7 +2495,7 @@ module Aws::S3
2437
2495
  #
2438
2496
  #
2439
2497
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
2440
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html
2498
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2441
2499
  # @option options [String] :content_type
2442
2500
  # A standard MIME type describing the format of the contents. For more
2443
2501
  # information, see
@@ -2474,14 +2532,21 @@ module Aws::S3
2474
2532
  # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2475
2533
  # that matches the provided value in `x-amz-checksum-algorithm `.
2476
2534
  #
2477
- # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2478
- # is the default checksum algorithm that's used for performance.
2535
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2536
+ # for any request to upload an object with a retention period configured
2537
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2538
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2539
+ # Guide*.
2479
2540
  #
2480
2541
  # </note>
2481
2542
  #
2543
+ # For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2544
+ # is the default checksum algorithm that's used for performance.
2545
+ #
2482
2546
  #
2483
2547
  #
2484
2548
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2549
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2485
2550
  # @option options [String] :checksum_crc32
2486
2551
  # This header can be used as a data integrity check to verify that the
2487
2552
  # data received is the same data that was originally sent. This header
@@ -2530,6 +2595,25 @@ module Aws::S3
2530
2595
  #
2531
2596
  #
2532
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
2533
2617
  # @option options [String] :if_none_match
2534
2618
  # Uploads the object only if the object key name does not already exist
2535
2619
  # in the bucket specified. Otherwise, Amazon S3 returns a `412
@@ -2581,6 +2665,16 @@ module Aws::S3
2581
2665
  # * This functionality is not supported for Amazon S3 on Outposts.
2582
2666
  #
2583
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>
2584
2678
  # @option options [Hash<String,String>] :metadata
2585
2679
  # A map of metadata to store with the object in S3.
2586
2680
  # @option options [String] :server_side_encryption
@@ -2734,14 +2828,19 @@ module Aws::S3
2734
2828
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
2735
2829
  #
2736
2830
  # **Directory buckets** - If you specify `x-amz-server-side-encryption`
2737
- # with `aws:kms`, you must specify the `
2738
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
2739
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
2740
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
2741
- # key ID or key ARN. The key alias format of the KMS key isn't
2742
- # supported. Your SSE-KMS configuration can only support 1 [customer
2743
- # managed key][1] per directory bucket for the lifetime of the bucket.
2744
- # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
2831
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
2832
+ # header is implicitly assigned the ID of the KMS symmetric encryption
2833
+ # customer managed key that's configured for your directory bucket's
2834
+ # default encryption setting. If you want to specify the `
2835
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
2836
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
2837
+ # customer managed key that's configured for your directory bucket's
2838
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
2839
+ # Request` error. Only use the key ID or key ARN. The key alias format
2840
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
2841
+ # support 1 [customer managed key][1] per directory bucket for the
2842
+ # lifetime of the bucket. The [Amazon Web Services managed key][2]
2843
+ # (`aws/s3`) isn't supported.
2745
2844
  #
2746
2845
  #
2747
2846
  #