Skip to content

Commit dcde25a

Browse files
author
awstools
committed
feat(client-s3): Updated a few x-id in the http uri traits
1 parent 43f9444 commit dcde25a

File tree

3 files changed

+88
-134
lines changed

3 files changed

+88
-134
lines changed

clients/client-s3/src/commands/PutObjectCommand.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -263,49 +263,49 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
263263
* // example id: to-upload-an-object-1481760101010
264264
* ```
265265
*
266-
* @example To upload object and specify user-defined metadata
266+
* @example To upload an object (specify optional headers)
267267
* ```javascript
268-
* // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
268+
* // 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.
269269
* const input = {
270-
* "Body": "filetoupload",
270+
* "Body": "HappyFace.jpg",
271271
* "Bucket": "examplebucket",
272-
* "Key": "exampleobject",
273-
* "Metadata": {
274-
* "metadata1": "value1",
275-
* "metadata2": "value2"
276-
* }
272+
* "Key": "HappyFace.jpg",
273+
* "ServerSideEncryption": "AES256",
274+
* "StorageClass": "STANDARD_IA"
277275
* };
278276
* const command = new PutObjectCommand(input);
279277
* const response = await client.send(command);
280278
* /* response ==
281279
* {
282280
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
283-
* "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
281+
* "ServerSideEncryption": "AES256",
282+
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
284283
* }
285284
* *\/
286-
* // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
285+
* // example id: to-upload-an-object-(specify-optional-headers)
287286
* ```
288287
*
289-
* @example To upload an object (specify optional headers)
288+
* @example To upload object and specify user-defined metadata
290289
* ```javascript
291-
* // 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.
290+
* // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
292291
* const input = {
293-
* "Body": "HappyFace.jpg",
292+
* "Body": "filetoupload",
294293
* "Bucket": "examplebucket",
295-
* "Key": "HappyFace.jpg",
296-
* "ServerSideEncryption": "AES256",
297-
* "StorageClass": "STANDARD_IA"
294+
* "Key": "exampleobject",
295+
* "Metadata": {
296+
* "metadata1": "value1",
297+
* "metadata2": "value2"
298+
* }
298299
* };
299300
* const command = new PutObjectCommand(input);
300301
* const response = await client.send(command);
301302
* /* response ==
302303
* {
303304
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
304-
* "ServerSideEncryption": "AES256",
305-
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
305+
* "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
306306
* }
307307
* *\/
308-
* // example id: to-upload-an-object-(specify-optional-headers)
308+
* // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
309309
* ```
310310
*
311311
* @example To upload an object and specify canned ACL.

clients/client-s3/src/protocols/Aws_restXml.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,6 @@ export const se_CompleteMultipartUploadCommand = async (
492492
b.p("Bucket", () => input.Bucket!, "{Bucket}", false);
493493
b.p("Key", () => input.Key!, "{Key+}", true);
494494
const query: any = map({
495-
[_xi]: [, "CompleteMultipartUpload"],
496495
[_uI]: [, __expectNonNull(input[_UI]!, `UploadId`)],
497496
});
498497
let body: any;
@@ -658,7 +657,6 @@ export const se_CreateMultipartUploadCommand = async (
658657
b.p("Key", () => input.Key!, "{Key+}", true);
659658
const query: any = map({
660659
[_u]: [, ""],
661-
[_xi]: [, "CreateMultipartUpload"],
662660
});
663661
let body: any;
664662
b.m("POST").h(headers).q(query).b(body);
@@ -1004,7 +1002,6 @@ export const se_DeleteObjectsCommand = async (
10041002
b.p("Bucket", () => input.Bucket!, "{Bucket}", false);
10051003
const query: any = map({
10061004
[_d]: [, ""],
1007-
[_xi]: [, "DeleteObjects"],
10081005
});
10091006
let body: any;
10101007
let contents: any;
@@ -2909,7 +2906,6 @@ export const se_RestoreObjectCommand = async (
29092906
b.p("Key", () => input.Key!, "{Key+}", true);
29102907
const query: any = map({
29112908
[_res]: [, ""],
2912-
[_xi]: [, "RestoreObject"],
29132909
[_vI]: [, input[_VI]!],
29142910
});
29152911
let body: any;
@@ -2945,7 +2941,6 @@ export const se_SelectObjectContentCommand = async (
29452941
const query: any = map({
29462942
[_se]: [, ""],
29472943
[_st]: [, "2"],
2948-
[_xi]: [, "SelectObjectContent"],
29492944
});
29502945
let body: any;
29512946
body = _ve;
@@ -3108,9 +3103,6 @@ export const se_WriteGetObjectResponseCommand = async (
31083103
}, {})),
31093104
});
31103105
b.bp("/WriteGetObjectResponse");
3111-
const query: any = map({
3112-
[_xi]: [, "WriteGetObjectResponse"],
3113-
});
31143106
let body: any;
31153107
let contents: any;
31163108
if (input.Body !== undefined) {
@@ -3129,7 +3121,7 @@ export const se_WriteGetObjectResponseCommand = async (
31293121
}
31303122
}
31313123
b.hn(resolvedHostname);
3132-
b.m("POST").h(headers).q(query).b(body);
3124+
b.m("POST").h(headers).b(body);
31333125
return b.build();
31343126
};
31353127

0 commit comments

Comments
 (0)