@aws-sdk/client-s3 3.451.0 → 3.456.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/endpoint/ruleset.js +2 -2
- package/dist-cjs/models/models_0.js +6 -2
- package/dist-cjs/protocols/Aws_restXml.js +52 -0
- package/dist-es/endpoint/ruleset.js +2 -2
- package/dist-es/models/models_0.js +4 -0
- package/dist-es/protocols/Aws_restXml.js +52 -0
- package/dist-types/commands/CreateBucketCommand.d.ts +13 -13
- package/dist-types/commands/DeleteObjectTaggingCommand.d.ts +11 -11
- package/dist-types/commands/GetBucketLoggingCommand.d.ts +6 -0
- package/dist-types/commands/GetObjectCommand.d.ts +24 -23
- package/dist-types/commands/HeadObjectCommand.d.ts +14 -3
- package/dist-types/commands/ListMultipartUploadsCommand.d.ts +32 -32
- package/dist-types/commands/ListObjectVersionsCommand.d.ts +0 -1
- package/dist-types/commands/PutBucketLoggingCommand.d.ts +6 -0
- package/dist-types/commands/PutObjectAclCommand.d.ts +1 -1
- package/dist-types/commands/PutObjectCommand.d.ts +37 -37
- package/dist-types/commands/PutObjectLegalHoldCommand.d.ts +1 -1
- package/dist-types/commands/PutPublicAccessBlockCommand.d.ts +1 -1
- package/dist-types/commands/UploadPartCopyCommand.d.ts +13 -13
- package/dist-types/models/models_0.d.ts +77 -204
- package/dist-types/models/models_1.d.ts +189 -1
- package/dist-types/ts3.4/commands/PutObjectAclCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/PutObjectLegalHoldCommand.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +15 -32
- package/dist-types/ts3.4/models/models_1.d.ts +34 -0
- package/package.json +2 -2
|
@@ -100,7 +100,7 @@ export interface GetObjectCommandOutput extends Omit<GetObjectOutput, "Body">, _
|
|
|
100
100
|
* <note>
|
|
101
101
|
* <ul>
|
|
102
102
|
* <li>
|
|
103
|
-
* <p>
|
|
103
|
+
* <p>If you supply a <code>versionId</code>, you need the
|
|
104
104
|
* <code>s3:GetObjectVersion</code> permission to access a specific
|
|
105
105
|
* version of an object. If you request a specific version, you do not need
|
|
106
106
|
* to have the <code>s3:GetObject</code> permission. If you request the
|
|
@@ -109,9 +109,10 @@ export interface GetObjectCommandOutput extends Omit<GetObjectOutput, "Body">, _
|
|
|
109
109
|
* <code>s3:GetObjectVersion</code> permission won't be required.</p>
|
|
110
110
|
* </li>
|
|
111
111
|
* <li>
|
|
112
|
-
* <p>If the current version of the object is a delete marker, Amazon S3 behaves
|
|
113
|
-
*
|
|
114
|
-
*
|
|
112
|
+
* <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p>
|
|
113
|
+
* </li>
|
|
114
|
+
* <li>
|
|
115
|
+
* <p>If the specified version is a delete marker, the response returns a 405 (Method Not Allowed) error and the <code>Last-Modified: timestamp</code> response header.</p>
|
|
115
116
|
* </li>
|
|
116
117
|
* </ul>
|
|
117
118
|
* </note>
|
|
@@ -287,53 +288,53 @@ export interface GetObjectCommandOutput extends Omit<GetObjectOutput, "Body">, _
|
|
|
287
288
|
* @throws {@link S3ServiceException}
|
|
288
289
|
* <p>Base exception class for all service exceptions from S3 service.</p>
|
|
289
290
|
*
|
|
290
|
-
* @example To retrieve
|
|
291
|
+
* @example To retrieve an object
|
|
291
292
|
* ```javascript
|
|
292
|
-
* // The following example retrieves an object for an S3 bucket.
|
|
293
|
+
* // The following example retrieves an object for an S3 bucket.
|
|
293
294
|
* const input = {
|
|
294
295
|
* "Bucket": "examplebucket",
|
|
295
|
-
* "Key": "
|
|
296
|
-
* "Range": "bytes=0-9"
|
|
296
|
+
* "Key": "HappyFace.jpg"
|
|
297
297
|
* };
|
|
298
298
|
* const command = new GetObjectCommand(input);
|
|
299
299
|
* const response = await client.send(command);
|
|
300
300
|
* /* response ==
|
|
301
301
|
* {
|
|
302
302
|
* "AcceptRanges": "bytes",
|
|
303
|
-
* "ContentLength": "
|
|
304
|
-
* "
|
|
305
|
-
* "
|
|
306
|
-
* "
|
|
307
|
-
* "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT",
|
|
303
|
+
* "ContentLength": "3191",
|
|
304
|
+
* "ContentType": "image/jpeg",
|
|
305
|
+
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
|
306
|
+
* "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT",
|
|
308
307
|
* "Metadata": {},
|
|
308
|
+
* "TagCount": 2,
|
|
309
309
|
* "VersionId": "null"
|
|
310
310
|
* }
|
|
311
311
|
* *\/
|
|
312
|
-
* // example id: to-retrieve-
|
|
312
|
+
* // example id: to-retrieve-an-object-1481827837012
|
|
313
313
|
* ```
|
|
314
314
|
*
|
|
315
|
-
* @example To retrieve an object
|
|
315
|
+
* @example To retrieve a byte range of an object
|
|
316
316
|
* ```javascript
|
|
317
|
-
* // The following example retrieves an object for an S3 bucket.
|
|
317
|
+
* // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range.
|
|
318
318
|
* const input = {
|
|
319
319
|
* "Bucket": "examplebucket",
|
|
320
|
-
* "Key": "
|
|
320
|
+
* "Key": "SampleFile.txt",
|
|
321
|
+
* "Range": "bytes=0-9"
|
|
321
322
|
* };
|
|
322
323
|
* const command = new GetObjectCommand(input);
|
|
323
324
|
* const response = await client.send(command);
|
|
324
325
|
* /* response ==
|
|
325
326
|
* {
|
|
326
327
|
* "AcceptRanges": "bytes",
|
|
327
|
-
* "ContentLength": "
|
|
328
|
-
* "
|
|
329
|
-
* "
|
|
330
|
-
* "
|
|
328
|
+
* "ContentLength": "10",
|
|
329
|
+
* "ContentRange": "bytes 0-9/43",
|
|
330
|
+
* "ContentType": "text/plain",
|
|
331
|
+
* "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
|
|
332
|
+
* "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT",
|
|
331
333
|
* "Metadata": {},
|
|
332
|
-
* "TagCount": 2,
|
|
333
334
|
* "VersionId": "null"
|
|
334
335
|
* }
|
|
335
336
|
* *\/
|
|
336
|
-
* // example id: to-retrieve-an-object
|
|
337
|
+
* // example id: to-retrieve-a-byte-range-of-an-object--1481832674603
|
|
337
338
|
* ```
|
|
338
339
|
*
|
|
339
340
|
*/
|
|
@@ -29,9 +29,9 @@ export interface HeadObjectCommandOutput extends HeadObjectOutput, __MetadataBea
|
|
|
29
29
|
* <p>A <code>HEAD</code> request has the same options as a <code>GET</code> action on an
|
|
30
30
|
* object. The response is identical to the <code>GET</code> response except that there is no
|
|
31
31
|
* response body. Because of this, if the <code>HEAD</code> request generates an error, it
|
|
32
|
-
* returns a generic <code>400 Bad Request</code>, <code>403 Forbidden</code
|
|
33
|
-
* Found</code
|
|
34
|
-
*
|
|
32
|
+
* returns a generic code, such as <code>400 Bad Request</code>, <code>403 Forbidden</code>, <code>404 Not
|
|
33
|
+
* Found</code>, <code>405 Method Not Allowed</code>, <code>412 Precondition Failed</code>, or <code>304 Not Modified</code>.
|
|
34
|
+
* It's not possible to retrieve the exact exception of these error codes.</p>
|
|
35
35
|
* <p>If you encrypt an object by using server-side encryption with customer-provided
|
|
36
36
|
* encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the
|
|
37
37
|
* metadata from the object, you must use the following headers:</p>
|
|
@@ -129,6 +129,17 @@ export interface HeadObjectCommandOutput extends HeadObjectOutput, __MetadataBea
|
|
|
129
129
|
* </li>
|
|
130
130
|
* </ul>
|
|
131
131
|
* </dd>
|
|
132
|
+
* <dt>Versioning</dt>
|
|
133
|
+
* <dd>
|
|
134
|
+
* <ul>
|
|
135
|
+
* <li>
|
|
136
|
+
* <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p>
|
|
137
|
+
* </li>
|
|
138
|
+
* <li>
|
|
139
|
+
* <p>If the specified version is a delete marker, the response returns a 405 (Method Not Allowed) error and the <code>Last-Modified: timestamp</code> response header.</p>
|
|
140
|
+
* </li>
|
|
141
|
+
* </ul>
|
|
142
|
+
* </dd>
|
|
132
143
|
* </dl>
|
|
133
144
|
* <p>The following actions are related to <code>HeadObject</code>:</p>
|
|
134
145
|
* <ul>
|
|
@@ -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 List next set of multipart uploads when previous result is truncated
|
|
139
139
|
* ```javascript
|
|
140
|
-
* // The following example
|
|
140
|
+
* // The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads.
|
|
141
141
|
* const input = {
|
|
142
|
-
* "Bucket": "examplebucket"
|
|
142
|
+
* "Bucket": "examplebucket",
|
|
143
|
+
* "KeyMarker": "nextkeyfrompreviousresponse",
|
|
144
|
+
* "MaxUploads": "2",
|
|
145
|
+
* "UploadIdMarker": "valuefrompreviousresponse"
|
|
143
146
|
* };
|
|
144
147
|
* const command = new ListMultipartUploadsCommand(input);
|
|
145
148
|
* const response = await client.send(command);
|
|
146
149
|
* /* response ==
|
|
147
150
|
* {
|
|
151
|
+
* "Bucket": "acl1",
|
|
152
|
+
* "IsTruncated": true,
|
|
153
|
+
* "KeyMarker": "",
|
|
154
|
+
* "MaxUploads": "2",
|
|
155
|
+
* "NextKeyMarker": "someobjectkey",
|
|
156
|
+
* "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
|
157
|
+
* "UploadIdMarker": "",
|
|
148
158
|
* "Uploads": [
|
|
149
159
|
* {
|
|
150
160
|
* "Initiated": "2014-05-01T05:40:58.000Z",
|
|
151
161
|
* "Initiator": {
|
|
152
|
-
* "DisplayName": "display-name",
|
|
162
|
+
* "DisplayName": "ownder-display-name",
|
|
153
163
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
154
164
|
* },
|
|
155
165
|
* "Key": "JavaFile",
|
|
156
166
|
* "Owner": {
|
|
157
|
-
* "DisplayName": "
|
|
158
|
-
* "ID": "
|
|
167
|
+
* "DisplayName": "mohanataws",
|
|
168
|
+
* "ID": "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
159
169
|
* },
|
|
160
170
|
* "StorageClass": "STANDARD",
|
|
161
|
-
* "UploadId": "
|
|
171
|
+
* "UploadId": "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--"
|
|
162
172
|
* },
|
|
163
173
|
* {
|
|
164
174
|
* "Initiated": "2014-05-01T05:41:27.000Z",
|
|
165
175
|
* "Initiator": {
|
|
166
|
-
* "DisplayName": "display-name",
|
|
176
|
+
* "DisplayName": "ownder-display-name",
|
|
167
177
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
168
178
|
* },
|
|
169
179
|
* "Key": "JavaFile",
|
|
170
180
|
* "Owner": {
|
|
171
|
-
* "DisplayName": "display-name",
|
|
181
|
+
* "DisplayName": "ownder-display-name",
|
|
172
182
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
173
183
|
* },
|
|
174
184
|
* "StorageClass": "STANDARD",
|
|
175
|
-
* "UploadId": "
|
|
185
|
+
* "UploadId": "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--"
|
|
176
186
|
* }
|
|
177
187
|
* ]
|
|
178
188
|
* }
|
|
179
189
|
* *\/
|
|
180
|
-
* // example id:
|
|
190
|
+
* // example id: list-next-set-of-multipart-uploads-when-previous-result-is-truncated-1482428106748
|
|
181
191
|
* ```
|
|
182
192
|
*
|
|
183
|
-
* @example
|
|
193
|
+
* @example To list in-progress multipart uploads on a bucket
|
|
184
194
|
* ```javascript
|
|
185
|
-
* // The following example
|
|
195
|
+
* // The following example lists in-progress multipart uploads on a specific bucket.
|
|
186
196
|
* const input = {
|
|
187
|
-
* "Bucket": "examplebucket"
|
|
188
|
-
* "KeyMarker": "nextkeyfrompreviousresponse",
|
|
189
|
-
* "MaxUploads": "2",
|
|
190
|
-
* "UploadIdMarker": "valuefrompreviousresponse"
|
|
197
|
+
* "Bucket": "examplebucket"
|
|
191
198
|
* };
|
|
192
199
|
* const command = new ListMultipartUploadsCommand(input);
|
|
193
200
|
* const response = await client.send(command);
|
|
194
201
|
* /* response ==
|
|
195
202
|
* {
|
|
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": "
|
|
207
|
+
* "DisplayName": "display-name",
|
|
208
208
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
209
209
|
* },
|
|
210
210
|
* "Key": "JavaFile",
|
|
211
211
|
* "Owner": {
|
|
212
|
-
* "DisplayName": "
|
|
213
|
-
* "ID": "
|
|
212
|
+
* "DisplayName": "display-name",
|
|
213
|
+
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
214
214
|
* },
|
|
215
215
|
* "StorageClass": "STANDARD",
|
|
216
|
-
* "UploadId": "
|
|
216
|
+
* "UploadId": "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--"
|
|
217
217
|
* },
|
|
218
218
|
* {
|
|
219
219
|
* "Initiated": "2014-05-01T05:41:27.000Z",
|
|
220
220
|
* "Initiator": {
|
|
221
|
-
* "DisplayName": "
|
|
221
|
+
* "DisplayName": "display-name",
|
|
222
222
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
223
223
|
* },
|
|
224
224
|
* "Key": "JavaFile",
|
|
225
225
|
* "Owner": {
|
|
226
|
-
* "DisplayName": "
|
|
226
|
+
* "DisplayName": "display-name",
|
|
227
227
|
* "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
|
|
228
228
|
* },
|
|
229
229
|
* "StorageClass": "STANDARD",
|
|
230
|
-
* "UploadId": "
|
|
230
|
+
* "UploadId": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--"
|
|
231
231
|
* }
|
|
232
232
|
* ]
|
|
233
233
|
* }
|
|
234
234
|
* *\/
|
|
235
|
-
* // example id: list-
|
|
235
|
+
* // example id: to-list-in-progress-multipart-uploads-on-a-bucket-1481852775260
|
|
236
236
|
* ```
|
|
237
237
|
*
|
|
238
238
|
*/
|
|
@@ -36,7 +36,6 @@ export interface ListObjectVersionsCommandOutput extends ListObjectVersionsOutpu
|
|
|
36
36
|
* appropriately.</p>
|
|
37
37
|
* </note>
|
|
38
38
|
* <p>To use this operation, you must have READ access to the bucket.</p>
|
|
39
|
-
* <p>This action is not supported by Amazon S3 on Outposts.</p>
|
|
40
39
|
* <p>The following operations are related to <code>ListObjectVersions</code>:</p>
|
|
41
40
|
* <ul>
|
|
42
41
|
* <li>
|
|
@@ -132,6 +132,12 @@ export interface PutBucketLoggingCommandOutput extends __MetadataBearer {
|
|
|
132
132
|
* },
|
|
133
133
|
* ],
|
|
134
134
|
* TargetPrefix: "STRING_VALUE", // required
|
|
135
|
+
* TargetObjectKeyFormat: { // TargetObjectKeyFormat
|
|
136
|
+
* SimplePrefix: {},
|
|
137
|
+
* PartitionedPrefix: { // PartitionedPrefix
|
|
138
|
+
* PartitionDateSource: "EventTime" || "DeliveryTime",
|
|
139
|
+
* },
|
|
140
|
+
* },
|
|
135
141
|
* },
|
|
136
142
|
* },
|
|
137
143
|
* ContentMD5: "STRING_VALUE",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
3
|
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
|
-
import { PutObjectAclOutput, PutObjectAclRequest } from "../models/
|
|
4
|
+
import { PutObjectAclOutput, PutObjectAclRequest } from "../models/models_1";
|
|
5
5
|
import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
@@ -192,6 +192,25 @@ 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
|
+
*
|
|
195
214
|
* @example To upload an object and specify server-side encryption and object tags
|
|
196
215
|
* ```javascript
|
|
197
216
|
* // 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.
|
|
@@ -233,26 +252,27 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
|
|
|
233
252
|
* // example id: to-create-an-object-1483147613675
|
|
234
253
|
* ```
|
|
235
254
|
*
|
|
236
|
-
* @example To upload
|
|
255
|
+
* @example To upload object and specify user-defined metadata
|
|
237
256
|
* ```javascript
|
|
238
|
-
* // The following example
|
|
257
|
+
* // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
|
|
239
258
|
* const input = {
|
|
240
|
-
* "Body": "
|
|
259
|
+
* "Body": "filetoupload",
|
|
241
260
|
* "Bucket": "examplebucket",
|
|
242
|
-
* "Key": "
|
|
243
|
-
* "
|
|
244
|
-
*
|
|
261
|
+
* "Key": "exampleobject",
|
|
262
|
+
* "Metadata": {
|
|
263
|
+
* "metadata1": "value1",
|
|
264
|
+
* "metadata2": "value2"
|
|
265
|
+
* }
|
|
245
266
|
* };
|
|
246
267
|
* const command = new PutObjectCommand(input);
|
|
247
268
|
* const response = await client.send(command);
|
|
248
269
|
* /* response ==
|
|
249
270
|
* {
|
|
250
271
|
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
|
251
|
-
* "
|
|
252
|
-
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
|
|
272
|
+
* "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
|
|
253
273
|
* }
|
|
254
274
|
* *\/
|
|
255
|
-
* // example id: to-upload-
|
|
275
|
+
* // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
|
|
256
276
|
* ```
|
|
257
277
|
*
|
|
258
278
|
* @example To upload an object and specify optional tags
|
|
@@ -275,29 +295,6 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
|
|
|
275
295
|
* // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
|
|
276
296
|
* ```
|
|
277
297
|
*
|
|
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
|
-
*
|
|
301
298
|
* @example To upload an object and specify canned ACL.
|
|
302
299
|
* ```javascript
|
|
303
300
|
* // 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.
|
|
@@ -318,23 +315,26 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
|
|
|
318
315
|
* // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
|
|
319
316
|
* ```
|
|
320
317
|
*
|
|
321
|
-
* @example To upload an object
|
|
318
|
+
* @example To upload an object (specify optional headers)
|
|
322
319
|
* ```javascript
|
|
323
|
-
* // The following example uploads an object
|
|
320
|
+
* // 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.
|
|
324
321
|
* const input = {
|
|
325
322
|
* "Body": "HappyFace.jpg",
|
|
326
323
|
* "Bucket": "examplebucket",
|
|
327
|
-
* "Key": "HappyFace.jpg"
|
|
324
|
+
* "Key": "HappyFace.jpg",
|
|
325
|
+
* "ServerSideEncryption": "AES256",
|
|
326
|
+
* "StorageClass": "STANDARD_IA"
|
|
328
327
|
* };
|
|
329
328
|
* const command = new PutObjectCommand(input);
|
|
330
329
|
* const response = await client.send(command);
|
|
331
330
|
* /* response ==
|
|
332
331
|
* {
|
|
333
332
|
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
|
334
|
-
* "
|
|
333
|
+
* "ServerSideEncryption": "AES256",
|
|
334
|
+
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
|
|
335
335
|
* }
|
|
336
336
|
* *\/
|
|
337
|
-
* // example id: to-upload-an-object-
|
|
337
|
+
* // example id: to-upload-an-object-(specify-optional-headers)
|
|
338
338
|
* ```
|
|
339
339
|
*
|
|
340
340
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
|
|
2
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
3
|
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
|
|
4
|
-
import { PutObjectLegalHoldOutput, PutObjectLegalHoldRequest } from "../models/
|
|
4
|
+
import { PutObjectLegalHoldOutput, PutObjectLegalHoldRequest } from "../models/models_1";
|
|
5
5
|
import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
@@ -32,7 +32,7 @@ export interface PutPublicAccessBlockCommandOutput extends __MetadataBearer {
|
|
|
32
32
|
* an object, it checks the <code>PublicAccessBlock</code> configuration for both the
|
|
33
33
|
* bucket (or the bucket that contains the object) and the bucket owner's account. If the
|
|
34
34
|
* <code>PublicAccessBlock</code> configurations are different between the bucket and
|
|
35
|
-
* the account, S3 uses the most restrictive combination of the bucket-level and
|
|
35
|
+
* the account, Amazon S3 uses the most restrictive combination of the bucket-level and
|
|
36
36
|
* account-level settings.</p>
|
|
37
37
|
* </important>
|
|
38
38
|
* <p>For more information about when Amazon S3 considers a bucket or an object public, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status">The Meaning of "Public"</a>.</p>
|
|
@@ -252,14 +252,15 @@ 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 byte range 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 a specified byte range 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",
|
|
261
262
|
* "Key": "examplelargeobject",
|
|
262
|
-
* "PartNumber": "
|
|
263
|
+
* "PartNumber": "2",
|
|
263
264
|
* "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"
|
|
264
265
|
* };
|
|
265
266
|
* const command = new UploadPartCopyCommand(input);
|
|
@@ -267,23 +268,22 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met
|
|
|
267
268
|
* /* response ==
|
|
268
269
|
* {
|
|
269
270
|
* "CopyPartResult": {
|
|
270
|
-
* "ETag": "\"
|
|
271
|
-
* "LastModified": "2016-12-29T21:
|
|
271
|
+
* "ETag": "\"65d16d19e65a7508a51f043180edcc36\"",
|
|
272
|
+
* "LastModified": "2016-12-29T21:44:28.000Z"
|
|
272
273
|
* }
|
|
273
274
|
* }
|
|
274
275
|
* *\/
|
|
275
|
-
* // example id: to-upload-a-part-by-copying-
|
|
276
|
+
* // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594
|
|
276
277
|
* ```
|
|
277
278
|
*
|
|
278
|
-
* @example To upload a part by copying
|
|
279
|
+
* @example To upload a part by copying data from an existing object as data source
|
|
279
280
|
* ```javascript
|
|
280
|
-
* // The following example uploads a part of a multipart upload by copying
|
|
281
|
+
* // The following example uploads a part of a multipart upload by copying data from an existing object as data source.
|
|
281
282
|
* const input = {
|
|
282
283
|
* "Bucket": "examplebucket",
|
|
283
284
|
* "CopySource": "/bucketname/sourceobjectkey",
|
|
284
|
-
* "CopySourceRange": "bytes=1-100000",
|
|
285
285
|
* "Key": "examplelargeobject",
|
|
286
|
-
* "PartNumber": "
|
|
286
|
+
* "PartNumber": "1",
|
|
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": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
|
|
295
|
+
* "LastModified": "2016-12-29T21:24:43.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-data-from-an-existing-object-as-data-source-1483046746348
|
|
300
300
|
* ```
|
|
301
301
|
*
|
|
302
302
|
*/
|