@aws-sdk/client-s3 3.658.0 → 3.662.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.
@@ -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, 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, 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,10 +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]: [
810
- () => isSerializableHeaderValue(input[_OA]),
811
- () => (input[_OA] || []).map((_entry) => _entry).join(", "),
812
- ],
809
+ [_xaoa]: [() => isSerializableHeaderValue(input[_OA]), () => (input[_OA] || []).join(", ")],
813
810
  });
814
811
  b.bp("/{Key+}");
815
812
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -1074,10 +1071,7 @@ export const se_ListObjectsCommand = async (input, context) => {
1074
1071
  const headers = map({}, isSerializableHeaderValue, {
1075
1072
  [_xarp]: input[_RP],
1076
1073
  [_xaebo]: input[_EBO],
1077
- [_xaooa]: [
1078
- () => isSerializableHeaderValue(input[_OOA]),
1079
- () => (input[_OOA] || []).map((_entry) => _entry).join(", "),
1080
- ],
1074
+ [_xaooa]: [() => isSerializableHeaderValue(input[_OOA]), () => (input[_OOA] || []).join(", ")],
1081
1075
  });
1082
1076
  b.bp("/");
1083
1077
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -1097,10 +1091,7 @@ export const se_ListObjectsV2Command = async (input, context) => {
1097
1091
  const headers = map({}, isSerializableHeaderValue, {
1098
1092
  [_xarp]: input[_RP],
1099
1093
  [_xaebo]: input[_EBO],
1100
- [_xaooa]: [
1101
- () => isSerializableHeaderValue(input[_OOA]),
1102
- () => (input[_OOA] || []).map((_entry) => _entry).join(", "),
1103
- ],
1094
+ [_xaooa]: [() => isSerializableHeaderValue(input[_OOA]), () => (input[_OOA] || []).join(", ")],
1104
1095
  });
1105
1096
  b.bp("/");
1106
1097
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -1123,10 +1114,7 @@ export const se_ListObjectVersionsCommand = async (input, context) => {
1123
1114
  const headers = map({}, isSerializableHeaderValue, {
1124
1115
  [_xaebo]: input[_EBO],
1125
1116
  [_xarp]: input[_RP],
1126
- [_xaooa]: [
1127
- () => isSerializableHeaderValue(input[_OOA]),
1128
- () => (input[_OOA] || []).map((_entry) => _entry).join(", "),
1129
- ],
1117
+ [_xaooa]: [() => isSerializableHeaderValue(input[_OOA]), () => (input[_OOA] || []).join(", ")],
1130
1118
  });
1131
1119
  b.bp("/");
1132
1120
  b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -6808,11 +6796,6 @@ const deserializeMetadata = (output) => ({
6808
6796
  cfId: output.headers["x-amz-cf-id"],
6809
6797
  });
6810
6798
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
6811
- const isSerializableHeaderValue = (value) => value !== undefined &&
6812
- value !== null &&
6813
- value !== "" &&
6814
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
6815
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
6816
6799
  const _A = "And";
6817
6800
  const _AAO = "AnalyticsAndOperator";
6818
6801
  const _AC = "AnalyticsConfiguration";
@@ -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
  */
@@ -210,18 +210,20 @@ 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 objects from a versioned bucket
213
+ * @example To delete multiple object versions from a versioned bucket
214
214
  * ```javascript
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.
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.
216
216
  * const input = {
217
217
  * "Bucket": "examplebucket",
218
218
  * "Delete": {
219
219
  * "Objects": [
220
220
  * {
221
- * "Key": "objectkey1"
221
+ * "Key": "HappyFace.jpg",
222
+ * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
222
223
  * },
223
224
  * {
224
- * "Key": "objectkey2"
225
+ * "Key": "HappyFace.jpg",
226
+ * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
225
227
  * }
226
228
  * ],
227
229
  * "Quiet": false
@@ -233,35 +235,31 @@ declare const DeleteObjectsCommand_base: {
233
235
  * {
234
236
  * "Deleted": [
235
237
  * {
236
- * "DeleteMarker": "true",
237
- * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
238
- * "Key": "objectkey1"
238
+ * "Key": "HappyFace.jpg",
239
+ * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
239
240
  * },
240
241
  * {
241
- * "DeleteMarker": "true",
242
- * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
243
- * "Key": "objectkey2"
242
+ * "Key": "HappyFace.jpg",
243
+ * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
244
244
  * }
245
245
  * ]
246
246
  * }
247
247
  * *\/
248
- * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805
248
+ * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737
249
249
  * ```
250
250
  *
251
- * @example To delete multiple object versions from a versioned bucket
251
+ * @example To delete multiple objects from a versioned bucket
252
252
  * ```javascript
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.
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.
254
254
  * const input = {
255
255
  * "Bucket": "examplebucket",
256
256
  * "Delete": {
257
257
  * "Objects": [
258
258
  * {
259
- * "Key": "HappyFace.jpg",
260
- * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
259
+ * "Key": "objectkey1"
261
260
  * },
262
261
  * {
263
- * "Key": "HappyFace.jpg",
264
- * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
262
+ * "Key": "objectkey2"
265
263
  * }
266
264
  * ],
267
265
  * "Quiet": false
@@ -273,17 +271,19 @@ declare const DeleteObjectsCommand_base: {
273
271
  * {
274
272
  * "Deleted": [
275
273
  * {
276
- * "Key": "HappyFace.jpg",
277
- * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
274
+ * "DeleteMarker": "true",
275
+ * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
276
+ * "Key": "objectkey1"
278
277
  * },
279
278
  * {
280
- * "Key": "HappyFace.jpg",
281
- * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
279
+ * "DeleteMarker": "true",
280
+ * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
281
+ * "Key": "objectkey2"
282
282
  * }
283
283
  * ]
284
284
  * }
285
285
  * *\/
286
- * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737
286
+ * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805
287
287
  * ```
288
288
  *
289
289
  */
@@ -96,12 +96,13 @@ 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 an object
99
+ * @example To retrieve tag set of a specific object version
100
100
  * ```javascript
101
- * // The following example retrieves tag set of an object.
101
+ * // The following example retrieves tag set of an object. The request specifies object version.
102
102
  * const input = {
103
103
  * "Bucket": "examplebucket",
104
- * "Key": "HappyFace.jpg"
104
+ * "Key": "exampleobject",
105
+ * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
105
106
  * };
106
107
  * const command = new GetObjectTaggingCommand(input);
107
108
  * const response = await client.send(command);
@@ -109,27 +110,22 @@ declare const GetObjectTaggingCommand_base: {
109
110
  * {
110
111
  * "TagSet": [
111
112
  * {
112
- * "Key": "Key4",
113
- * "Value": "Value4"
114
- * },
115
- * {
116
- * "Key": "Key3",
117
- * "Value": "Value3"
113
+ * "Key": "Key1",
114
+ * "Value": "Value1"
118
115
  * }
119
116
  * ],
120
- * "VersionId": "null"
117
+ * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
121
118
  * }
122
119
  * *\/
123
- * // example id: to-retrieve-tag-set-of-an-object-1481833847896
120
+ * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663
124
121
  * ```
125
122
  *
126
- * @example To retrieve tag set of a specific object version
123
+ * @example To retrieve tag set of an object
127
124
  * ```javascript
128
- * // The following example retrieves tag set of an object. The request specifies object version.
125
+ * // The following example retrieves tag set of an object.
129
126
  * const input = {
130
127
  * "Bucket": "examplebucket",
131
- * "Key": "exampleobject",
132
- * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
128
+ * "Key": "HappyFace.jpg"
133
129
  * };
134
130
  * const command = new GetObjectTaggingCommand(input);
135
131
  * const response = await client.send(command);
@@ -137,14 +133,18 @@ declare const GetObjectTaggingCommand_base: {
137
133
  * {
138
134
  * "TagSet": [
139
135
  * {
140
- * "Key": "Key1",
141
- * "Value": "Value1"
136
+ * "Key": "Key4",
137
+ * "Value": "Value4"
138
+ * },
139
+ * {
140
+ * "Key": "Key3",
141
+ * "Value": "Value3"
142
142
  * }
143
143
  * ],
144
- * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
144
+ * "VersionId": "null"
145
145
  * }
146
146
  * *\/
147
- * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663
147
+ * // example id: to-retrieve-tag-set-of-an-object-1481833847896
148
148
  * ```
149
149
  *
150
150
  */
@@ -238,26 +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 (specify optional headers)
241
+ * @example To upload an object and specify optional tags
242
242
  * ```javascript
243
- * // 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.
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.
244
244
  * const input = {
245
- * "Body": "HappyFace.jpg",
245
+ * "Body": "c:\\HappyFace.jpg",
246
246
  * "Bucket": "examplebucket",
247
247
  * "Key": "HappyFace.jpg",
248
- * "ServerSideEncryption": "AES256",
249
- * "StorageClass": "STANDARD_IA"
248
+ * "Tagging": "key1=value1&key2=value2"
250
249
  * };
251
250
  * const command = new PutObjectCommand(input);
252
251
  * const response = await client.send(command);
253
252
  * /* response ==
254
253
  * {
255
254
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
256
- * "ServerSideEncryption": "AES256",
257
- * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
255
+ * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
258
256
  * }
259
257
  * *\/
260
- * // example id: to-upload-an-object-(specify-optional-headers)
258
+ * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
261
259
  * ```
262
260
  *
263
261
  * @example To create an object.
@@ -279,97 +277,99 @@ declare const PutObjectCommand_base: {
279
277
  * // example id: to-create-an-object-1483147613675
280
278
  * ```
281
279
  *
282
- * @example To upload an object
280
+ * @example To upload object and specify user-defined metadata
283
281
  * ```javascript
284
- * // 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.
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.
285
283
  * const input = {
286
- * "Body": "HappyFace.jpg",
284
+ * "Body": "filetoupload",
287
285
  * "Bucket": "examplebucket",
288
- * "Key": "HappyFace.jpg"
286
+ * "Key": "exampleobject",
287
+ * "Metadata": {
288
+ * "metadata1": "value1",
289
+ * "metadata2": "value2"
290
+ * }
289
291
  * };
290
292
  * const command = new PutObjectCommand(input);
291
293
  * const response = await client.send(command);
292
294
  * /* response ==
293
295
  * {
294
296
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
295
- * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
297
+ * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
296
298
  * }
297
299
  * *\/
298
- * // example id: to-upload-an-object-1481760101010
300
+ * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
299
301
  * ```
300
302
  *
301
- * @example To upload an object and specify optional tags
303
+ * @example To upload an object
302
304
  * ```javascript
303
- * // 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.
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.
304
306
  * const input = {
305
- * "Body": "c:\\HappyFace.jpg",
307
+ * "Body": "HappyFace.jpg",
306
308
  * "Bucket": "examplebucket",
307
- * "Key": "HappyFace.jpg",
308
- * "Tagging": "key1=value1&key2=value2"
309
+ * "Key": "HappyFace.jpg"
309
310
  * };
310
311
  * const command = new PutObjectCommand(input);
311
312
  * const response = await client.send(command);
312
313
  * /* response ==
313
314
  * {
314
315
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
315
- * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
316
+ * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
316
317
  * }
317
318
  * *\/
318
- * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
319
+ * // example id: to-upload-an-object-1481760101010
319
320
  * ```
320
321
  *
321
- * @example To upload an object and specify canned ACL.
322
+ * @example To upload an object and specify server-side encryption and object tags
322
323
  * ```javascript
323
- * // 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.
324
+ * // 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.
324
325
  * const input = {
325
- * "ACL": "authenticated-read",
326
326
  * "Body": "filetoupload",
327
327
  * "Bucket": "examplebucket",
328
- * "Key": "exampleobject"
328
+ * "Key": "exampleobject",
329
+ * "ServerSideEncryption": "AES256",
330
+ * "Tagging": "key1=value1&key2=value2"
329
331
  * };
330
332
  * const command = new PutObjectCommand(input);
331
333
  * const response = await client.send(command);
332
334
  * /* response ==
333
335
  * {
334
336
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
335
- * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
337
+ * "ServerSideEncryption": "AES256",
338
+ * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
336
339
  * }
337
340
  * *\/
338
- * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
341
+ * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
339
342
  * ```
340
343
  *
341
- * @example To upload object and specify user-defined metadata
344
+ * @example To upload an object and specify canned ACL.
342
345
  * ```javascript
343
- * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
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.
344
347
  * const input = {
348
+ * "ACL": "authenticated-read",
345
349
  * "Body": "filetoupload",
346
350
  * "Bucket": "examplebucket",
347
- * "Key": "exampleobject",
348
- * "Metadata": {
349
- * "metadata1": "value1",
350
- * "metadata2": "value2"
351
- * }
351
+ * "Key": "exampleobject"
352
352
  * };
353
353
  * const command = new PutObjectCommand(input);
354
354
  * const response = await client.send(command);
355
355
  * /* response ==
356
356
  * {
357
357
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
358
- * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
358
+ * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
359
359
  * }
360
360
  * *\/
361
- * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
361
+ * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
362
362
  * ```
363
363
  *
364
- * @example To upload an object and specify server-side encryption and object tags
364
+ * @example To upload an object (specify optional headers)
365
365
  * ```javascript
366
- * // 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.
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.
367
367
  * const input = {
368
- * "Body": "filetoupload",
368
+ * "Body": "HappyFace.jpg",
369
369
  * "Bucket": "examplebucket",
370
- * "Key": "exampleobject",
370
+ * "Key": "HappyFace.jpg",
371
371
  * "ServerSideEncryption": "AES256",
372
- * "Tagging": "key1=value1&key2=value2"
372
+ * "StorageClass": "STANDARD_IA"
373
373
  * };
374
374
  * const command = new PutObjectCommand(input);
375
375
  * const response = await client.send(command);
@@ -377,10 +377,10 @@ declare const PutObjectCommand_base: {
377
377
  * {
378
378
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
379
379
  * "ServerSideEncryption": "AES256",
380
- * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
380
+ * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
381
381
  * }
382
382
  * *\/
383
- * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
383
+ * // example id: to-upload-an-object-(specify-optional-headers)
384
384
  * ```
385
385
  *
386
386
  */
@@ -297,14 +297,15 @@ 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 data from an existing object as data source
300
+ * @example To upload a part by copying byte range from an existing object as data source
301
301
  * ```javascript
302
- * // The following example uploads a part of a multipart upload by copying data from an existing object as data source.
302
+ * // The following example uploads a part of a multipart upload by copying a specified byte range 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",
306
307
  * "Key": "examplelargeobject",
307
- * "PartNumber": "1",
308
+ * "PartNumber": "2",
308
309
  * "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"
309
310
  * };
310
311
  * const command = new UploadPartCopyCommand(input);
@@ -312,23 +313,22 @@ declare const UploadPartCopyCommand_base: {
312
313
  * /* response ==
313
314
  * {
314
315
  * "CopyPartResult": {
315
- * "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
316
- * "LastModified": "2016-12-29T21:24:43.000Z"
316
+ * "ETag": "\"65d16d19e65a7508a51f043180edcc36\"",
317
+ * "LastModified": "2016-12-29T21:44:28.000Z"
317
318
  * }
318
319
  * }
319
320
  * *\/
320
- * // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348
321
+ * // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594
321
322
  * ```
322
323
  *
323
- * @example To upload a part by copying byte range from an existing object as data source
324
+ * @example To upload a part by copying data from an existing object as data source
324
325
  * ```javascript
325
- * // The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.
326
+ * // The following example uploads a part of a multipart upload by copying data from an existing object as data source.
326
327
  * const input = {
327
328
  * "Bucket": "examplebucket",
328
329
  * "CopySource": "/bucketname/sourceobjectkey",
329
- * "CopySourceRange": "bytes=1-100000",
330
330
  * "Key": "examplelargeobject",
331
- * "PartNumber": "2",
331
+ * "PartNumber": "1",
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": "\"65d16d19e65a7508a51f043180edcc36\"",
340
- * "LastModified": "2016-12-29T21:44:28.000Z"
339
+ * "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
340
+ * "LastModified": "2016-12-29T21:24:43.000Z"
341
341
  * }
342
342
  * }
343
343
  * *\/
344
- * // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594
344
+ * // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348
345
345
  * ```
346
346
  *
347
347
  */