@aws-sdk/client-s3 3.418.0 → 3.421.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/README.md +7 -7
- package/dist-cjs/models/models_0.js +1 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-types/commands/CreateBucketCommand.d.ts +13 -13
- package/dist-types/commands/DeleteObjectTaggingCommand.d.ts +11 -11
- package/dist-types/commands/GetObjectCommand.d.ts +20 -20
- package/dist-types/commands/HeadObjectCommand.d.ts +1 -1
- package/dist-types/commands/ListMultipartUploadsCommand.d.ts +32 -32
- package/dist-types/commands/PutObjectCommand.d.ts +37 -37
- package/dist-types/commands/UploadPartCopyCommand.d.ts +13 -13
- package/dist-types/commands/WriteGetObjectResponseCommand.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -23,16 +23,16 @@ using your favorite package manager:
|
|
|
23
23
|
|
|
24
24
|
The AWS SDK is modulized by clients and commands.
|
|
25
25
|
To send a request, you only need to import the `S3Client` and
|
|
26
|
-
the commands you need, for example `
|
|
26
|
+
the commands you need, for example `ListBucketsCommand`:
|
|
27
27
|
|
|
28
28
|
```js
|
|
29
29
|
// ES5 example
|
|
30
|
-
const { S3Client,
|
|
30
|
+
const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
```ts
|
|
34
34
|
// ES6+ example
|
|
35
|
-
import { S3Client,
|
|
35
|
+
import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3";
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### Usage
|
|
@@ -51,7 +51,7 @@ const client = new S3Client({ region: "REGION" });
|
|
|
51
51
|
const params = {
|
|
52
52
|
/** input parameters */
|
|
53
53
|
};
|
|
54
|
-
const command = new
|
|
54
|
+
const command = new ListBucketsCommand(params);
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
#### Async/await
|
|
@@ -130,7 +130,7 @@ const client = new AWS.S3({ region: "REGION" });
|
|
|
130
130
|
|
|
131
131
|
// async/await.
|
|
132
132
|
try {
|
|
133
|
-
const data = await client.
|
|
133
|
+
const data = await client.listBuckets(params);
|
|
134
134
|
// process data.
|
|
135
135
|
} catch (error) {
|
|
136
136
|
// error handling.
|
|
@@ -138,7 +138,7 @@ try {
|
|
|
138
138
|
|
|
139
139
|
// Promises.
|
|
140
140
|
client
|
|
141
|
-
.
|
|
141
|
+
.listBuckets(params)
|
|
142
142
|
.then((data) => {
|
|
143
143
|
// process data.
|
|
144
144
|
})
|
|
@@ -147,7 +147,7 @@ client
|
|
|
147
147
|
});
|
|
148
148
|
|
|
149
149
|
// callbacks.
|
|
150
|
-
client.
|
|
150
|
+
client.listBuckets(params, (err, data) => {
|
|
151
151
|
// process err and data.
|
|
152
152
|
});
|
|
153
153
|
```
|
|
@@ -181,39 +181,39 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat
|
|
|
181
181
|
* @throws {@link S3ServiceException}
|
|
182
182
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
183
183
|
*
|
|
184
|
-
* @example To create a bucket
|
|
184
|
+
* @example To create a bucket
|
|
185
185
|
* ```javascript
|
|
186
|
-
* // The following example creates a bucket.
|
|
186
|
+
* // The following example creates a bucket.
|
|
187
187
|
* const input = {
|
|
188
|
-
* "Bucket": "examplebucket"
|
|
189
|
-
* "CreateBucketConfiguration": {
|
|
190
|
-
* "LocationConstraint": "eu-west-1"
|
|
191
|
-
* }
|
|
188
|
+
* "Bucket": "examplebucket"
|
|
192
189
|
* };
|
|
193
190
|
* const command = new CreateBucketCommand(input);
|
|
194
191
|
* const response = await client.send(command);
|
|
195
192
|
* /* response ==
|
|
196
193
|
* {
|
|
197
|
-
* "Location": "
|
|
194
|
+
* "Location": "/examplebucket"
|
|
198
195
|
* }
|
|
199
196
|
* *\/
|
|
200
|
-
* // example id: to-create-a-bucket
|
|
197
|
+
* // example id: to-create-a-bucket--1472851826060
|
|
201
198
|
* ```
|
|
202
199
|
*
|
|
203
|
-
* @example To create a bucket
|
|
200
|
+
* @example To create a bucket in a specific region
|
|
204
201
|
* ```javascript
|
|
205
|
-
* // The following example creates a bucket.
|
|
202
|
+
* // The following example creates a bucket. The request specifies an AWS region where to create the bucket.
|
|
206
203
|
* const input = {
|
|
207
|
-
* "Bucket": "examplebucket"
|
|
204
|
+
* "Bucket": "examplebucket",
|
|
205
|
+
* "CreateBucketConfiguration": {
|
|
206
|
+
* "LocationConstraint": "eu-west-1"
|
|
207
|
+
* }
|
|
208
208
|
* };
|
|
209
209
|
* const command = new CreateBucketCommand(input);
|
|
210
210
|
* const response = await client.send(command);
|
|
211
211
|
* /* response ==
|
|
212
212
|
* {
|
|
213
|
-
* "Location": "/
|
|
213
|
+
* "Location": "http://examplebucket.<Region>.s3.amazonaws.com/"
|
|
214
214
|
* }
|
|
215
215
|
* *\/
|
|
216
|
-
* // example id: to-create-a-bucket
|
|
216
|
+
* // example id: to-create-a-bucket-in-a-specific-region-1483399072992
|
|
217
217
|
* ```
|
|
218
218
|
*
|
|
219
219
|
*/
|
|
@@ -72,39 +72,39 @@ export interface DeleteObjectTaggingCommandOutput extends DeleteObjectTaggingOut
|
|
|
72
72
|
* @throws {@link S3ServiceException}
|
|
73
73
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
74
74
|
*
|
|
75
|
-
* @example To remove tag set from an object
|
|
75
|
+
* @example To remove tag set from an object version
|
|
76
76
|
* ```javascript
|
|
77
|
-
* // The following example removes tag set associated with the specified object.
|
|
77
|
+
* // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.
|
|
78
78
|
* const input = {
|
|
79
79
|
* "Bucket": "examplebucket",
|
|
80
|
-
* "Key": "HappyFace.jpg"
|
|
80
|
+
* "Key": "HappyFace.jpg",
|
|
81
|
+
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
|
|
81
82
|
* };
|
|
82
83
|
* const command = new DeleteObjectTaggingCommand(input);
|
|
83
84
|
* const response = await client.send(command);
|
|
84
85
|
* /* response ==
|
|
85
86
|
* {
|
|
86
|
-
* "VersionId": "
|
|
87
|
+
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
|
|
87
88
|
* }
|
|
88
89
|
* *\/
|
|
89
|
-
* // example id: to-remove-tag-set-from-an-object-
|
|
90
|
+
* // example id: to-remove-tag-set-from-an-object-version-1483145285913
|
|
90
91
|
* ```
|
|
91
92
|
*
|
|
92
|
-
* @example To remove tag set from an object
|
|
93
|
+
* @example To remove tag set from an object
|
|
93
94
|
* ```javascript
|
|
94
|
-
* // The following example removes tag set associated with the specified object
|
|
95
|
+
* // 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.
|
|
95
96
|
* const input = {
|
|
96
97
|
* "Bucket": "examplebucket",
|
|
97
|
-
* "Key": "HappyFace.jpg"
|
|
98
|
-
* "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"
|
|
98
|
+
* "Key": "HappyFace.jpg"
|
|
99
99
|
* };
|
|
100
100
|
* const command = new DeleteObjectTaggingCommand(input);
|
|
101
101
|
* const response = await client.send(command);
|
|
102
102
|
* /* response ==
|
|
103
103
|
* {
|
|
104
|
-
* "VersionId": "
|
|
104
|
+
* "VersionId": "null"
|
|
105
105
|
* }
|
|
106
106
|
* *\/
|
|
107
|
-
* // example id: to-remove-tag-set-from-an-object-
|
|
107
|
+
* // example id: to-remove-tag-set-from-an-object-1483145342862
|
|
108
108
|
* ```
|
|
109
109
|
*
|
|
110
110
|
*/
|
|
@@ -262,7 +262,7 @@ export interface GetObjectCommandOutput extends Omit<GetObjectOutput, "Body">, _
|
|
|
262
262
|
* // BucketKeyEnabled: true || false,
|
|
263
263
|
* // StorageClass: "STANDARD" || "REDUCED_REDUNDANCY" || "STANDARD_IA" || "ONEZONE_IA" || "INTELLIGENT_TIERING" || "GLACIER" || "DEEP_ARCHIVE" || "OUTPOSTS" || "GLACIER_IR" || "SNOW",
|
|
264
264
|
* // RequestCharged: "requester",
|
|
265
|
-
* // ReplicationStatus: "COMPLETE" || "PENDING" || "FAILED" || "REPLICA",
|
|
265
|
+
* // ReplicationStatus: "COMPLETE" || "PENDING" || "FAILED" || "REPLICA" || "COMPLETED",
|
|
266
266
|
* // PartsCount: Number("int"),
|
|
267
267
|
* // TagCount: Number("int"),
|
|
268
268
|
* // ObjectLockMode: "GOVERNANCE" || "COMPLIANCE",
|
|
@@ -287,53 +287,53 @@ export interface GetObjectCommandOutput extends Omit<GetObjectOutput, "Body">, _
|
|
|
287
287
|
* @throws {@link S3ServiceException}
|
|
288
288
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
289
289
|
*
|
|
290
|
-
* @example To retrieve an object
|
|
290
|
+
* @example To retrieve a byte range of an object
|
|
291
291
|
* ```javascript
|
|
292
|
-
* // The following example retrieves an object for an S3 bucket.
|
|
292
|
+
* // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.
|
|
293
293
|
* const input = {
|
|
294
294
|
* "Bucket": "examplebucket",
|
|
295
|
-
* "Key": "
|
|
295
|
+
* "Key": "SampleFile.txt",
|
|
296
|
+
* "Range": "bytes=0-9"
|
|
296
297
|
* };
|
|
297
298
|
* const command = new GetObjectCommand(input);
|
|
298
299
|
* const response = await client.send(command);
|
|
299
300
|
* /* response ==
|
|
300
301
|
* {
|
|
301
302
|
* "AcceptRanges": "bytes",
|
|
302
|
-
* "ContentLength": "
|
|
303
|
-
* "
|
|
304
|
-
* "
|
|
305
|
-
* "
|
|
303
|
+
* "ContentLength": "10",
|
|
304
|
+
* "ContentRange": "bytes 0-9/43",
|
|
305
|
+
* "ContentType": "text/plain",
|
|
306
|
+
* "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
|
|
307
|
+
* "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT",
|
|
306
308
|
* "Metadata": {},
|
|
307
|
-
* "TagCount": 2,
|
|
308
309
|
* "VersionId": "null"
|
|
309
310
|
* }
|
|
310
311
|
* *\/
|
|
311
|
-
* // example id: to-retrieve-an-object
|
|
312
|
+
* // example id: to-retrieve-a-byte-range-of-an-object--1481832674603
|
|
312
313
|
* ```
|
|
313
314
|
*
|
|
314
|
-
* @example To retrieve
|
|
315
|
+
* @example To retrieve an object
|
|
315
316
|
* ```javascript
|
|
316
|
-
* // The following example retrieves an object for an S3 bucket.
|
|
317
|
+
* // The following example retrieves an object for an S3 bucket.
|
|
317
318
|
* const input = {
|
|
318
319
|
* "Bucket": "examplebucket",
|
|
319
|
-
* "Key": "
|
|
320
|
-
* "Range": "bytes=0-9"
|
|
320
|
+
* "Key": "HappyFace.jpg"
|
|
321
321
|
* };
|
|
322
322
|
* const command = new GetObjectCommand(input);
|
|
323
323
|
* const response = await client.send(command);
|
|
324
324
|
* /* response ==
|
|
325
325
|
* {
|
|
326
326
|
* "AcceptRanges": "bytes",
|
|
327
|
-
* "ContentLength": "
|
|
328
|
-
* "
|
|
329
|
-
* "
|
|
330
|
-
* "
|
|
331
|
-
* "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT",
|
|
327
|
+
* "ContentLength": "3191",
|
|
328
|
+
* "ContentType": "image/jpeg",
|
|
329
|
+
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
|
330
|
+
* "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT",
|
|
332
331
|
* "Metadata": {},
|
|
332
|
+
* "TagCount": 2,
|
|
333
333
|
* "VersionId": "null"
|
|
334
334
|
* }
|
|
335
335
|
* *\/
|
|
336
|
-
* // example id: to-retrieve-
|
|
336
|
+
* // example id: to-retrieve-an-object-1481827837012
|
|
337
337
|
* ```
|
|
338
338
|
*
|
|
339
339
|
*/
|
|
@@ -200,7 +200,7 @@ export interface HeadObjectCommandOutput extends HeadObjectOutput, __MetadataBea
|
|
|
200
200
|
* // BucketKeyEnabled: true || false,
|
|
201
201
|
* // StorageClass: "STANDARD" || "REDUCED_REDUNDANCY" || "STANDARD_IA" || "ONEZONE_IA" || "INTELLIGENT_TIERING" || "GLACIER" || "DEEP_ARCHIVE" || "OUTPOSTS" || "GLACIER_IR" || "SNOW",
|
|
202
202
|
* // RequestCharged: "requester",
|
|
203
|
-
* // ReplicationStatus: "COMPLETE" || "PENDING" || "FAILED" || "REPLICA",
|
|
203
|
+
* // ReplicationStatus: "COMPLETE" || "PENDING" || "FAILED" || "REPLICA" || "COMPLETED",
|
|
204
204
|
* // PartsCount: Number("int"),
|
|
205
205
|
* // ObjectLockMode: "GOVERNANCE" || "COMPLIANCE",
|
|
206
206
|
* // ObjectLockRetainUntilDate: new Date("TIMESTAMP"),
|
|
@@ -135,104 +135,104 @@ export interface ListMultipartUploadsCommandOutput extends ListMultipartUploadsO
|
|
|
135
135
|
* @throws {@link S3ServiceException}
|
|
136
136
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
137
137
|
*
|
|
138
|
-
* @example
|
|
138
|
+
* @example To list in-progress multipart uploads on a bucket
|
|
139
139
|
* ```javascript
|
|
140
|
-
* // The following example
|
|
140
|
+
* // The following example lists in-progress multipart uploads on a specific bucket.
|
|
141
141
|
* const input = {
|
|
142
|
-
* "Bucket": "examplebucket"
|
|
143
|
-
* "KeyMarker": "nextkeyfrompreviousresponse",
|
|
144
|
-
* "MaxUploads": "2",
|
|
145
|
-
* "UploadIdMarker": "valuefrompreviousresponse"
|
|
142
|
+
* "Bucket": "examplebucket"
|
|
146
143
|
* };
|
|
147
144
|
* const command = new ListMultipartUploadsCommand(input);
|
|
148
145
|
* const response = await client.send(command);
|
|
149
146
|
* /* response ==
|
|
150
147
|
* {
|
|
151
|
-
* "Bucket": "acl1",
|
|
152
|
-
* "IsTruncated": true,
|
|
153
|
-
* "KeyMarker": "",
|
|
154
|
-
* "MaxUploads": "2",
|
|
155
|
-
* "NextKeyMarker": "someobjectkey",
|
|
156
|
-
* "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
|
157
|
-
* "UploadIdMarker": "",
|
|
158
148
|
* "Uploads": [
|
|
159
149
|
* {
|
|
160
150
|
* "Initiated": "2014-05-01T05:40:58.000Z",
|
|
161
151
|
* "Initiator": {
|
|
162
|
-
* "DisplayName": "
|
|
152
|
+
* "DisplayName": "display-name",
|
|
163
153
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
164
154
|
* },
|
|
165
155
|
* "Key": "JavaFile",
|
|
166
156
|
* "Owner": {
|
|
167
|
-
* "DisplayName": "
|
|
168
|
-
* "ID": "
|
|
157
|
+
* "DisplayName": "display-name",
|
|
158
|
+
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
169
159
|
* },
|
|
170
160
|
* "StorageClass": "STANDARD",
|
|
171
|
-
* "UploadId": "
|
|
161
|
+
* "UploadId": "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--"
|
|
172
162
|
* },
|
|
173
163
|
* {
|
|
174
164
|
* "Initiated": "2014-05-01T05:41:27.000Z",
|
|
175
165
|
* "Initiator": {
|
|
176
|
-
* "DisplayName": "
|
|
166
|
+
* "DisplayName": "display-name",
|
|
177
167
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
178
168
|
* },
|
|
179
169
|
* "Key": "JavaFile",
|
|
180
170
|
* "Owner": {
|
|
181
|
-
* "DisplayName": "
|
|
171
|
+
* "DisplayName": "display-name",
|
|
182
172
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
183
173
|
* },
|
|
184
174
|
* "StorageClass": "STANDARD",
|
|
185
|
-
* "UploadId": "
|
|
175
|
+
* "UploadId": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--"
|
|
186
176
|
* }
|
|
187
177
|
* ]
|
|
188
178
|
* }
|
|
189
179
|
* *\/
|
|
190
|
-
* // example id: list-
|
|
180
|
+
* // example id: to-list-in-progress-multipart-uploads-on-a-bucket-1481852775260
|
|
191
181
|
* ```
|
|
192
182
|
*
|
|
193
|
-
* @example
|
|
183
|
+
* @example List next set of multipart uploads when previous result is truncated
|
|
194
184
|
* ```javascript
|
|
195
|
-
* // The following example
|
|
185
|
+
* // The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads.
|
|
196
186
|
* const input = {
|
|
197
|
-
* "Bucket": "examplebucket"
|
|
187
|
+
* "Bucket": "examplebucket",
|
|
188
|
+
* "KeyMarker": "nextkeyfrompreviousresponse",
|
|
189
|
+
* "MaxUploads": "2",
|
|
190
|
+
* "UploadIdMarker": "valuefrompreviousresponse"
|
|
198
191
|
* };
|
|
199
192
|
* const command = new ListMultipartUploadsCommand(input);
|
|
200
193
|
* const response = await client.send(command);
|
|
201
194
|
* /* response ==
|
|
202
195
|
* {
|
|
196
|
+
* "Bucket": "acl1",
|
|
197
|
+
* "IsTruncated": true,
|
|
198
|
+
* "KeyMarker": "",
|
|
199
|
+
* "MaxUploads": "2",
|
|
200
|
+
* "NextKeyMarker": "someobjectkey",
|
|
201
|
+
* "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
|
202
|
+
* "UploadIdMarker": "",
|
|
203
203
|
* "Uploads": [
|
|
204
204
|
* {
|
|
205
205
|
* "Initiated": "2014-05-01T05:40:58.000Z",
|
|
206
206
|
* "Initiator": {
|
|
207
|
-
* "DisplayName": "display-name",
|
|
207
|
+
* "DisplayName": "ownder-display-name",
|
|
208
208
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
209
209
|
* },
|
|
210
210
|
* "Key": "JavaFile",
|
|
211
211
|
* "Owner": {
|
|
212
|
-
* "DisplayName": "
|
|
213
|
-
* "ID": "
|
|
212
|
+
* "DisplayName": "mohanataws",
|
|
213
|
+
* "ID": "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
214
214
|
* },
|
|
215
215
|
* "StorageClass": "STANDARD",
|
|
216
|
-
* "UploadId": "
|
|
216
|
+
* "UploadId": "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--"
|
|
217
217
|
* },
|
|
218
218
|
* {
|
|
219
219
|
* "Initiated": "2014-05-01T05:41:27.000Z",
|
|
220
220
|
* "Initiator": {
|
|
221
|
-
* "DisplayName": "display-name",
|
|
221
|
+
* "DisplayName": "ownder-display-name",
|
|
222
222
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
223
223
|
* },
|
|
224
224
|
* "Key": "JavaFile",
|
|
225
225
|
* "Owner": {
|
|
226
|
-
* "DisplayName": "display-name",
|
|
226
|
+
* "DisplayName": "ownder-display-name",
|
|
227
227
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
228
228
|
* },
|
|
229
229
|
* "StorageClass": "STANDARD",
|
|
230
|
-
* "UploadId": "
|
|
230
|
+
* "UploadId": "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--"
|
|
231
231
|
* }
|
|
232
232
|
* ]
|
|
233
233
|
* }
|
|
234
234
|
* *\/
|
|
235
|
-
* // example id:
|
|
235
|
+
* // example id: list-next-set-of-multipart-uploads-when-previous-result-is-truncated-1482428106748
|
|
236
236
|
* ```
|
|
237
237
|
*
|
|
238
238
|
*/
|
|
@@ -192,25 +192,6 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
|
|
|
192
192
|
* @throws {@link S3ServiceException}
|
|
193
193
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
194
194
|
*
|
|
195
|
-
* @example To upload an object
|
|
196
|
-
* ```javascript
|
|
197
|
-
* // 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.
|
|
198
|
-
* const input = {
|
|
199
|
-
* "Body": "HappyFace.jpg",
|
|
200
|
-
* "Bucket": "examplebucket",
|
|
201
|
-
* "Key": "HappyFace.jpg"
|
|
202
|
-
* };
|
|
203
|
-
* const command = new PutObjectCommand(input);
|
|
204
|
-
* const response = await client.send(command);
|
|
205
|
-
* /* response ==
|
|
206
|
-
* {
|
|
207
|
-
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
|
208
|
-
* "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
|
|
209
|
-
* }
|
|
210
|
-
* *\/
|
|
211
|
-
* // example id: to-upload-an-object-1481760101010
|
|
212
|
-
* ```
|
|
213
|
-
*
|
|
214
195
|
* @example To upload an object and specify server-side encryption and object tags
|
|
215
196
|
* ```javascript
|
|
216
197
|
* // 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.
|
|
@@ -252,27 +233,26 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
|
|
|
252
233
|
* // example id: to-create-an-object-1483147613675
|
|
253
234
|
* ```
|
|
254
235
|
*
|
|
255
|
-
* @example To upload object
|
|
236
|
+
* @example To upload an object (specify optional headers)
|
|
256
237
|
* ```javascript
|
|
257
|
-
* // The following example
|
|
238
|
+
* // 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.
|
|
258
239
|
* const input = {
|
|
259
|
-
* "Body": "
|
|
240
|
+
* "Body": "HappyFace.jpg",
|
|
260
241
|
* "Bucket": "examplebucket",
|
|
261
|
-
* "Key": "
|
|
262
|
-
* "
|
|
263
|
-
*
|
|
264
|
-
* "metadata2": "value2"
|
|
265
|
-
* }
|
|
242
|
+
* "Key": "HappyFace.jpg",
|
|
243
|
+
* "ServerSideEncryption": "AES256",
|
|
244
|
+
* "StorageClass": "STANDARD_IA"
|
|
266
245
|
* };
|
|
267
246
|
* const command = new PutObjectCommand(input);
|
|
268
247
|
* const response = await client.send(command);
|
|
269
248
|
* /* response ==
|
|
270
249
|
* {
|
|
271
250
|
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
|
272
|
-
* "
|
|
251
|
+
* "ServerSideEncryption": "AES256",
|
|
252
|
+
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
|
|
273
253
|
* }
|
|
274
254
|
* *\/
|
|
275
|
-
* // example id: to-upload-object-
|
|
255
|
+
* // example id: to-upload-an-object-(specify-optional-headers)
|
|
276
256
|
* ```
|
|
277
257
|
*
|
|
278
258
|
* @example To upload an object and specify optional tags
|
|
@@ -295,6 +275,29 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
|
|
|
295
275
|
* // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
|
|
296
276
|
* ```
|
|
297
277
|
*
|
|
278
|
+
* @example To upload object and specify user-defined metadata
|
|
279
|
+
* ```javascript
|
|
280
|
+
* // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
|
|
281
|
+
* const input = {
|
|
282
|
+
* "Body": "filetoupload",
|
|
283
|
+
* "Bucket": "examplebucket",
|
|
284
|
+
* "Key": "exampleobject",
|
|
285
|
+
* "Metadata": {
|
|
286
|
+
* "metadata1": "value1",
|
|
287
|
+
* "metadata2": "value2"
|
|
288
|
+
* }
|
|
289
|
+
* };
|
|
290
|
+
* const command = new PutObjectCommand(input);
|
|
291
|
+
* const response = await client.send(command);
|
|
292
|
+
* /* response ==
|
|
293
|
+
* {
|
|
294
|
+
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
|
295
|
+
* "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
|
|
296
|
+
* }
|
|
297
|
+
* *\/
|
|
298
|
+
* // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
|
|
299
|
+
* ```
|
|
300
|
+
*
|
|
298
301
|
* @example To upload an object and specify canned ACL.
|
|
299
302
|
* ```javascript
|
|
300
303
|
* // 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.
|
|
@@ -315,26 +318,23 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
|
|
|
315
318
|
* // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
|
|
316
319
|
* ```
|
|
317
320
|
*
|
|
318
|
-
* @example To upload an object
|
|
321
|
+
* @example To upload an object
|
|
319
322
|
* ```javascript
|
|
320
|
-
* // The following example uploads an object. The
|
|
323
|
+
* // 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.
|
|
321
324
|
* const input = {
|
|
322
325
|
* "Body": "HappyFace.jpg",
|
|
323
326
|
* "Bucket": "examplebucket",
|
|
324
|
-
* "Key": "HappyFace.jpg"
|
|
325
|
-
* "ServerSideEncryption": "AES256",
|
|
326
|
-
* "StorageClass": "STANDARD_IA"
|
|
327
|
+
* "Key": "HappyFace.jpg"
|
|
327
328
|
* };
|
|
328
329
|
* const command = new PutObjectCommand(input);
|
|
329
330
|
* const response = await client.send(command);
|
|
330
331
|
* /* response ==
|
|
331
332
|
* {
|
|
332
333
|
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
|
333
|
-
* "
|
|
334
|
-
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
|
|
334
|
+
* "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
|
|
335
335
|
* }
|
|
336
336
|
* *\/
|
|
337
|
-
* // example id: to-upload-an-object-
|
|
337
|
+
* // example id: to-upload-an-object-1481760101010
|
|
338
338
|
* ```
|
|
339
339
|
*
|
|
340
340
|
*/
|
|
@@ -252,15 +252,14 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met
|
|
|
252
252
|
* @throws {@link S3ServiceException}
|
|
253
253
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
254
254
|
*
|
|
255
|
-
* @example To upload a part by copying
|
|
255
|
+
* @example To upload a part by copying data from an existing object as data source
|
|
256
256
|
* ```javascript
|
|
257
|
-
* // The following example uploads a part of a multipart upload by copying
|
|
257
|
+
* // The following example uploads a part of a multipart upload by copying data from an existing object as data source.
|
|
258
258
|
* const input = {
|
|
259
259
|
* "Bucket": "examplebucket",
|
|
260
260
|
* "CopySource": "/bucketname/sourceobjectkey",
|
|
261
|
-
* "CopySourceRange": "bytes=1-100000",
|
|
262
261
|
* "Key": "examplelargeobject",
|
|
263
|
-
* "PartNumber": "
|
|
262
|
+
* "PartNumber": "1",
|
|
264
263
|
* "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"
|
|
265
264
|
* };
|
|
266
265
|
* const command = new UploadPartCopyCommand(input);
|
|
@@ -268,22 +267,23 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met
|
|
|
268
267
|
* /* response ==
|
|
269
268
|
* {
|
|
270
269
|
* "CopyPartResult": {
|
|
271
|
-
* "ETag": "\"
|
|
272
|
-
* "LastModified": "2016-12-29T21:
|
|
270
|
+
* "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
|
|
271
|
+
* "LastModified": "2016-12-29T21:24:43.000Z"
|
|
273
272
|
* }
|
|
274
273
|
* }
|
|
275
274
|
* *\/
|
|
276
|
-
* // example id: to-upload-a-part-by-copying-
|
|
275
|
+
* // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348
|
|
277
276
|
* ```
|
|
278
277
|
*
|
|
279
|
-
* @example To upload a part by copying
|
|
278
|
+
* @example To upload a part by copying byte range from an existing object as data source
|
|
280
279
|
* ```javascript
|
|
281
|
-
* // The following example uploads a part of a multipart upload by copying
|
|
280
|
+
* // The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.
|
|
282
281
|
* const input = {
|
|
283
282
|
* "Bucket": "examplebucket",
|
|
284
283
|
* "CopySource": "/bucketname/sourceobjectkey",
|
|
284
|
+
* "CopySourceRange": "bytes=1-100000",
|
|
285
285
|
* "Key": "examplelargeobject",
|
|
286
|
-
* "PartNumber": "
|
|
286
|
+
* "PartNumber": "2",
|
|
287
287
|
* "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"
|
|
288
288
|
* };
|
|
289
289
|
* const command = new UploadPartCopyCommand(input);
|
|
@@ -291,12 +291,12 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met
|
|
|
291
291
|
* /* response ==
|
|
292
292
|
* {
|
|
293
293
|
* "CopyPartResult": {
|
|
294
|
-
* "ETag": "\"
|
|
295
|
-
* "LastModified": "2016-12-29T21:
|
|
294
|
+
* "ETag": "\"65d16d19e65a7508a51f043180edcc36\"",
|
|
295
|
+
* "LastModified": "2016-12-29T21:44:28.000Z"
|
|
296
296
|
* }
|
|
297
297
|
* }
|
|
298
298
|
* *\/
|
|
299
|
-
* // example id: to-upload-a-part-by-copying-
|
|
299
|
+
* // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594
|
|
300
300
|
* ```
|
|
301
301
|
*
|
|
302
302
|
*/
|
|
@@ -96,7 +96,7 @@ export interface WriteGetObjectResponseCommandOutput extends __MetadataBearer {
|
|
|
96
96
|
* ObjectLockLegalHoldStatus: "ON" || "OFF",
|
|
97
97
|
* ObjectLockRetainUntilDate: new Date("TIMESTAMP"),
|
|
98
98
|
* PartsCount: Number("int"),
|
|
99
|
-
* ReplicationStatus: "COMPLETE" || "PENDING" || "FAILED" || "REPLICA",
|
|
99
|
+
* ReplicationStatus: "COMPLETE" || "PENDING" || "FAILED" || "REPLICA" || "COMPLETED",
|
|
100
100
|
* RequestCharged: "requester",
|
|
101
101
|
* Restore: "STRING_VALUE",
|
|
102
102
|
* ServerSideEncryption: "AES256" || "aws:kms" || "aws:kms:dsse",
|
|
@@ -6855,6 +6855,7 @@ export interface GetBucketWebsiteRequest {
|
|
|
6855
6855
|
*/
|
|
6856
6856
|
export declare const ReplicationStatus: {
|
|
6857
6857
|
readonly COMPLETE: "COMPLETE";
|
|
6858
|
+
readonly COMPLETED: "COMPLETED";
|
|
6858
6859
|
readonly FAILED: "FAILED";
|
|
6859
6860
|
readonly PENDING: "PENDING";
|
|
6860
6861
|
readonly REPLICA: "REPLICA";
|
|
@@ -1300,6 +1300,7 @@ export interface GetBucketWebsiteRequest {
|
|
|
1300
1300
|
}
|
|
1301
1301
|
export declare const ReplicationStatus: {
|
|
1302
1302
|
readonly COMPLETE: "COMPLETE";
|
|
1303
|
+
readonly COMPLETED: "COMPLETED";
|
|
1303
1304
|
readonly FAILED: "FAILED";
|
|
1304
1305
|
readonly PENDING: "PENDING";
|
|
1305
1306
|
readonly REPLICA: "REPLICA";
|
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.
|
|
4
|
+
"version": "3.421.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@aws-crypto/sha1-browser": "3.0.0",
|
|
26
26
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
27
27
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
28
|
-
"@aws-sdk/client-sts": "3.
|
|
29
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
28
|
+
"@aws-sdk/client-sts": "3.421.0",
|
|
29
|
+
"@aws-sdk/credential-provider-node": "3.421.0",
|
|
30
30
|
"@aws-sdk/middleware-bucket-endpoint": "3.418.0",
|
|
31
31
|
"@aws-sdk/middleware-expect-continue": "3.418.0",
|
|
32
32
|
"@aws-sdk/middleware-flexible-checksums": "3.418.0",
|