@aws-sdk/client-s3 3.664.0 → 3.666.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
@@ -1939,7 +1939,7 @@ var se_GetObjectAttributesCommand = /* @__PURE__ */ __name(async (input, context
1939
1939
  [_xasseckm]: input[_SSECKMD],
1940
1940
  [_xarp]: input[_RP],
1941
1941
  [_xaebo]: input[_EBO],
1942
- [_xaoa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OA]), () => (input[_OA] || []).join(", ")]
1942
+ [_xaoa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OA]), () => (input[_OA] || []).map(import_smithy_client.quoteHeader).join(", ")]
1943
1943
  });
1944
1944
  b.bp("/{Key+}");
1945
1945
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -2204,7 +2204,7 @@ var se_ListObjectsCommand = /* @__PURE__ */ __name(async (input, context) => {
2204
2204
  const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
2205
2205
  [_xarp]: input[_RP],
2206
2206
  [_xaebo]: input[_EBO],
2207
- [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).join(", ")]
2207
+ [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")]
2208
2208
  });
2209
2209
  b.bp("/");
2210
2210
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -2224,7 +2224,7 @@ var se_ListObjectsV2Command = /* @__PURE__ */ __name(async (input, context) => {
2224
2224
  const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
2225
2225
  [_xarp]: input[_RP],
2226
2226
  [_xaebo]: input[_EBO],
2227
- [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).join(", ")]
2227
+ [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")]
2228
2228
  });
2229
2229
  b.bp("/");
2230
2230
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -2247,7 +2247,7 @@ var se_ListObjectVersionsCommand = /* @__PURE__ */ __name(async (input, context)
2247
2247
  const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
2248
2248
  [_xaebo]: input[_EBO],
2249
2249
  [_xarp]: input[_RP],
2250
- [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).join(", ")]
2250
+ [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")]
2251
2251
  });
2252
2252
  b.bp("/");
2253
2253
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -2,7 +2,7 @@ import { loadRestXmlErrorCode, parseXmlBody as parseBody, parseXmlErrorBody as p
2
2
  import { XmlNode as __XmlNode, XmlText as __XmlText } from "@aws-sdk/xml-builder";
3
3
  import { requestBuilder as rb } from "@smithy/core";
4
4
  import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
5
- import { collectBody, dateToUtcString as __dateToUtcString, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, getArrayIfSingleItem as __getArrayIfSingleItem, isSerializableHeaderValue, map, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, parseRfc7231DateTime as __parseRfc7231DateTime, serializeDateTime as __serializeDateTime, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, withBaseException, } from "@smithy/smithy-client";
5
+ import { collectBody, dateToUtcString as __dateToUtcString, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, getArrayIfSingleItem as __getArrayIfSingleItem, isSerializableHeaderValue, map, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, parseRfc7231DateTime as __parseRfc7231DateTime, quoteHeader as __quoteHeader, serializeDateTime as __serializeDateTime, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, withBaseException, } from "@smithy/smithy-client";
6
6
  import { AnalyticsFilter, BucketAlreadyExists, BucketAlreadyOwnedByYou, InvalidObjectState, LifecycleRuleFilter, MetricsFilter, NoSuchBucket, NoSuchKey, NoSuchUpload, NotFound, ObjectNotInActiveTierError, ReplicationRuleFilter, } from "../models/models_0";
7
7
  import { ObjectAlreadyInActiveTierError, } from "../models/models_1";
8
8
  import { S3ServiceException as __BaseException } from "../models/S3ServiceException";
@@ -806,7 +806,7 @@ export const se_GetObjectAttributesCommand = async (input, context) => {
806
806
  [_xasseckm]: input[_SSECKMD],
807
807
  [_xarp]: input[_RP],
808
808
  [_xaebo]: input[_EBO],
809
- [_xaoa]: [() => isSerializableHeaderValue(input[_OA]), () => (input[_OA] || []).join(", ")],
809
+ [_xaoa]: [() => isSerializableHeaderValue(input[_OA]), () => (input[_OA] || []).map(__quoteHeader).join(", ")],
810
810
  });
811
811
  b.bp("/{Key+}");
