@aws-sdk/client-s3 3.658.0 → 3.658.1
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 +130 -143
- package/dist-es/protocols/Aws_restXml.js +5 -22
- package/dist-types/commands/DeleteObjectTaggingCommand.d.ts +11 -11
- package/dist-types/commands/DeleteObjectsCommand.d.ts +22 -22
- package/dist-types/commands/GetObjectTaggingCommand.d.ts +19 -19
- package/dist-types/commands/PutObjectCommand.d.ts +43 -43
- package/dist-types/commands/UploadPartCopyCommand.d.ts +13 -13
- package/package.json +17 -17
|
@@ -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
|
|
83
|
+
* @example To remove tag set from an object
|
|
84
84
|
* ```javascript
|
|
85
|
-
* // The following example removes tag set associated with the specified object
|
|
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": "
|
|
94
|
+
* "VersionId": "null"
|
|
96
95
|
* }
|
|
97
96
|
* *\/
|
|
98
|
-
* // example id: to-remove-tag-set-from-an-object-
|
|
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.
|
|
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": "
|
|
112
|
+
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
|
|
113
113
|
* }
|
|
114
114
|
* *\/
|
|
115
|
-
* // example id: to-remove-tag-set-from-an-object-
|
|
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
|
|
213
|
+
* @example To delete multiple object versions from a versioned bucket
|
|
214
214
|
* ```javascript
|
|
215
|
-
* // The following example deletes objects from a bucket. The
|
|
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": "
|
|
221
|
+
* "Key": "HappyFace.jpg",
|
|
222
|
+
* "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
|
|
222
223
|
* },
|
|
223
224
|
* {
|
|
224
|
-
* "Key": "
|
|
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
|
-
* "
|
|
237
|
-
* "
|
|
238
|
-
* "Key": "objectkey1"
|
|
238
|
+
* "Key": "HappyFace.jpg",
|
|
239
|
+
* "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
|
|
239
240
|
* },
|
|
240
241
|
* {
|
|
241
|
-
* "
|
|
242
|
-
* "
|
|
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-
|
|
248
|
+
* // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737
|
|
249
249
|
* ```
|
|
250
250
|
*
|
|
251
|
-
* @example To delete multiple
|
|
251
|
+
* @example To delete multiple objects from a versioned bucket
|
|
252
252
|
* ```javascript
|
|
253
|
-
* // The following example deletes objects from a bucket. The request
|
|
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": "
|
|
260
|
-
* "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
|
|
259
|
+
* "Key": "objectkey1"
|
|
261
260
|
* },
|
|
262
261
|
* {
|
|
263
|
-
* "Key": "
|
|
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
|
-
* "
|
|
277
|
-
* "
|
|
274
|
+
* "DeleteMarker": "true",
|
|
275
|
+
* "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
|
276
|
+
* "Key": "objectkey1"
|
|
278
277
|
* },
|
|
279
278
|
* {
|
|
280
|
-
* "
|
|
281
|
-
* "
|
|
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-
|
|
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
|
|
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": "
|
|
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": "
|
|
113
|
-
* "Value": "
|
|
114
|
-
* },
|
|
115
|
-
* {
|
|
116
|
-
* "Key": "Key3",
|
|
117
|
-
* "Value": "Value3"
|
|
113
|
+
* "Key": "Key1",
|
|
114
|
+
* "Value": "Value1"
|
|
118
115
|
* }
|
|
119
116
|
* ],
|
|
120
|
-
* "VersionId": "
|
|
117
|
+
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
|
|
121
118
|
* }
|
|
122
119
|
* *\/
|
|
123
|
-
* // example id: to-retrieve-tag-set-of-
|
|
120
|
+
* // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663
|
|
124
121
|
* ```
|
|
125
122
|
*
|
|
126
|
-
* @example To retrieve tag set of
|
|
123
|
+
* @example To retrieve tag set of an object
|
|
127
124
|
* ```javascript
|
|
128
|
-
* // The following example retrieves tag set of an object.
|
|
125
|
+
* // The following example retrieves tag set of an object.
|
|
129
126
|
* const input = {
|
|
130
127
|
* "Bucket": "examplebucket",
|
|
131
|
-
* "Key": "
|
|
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": "
|
|
141
|
-
* "Value": "
|
|
136
|
+
* "Key": "Key4",
|
|
137
|
+
* "Value": "Value4"
|
|
138
|
+
* },
|
|
139
|
+
* {
|
|
140
|
+
* "Key": "Key3",
|
|
141
|
+
* "Value": "Value3"
|
|
142
142
|
* }
|
|
143
143
|
* ],
|
|
144
|
-
* "VersionId": "
|
|
144
|
+
* "VersionId": "null"
|
|
145
145
|
* }
|
|
146
146
|
* *\/
|
|
147
|
-
* // example id: to-retrieve-tag-set-of-
|
|
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
|
|
241
|
+
* @example To upload an object and specify optional tags
|
|
242
242
|
* ```javascript
|
|
243
|
-
* // The following example uploads an object. The request specifies optional
|
|
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
|
-
* "
|
|
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
|
-
* "
|
|
257
|
-
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
|
|
255
|
+
* "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a"
|
|
258
256
|
* }
|
|
259
257
|
* *\/
|
|
260
|
-
* // example id: to-upload-an-object-
|
|
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
|
|
280
|
+
* @example To upload object and specify user-defined metadata
|
|
283
281
|
* ```javascript
|
|
284
|
-
* // The following example
|
|
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": "
|
|
284
|
+
* "Body": "filetoupload",
|
|
287
285
|
* "Bucket": "examplebucket",
|
|
288
|
-
* "Key": "
|
|
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": "
|
|
297
|
+
* "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
|
|
296
298
|
* }
|
|
297
299
|
* *\/
|
|
298
|
-
* // example id: to-upload-
|
|
300
|
+
* // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
|
|
299
301
|
* ```
|
|
300
302
|
*
|
|
301
|
-
* @example To upload an object
|
|
303
|
+
* @example To upload an object
|
|
302
304
|
* ```javascript
|
|
303
|
-
* // The following example uploads an 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": "
|
|
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": "
|
|
316
|
+
* "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
|
|
316
317
|
* }
|
|
317
318
|
* *\/
|
|
318
|
-
* // example id: to-upload-an-object-
|
|
319
|
+
* // example id: to-upload-an-object-1481760101010
|
|
319
320
|
* ```
|
|
320
321
|
*
|
|
321
|
-
* @example To upload an object and specify
|
|
322
|
+
* @example To upload an object and specify server-side encryption and object tags
|
|
322
323
|
* ```javascript
|
|
323
|
-
* // The following example uploads
|
|
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
|
-
* "
|
|
337
|
+
* "ServerSideEncryption": "AES256",
|
|
338
|
+
* "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
|
|
336
339
|
* }
|
|
337
340
|
* *\/
|
|
338
|
-
* // example id: to-upload-an-object-and-specify-
|
|
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
|
|
344
|
+
* @example To upload an object and specify canned ACL.
|
|
342
345
|
* ```javascript
|
|
343
|
-
* // The following example
|
|
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": "
|
|
358
|
+
* "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
|
|
359
359
|
* }
|
|
360
360
|
* *\/
|
|
361
|
-
* // example id: to-upload-object-and-specify-
|
|
361
|
+
* // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
|
|
362
362
|
* ```
|
|
363
363
|
*
|
|
364
|
-
* @example To upload an object
|
|
364
|
+
* @example To upload an object (specify optional headers)
|
|
365
365
|
* ```javascript
|
|
366
|
-
* // The following example uploads an object. The request specifies
|
|
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": "
|
|
368
|
+
* "Body": "HappyFace.jpg",
|
|
369
369
|
* "Bucket": "examplebucket",
|
|
370
|
-
* "Key": "
|
|
370
|
+
* "Key": "HappyFace.jpg",
|
|
371
371
|
* "ServerSideEncryption": "AES256",
|
|
372
|
-
* "
|
|
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": "
|
|
380
|
+
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
|
|
381
381
|
* }
|
|
382
382
|
* *\/
|
|
383
|
-
* // example id: to-upload-an-object-
|
|
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
|
|
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
|
|
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": "
|
|
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": "\"
|
|
316
|
-
* "LastModified": "2016-12-29T21:
|
|
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-
|
|
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
|
|
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
|
|
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": "
|
|
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": "\"
|
|
340
|
-
* "LastModified": "2016-12-29T21:
|
|
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-
|
|
344
|
+
* // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348
|
|
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.658.
|
|
4
|
+
"version": "3.658.1",
|
|
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,33 +26,33 @@
|
|
|
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.658.
|
|
30
|
-
"@aws-sdk/client-sts": "3.658.
|
|
31
|
-
"@aws-sdk/core": "3.658.
|
|
32
|
-
"@aws-sdk/credential-provider-node": "3.658.
|
|
29
|
+
"@aws-sdk/client-sso-oidc": "3.658.1",
|
|
30
|
+
"@aws-sdk/client-sts": "3.658.1",
|
|
31
|
+
"@aws-sdk/core": "3.658.1",
|
|
32
|
+
"@aws-sdk/credential-provider-node": "3.658.1",
|
|
33
33
|
"@aws-sdk/middleware-bucket-endpoint": "3.654.0",
|
|
34
34
|
"@aws-sdk/middleware-expect-continue": "3.654.0",
|
|
35
|
-
"@aws-sdk/middleware-flexible-checksums": "3.
|
|
35
|
+
"@aws-sdk/middleware-flexible-checksums": "3.658.1",
|
|
36
36
|
"@aws-sdk/middleware-host-header": "3.654.0",
|
|
37
37
|
"@aws-sdk/middleware-location-constraint": "3.654.0",
|
|
38
38
|
"@aws-sdk/middleware-logger": "3.654.0",
|
|
39
39
|
"@aws-sdk/middleware-recursion-detection": "3.654.0",
|
|
40
|
-
"@aws-sdk/middleware-sdk-s3": "3.658.
|
|
40
|
+
"@aws-sdk/middleware-sdk-s3": "3.658.1",
|
|
41
41
|
"@aws-sdk/middleware-ssec": "3.654.0",
|
|
42
42
|
"@aws-sdk/middleware-user-agent": "3.654.0",
|
|
43
43
|
"@aws-sdk/region-config-resolver": "3.654.0",
|
|
44
|
-
"@aws-sdk/signature-v4-multi-region": "3.658.
|
|
44
|
+
"@aws-sdk/signature-v4-multi-region": "3.658.1",
|
|
45
45
|
"@aws-sdk/types": "3.654.0",
|
|
46
46
|
"@aws-sdk/util-endpoints": "3.654.0",
|
|
47
47
|
"@aws-sdk/util-user-agent-browser": "3.654.0",
|
|
48
48
|
"@aws-sdk/util-user-agent-node": "3.654.0",
|
|
49
49
|
"@aws-sdk/xml-builder": "3.654.0",
|
|
50
50
|
"@smithy/config-resolver": "^3.0.8",
|
|
51
|
-
"@smithy/core": "^2.4.
|
|
51
|
+
"@smithy/core": "^2.4.6",
|
|
52
52
|
"@smithy/eventstream-serde-browser": "^3.0.9",
|
|
53
53
|
"@smithy/eventstream-serde-config-resolver": "^3.0.6",
|
|
54
54
|
"@smithy/eventstream-serde-node": "^3.0.8",
|
|
55
|
-
"@smithy/fetch-http-handler": "^3.2.
|
|
55
|
+
"@smithy/fetch-http-handler": "^3.2.8",
|
|
56
56
|
"@smithy/hash-blob-browser": "^3.1.5",
|
|
57
57
|
"@smithy/hash-node": "^3.0.6",
|
|
58
58
|
"@smithy/hash-stream-node": "^3.1.5",
|
|
@@ -60,30 +60,30 @@
|
|
|
60
60
|
"@smithy/md5-js": "^3.0.6",
|
|
61
61
|
"@smithy/middleware-content-length": "^3.0.8",
|
|
62
62
|
"@smithy/middleware-endpoint": "^3.1.3",
|
|
63
|
-
"@smithy/middleware-retry": "^3.0.
|
|
63
|
+
"@smithy/middleware-retry": "^3.0.21",
|
|
64
64
|
"@smithy/middleware-serde": "^3.0.6",
|
|
65
65
|
"@smithy/middleware-stack": "^3.0.6",
|
|
66
66
|
"@smithy/node-config-provider": "^3.1.7",
|
|
67
|
-
"@smithy/node-http-handler": "^3.2.
|
|
67
|
+
"@smithy/node-http-handler": "^3.2.3",
|
|
68
68
|
"@smithy/protocol-http": "^4.1.3",
|
|
69
|
-
"@smithy/smithy-client": "^3.3.
|
|
69
|
+
"@smithy/smithy-client": "^3.3.5",
|
|
70
70
|
"@smithy/types": "^3.4.2",
|
|
71
71
|
"@smithy/url-parser": "^3.0.6",
|
|
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.
|
|
76
|
-
"@smithy/util-defaults-mode-node": "^3.0.
|
|
75
|
+
"@smithy/util-defaults-mode-browser": "^3.0.21",
|
|
76
|
+
"@smithy/util-defaults-mode-node": "^3.0.21",
|
|
77
77
|
"@smithy/util-endpoints": "^2.1.2",
|
|
78
78
|
"@smithy/util-middleware": "^3.0.6",
|
|
79
79
|
"@smithy/util-retry": "^3.0.6",
|
|
80
|
-
"@smithy/util-stream": "^3.1.
|
|
80
|
+
"@smithy/util-stream": "^3.1.8",
|
|
81
81
|
"@smithy/util-utf8": "^3.0.0",
|
|
82
82
|
"@smithy/util-waiter": "^3.1.5",
|
|
83
83
|
"tslib": "^2.6.2"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@aws-sdk/signature-v4-crt": "3.658.
|
|
86
|
+
"@aws-sdk/signature-v4-crt": "3.658.1",
|
|
87
87
|
"@tsconfig/node16": "16.1.3",
|
|
88
88
|
"@types/chai": "^4.2.11",
|
|
89
89
|
"@types/mocha": "^8.0.4",
|