aws-sdk-s3 1.166.0 → 1.174.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +82 -27
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +5 -0
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +58 -1
- data/lib/aws-sdk-s3/bucket_policy.rb +4 -4
- data/lib/aws-sdk-s3/client.rb +734 -475
- data/lib/aws-sdk-s3/client_api.rb +45 -1
- data/lib/aws-sdk-s3/endpoint_parameters.rb +13 -18
- data/lib/aws-sdk-s3/endpoints.rb +405 -1405
- data/lib/aws-sdk-s3/errors.rb +44 -0
- data/lib/aws-sdk-s3/multipart_upload.rb +37 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +8 -8
- data/lib/aws-sdk-s3/object.rb +153 -56
- data/lib/aws-sdk-s3/object_summary.rb +151 -54
- data/lib/aws-sdk-s3/object_version.rb +47 -4
- data/lib/aws-sdk-s3/plugins/endpoints.rb +1 -204
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +3 -3
- data/lib/aws-sdk-s3/resource.rb +25 -1
- data/lib/aws-sdk-s3/types.rb +527 -233
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/bucket.rbs +9 -1
- data/sig/bucket_lifecycle_configuration.rbs +7 -3
- data/sig/client.rbs +27 -7
- 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 -0
- data/sig/types.rbs +34 -0
- metadata +4 -4
data/lib/aws-sdk-s3/errors.rb
CHANGED
@@ -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",
|
@@ -306,9 +319,9 @@ module Aws::S3
|
|
306
319
|
# @option options [String] :checksum_crc32
|
307
320
|
# This header can be used as a data integrity check to verify that the
|
308
321
|
# data received is the same data that was originally sent. This header
|
309
|
-
# specifies the base64-encoded, 32-bit
|
310
|
-
# more information, see [Checking object integrity][1] in the
|
311
|
-
# User Guide*.
|
322
|
+
# specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
|
323
|
+
# For more information, see [Checking object integrity][1] in the
|
324
|
+
# *Amazon S3 User Guide*.
|
312
325
|
#
|
313
326
|
#
|
314
327
|
#
|
@@ -316,7 +329,7 @@ module Aws::S3
|
|
316
329
|
# @option options [String] :checksum_crc32c
|
317
330
|
# This header can be used as a data integrity check to verify that the
|
318
331
|
# data received is the same data that was originally sent. This header
|
319
|
-
# specifies the base64-encoded, 32-bit
|
332
|
+
# specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
|
320
333
|
# For more information, see [Checking object integrity][1] in the
|
321
334
|
# *Amazon S3 User Guide*.
|
322
335
|
#
|
@@ -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
|
@@ -78,9 +78,9 @@ module Aws::S3
|
|
78
78
|
|
79
79
|
# This header can be used as a data integrity check to verify that the
|
80
80
|
# data received is the same data that was originally sent. This header
|
81
|
-
# specifies the base64-encoded, 32-bit
|
82
|
-
# more information, see [Checking object integrity][1] in the
|
83
|
-
# User Guide*.
|
81
|
+
# specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
|
82
|
+
# For more information, see [Checking object integrity][1] in the
|
83
|
+
# *Amazon S3 User Guide*.
|
84
84
|
#
|
85
85
|
#
|
86
86
|
#
|
@@ -90,7 +90,7 @@ module Aws::S3
|
|
90
90
|
data[:checksum_crc32]
|
91
91
|
end
|
92
92
|
|
93
|
-
# The base64-encoded, 32-bit
|
93
|
+
# The base64-encoded, 32-bit CRC-32C checksum of the object. This will
|
94
94
|
# only be present if it was uploaded with the object. When you use an
|
95
95
|
# API operation on an object that was uploaded using multipart uploads,
|
96
96
|
# this value may not be a direct checksum value of the full object.
|
@@ -558,9 +558,9 @@ module Aws::S3
|
|
558
558
|
# @option options [String] :checksum_crc32
|
559
559
|
# This header can be used as a data integrity check to verify that the
|
560
560
|
# data received is the same data that was originally sent. This header
|
561
|
-
# specifies the base64-encoded, 32-bit
|
562
|
-
# more information, see [Checking object integrity][1] in the
|
563
|
-
# User Guide*.
|
561
|
+
# specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
|
562
|
+
# For more information, see [Checking object integrity][1] in the
|
563
|
+
# *Amazon S3 User Guide*.
|
564
564
|
#
|
565
565
|
#
|
566
566
|
#
|
@@ -568,7 +568,7 @@ module Aws::S3
|
|
568
568
|
# @option options [String] :checksum_crc32c
|
569
569
|
# This header can be used as a data integrity check to verify that the
|
570
570
|
# data received is the same data that was originally sent. This header
|
571
|
-
# specifies the base64-encoded, 32-bit
|
571
|
+
# specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
|
572
572
|
# For more information, see [Checking object integrity][1] in the
|
573
573
|
# *Amazon S3 User Guide*.
|
574
574
|
#
|
data/lib/aws-sdk-s3/object.rb
CHANGED
@@ -132,7 +132,7 @@ module Aws::S3
|
|
132
132
|
data[:content_length]
|
133
133
|
end
|
134
134
|
|
135
|
-
# The base64-encoded, 32-bit
|
135
|
+
# The base64-encoded, 32-bit CRC-32 checksum of the object. This will
|
136
136
|
# only be present if it was uploaded with the object. When you use an
|
137
137
|
# API operation on an object that was uploaded using multipart uploads,
|
138
138
|
# this value may not be a direct checksum value of the full object.
|
@@ -149,7 +149,7 @@ module Aws::S3
|
|
149
149
|
data[:checksum_crc32]
|
150
150
|
end
|
151
151
|
|
152
|
-
# The base64-encoded, 32-bit
|
152
|
+
# The base64-encoded, 32-bit CRC-32C checksum of the object. This will
|
153
153
|
# only be present if it was uploaded with the object. When you use an
|
154
154
|
# API operation on an object that was uploaded using multipart uploads,
|
155
155
|
# this value may not be a direct checksum value of the full object.
|
@@ -1073,17 +1073,17 @@ module Aws::S3
|
|
1073
1073
|
# * To encrypt new object copies to a directory bucket with SSE-KMS, we
|
1074
1074
|
# recommend you specify SSE-KMS as the directory bucket's default
|
1075
1075
|
# encryption configuration with a KMS key (specifically, a [customer
|
1076
|
-
# managed key][4]). [Amazon Web Services managed key][5]
|
1077
|
-
# isn't supported. Your SSE-KMS configuration can only
|
1078
|
-
# [customer managed key][4] per directory bucket for the
|
1079
|
-
# the bucket. After you specify a customer managed key for
|
1080
|
-
# you can't override the customer managed key for the
|
1081
|
-
# SSE-KMS configuration. Then, when you perform a
|
1082
|
-
# operation and want to specify server-side encryption
|
1083
|
-
# new object copies with SSE-KMS in the
|
1084
|
-
# headers, you must ensure the encryption
|
1085
|
-
# managed key that you specified for the
|
1086
|
-
# encryption configuration.
|
1076
|
+
# managed key][4]). The [Amazon Web Services managed key][5]
|
1077
|
+
# (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
|
1078
|
+
# support 1 [customer managed key][4] per directory bucket for the
|
1079
|
+
# lifetime of the bucket. After you specify a customer managed key for
|
1080
|
+
# SSE-KMS, you can't override the customer managed key for the
|
1081
|
+
# bucket's SSE-KMS configuration. Then, when you perform a
|
1082
|
+
# `CopyObject` operation and want to specify server-side encryption
|
1083
|
+
# settings for new object copies with SSE-KMS in the
|
1084
|
+
# encryption-related request headers, you must ensure the encryption
|
1085
|
+
# key is the same customer managed key that you specified for the
|
1086
|
+
# directory bucket's default encryption configuration.
|
1087
1087
|
#
|
1088
1088
|
#
|
1089
1089
|
#
|
@@ -1191,14 +1191,19 @@ module Aws::S3
|
|
1191
1191
|
# Guide*.
|
1192
1192
|
#
|
1193
1193
|
# **Directory buckets** - If you specify `x-amz-server-side-encryption`
|
1194
|
-
# with `aws:kms`,
|
1195
|
-
#
|
1196
|
-
#
|
1197
|
-
#
|
1198
|
-
# key
|
1199
|
-
#
|
1200
|
-
# managed key
|
1201
|
-
#
|
1194
|
+
# with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
|
1195
|
+
# header is implicitly assigned the ID of the KMS symmetric encryption
|
1196
|
+
# customer managed key that's configured for your directory bucket's
|
1197
|
+
# default encryption setting. If you want to specify the `
|
1198
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
|
1199
|
+
# can only specify it with the ID (Key ID or Key ARN) of the KMS
|
1200
|
+
# customer managed key that's configured for your directory bucket's
|
1201
|
+
# default encryption setting. Otherwise, you get an HTTP `400 Bad
|
1202
|
+
# Request` error. Only use the key ID or key ARN. The key alias format
|
1203
|
+
# of the KMS key isn't supported. Your SSE-KMS configuration can only
|
1204
|
+
# support 1 [customer managed key][2] per directory bucket for the
|
1205
|
+
# lifetime of the bucket. The [Amazon Web Services managed key][3]
|
1206
|
+
# (`aws/s3`) isn't supported.
|
1202
1207
|
#
|
1203
1208
|
#
|
1204
1209
|
#
|
@@ -1405,6 +1410,9 @@ module Aws::S3
|
|
1405
1410
|
# request_payer: "requester", # accepts requester
|
1406
1411
|
# bypass_governance_retention: false,
|
1407
1412
|
# expected_bucket_owner: "AccountId",
|
1413
|
+
# if_match: "IfMatch",
|
1414
|
+
# if_match_last_modified_time: Time.now,
|
1415
|
+
# if_match_size: 1,
|
1408
1416
|
# })
|
1409
1417
|
# @param [Hash] options ({})
|
1410
1418
|
# @option options [String] :mfa
|
@@ -1451,6 +1459,46 @@ module Aws::S3
|
|
1451
1459
|
# The account ID of the expected bucket owner. If the account ID that
|
1452
1460
|
# you provide does not match the actual owner of the bucket, the request
|
1453
1461
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
1462
|
+
# @option options [String] :if_match
|
1463
|
+
# The `If-Match` header field makes the request method conditional on
|
1464
|
+
# ETags. If the ETag value does not match, the operation returns a `412
|
1465
|
+
# Precondition Failed` error. If the ETag matches or if the object
|
1466
|
+
# doesn't exist, the operation will return a `204 Success (No Content)
|
1467
|
+
# response`.
|
1468
|
+
#
|
1469
|
+
# For more information about conditional requests, see [RFC 7232][1].
|
1470
|
+
#
|
1471
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
1472
|
+
#
|
1473
|
+
# </note>
|
1474
|
+
#
|
1475
|
+
#
|
1476
|
+
#
|
1477
|
+
# [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
|
1478
|
+
# @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
|
1479
|
+
# If present, the object is deleted only if its modification times
|
1480
|
+
# matches the provided `Timestamp`. If the `Timestamp` values do not
|
1481
|
+
# match, the operation returns a `412 Precondition Failed` error. If the
|
1482
|
+
# `Timestamp` matches or if the object doesn’t exist, the operation
|
1483
|
+
# returns a `204 Success (No Content)` response.
|
1484
|
+
#
|
1485
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
1486
|
+
#
|
1487
|
+
# </note>
|
1488
|
+
# @option options [Integer] :if_match_size
|
1489
|
+
# If present, the object is deleted only if its size matches the
|
1490
|
+
# provided size in bytes. If the `Size` value does not match, the
|
1491
|
+
# operation returns a `412 Precondition Failed` error. If the `Size`
|
1492
|
+
# matches or if the object doesn’t exist, the operation returns a `204
|
1493
|
+
# Success (No Content)` response.
|
1494
|
+
#
|
1495
|
+
# <note markdown="1"> This functionality is only supported for directory buckets.
|
1496
|
+
#
|
1497
|
+
# </note>
|
1498
|
+
#
|
1499
|
+
# You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
|
1500
|
+
# `x-amz-if-match-size` conditional headers in conjunction with
|
1501
|
+
# each-other or individually.
|
1454
1502
|
# @return [Types::DeleteObjectOutput]
|
1455
1503
|
def delete(options = {})
|
1456
1504
|
options = options.merge(
|
@@ -2176,14 +2224,19 @@ module Aws::S3
|
|
2176
2224
|
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
2177
2225
|
#
|
2178
2226
|
# **Directory buckets** - If you specify `x-amz-server-side-encryption`
|
2179
|
-
# with `aws:kms`,
|
2180
|
-
#
|
2181
|
-
#
|
2182
|
-
#
|
2183
|
-
# key
|
2184
|
-
#
|
2185
|
-
# managed key
|
2186
|
-
#
|
2227
|
+
# with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
|
2228
|
+
# header is implicitly assigned the ID of the KMS symmetric encryption
|
2229
|
+
# customer managed key that's configured for your directory bucket's
|
2230
|
+
# default encryption setting. If you want to specify the `
|
2231
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
|
2232
|
+
# can only specify it with the ID (Key ID or Key ARN) of the KMS
|
2233
|
+
# customer managed key that's configured for your directory bucket's
|
2234
|
+
# default encryption setting. Otherwise, you get an HTTP `400 Bad
|
2235
|
+
# Request` error. Only use the key ID or key ARN. The key alias format
|
2236
|
+
# of the KMS key isn't supported. Your SSE-KMS configuration can only
|
2237
|
+
# support 1 [customer managed key][1] per directory bucket for the
|
2238
|
+
# lifetime of the bucket. The [Amazon Web Services managed key][2]
|
2239
|
+
# (`aws/s3`) isn't supported.
|
2187
2240
|
#
|
2188
2241
|
#
|
2189
2242
|
#
|
@@ -2315,11 +2368,13 @@ module Aws::S3
|
|
2315
2368
|
# checksum_sha1: "ChecksumSHA1",
|
2316
2369
|
# checksum_sha256: "ChecksumSHA256",
|
2317
2370
|
# expires: Time.now,
|
2371
|
+
# if_match: "IfMatch",
|
2318
2372
|
# if_none_match: "IfNoneMatch",
|
2319
2373
|
# grant_full_control: "GrantFullControl",
|
2320
2374
|
# grant_read: "GrantRead",
|
2321
2375
|
# grant_read_acp: "GrantReadACP",
|
2322
2376
|
# grant_write_acp: "GrantWriteACP",
|
2377
|
+
# write_offset_bytes: 1,
|
2323
2378
|
# metadata: {
|
2324
2379
|
# "MetadataKey" => "MetadataValue",
|
2325
2380
|
# },
|
@@ -2423,10 +2478,11 @@ module Aws::S3
|
|
2423
2478
|
# information about REST request authentication, see [REST
|
2424
2479
|
# Authentication][1].
|
2425
2480
|
#
|
2426
|
-
# <note markdown="1"> The `Content-MD5` header is required
|
2427
|
-
# object with a retention period configured
|
2428
|
-
#
|
2429
|
-
# Object Lock
|
2481
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
2482
|
+
# for any request to upload an object with a retention period configured
|
2483
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
2484
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
2485
|
+
# Guide*.
|
2430
2486
|
#
|
2431
2487
|
# </note>
|
2432
2488
|
#
|
@@ -2437,7 +2493,7 @@ module Aws::S3
|
|
2437
2493
|
#
|
2438
2494
|
#
|
2439
2495
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
2440
|
-
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/
|
2496
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
2441
2497
|
# @option options [String] :content_type
|
2442
2498
|
# A standard MIME type describing the format of the contents. For more
|
2443
2499
|
# information, see
|
@@ -2457,13 +2513,13 @@ module Aws::S3
|
|
2457
2513
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
2458
2514
|
# the supported algorithm from the following list:
|
2459
2515
|
#
|
2460
|
-
# * CRC32
|
2516
|
+
# * `CRC32`
|
2461
2517
|
#
|
2462
|
-
# * CRC32C
|
2518
|
+
# * `CRC32C`
|
2463
2519
|
#
|
2464
|
-
# * SHA1
|
2520
|
+
# * `SHA1`
|
2465
2521
|
#
|
2466
|
-
# * SHA256
|
2522
|
+
# * `SHA256`
|
2467
2523
|
#
|
2468
2524
|
# For more information, see [Checking object integrity][1] in the
|
2469
2525
|
# *Amazon S3 User Guide*.
|
@@ -2474,20 +2530,27 @@ module Aws::S3
|
|
2474
2530
|
# provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
|
2475
2531
|
# that matches the provided value in `x-amz-checksum-algorithm `.
|
2476
2532
|
#
|
2477
|
-
# <note markdown="1">
|
2478
|
-
#
|
2533
|
+
# <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
|
2534
|
+
# for any request to upload an object with a retention period configured
|
2535
|
+
# using Amazon S3 Object Lock. For more information, see [Uploading
|
2536
|
+
# objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
|
2537
|
+
# Guide*.
|
2479
2538
|
#
|
2480
2539
|
# </note>
|
2481
2540
|
#
|
2541
|
+
# For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
2542
|
+
# is the default checksum algorithm that's used for performance.
|
2543
|
+
#
|
2482
2544
|
#
|
2483
2545
|
#
|
2484
2546
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
2547
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
|
2485
2548
|
# @option options [String] :checksum_crc32
|
2486
2549
|
# This header can be used as a data integrity check to verify that the
|
2487
2550
|
# data received is the same data that was originally sent. This header
|
2488
|
-
# specifies the base64-encoded, 32-bit
|
2489
|
-
# more information, see [Checking object integrity][1] in the
|
2490
|
-
# User Guide*.
|
2551
|
+
# specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
|
2552
|
+
# For more information, see [Checking object integrity][1] in the
|
2553
|
+
# *Amazon S3 User Guide*.
|
2491
2554
|
#
|
2492
2555
|
#
|
2493
2556
|
#
|
@@ -2495,7 +2558,7 @@ module Aws::S3
|
|
2495
2558
|
# @option options [String] :checksum_crc32c
|
2496
2559
|
# This header can be used as a data integrity check to verify that the
|
2497
2560
|
# data received is the same data that was originally sent. This header
|
2498
|
-
# specifies the base64-encoded, 32-bit
|
2561
|
+
# specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
|
2499
2562
|
# For more information, see [Checking object integrity][1] in the
|
2500
2563
|
# *Amazon S3 User Guide*.
|
2501
2564
|
#
|
@@ -2530,6 +2593,25 @@ module Aws::S3
|
|
2530
2593
|
#
|
2531
2594
|
#
|
2532
2595
|
# [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
|
2596
|
+
# @option options [String] :if_match
|
2597
|
+
# Uploads the object only if the ETag (entity tag) value provided during
|
2598
|
+
# the WRITE operation matches the ETag of the object in S3. If the ETag
|
2599
|
+
# values do not match, the operation returns a `412 Precondition Failed`
|
2600
|
+
# error.
|
2601
|
+
#
|
2602
|
+
# If a conflicting operation occurs during the upload S3 returns a `409
|
2603
|
+
# ConditionalRequestConflict` response. On a 409 failure you should
|
2604
|
+
# fetch the object's ETag and retry the upload.
|
2605
|
+
#
|
2606
|
+
# Expects the ETag value as a string.
|
2607
|
+
#
|
2608
|
+
# For more information about conditional requests, see [RFC 7232][1], or
|
2609
|
+
# [Conditional requests][2] in the *Amazon S3 User Guide*.
|
2610
|
+
#
|
2611
|
+
#
|
2612
|
+
#
|
2613
|
+
# [1]: https://tools.ietf.org/html/rfc7232
|
2614
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
|
2533
2615
|
# @option options [String] :if_none_match
|
2534
2616
|
# Uploads the object only if the object key name does not already exist
|
2535
2617
|
# in the bucket specified. Otherwise, Amazon S3 returns a `412
|
@@ -2581,6 +2663,16 @@ module Aws::S3
|
|
2581
2663
|
# * This functionality is not supported for Amazon S3 on Outposts.
|
2582
2664
|
#
|
2583
2665
|
# </note>
|
2666
|
+
# @option options [Integer] :write_offset_bytes
|
2667
|
+
# Specifies the offset for appending data to existing objects in bytes.
|
2668
|
+
# The offset must be equal to the size of the existing object being
|
2669
|
+
# appended to. If no object exists, setting this header to 0 will create
|
2670
|
+
# a new object.
|
2671
|
+
#
|
2672
|
+
# <note markdown="1"> This functionality is only supported for objects in the Amazon S3
|
2673
|
+
# Express One Zone storage class in directory buckets.
|
2674
|
+
#
|
2675
|
+
# </note>
|
2584
2676
|
# @option options [Hash<String,String>] :metadata
|
2585
2677
|
# A map of metadata to store with the object in S3.
|
2586
2678
|
# @option options [String] :server_side_encryption
|
@@ -2734,14 +2826,19 @@ module Aws::S3
|
|
2734
2826
|
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
2735
2827
|
#
|
2736
2828
|
# **Directory buckets** - If you specify `x-amz-server-side-encryption`
|
2737
|
-
# with `aws:kms`,
|
2738
|
-
#
|
2739
|
-
#
|
2740
|
-
#
|
2741
|
-
# key
|
2742
|
-
#
|
2743
|
-
# managed key
|
2744
|
-
#
|
2829
|
+
# with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
|
2830
|
+
# header is implicitly assigned the ID of the KMS symmetric encryption
|
2831
|
+
# customer managed key that's configured for your directory bucket's
|
2832
|
+
# default encryption setting. If you want to specify the `
|
2833
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
|
2834
|
+
# can only specify it with the ID (Key ID or Key ARN) of the KMS
|
2835
|
+
# customer managed key that's configured for your directory bucket's
|
2836
|
+
# default encryption setting. Otherwise, you get an HTTP `400 Bad
|
2837
|
+
# Request` error. Only use the key ID or key ARN. The key alias format
|
2838
|
+
# of the KMS key isn't supported. Your SSE-KMS configuration can only
|
2839
|
+
# support 1 [customer managed key][1] per directory bucket for the
|
2840
|
+
# lifetime of the bucket. The [Amazon Web Services managed key][2]
|
2841
|
+
# (`aws/s3`) isn't supported.
|
2745
2842
|
#
|
2746
2843
|
#
|
2747
2844
|
#
|
@@ -3376,13 +3473,13 @@ module Aws::S3
|
|
3376
3473
|
# For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
|
3377
3474
|
# the supported algorithm from the following list:
|
3378
3475
|
#
|
3379
|
-
# * CRC32
|
3476
|
+
# * `CRC32`
|
3380
3477
|
#
|
3381
|
-
# * CRC32C
|
3478
|
+
# * `CRC32C`
|
3382
3479
|
#
|
3383
|
-
# * SHA1
|
3480
|
+
# * `SHA1`
|
3384
3481
|
#
|
3385
|
-
# * SHA256
|
3482
|
+
# * `SHA256`
|
3386
3483
|
#
|
3387
3484
|
# For more information, see [Checking object integrity][1] in the
|
3388
3485
|
# *Amazon S3 User Guide*.
|