You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* <p>Base exception class for all service exceptions from S3 service.</p>
83
83
*
84
84
* @public
85
-
* @example To remove tag set from an object
85
+
* @example To remove tag set from an object version
86
86
* ```javascript
87
-
* // 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.
87
+
* // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.
88
88
* const input = {
89
89
* "Bucket": "examplebucket",
90
-
* "Key": "HappyFace.jpg"
90
+
* "Key": "HappyFace.jpg",
91
+
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
91
92
* };
92
93
* const command = new DeleteObjectTaggingCommand(input);
93
94
* const response = await client.send(command);
94
95
* /* response ==
95
96
* {
96
-
* "VersionId": "null"
97
+
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
97
98
* }
98
99
* *\/
99
-
* // example id: to-remove-tag-set-from-an-object-1483145342862
100
+
* // example id: to-remove-tag-set-from-an-object-version-1483145285913
100
101
* ```
101
102
*
102
-
* @example To remove tag set from an object version
103
+
* @example To remove tag set from an object
103
104
* ```javascript
104
-
* // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.
105
+
* // 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.
105
106
* const input = {
106
107
* "Bucket": "examplebucket",
107
-
* "Key": "HappyFace.jpg",
108
-
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
108
+
* "Key": "HappyFace.jpg"
109
109
* };
110
110
* const command = new DeleteObjectTaggingCommand(input);
111
111
* const response = await client.send(command);
112
112
* /* response ==
113
113
* {
114
-
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
114
+
* "VersionId": "null"
115
115
* }
116
116
* *\/
117
-
* // example id: to-remove-tag-set-from-an-object-version-1483145285913
117
+
* // example id: to-remove-tag-set-from-an-object-1483145342862
* <p>Base exception class for all service exceptions from S3 service.</p>
247
247
*
248
248
* @public
249
+
* @example To upload an object (specify optional headers)
250
+
* ```javascript
251
+
* // 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.
252
+
* const input = {
253
+
* "Body": "HappyFace.jpg",
254
+
* "Bucket": "examplebucket",
255
+
* "Key": "HappyFace.jpg",
256
+
* "ServerSideEncryption": "AES256",
257
+
* "StorageClass": "STANDARD_IA"
258
+
* };
259
+
* const command = new PutObjectCommand(input);
260
+
* const response = await client.send(command);
261
+
* /* response ==
262
+
* {
263
+
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
264
+
* "ServerSideEncryption": "AES256",
265
+
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
266
+
* }
267
+
* *\/
268
+
* // example id: to-upload-an-object-(specify-optional-headers)
269
+
* ```
270
+
*
249
271
* @example To create an object.
250
272
* ```javascript
251
273
* // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
* // example id: to-create-an-object-1483147613675
266
288
* ```
267
289
*
268
-
* @example To upload an object (specify optional headers)
290
+
* @example To upload an object
269
291
* ```javascript
270
-
* // 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.
292
+
* // 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.
271
293
* const input = {
272
294
* "Body": "HappyFace.jpg",
273
295
* "Bucket": "examplebucket",
274
-
* "Key": "HappyFace.jpg",
275
-
* "ServerSideEncryption": "AES256",
276
-
* "StorageClass": "STANDARD_IA"
296
+
* "Key": "HappyFace.jpg"
277
297
* };
278
298
* const command = new PutObjectCommand(input);
279
299
* const response = await client.send(command);
280
300
* /* response ==
281
301
* {
282
302
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
283
-
* "ServerSideEncryption": "AES256",
284
-
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
303
+
* "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
285
304
* }
286
305
* *\/
287
-
* // example id: to-upload-an-object-(specify-optional-headers)
306
+
* // example id: to-upload-an-object-1481760101010
288
307
* ```
289
308
*
290
-
* @example To upload an object and specify canned ACL.
309
+
* @example To upload an object and specify optional tags
291
310
* ```javascript
292
-
* // 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.
311
+
* // 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.
293
312
* const input = {
294
-
* "ACL": "authenticated-read",
295
-
* "Body": "filetoupload",
313
+
* "Body": "c:\\HappyFace.jpg",
296
314
* "Bucket": "examplebucket",
297
-
* "Key": "exampleobject"
315
+
* "Key": "HappyFace.jpg",
316
+
* "Tagging": "key1=value1&key2=value2"
298
317
* };
299
318
* const command = new PutObjectCommand(input);
300
319
* const response = await client.send(command);
301
320
* /* response ==
302
321
* {
303
322
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
304
-
* "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
323
+
* "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
305
324
* }
306
325
* *\/
307
-
* // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
326
+
* // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
308
327
* ```
309
328
*
310
-
* @example To upload an object and specify server-side encryption and object tags
329
+
* @example To upload an object and specify canned ACL.
311
330
* ```javascript
312
-
* // 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.
331
+
* // 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.
313
332
* const input = {
333
+
* "ACL": "authenticated-read",
314
334
* "Body": "filetoupload",
315
335
* "Bucket": "examplebucket",
316
-
* "Key": "exampleobject",
317
-
* "ServerSideEncryption": "AES256",
318
-
* "Tagging": "key1=value1&key2=value2"
336
+
* "Key": "exampleobject"
319
337
* };
320
338
* const command = new PutObjectCommand(input);
321
339
* const response = await client.send(command);
322
340
* /* response ==
323
341
* {
324
342
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
325
-
* "ServerSideEncryption": "AES256",
326
-
* "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
343
+
* "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
327
344
* }
328
345
* *\/
329
-
* // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
346
+
* // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
330
347
* ```
331
348
*
332
349
* @example To upload object and specify user-defined metadata
* // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
353
370
* ```
354
371
*
355
-
* @example To upload an object
356
-
* ```javascript
357
-
* // 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.
358
-
* const input = {
359
-
* "Body": "HappyFace.jpg",
360
-
* "Bucket": "examplebucket",
361
-
* "Key": "HappyFace.jpg"
362
-
* };
363
-
* const command = new PutObjectCommand(input);
364
-
* const response = await client.send(command);
365
-
* /* response ==
366
-
* {
367
-
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
368
-
* "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
369
-
* }
370
-
* *\/
371
-
* // example id: to-upload-an-object-1481760101010
372
-
* ```
373
-
*
374
-
* @example To upload an object and specify optional tags
372
+
* @example To upload an object and specify server-side encryption and object tags
375
373
* ```javascript
376
-
* // 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.
374
+
* // 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.
377
375
* const input = {
378
-
* "Body": "c:\\HappyFace.jpg",
376
+
* "Body": "filetoupload",
379
377
* "Bucket": "examplebucket",
380
-
* "Key": "HappyFace.jpg",
378
+
* "Key": "exampleobject",
379
+
* "ServerSideEncryption": "AES256",
381
380
* "Tagging": "key1=value1&key2=value2"
382
381
* };
383
382
* const command = new PutObjectCommand(input);
384
383
* const response = await client.send(command);
385
384
* /* response ==
386
385
* {
387
386
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
388
-
* "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
387
+
* "ServerSideEncryption": "AES256",
388
+
* "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
389
389
* }
390
390
* *\/
391
-
* // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
391
+
* // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
0 commit comments