812
812
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -1071,7 +1071,7 @@ export const se_ListObjectsCommand = async (input, context) => {
1071
1071
  const headers = map({}, isSerializableHeaderValue, {
1072
1072
  [_xarp]: input[_RP],
1073
1073
  [_xaebo]: input[_EBO],
1074
- [_xaooa]: [() => isSerializableHeaderValue(input[_OOA]), () => (input[_OOA] || []).join(", ")],
1074
+ [_xaooa]: [() => isSerializableHeaderValue(input[_OOA]), () => (input[_OOA] || []).map(__quoteHeader).join(", ")],
1075
1075
  });
1076
1076
  b.bp("/");
1077
1077
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -1091,7 +1091,7 @@ export const se_ListObjectsV2Command = async (input, context) => {
1091
1091
  const headers = map({}, isSerializableHeaderValue, {
1092
1092
  [_xarp]: input[_RP],
1093
1093
  [_xaebo]: input[_EBO],
1094
- [_xaooa]: [() => isSerializableHeaderValue(input[_OOA]), () => (input[_OOA] || []).join(", ")],
1094
+ [_xaooa]: [() => isSerializableHeaderValue(input[_OOA]), () => (input[_OOA] || []).map(__quoteHeader).join(", ")],
1095
1095
  });
1096
1096
  b.bp("/");
1097
1097
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -1114,7 +1114,7 @@ export const se_ListObjectVersionsCommand = async (input, context) => {
1114
1114
  const headers = map({}, isSerializableHeaderValue, {
1115
1115
  [_xaebo]: input[_EBO],
1116
1116
  [_xarp]: input[_RP],
1117
- [_xaooa]: [() => isSerializableHeaderValue(input[_OOA]), () => (input[_OOA] || []).join(", ")],
1117
+ [_xaooa]: [() => isSerializableHeaderValue(input[_OOA]), () => (input[_OOA] || []).map(__quoteHeader).join(", ")],
1118
1118
  });
1119
1119
  b.bp("/");
1120
1120
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -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 (from a non-versioned bucket)
164
+ * @example To delete an object
165
165
  * ```javascript
166
- * // The following example deletes an object from a non-versioned bucket.
166
+ * // The following example deletes an object from an S3 bucket.
167
167
  * const input = {
168
- * "Bucket": "ExampleBucket",
169
- * "Key": "HappyFace.jpg"
168
+ * "Bucket": "examplebucket",
169
+ * "Key": "objectkey.jpg"
170
170
  * };
171
171
  * const command = new DeleteObjectCommand(input);
172
172
  * await client.send(command);
173
- * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
173
+ * // example id: to-delete-an-object-1472850136595
174
174
  * ```
175
175
  *
176
- * @example To delete an object
176
+ * @example To delete an object (from a non-versioned bucket)
177
177
  * ```javascript
178
- * // The following example deletes an object from an S3 bucket.
178
+ * // The following example deletes an object from a non-versioned bucket.
179
179
  * const input = {
180
- * "Bucket": "examplebucket",
181
- * "Key": "objectkey.jpg"
180
+ * "Bucket": "ExampleBucket",
181
+ * "Key": "HappyFace.jpg"
182
182
  * };
183
183
  * const command = new DeleteObjectCommand(input);
184
184
  * await client.send(command);
185
- * // example id: to-delete-an-object-1472850136595
185
+ * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089
186
186
  * ```
187
187
  *
188
188
  */
@@ -210,20 +210,18 @@ declare const DeleteObjectsCommand_base: {
210
210
  * <p>Base exception class for all service exceptions from S3 service.</p>
211
211
  *
212
212
  * @public
213
- * @example To delete multiple object versions from a versioned bucket
213
+ * @example To delete multiple objects from a versioned bucket
214
214
  * ```javascript
215
- * // The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response.
215
+ * // The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
216
216
  * const input = {
217
217
  * "Bucket": "examplebucket",
218
218
  * "Delete": {
219
219
  * "Objects": [
220
220
  * {
221
- * "Key": "HappyFace.jpg",
222
- * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
221
+ * "Key": "objectkey1"
223
222
  * },
224
223
  * {
225
- * "Key": "HappyFace.jpg",
226
- * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
224
+ * "Key": "objectkey2"
227
225
  * }
228
226
  * ],
229
227
  * "Quiet": false
@@ -235,31 +233,35 @@ declare const DeleteObjectsCommand_base: {
235
233
  * {
236
234
  * "Deleted": [
237
235
  * {
238
- * "Key": "HappyFace.jpg",
239
- * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
236
+ * "DeleteMarker": "true",
237
+ * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
238
+ * "Key": "objectkey1"
240
239
  * },
241
240
  * {
242
- * "Key": "HappyFace.jpg",
243
- * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
241
+ * "DeleteMarker": "true",
242
+ * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
243
+ * "Key": "objectkey2"
244
244
  * }
245
245
  * ]
246
246
  * }
247
247
  * *\/
248
- * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737
248
+ * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805
249
249
  * ```
250
250
  *
251
- * @example To delete multiple objects from a versioned bucket
251
+ * @example To delete multiple object versions from a versioned bucket
252
252
  * ```javascript
253
- * // The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
253
+ * // The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response.
254
254
  * const input = {
255
255
  * "Bucket": "examplebucket",
256
256
  * "Delete": {
257
257
  * "Objects": [
258
258
  * {
259
- * "Key": "objectkey1"
259
+ * "Key": "HappyFace.jpg",
260
+ * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
260
261
  * },
261
262
  * {
262
- * "Key": "objectkey2"
263
+ * "Key": "HappyFace.jpg",
264
+ * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
263
265
  * }
264
266
  * ],
265
267
  * "Quiet": false
@@ -271,19 +273,17 @@ declare const DeleteObjectsCommand_base: {
271
273
  * {
272
274
  * "Deleted": [
273
275
  * {
274
- * "DeleteMarker": "true",
275
- * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
276
- * "Key": "objectkey1"
276
+ * "Key": "HappyFace.jpg",
277
+ * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
277
278
  * },
278
279
  * {
279
- * "DeleteMarker": "true",
280
- * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
281
- * "Key": "objectkey2"
280
+ * "Key": "HappyFace.jpg",
281
+ * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
282
282
  * }
283
283
  * ]
284
284
  * }
285
285
  * *\/
286
- * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805
286
+ * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737
287
287
  * ```
288
288
  *
289
289
  */
@@ -282,53 +282,53 @@ declare const GetObjectCommand_base: {
282
282
  * <p>Base exception class for all service exceptions from S3 service.</p>
283
283
  *
284
284
  * @public
285
- * @example To retrieve an object
285
+ * @example To retrieve a byte range of an object
286
286
  * ```javascript
287
- * // The following example retrieves an object for an S3 bucket.
287
+ * // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.
288
288
  * const input = {
289
289
  * "Bucket": "examplebucket",
290
- * "Key": "HappyFace.jpg"
290
+ * "Key": "SampleFile.txt",
291
+ * "Range": "bytes=0-9"
291
292
  * };
292
293
  * const command = new GetObjectCommand(input);
293
294
  * const response = await client.send(command);
294
295
  * /* response ==
295
296
  * {
296
297
  * "AcceptRanges": "bytes",
297
- * "ContentLength": "3191",
298
- * "ContentType": "image/jpeg",
299
- * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
300
- * "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT",
298
+ * "ContentLength": "10",
299
+ * "ContentRange": "bytes 0-9/43",
300
+ * "ContentType": "text/plain",
301
+ * "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
302
+ * "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT",
301
303
  * "Metadata": {},
302
- * "TagCount": 2,
303
304
  * "VersionId": "null"
304
305
  * }
305
306
  * *\/
306
- * // example id: to-retrieve-an-object-1481827837012
307
+ * // example id: to-retrieve-a-byte-range-of-an-object--1481832674603
307
308
  * ```
308
309
  *
309
- * @example To retrieve a byte range of an object
310
+ * @example To retrieve an object
310
311
  * ```javascript
311
- * // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.
312
+ * // The following example retrieves an object for an S3 bucket.
312
313
  * const input = {
313
314
  * "Bucket": "examplebucket",
314
- * "Key": "SampleFile.txt",
315
- * "Range": "bytes=0-9"
315
+ * "Key": "HappyFace.jpg"
316
316
  * };
317
317
  * const command = new GetObjectCommand(input);
318
318
  * const response = await client.send(command);
319
319
  * /* response ==
320
320
  * {
321
321
  * "AcceptRanges": "bytes",
322
- * "ContentLength": "10",
323
- * "ContentRange": "bytes 0-9/43",
324
- * "ContentType": "text/plain",
325
- * "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
326
- * "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT",
322
+ * "ContentLength": "3191",
323
+ * "ContentType": "image/jpeg",
324
+ * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
325
+ * "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT",
327
326
  * "Metadata": {},
327
+ * "TagCount": 2,
328
328
  * "VersionId": "null"
329
329
  * }
330
330
  * *\/
331
- * // example id: to-retrieve-a-byte-range-of-an-object--1481832674603
331
+ * // example id: to-retrieve-an-object-1481827837012
332
332
  * ```
333
333
  *
334
334
  */
@@ -96,13 +96,12 @@ declare const GetObjectTaggingCommand_base: {
96
96
  * <p>Base exception class for all service exceptions from S3 service.</p>
97
97
  *
98
98
  * @public
99
- * @example To retrieve tag set of a specific object version
99
+ * @example To retrieve tag set of an object
100
100
  * ```javascript
101
- * // The following example retrieves tag set of an object. The request specifies object version.
101
+ * // The following example retrieves tag set of an object.
102
102
  * const input = {
103
103
  * "Bucket": "examplebucket",
104
- * "Key": "exampleobject",
105
- * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
104
+ * "Key": "HappyFace.jpg"
106
105
  * };
107
106
  * const command = new GetObjectTaggingCommand(input);
108
107
  * const response = await client.send(command);
@@ -110,22 +109,27 @@ declare const GetObjectTaggingCommand_base: {
110
109
  * {
111
110
  * "TagSet": [
112
111
  * {
113
- * "Key": "Key1",
114
- * "Value": "Value1"
112
+ * "Key": "Key4",
113
+ * "Value": "Value4"
114
+ * },
115
+ * {
116
+ * "Key": "Key3",
117
+ * "Value": "Value3"
115
118
  * }
116
119
  * ],
117
- * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
120
+ * "VersionId": "null"
118
121
  * }
119
122
  * *\/
120
- * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663
123
+ * // example id: to-retrieve-tag-set-of-an-object-1481833847896
121
124
  * ```
122
125
  *
123
- * @example To retrieve tag set of an object
126
+ * @example To retrieve tag set of a specific object version
124
127
  * ```javascript
125
- * // The following example retrieves tag set of an object.
128
+ * // The following example retrieves tag set of an object. The request specifies object version.
126
129
  * const input = {
127
130
  * "Bucket": "examplebucket",
128
- * "Key": "HappyFace.jpg"
131
+ * "Key": "exampleobject",
132
+ * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
129
133
  * };
130
134
  * const command = new GetObjectTaggingCommand(input);
131
135
  * const response = await client.send(command);
@@ -133,18 +137,14 @@ declare const GetObjectTaggingCommand_base: {
133
137
  * {
134
138
  * "TagSet": [
135
139
  * {
136
- * "Key": "Key4",
137
- * "Value": "Value4"
138
- * },
139
- * {
140
- * "Key": "Key3",
141
- * "Value": "Value3"
140
+ * "Key": "Key1",
141
+ * "Value": "Value1"
142
142
  * }
143
143
  * ],
144
- * "VersionId": "null"
144
+ * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
145
145
  * }
146
146
  * *\/
147
- * // example id: to-retrieve-tag-set-of-an-object-1481833847896
147
+ * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663
148
148
  * ```
149
149
  *
150
150
  */
@@ -238,24 +238,24 @@ declare const PutObjectCommand_base: {
238
238
  * <p>Base exception class for all service exceptions from S3 service.</p>
239
239
  *
240
240
  * @public
241
- * @example To upload an object and specify optional tags
241
+ * @example To upload an object and specify canned ACL.
242
242
  * ```javascript
243
- * // 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.
243
+ * // 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.
244
244
  * const input = {
245
- * "Body": "c:\\HappyFace.jpg",
245
+ * "ACL": "authenticated-read",
246
+ * "Body": "filetoupload",
246
247
  * "Bucket": "examplebucket",
247
- * "Key": "HappyFace.jpg",
248
- * "Tagging": "key1=value1&key2=value2"
248
+ * "Key": "exampleobject"
249
249
  * };
250
250
  * const command = new PutObjectCommand(input);
251
251
  * const response = await client.send(command);
252
252
  * /* response ==
253
253
  * {
254
254
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
255
- * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
255
+ * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
256
256
  * }
257
257
  * *\/
258
- * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
258
+ * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
259
259
  * ```
260
260
  *
261
261
  * @example To create an object.
@@ -277,46 +277,43 @@ declare const PutObjectCommand_base: {
277
277
  * // example id: to-create-an-object-1483147613675
278
278
  * ```
279
279
  *
280
- * @example To upload object and specify user-defined metadata
280
+ * @example To upload an object
281
281
  * ```javascript
282
- * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
282
+ * // 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.
283
283
  * const input = {
284
- * "Body": "filetoupload",
284
+ * "Body": "HappyFace.jpg",
285
285
  * "Bucket": "examplebucket",
286
- * "Key": "exampleobject",
287
- * "Metadata": {
288
- * "metadata1": "value1",
289
- * "metadata2": "value2"
290
- * }
286
+ * "Key": "HappyFace.jpg"
291
287
  * };
292
288
  * const command = new PutObjectCommand(input);
293
289
  * const response = await client.send(command);
294
290
  * /* response ==
295
291
  * {
296
292
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
297
- * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
293
+ * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
298
294
  * }
299
295
  * *\/
300
- * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
296
+ * // example id: to-upload-an-object-1481760101010
301
297
  * ```
302
298
  *
303
- * @example To upload an object
299
+ * @example To upload an object and specify optional tags
304
300
  * ```javascript
305
- * // 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.
301
+ * // 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.
306
302
  * const input = {
307
- * "Body": "HappyFace.jpg",
303
+ * "Body": "c:\\HappyFace.jpg",
308
304
  * "Bucket": "examplebucket",
309
- * "Key": "HappyFace.jpg"
305
+ * "Key": "HappyFace.jpg",
306
+ * "Tagging": "key1=value1&key2=value2"
310
307
  * };
311
308
  * const command = new PutObjectCommand(input);
312
309
  * const response = await client.send(command);
313
310
  * /* response ==
314
311
  * {
315
312
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
316
- * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
313
+ * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
317
314
  * }
318
315
  * *\/
319
- * // example id: to-upload-an-object-1481760101010
316
+ * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
320
317
  * ```
321
318
  *
322
319
  * @example To upload an object and specify server-side encryption and object tags
@@ -341,46 +338,49 @@ declare const PutObjectCommand_base: {
341
338
  * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
342
339
  * ```
343
340
  *
344
- * @example To upload an object and specify canned ACL.
341
+ * @example To upload an object (specify optional headers)
345
342
  * ```javascript
346
- * // 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.
343
+ * // 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.
347
344
  * const input = {
348
- * "ACL": "authenticated-read",
349
- * "Body": "filetoupload",
345
+ * "Body": "HappyFace.jpg",
350
346
  * "Bucket": "examplebucket",
351
- * "Key": "exampleobject"
347
+ * "Key": "HappyFace.jpg",
348
+ * "ServerSideEncryption": "AES256",
349
+ * "StorageClass": "STANDARD_IA"
352
350
  * };
353
351
  * const command = new PutObjectCommand(input);
354
352
  * const response = await client.send(command);
355
353
  * /* response ==
356
354
  * {
357
355
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
358
- * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
356
+ * "ServerSideEncryption": "AES256",
357
+ * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
359
358
  * }
360
359
  * *\/
361
- * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
360
+ * // example id: to-upload-an-object-(specify-optional-headers)
362
361
  * ```
363
362
  *
364
- * @example To upload an object (specify optional headers)
363
+ * @example To upload object and specify user-defined metadata
365
364
  * ```javascript
366
- * // 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.
365
+ * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
367
366
  * const input = {
368
- * "Body": "HappyFace.jpg",
367
+ * "Body": "filetoupload",
369
368
  * "Bucket": "examplebucket",
370
- * "Key": "HappyFace.jpg",
371
- * "ServerSideEncryption": "AES256",
372
- * "StorageClass": "STANDARD_IA"
369
+ * "Key": "exampleobject",
370
+ * "Metadata": {
371
+ * "metadata1": "value1",
372
+ * "metadata2": "value2"
373
+ * }
373
374
  * };
374
375
  * const command = new PutObjectCommand(input);
375
376
  * const response = await client.send(command);
376
377
  * /* response ==
377
378
  * {
378
379
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
379
- * "ServerSideEncryption": "AES256",
380
- * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
380
+ * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
381
381
  * }
382
382
  * *\/
383
- * // example id: to-upload-an-object-(specify-optional-headers)
383
+ * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
384
384
  * ```
385
385
  *
386
386
  */
@@ -297,15 +297,14 @@ declare const UploadPartCopyCommand_base: {
297
297
  * <p>Base exception class for all service exceptions from S3 service.</p>
298
298
  *
299
299
  * @public
300
- * @example To upload a part by copying byte range from an existing object as data source
300
+ * @example To upload a part by copying data from an existing object as data source
301
301
  * ```javascript
302
- * // The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.
302
+ * // The following example uploads a part of a multipart upload by copying data from an existing object as data source.
303
303
  * const input = {
304
304
  * "Bucket": "examplebucket",
305
305
  * "CopySource": "/bucketname/sourceobjectkey",
306
- * "CopySourceRange": "bytes=1-100000",
307
306
  * "Key": "examplelargeobject",
308
- * "PartNumber": "2",
307
+ * "PartNumber": "1",
309
308
  * "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"
310
309
  * };
311
310
  * const command = new UploadPartCopyCommand(input);
@@ -313,22 +312,23 @@ declare const UploadPartCopyCommand_base: {
313
312
  * /* response ==
314
313
  * {
315
314
  * "CopyPartResult": {
316
- * "ETag": "\"65d16d19e65a7508a51f043180edcc36\"",
317
- * "LastModified": "2016-12-29T21:44:28.000Z"
315
+ * "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
316
+ * "LastModified": "2016-12-29T21:24:43.000Z"
318
317
  * }
319
318
  * }
320
319
  * *\/
321
- * // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594
320
+ * // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348
322
321
  * ```
323
322
  *
324
- * @example To upload a part by copying data from an existing object as data source
323
+ * @example To upload a part by copying byte range from an existing object as data source
325
324
  * ```javascript
326
- * // The following example uploads a part of a multipart upload by copying data from an existing object as data source.
325
+ * // The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.
327
326
  * const input = {
328
327
  * "Bucket": "examplebucket",
329
328
  * "CopySource": "/bucketname/sourceobjectkey",
329
+ * "CopySourceRange": "bytes=1-100000",
330
330
  * "Key": "examplelargeobject",
331
- * "PartNumber": "1",
331
+ * "PartNumber": "2",
332
332
  * "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"
333
333
  * };
334
334
  * const command = new UploadPartCopyCommand(input);
@@ -336,12 +336,12 @@ declare const UploadPartCopyCommand_base: {
336
336
  * /* response ==
337
337
  * {
338
338
  * "CopyPartResult": {
339
- * "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
340
- * "LastModified": "2016-12-29T21:24:43.000Z"
339
+ * "ETag": "\"65d16d19e65a7508a51f043180edcc36\"",
340
+ * "LastModified": "2016-12-29T21:44:28.000Z"
341
341
  * }
342
342
  * }
343
343
  * *\/
344
- * // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348
344
+ * // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594
345
345
  * ```
346
346
  *
347
347
  */
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.664.0",
4
+ "version": "3.666.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,29 +26,29 @@
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.664.0",
30
- "@aws-sdk/client-sts": "3.664.0",
31
- "@aws-sdk/core": "3.664.0",
32
- "@aws-sdk/credential-provider-node": "3.664.0",
29
+ "@aws-sdk/client-sso-oidc": "3.666.0",
30
+ "@aws-sdk/client-sts": "3.666.0",
31
+ "@aws-sdk/core": "3.666.0",
32
+ "@aws-sdk/credential-provider-node": "3.666.0",
33
33
  "@aws-sdk/middleware-bucket-endpoint": "3.664.0",
34
34
  "@aws-sdk/middleware-expect-continue": "3.664.0",
35
- "@aws-sdk/middleware-flexible-checksums": "3.664.0",
35
+ "@aws-sdk/middleware-flexible-checksums": "3.666.0",
36
36
  "@aws-sdk/middleware-host-header": "3.664.0",
37
37
  "@aws-sdk/middleware-location-constraint": "3.664.0",
38
38
  "@aws-sdk/middleware-logger": "3.664.0",
39
39
  "@aws-sdk/middleware-recursion-detection": "3.664.0",
40
- "@aws-sdk/middleware-sdk-s3": "3.664.0",
40
+ "@aws-sdk/middleware-sdk-s3": "3.666.0",
41
41
  "@aws-sdk/middleware-ssec": "3.664.0",
42
- "@aws-sdk/middleware-user-agent": "3.664.0",
42
+ "@aws-sdk/middleware-user-agent": "3.666.0",
43
43
  "@aws-sdk/region-config-resolver": "3.664.0",
44
- "@aws-sdk/signature-v4-multi-region": "3.664.0",
44
+ "@aws-sdk/signature-v4-multi-region": "3.666.0",
45
45
  "@aws-sdk/types": "3.664.0",
46
46
  "@aws-sdk/util-endpoints": "3.664.0",
47
47
  "@aws-sdk/util-user-agent-browser": "3.664.0",
48
- "@aws-sdk/util-user-agent-node": "3.664.0",
48
+ "@aws-sdk/util-user-agent-node": "3.666.0",
49
49
  "@aws-sdk/xml-builder": "3.662.0",
50
50
  "@smithy/config-resolver": "^3.0.9",
51
- "@smithy/core": "^2.4.7",
51
+ "@smithy/core": "^2.4.8",
52
52
  "@smithy/eventstream-serde-browser": "^3.0.10",
53
53
  "@smithy/eventstream-serde-config-resolver": "^3.0.7",
54
54
  "@smithy/eventstream-serde-node": "^3.0.9",
@@ -60,20 +60,20 @@
60
60
  "@smithy/md5-js": "^3.0.7",
61
61
  "@smithy/middleware-content-length": "^3.0.9",
62
62
  "@smithy/middleware-endpoint": "^3.1.4",
63
- "@smithy/middleware-retry": "^3.0.22",
63
+ "@smithy/middleware-retry": "^3.0.23",
64
64
  "@smithy/middleware-serde": "^3.0.7",
65
65
  "@smithy/middleware-stack": "^3.0.7",
66
66
  "@smithy/node-config-provider": "^3.1.8",
67
67
  "@smithy/node-http-handler": "^3.2.4",
68
68
  "@smithy/protocol-http": "^4.1.4",
69
- "@smithy/smithy-client": "^3.3.6",
69
+ "@smithy/smithy-client": "^3.4.0",
70
70
  "@smithy/types": "^3.5.0",
71
71
  "@smithy/url-parser": "^3.0.7",
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.22",
76
- "@smithy/util-defaults-mode-node": "^3.0.22",
75
+ "@smithy/util-defaults-mode-browser": "^3.0.23",
76
+ "@smithy/util-defaults-mode-node": "^3.0.23",
77
77
  "@smithy/util-endpoints": "^2.1.3",
78
78
  "@smithy/util-middleware": "^3.0.7",
79
79
  "@smithy/util-retry": "^3.0.7",
@@ -83,7 +83,7 @@
83
83
  "tslib": "^2.6.2"
84
84
  },
85
85
  "devDependencies": {
86
- "@aws-sdk/signature-v4-crt": "3.664.0",
86
+ "@aws-sdk/signature-v4-crt": "3.666.0",
87
87
  "@tsconfig/node16": "16.1.3",
88
88
  "@types/chai": "^4.2.11",
89
89
  "@types/mocha": "^8.0.4",