@aws-sdk/client-s3 3.632.0 → 3.635.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.
package/dist-cjs/index.js CHANGED
@@ -1154,6 +1154,7 @@ var se_CompleteMultipartUploadCommand = /* @__PURE__ */ __name(async (input, con
1154
1154
  [_xacs_]: input[_CSHAh],
1155
1155
  [_xarp]: input[_RP],
1156
1156
  [_xaebo]: input[_EBO],
1157
+ [_inm]: input[_INM],
1157
1158
  [_xasseca]: input[_SSECA],
1158
1159
  [_xasseck]: input[_SSECK],
1159
1160
  [_xasseckm]: input[_SSECKMD]
@@ -2727,6 +2728,7 @@ var se_PutObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
2727
2728
  [_xacs]: input[_CSHA],
2728
2729
  [_xacs_]: input[_CSHAh],
2729
2730
  [_e]: [() => isSerializableHeaderValue(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
2731
+ [_inm]: input[_INM],
2730
2732
  [_xagfc]: input[_GFC],
2731
2733
  [_xagr]: input[_GR],
2732
2734
  [_xagra]: input[_GRACP],
@@ -33,6 +33,7 @@ export const se_CompleteMultipartUploadCommand = async (input, context) => {
33
33
  [_xacs_]: input[_CSHAh],
34
34
  [_xarp]: input[_RP],
35
35
  [_xaebo]: input[_EBO],
36
+ [_inm]: input[_INM],
36
37
  [_xasseca]: input[_SSECA],
37
38
  [_xasseck]: input[_SSECK],
38
39
  [_xasseckm]: input[_SSECKMD],
@@ -1608,6 +1609,7 @@ export const se_PutObjectCommand = async (input, context) => {
1608
1609
  [_xacs]: input[_CSHA],
1609
1610
  [_xacs_]: input[_CSHAh],
1610
1611
  [_e]: [() => isSerializableHeaderValue(input[_E]), () => __dateToUtcString(input[_E]).toString()],
1612
+ [_inm]: input[_INM],
1611
1613
  [_xagfc]: input[_GFC],
1612
1614
  [_xagr]: input[_GR],
1613
1615
  [_xagra]: input[_GRACP],
@@ -73,9 +73,10 @@ declare const CompleteMultipartUploadCommand_base: {
73
73
  * <ul>
74
74
  * <li>
75
75
  * <p>
76
- * <b>General purpose bucket permissions</b> - For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload
77
- * and Permissions</a> in the <i>Amazon S3
78
- * User Guide</i>.</p>
76
+ * <b>General purpose bucket permissions</b> - For
77
+ * information about permissions required to use the multipart upload API, see
78
+ * <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload and
79
+ * Permissions</a> in the <i>Amazon S3 User Guide</i>.</p>
79
80
  * </li>
80
81
  * <li>
81
82
  * <p>
@@ -86,6 +87,13 @@ declare const CompleteMultipartUploadCommand_base: {
86
87
  * <code>CreateSession</code>
87
88
  * </a>.</p>
88
89
  * </li>
90
+ * <li>
91
+ * <p> If you provide an <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">additional checksum
92
+ * value</a> in your <code>MultipartUpload</code> requests and the
93
+ * object is encrypted with Key Management Service, you must have permission to use the
94
+ * <code>kms:Decrypt</code> action for the
95
+ * <code>CompleteMultipartUpload</code> request to succeed.</p>
96
+ * </li>
89
97
  * </ul>
90
98
  * </dd>
91
99
  * <dt>Special errors</dt>
@@ -210,6 +218,7 @@ declare const CompleteMultipartUploadCommand_base: {
210
218
  * ChecksumSHA256: "STRING_VALUE",
211
219
  * RequestPayer: "requester",
212
220
  * ExpectedBucketOwner: "STRING_VALUE",
221
+ * IfNoneMatch: "STRING_VALUE",
213
222
  * SSECustomerAlgorithm: "STRING_VALUE",
214
223
  * SSECustomerKey: "STRING_VALUE",
215
224
  * SSECustomerKeyMD5: "STRING_VALUE",
@@ -70,17 +70,20 @@ declare const CreateMultipartUploadCommand_base: {
70
70
  * <ul>
71
71
  * <li>
72
72
  * <p>
73
- * <b>General purpose bucket permissions</b> - For information about the permissions required to use the multipart upload API, see
74
- * <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart
75
- * upload and permissions</a> in the <i>Amazon S3 User Guide</i>. </p>
76
- * <p>To perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester
77
- * must have permission to the <code>kms:Decrypt</code> and <code>kms:GenerateDataKey*</code>
78
- * actions on the key. These permissions are required because Amazon S3 must decrypt and read data
79
- * from the encrypted file parts before it completes the multipart upload. For more
80
- * information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API
81
- * and permissions</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting data using
82
- * server-side encryption with Amazon Web Services KMS</a> in the
83
- * <i>Amazon S3 User Guide</i>.</p>
73
+ * <b>General purpose bucket permissions</b> - To
74
+ * perform a multipart upload with encryption using an Key Management Service (KMS)
75
+ * KMS key, the requester must have permission to the
76
+ * <code>kms:Decrypt</code> and <code>kms:GenerateDataKey</code> actions on
77
+ * the key. The requester must also have permissions for the
78
+ * <code>kms:GenerateDataKey</code> action for the
79
+ * <code>CreateMultipartUpload</code> API. Then, the requester needs
80
+ * permissions for the <code>kms:Decrypt</code> action on the
81
+ * <code>UploadPart</code> and <code>UploadPartCopy</code> APIs. These
82
+ * permissions are required because Amazon S3 must decrypt and read data from the
83
+ * encrypted file parts before it completes the multipart upload. For more
84
+ * information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting data
85
+ * using server-side encryption with Amazon Web Services KMS</a> in the
86
+ * <i>Amazon S3 User Guide</i>.</p>
84
87
  * </li>
85
88
  * <li>
86
89
  * <p>
@@ -161,28 +161,28 @@ declare const DeleteObjectCommand_base: {
161
161
  * <p>Base exception class for all service exceptions from S3 service.</p>
162
162
  *
163
163
  * @public
164
- * @example To delete an object
164
+ * @example To delete an object (from a non-versioned bucket)
165
165
  * ```javascript
166
- * // The following example deletes an object from an S3 bucket.
166
+ * // The following example deletes an object from a non-versioned bucket.
167
167
  * const input = {
168
- * "Bucket": "examplebucket",
169
- * "Key": "objectkey.jpg"
168
+ * "Bucket": "ExampleBucket",
169
+ * "Key": "HappyFace.jpg"
170
170
  * };
171
171
  * const command = new DeleteObjectCommand(input);
172
172
  * await client.send(command);
173
- * // example id: to-delete-an-object-1472850136595
173
+ * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
174
174
  * ```
175
175
  *
176
- * @example To delete an object (from a non-versioned bucket)
176
+ * @example To delete an object
177
177
  * ```javascript
178
- * // The following example deletes an object from a non-versioned bucket.
178
+ * // The following example deletes an object from an S3 bucket.
179
179
  * const input = {
180
- * "Bucket": "ExampleBucket",
181
- * "Key": "HappyFace.jpg"
180
+ * "Bucket": "examplebucket",
181
+ * "Key": "objectkey.jpg"
182
182
  * };
183
183
  * const command = new DeleteObjectCommand(input);
184
184
  * await client.send(command);
185
- * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
185
+ * // example id: to-delete-an-object-1472850136595
186
186
  * ```
187
187
  *
188
188
  */
@@ -80,39 +80,39 @@ declare const DeleteObjectTaggingCommand_base: {
80
80
  * <p>Base exception class for all service exceptions from S3 service.</p>
81
81
  *
82
82
  * @public
83
- * @example To remove tag set from an object version
83
+ * @example To remove tag set from an object
84
84
  * ```javascript
85
- * // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.
85
+ * // The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version.
86
86
  * const input = {
87
87
  * "Bucket": "examplebucket",
88
- * "Key": "HappyFace.jpg",
89
- * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
88
+ * "Key": "HappyFace.jpg"
90
89
  * };
91
90
  * const command = new DeleteObjectTaggingCommand(input);
92
91
  * const response = await client.send(command);
93
92
  * /* response ==
94
93
  * {
95
- * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
94
+ * "VersionId": "null"
96
95
  * }
97
96
  * *\/
98
- * // example id: to-remove-tag-set-from-an-object-version-1483145285913
97
+ * // example id: to-remove-tag-set-from-an-object-1483145342862
99
98
  * ```
100
99
  *
101
- * @example To remove tag set from an object
100
+ * @example To remove tag set from an object version
102
101
  * ```javascript
103
- * // The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version.
102
+ * // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.
104
103
  * const input = {
105
104
  * "Bucket": "examplebucket",
106
- * "Key": "HappyFace.jpg"
105
+ * "Key": "HappyFace.jpg",
106
+ * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
107
107
  * };
108
108
  * const command = new DeleteObjectTaggingCommand(input);
109
109
  * const response = await client.send(command);
110
110
  * /* response ==
111
111
  * {
112
- * "VersionId": "null"
112
+ * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
113
113
  * }
114
114
  * *\/
115
- * // example id: to-remove-tag-set-from-an-object-1483145342862
115
+ * // example id: to-remove-tag-set-from-an-object-version-1483145285913
116
116
  * ```
117
117
  *
118
118
  */
@@ -276,53 +276,53 @@ declare const GetObjectCommand_base: {
276
276
  * <p>Base exception class for all service exceptions from S3 service.</p>
277
277
  *
278
278
  * @public
279
- * @example To retrieve a byte range of an object
279
+ * @example To retrieve an object
280
280
  * ```javascript
281
- * // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.
281
+ * // The following example retrieves an object for an S3 bucket.
282
282
  * const input = {
283
283
  * "Bucket": "examplebucket",
284
- * "Key": "SampleFile.txt",
285
- * "Range": "bytes=0-9"
284
+ * "Key": "HappyFace.jpg"
286
285
  * };
287
286
  * const command = new GetObjectCommand(input);
288
287
  * const response = await client.send(command);
289
288
  * /* response ==
290
289
  * {
291
290
  * "AcceptRanges": "bytes",
292
- * "ContentLength": "10",
293
- * "ContentRange": "bytes 0-9/43",
294
- * "ContentType": "text/plain",
295
- * "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
296
- * "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT",
291
+ * "ContentLength": "3191",
292
+ * "ContentType": "image/jpeg",
293
+ * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
294
+ * "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT",
297
295
  * "Metadata": {},
296
+ * "TagCount": 2,
298
297
  * "VersionId": "null"
299
298
  * }
300
299
  * *\/
301
- * // example id: to-retrieve-a-byte-range-of-an-object--1481832674603
300
+ * // example id: to-retrieve-an-object-1481827837012
302
301
  * ```
303
302
  *
304
- * @example To retrieve an object
303
+ * @example To retrieve a byte range of an object
305
304
  * ```javascript
306
- * // The following example retrieves an object for an S3 bucket.
305
+ * // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.
307
306
  * const input = {
308
307
  * "Bucket": "examplebucket",
309
- * "Key": "HappyFace.jpg"
308
+ * "Key": "SampleFile.txt",
309
+ * "Range": "bytes=0-9"
310
310
  * };
311
311
  * const command = new GetObjectCommand(input);
312
312
  * const response = await client.send(command);
313
313
  * /* response ==
314
314
  * {
315
315
  * "AcceptRanges": "bytes",
316
- * "ContentLength": "3191",
317
- * "ContentType": "image/jpeg",
318
- * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
319
- * "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT",
316
+ * "ContentLength": "10",
317
+ * "ContentRange": "bytes 0-9/43",
318
+ * "ContentType": "text/plain",
319
+ * "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
320
+ * "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT",
320
321
  * "Metadata": {},
321
- * "TagCount": 2,
322
322
  * "VersionId": "null"
323
323
  * }
324
324
  * *\/
325
- * // example id: to-retrieve-an-object-1481827837012
325
+ * // example id: to-retrieve-a-byte-range-of-an-object--1481832674603
326
326
  * ```
327
327
  *
328
328
  */
@@ -179,6 +179,7 @@ declare const PutObjectCommand_base: {
179
179
  * ChecksumSHA1: "STRING_VALUE",
180
180
  * ChecksumSHA256: "STRING_VALUE",
181
181
  * Expires: new Date("TIMESTAMP"),
182
+ * IfNoneMatch: "STRING_VALUE",
182
183
  * GrantFullControl: "STRING_VALUE",
183
184
  * GrantRead: "STRING_VALUE",
184
185
  * GrantReadACP: "STRING_VALUE",
@@ -234,34 +235,34 @@ declare const PutObjectCommand_base: {
234
235
  * <p>Base exception class for all service exceptions from S3 service.</p>
235
236
  *
236
237
  * @public
237
- * @example To upload an object
238
+ * @example To create an object.
238
239
  * ```javascript
239
- * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.
240
+ * // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
240
241
  * const input = {
241
- * "Body": "HappyFace.jpg",
242
+ * "Body": "filetoupload",
242
243
  * "Bucket": "examplebucket",
243
- * "Key": "HappyFace.jpg"
244
+ * "Key": "objectkey"
244
245
  * };
245
246
  * const command = new PutObjectCommand(input);
246
247
  * const response = await client.send(command);
247
248
  * /* response ==
248
249
  * {
249
250
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
250
- * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
251
+ * "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ"
251
252
  * }
252
253
  * *\/
253
- * // example id: to-upload-an-object-1481760101010
254
+ * // example id: to-create-an-object-1483147613675
254
255
  * ```
255
256
  *
256
- * @example To upload an object and specify server-side encryption and object tags
257
+ * @example To upload an object (specify optional headers)
257
258
  * ```javascript
258
- * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
259
+ * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.
259
260
  * const input = {
260
- * "Body": "filetoupload",
261
+ * "Body": "HappyFace.jpg",
261
262
  * "Bucket": "examplebucket",
262
- * "Key": "exampleobject",
263
+ * "Key": "HappyFace.jpg",
263
264
  * "ServerSideEncryption": "AES256",
264
- * "Tagging": "key1=value1&key2=value2"
265
+ * "StorageClass": "STANDARD_IA"
265
266
  * };
266
267
  * const command = new PutObjectCommand(input);
267
268
  * const response = await client.send(command);
@@ -269,114 +270,114 @@ declare const PutObjectCommand_base: {
269
270
  * {
270
271
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
271
272
  * "ServerSideEncryption": "AES256",
272
- * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
273
+ * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
273
274
  * }
274
275
  * *\/
275
- * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
276
+ * // example id: to-upload-an-object-(specify-optional-headers)
276
277
  * ```
277
278
  *
278
- * @example To upload an object (specify optional headers)
279
+ * @example To upload an object and specify canned ACL.
279
280
  * ```javascript
280
- * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.
281
+ * // The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
281
282
  * const input = {
282
- * "Body": "HappyFace.jpg",
283
+ * "ACL": "authenticated-read",
284
+ * "Body": "filetoupload",
283
285
  * "Bucket": "examplebucket",
284
- * "Key": "HappyFace.jpg",
285
- * "ServerSideEncryption": "AES256",
286
- * "StorageClass": "STANDARD_IA"
286
+ * "Key": "exampleobject"
287
287
  * };
288
288
  * const command = new PutObjectCommand(input);
289
289
  * const response = await client.send(command);
290
290
  * /* response ==
291
291
  * {
292
292
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
293
- * "ServerSideEncryption": "AES256",
294
- * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
293
+ * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
295
294
  * }
296
295
  * *\/
297
- * // example id: to-upload-an-object-(specify-optional-headers)
296
+ * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
298
297
  * ```
299
298
  *
300
- * @example To upload object and specify user-defined metadata
299
+ * @example To upload an object and specify server-side encryption and object tags
301
300
  * ```javascript
302
- * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
301
+ * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
303
302
  * const input = {
304
303
  * "Body": "filetoupload",
305
304
  * "Bucket": "examplebucket",
306
305
  * "Key": "exampleobject",
307
- * "Metadata": {
308
- * "metadata1": "value1",
309
- * "metadata2": "value2"
310
- * }
306
+ * "ServerSideEncryption": "AES256",
307
+ * "Tagging": "key1=value1&key2=value2"
311
308
  * };
312
309
  * const command = new PutObjectCommand(input);
313
310
  * const response = await client.send(command);
314
311
  * /* response ==
315
312
  * {
316
313
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
317
- * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
314
+ * "ServerSideEncryption": "AES256",
315
+ * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
318
316
  * }
319
317
  * *\/
320
- * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
318
+ * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
321
319
  * ```
322
320
  *
323
- * @example To upload an object and specify optional tags
321
+ * @example To upload object and specify user-defined metadata
324
322
  * ```javascript
325
- * // The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.
323
+ * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
326
324
  * const input = {
327
- * "Body": "c:\\HappyFace.jpg",
325
+ * "Body": "filetoupload",
328
326
  * "Bucket": "examplebucket",
329
- * "Key": "HappyFace.jpg",
330
- * "Tagging": "key1=value1&key2=value2"
327
+ * "Key": "exampleobject",
328
+ * "Metadata": {
329
+ * "metadata1": "value1",
330
+ * "metadata2": "value2"
331
+ * }
331
332
  * };
332
333
  * const command = new PutObjectCommand(input);
333
334
  * const response = await client.send(command);
334
335
  * /* response ==
335
336
  * {
336
337
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
337
- * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
338
+ * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
338
339
  * }
339
340
  * *\/
340
- * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
341
+ * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
341
342
  * ```
342
343
  *
343
- * @example To upload an object and specify canned ACL.
344
+ * @example To upload an object
344
345
  * ```javascript
345
- * // The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
346
+ * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.
346
347
  * const input = {
347
- * "ACL": "authenticated-read",
348
- * "Body": "filetoupload",
348
+ * "Body": "HappyFace.jpg",
349
349
  * "Bucket": "examplebucket",
350
- * "Key": "exampleobject"
350
+ * "Key": "HappyFace.jpg"
351
351
  * };
352
352
  * const command = new PutObjectCommand(input);
353
353
  * const response = await client.send(command);
354
354
  * /* response ==
355
355
  * {
356
356
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
357
- * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
357
+ * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
358
358
  * }
359
359
  * *\/
360
- * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
360
+ * // example id: to-upload-an-object-1481760101010
361
361
  * ```
362
362
  *
363
- * @example To create an object.
363
+ * @example To upload an object and specify optional tags
364
364
  * ```javascript
365
- * // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
365
+ * // The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.
366
366
  * const input = {
367
- * "Body": "filetoupload",
367
+ * "Body": "c:\\HappyFace.jpg",
368
368
  * "Bucket": "examplebucket",
369
- * "Key": "objectkey"
369
+ * "Key": "HappyFace.jpg",
370
+ * "Tagging": "key1=value1&key2=value2"
370
371
  * };
371
372
  * const command = new PutObjectCommand(input);
372
373
  * const response = await client.send(command);
373
374
  * /* response ==
374
375
  * {
375
376
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
376
- * "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ"
377
+ * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
377
378
  * }
378
379
  * *\/
379
- * // example id: to-create-an-object-1483147613675
380
+ * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
380
381
  * ```
381
382
  *
382
383
  */
@@ -30,6 +30,10 @@ declare const RestoreObjectCommand_base: {
30
30
  * <note>
31
31
  * <p>This operation is not supported by directory buckets.</p>
32
32
  * </note>
33
+ * <important>
34
+ * <p>The <code>SELECT</code> job type for the RestoreObject operation is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a>
35
+ * </p>
36
+ * </important>
33
37
  * <p>Restores an archived copy of an object back into Amazon S3</p>
34
38
  * <p>This functionality is not supported for Amazon S3 on Outposts.</p>
35
39
  * <p>This action performs the following types of requests: </p>
@@ -30,6 +30,10 @@ declare const SelectObjectContentCommand_base: {
30
30
  * <note>
31
31
  * <p>This operation is not supported by directory buckets.</p>
32
32
  * </note>
33
+ * <important>
34
+ * <p>The SelectObjectContent operation is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the operation as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a>
35
+ * </p>
36
+ * </important>
33
37
  * <p>This action filters the contents of an Amazon S3 object based on a simple structured query
34
38
  * language (SQL) statement. In the request, along with the SQL expression, you must also
35
39
  * specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses
@@ -65,9 +65,21 @@ declare const UploadPartCommand_base: {
65
65
  * <ul>
66
66
  * <li>
67
67
  * <p>
68
- * <b>General purpose bucket permissions</b> - For information on the permissions required to use the multipart upload API, see
69
- * <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart
70
- * Upload and Permissions</a> in the <i>Amazon S3 User Guide</i>.</p>
68
+ * <b>General purpose bucket permissions</b> - To
69
+ * perform a multipart upload with encryption using an Key Management Service key, the
70
+ * requester must have permission to the <code>kms:Decrypt</code> and
71
+ * <code>kms:GenerateDataKey</code> actions on the key. The requester must
72
+ * also have permissions for the <code>kms:GenerateDataKey</code> action for
73
+ * the <code>CreateMultipartUpload</code> API. Then, the requester needs
74
+ * permissions for the <code>kms:Decrypt</code> action on the
75
+ * <code>UploadPart</code> and <code>UploadPartCopy</code> APIs.</p>
76
+ * <p>These permissions are required because Amazon S3 must decrypt and read data
77
+ * from the encrypted file parts before it completes the multipart upload. For
78
+ * more information about KMS permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting data
79
+ * using server-side encryption with KMS</a> in the
80
+ * <i>Amazon S3 User Guide</i>. For information about the
81
+ * permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart upload and permissions</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> in the
82
+ * <i>Amazon S3 User Guide</i>.</p>
71
83
  * </li>
72
84
  * <li>
73
85
  * <p>
@@ -68,23 +68,44 @@ declare const UploadPartCopyCommand_base: {
68
68
  * <ul>
69
69
  * <li>
70
70
  * <p>
71
- * <b>General purpose bucket permissions</b> - You must have the permissions in a policy based on the bucket types of your source bucket and destination bucket in an <code>UploadPartCopy</code> operation.</p>
71
+ * <b>General purpose bucket permissions</b> - You
72
+ * must have the permissions in a policy based on the bucket types of your
73
+ * source bucket and destination bucket in an <code>UploadPartCopy</code>
74
+ * operation.</p>
72
75
  * <ul>
73
76
  * <li>
74
- * <p>If the source object is in a general purpose bucket, you must have the <b>
77
+ * <p>If the source object is in a general purpose bucket, you must have the
78
+ * <b>
75
79
  * <code>s3:GetObject</code>
76
- * </b> permission to read the source object that is being copied. </p>
80
+ * </b>
81
+ * permission to read the source object that is being copied. </p>
77
82
  * </li>
78
83
  * <li>
79
- * <p>If the destination bucket is a general purpose bucket, you must have the <b>
84
+ * <p>If the destination bucket is a general purpose bucket, you must have the
85
+ * <b>
80
86
  * <code>s3:PutObject</code>
81
- * </b> permission to write the object copy to the destination bucket.
82
- * </p>
87
+ * </b>
88
+ * permission to write the object copy to the destination bucket. </p>
89
+ * </li>
90
+ * <li>
91
+ * <p>To perform a multipart upload with encryption using an Key Management Service
92
+ * key, the requester must have permission to the
93
+ * <code>kms:Decrypt</code> and <code>kms:GenerateDataKey</code>
94
+ * actions on the key. The requester must also have permissions for the
95
+ * <code>kms:GenerateDataKey</code> action for the
96
+ * <code>CreateMultipartUpload</code> API. Then, the requester needs
97
+ * permissions for the <code>kms:Decrypt</code> action on the
98
+ * <code>UploadPart</code> and <code>UploadPartCopy</code> APIs. These
99
+ * permissions are required because Amazon S3 must decrypt and read data from
100
+ * the encrypted file parts before it completes the multipart upload. For
101
+ * more information about KMS permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting
102
+ * data using server-side encryption with KMS</a> in the
103
+ * <i>Amazon S3 User Guide</i>. For information about the
104
+ * permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart upload
105
+ * and permissions</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> in the
106
+ * <i>Amazon S3 User Guide</i>.</p>
83
107
  * </li>
84
108
  * </ul>
85
- * <p>For information about permissions required to use the multipart upload API, see
86
- * <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> in the
87
- * <i>Amazon S3 User Guide</i>.</p>
88
109
  * </li>
89
110
  * <li>
90
111
  * <p>
@@ -637,6 +637,14 @@ export interface CompleteMultipartUploadRequest {
637
637
  * @public
638
638
  */
639
639
  ExpectedBucketOwner?: string;
640
+ /**
641
+ * <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
642
+ * <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should re-initiate the multipart upload with <code>CreateMultipartUpload</code> and re-upload each part.</p>
643
+ * <p>Expects the '*' (asterisk) character.</p>
644
+ * <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
645
+ * @public
646
+ */
647
+ IfNoneMatch?: string;
640
648
  /**
641
649
  * <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is
642
650
  * required only when the object was created using a checksum algorithm or if
@@ -8758,6 +8766,10 @@ export interface GetObjectRequest {
8758
8766
  ExpectedBucketOwner?: string;
8759
8767
  /**
8760
8768
  * <p>To retrieve the checksum, this mode must be enabled.</p>
8769
+ * <p>In addition, if you enable checksum mode and the object is uploaded with a
8770
+ * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a>
8771
+ * and encrypted with an Key Management Service (KMS) key, you must have permission to use the
8772
+ * <code>kms:Decrypt</code> action to retrieve the checksum.</p>
8761
8773
  * @public
8762
8774
  */
8763
8775
  ChecksumMode?: ChecksumMode;
@@ -10297,9 +10309,10 @@ export interface HeadObjectRequest {
10297
10309
  ExpectedBucketOwner?: string;
10298
10310
  /**
10299
10311
  * <p>To retrieve the checksum, this parameter must be enabled.</p>
10300
- * <p>In addition, if you enable <code>ChecksumMode</code> and the object is encrypted with
10301
- * Amazon Web Services Key Management Service (Amazon Web Services KMS), you must have permission to use the
10302
- * <code>kms:Decrypt</code> action for the request to succeed.</p>
10312
+ * <p>In addition, if you enable checksum mode and the object is uploaded with a
10313
+ * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a>
10314
+ * and encrypted with an Key Management Service (KMS) key, you must have permission to use the
10315
+ * <code>kms:Decrypt</code> action to retrieve the checksum.</p>
10303
10316
  * @public
10304
10317
  */
10305
10318
  ChecksumMode?: ChecksumMode;
@@ -722,6 +722,14 @@ export interface PutObjectRequest {
722
722
  * @public
723
723
  */
724
724
  Expires?: Date;
725
+ /**
726
+ * <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
727
+ * <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
728
+ * <p>Expects the '*' (asterisk) character.</p>
729
+ * <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
730
+ * @public
731
+ */
732
+ IfNoneMatch?: string;
725
733
  /**
726
734
  * <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
727
735
  * <note>
@@ -1870,7 +1878,13 @@ export interface OutputSerialization {
1870
1878
  JSON?: JSONOutput;
1871
1879
  }
1872
1880
  /**
1873
- * <p>Describes the parameters for Select job types.</p>
1881
+ * <important>
1882
+ * <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a>
1883
+ * </p>
1884
+ * </important>
1885
+ * <p>Describes the parameters for Select job types.</p>
1886
+ * <p>Learn <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">How to optimize querying your data in Amazon S3</a> using
1887
+ * <a href="https://docs.aws.amazon.com/athena/latest/ug/what-is.html">Amazon Athena</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html">S3 Object Lambda</a>, or client-side filtering.</p>
1874
1888
  * @public
1875
1889
  */
1876
1890
  export interface SelectParameters {
@@ -1885,7 +1899,11 @@ export interface SelectParameters {
1885
1899
  */
1886
1900
  ExpressionType: ExpressionType | undefined;
1887
1901
  /**
1888
- * <p>The expression that is used to query the object.</p>
1902
+ * <important>
1903
+ * <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a>
1904
+ * </p>
1905
+ * </important>
1906
+ * <p>The expression that is used to query the object.</p>
1889
1907
  * @public
1890
1908
  */
1891
1909
  Expression: string | undefined;
@@ -1926,7 +1944,11 @@ export interface RestoreRequest {
1926
1944
  */
1927
1945
  GlacierJobParameters?: GlacierJobParameters;
1928
1946
  /**
1929
- * <p>Type of restore request.</p>
1947
+ * <important>
1948
+ * <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a>
1949
+ * </p>
1950
+ * </important>
1951
+ * <p>Type of restore request.</p>
1930
1952
  * @public
1931
1953
  */
1932
1954
  Type?: RestoreRequestType;
@@ -1941,7 +1963,11 @@ export interface RestoreRequest {
1941
1963
  */
1942
1964
  Description?: string;
1943
1965
  /**
1944
- * <p>Describes the parameters for Select job types.</p>
1966
+ * <important>
1967
+ * <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a>
1968
+ * </p>
1969
+ * </important>
1970
+ * <p>Describes the parameters for Select job types.</p>
1945
1971
  * @public
1946
1972
  */
1947
1973
  SelectParameters?: SelectParameters;
@@ -2248,7 +2274,11 @@ export interface ScanRange {
2248
2274
  End?: number;
2249
2275
  }
2250
2276
  /**
2251
- * <p>Request to filter the contents of an Amazon S3 object based on a simple Structured Query
2277
+ * <note>
2278
+ * <p>Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a>
2279
+ * </p>
2280
+ * </note>
2281
+ * <p>Request to filter the contents of an Amazon S3 object based on a simple Structured Query
2252
2282
  * Language (SQL) statement. In the request, along with the SQL expression, you must specify a
2253
2283
  * data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data
2254
2284
  * into records. It returns only records that match the specified SQL expression. You must
@@ -122,6 +122,7 @@ export interface CompleteMultipartUploadRequest {
122
122
  ChecksumSHA256?: string;
123
123
  RequestPayer?: RequestPayer;
124
124
  ExpectedBucketOwner?: string;
125
+ IfNoneMatch?: string;
125
126
  SSECustomerAlgorithm?: string;
126
127
  SSECustomerKey?: string;
127
128
  SSECustomerKeyMD5?: string;
@@ -125,6 +125,7 @@ export interface PutObjectRequest {
125
125
  ChecksumSHA1?: string;
126
126
  ChecksumSHA256?: string;
127
127
  Expires?: Date;
128
+ IfNoneMatch?: string;
128
129
  GrantFullControl?: string;
129
130
  GrantRead?: string;
130
131
  GrantReadACP?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-s3",
3
3
  "description": "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",
4
- "version": "3.632.0",
4
+ "version": "3.635.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-s3",
@@ -26,10 +26,10 @@
26
26
  "@aws-crypto/sha1-browser": "5.2.0",
27
27
  "@aws-crypto/sha256-browser": "5.2.0",
28
28
  "@aws-crypto/sha256-js": "5.2.0",
29
- "@aws-sdk/client-sso-oidc": "3.632.0",
30
- "@aws-sdk/client-sts": "3.632.0",
31
- "@aws-sdk/core": "3.629.0",
32
- "@aws-sdk/credential-provider-node": "3.632.0",
29
+ "@aws-sdk/client-sso-oidc": "3.635.0",
30
+ "@aws-sdk/client-sts": "3.635.0",
31
+ "@aws-sdk/core": "3.635.0",
32
+ "@aws-sdk/credential-provider-node": "3.635.0",
33
33
  "@aws-sdk/middleware-bucket-endpoint": "3.620.0",
34
34
  "@aws-sdk/middleware-expect-continue": "3.620.0",
35
35
  "@aws-sdk/middleware-flexible-checksums": "3.620.0",
@@ -37,18 +37,18 @@
37
37
  "@aws-sdk/middleware-location-constraint": "3.609.0",
38
38
  "@aws-sdk/middleware-logger": "3.609.0",
39
39
  "@aws-sdk/middleware-recursion-detection": "3.620.0",
40
- "@aws-sdk/middleware-sdk-s3": "3.629.0",
40
+ "@aws-sdk/middleware-sdk-s3": "3.635.0",
41
41
  "@aws-sdk/middleware-ssec": "3.609.0",
42
42
  "@aws-sdk/middleware-user-agent": "3.632.0",
43
43
  "@aws-sdk/region-config-resolver": "3.614.0",
44
- "@aws-sdk/signature-v4-multi-region": "3.629.0",
44
+ "@aws-sdk/signature-v4-multi-region": "3.635.0",
45
45
  "@aws-sdk/types": "3.609.0",
46
46
  "@aws-sdk/util-endpoints": "3.632.0",
47
47
  "@aws-sdk/util-user-agent-browser": "3.609.0",
48
48
  "@aws-sdk/util-user-agent-node": "3.614.0",
49
49
  "@aws-sdk/xml-builder": "3.609.0",
50
50
  "@smithy/config-resolver": "^3.0.5",
51
- "@smithy/core": "^2.3.2",
51
+ "@smithy/core": "^2.4.0",
52
52
  "@smithy/eventstream-serde-browser": "^3.0.6",
53
53
  "@smithy/eventstream-serde-config-resolver": "^3.0.3",
54
54
  "@smithy/eventstream-serde-node": "^3.0.5",
@@ -60,20 +60,20 @@
60
60
  "@smithy/md5-js": "^3.0.3",
61
61
  "@smithy/middleware-content-length": "^3.0.5",
62
62
  "@smithy/middleware-endpoint": "^3.1.0",
63
- "@smithy/middleware-retry": "^3.0.14",
63
+ "@smithy/middleware-retry": "^3.0.15",
64
64
  "@smithy/middleware-serde": "^3.0.3",
65
65
  "@smithy/middleware-stack": "^3.0.3",
66
66
  "@smithy/node-config-provider": "^3.1.4",
67
67
  "@smithy/node-http-handler": "^3.1.4",
68
68
  "@smithy/protocol-http": "^4.1.0",
69
- "@smithy/smithy-client": "^3.1.12",
69
+ "@smithy/smithy-client": "^3.2.0",
70
70
  "@smithy/types": "^3.3.0",
71
71
  "@smithy/url-parser": "^3.0.3",
72
72
  "@smithy/util-base64": "^3.0.0",
73
73
  "@smithy/util-body-length-browser": "^3.0.0",
74
74
  "@smithy/util-body-length-node": "^3.0.0",
75
- "@smithy/util-defaults-mode-browser": "^3.0.14",
76
- "@smithy/util-defaults-mode-node": "^3.0.14",
75
+ "@smithy/util-defaults-mode-browser": "^3.0.15",
76
+ "@smithy/util-defaults-mode-node": "^3.0.15",
77
77
  "@smithy/util-endpoints": "^2.0.5",
78
78
  "@smithy/util-middleware": "^3.0.3",
79
79
  "@smithy/util-retry": "^3.0.3",
@@ -83,7 +83,7 @@
83
83
  "tslib": "^2.6.2"
84
84
  },
85
85
  "devDependencies": {
86
- "@aws-sdk/signature-v4-crt": "3.629.0",
86
+ "@aws-sdk/signature-v4-crt": "3.635.0",
87
87
  "@tsconfig/node16": "16.1.3",
88
88
  "@types/chai": "^4.2.11",
89
89
  "@types/mocha": "^8.0.4",