Skip to content

Commit

Permalink
feat(client-s3): Updated a few x-id in the http uri traits
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed May 14, 2024
1 parent 43f9444 commit dcde25a
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 134 deletions.
38 changes: 19 additions & 19 deletions clients/client-s3/src/commands/PutObjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,49 +263,49 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
* // example id: to-upload-an-object-1481760101010
* ```
*
* @example To upload object and specify user-defined metadata
* @example To upload an object (specify optional headers)
* ```javascript
* // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
* // 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.
* const input = {
* "Body": "filetoupload",
* "Body": "HappyFace.jpg",
* "Bucket": "examplebucket",
* "Key": "exampleobject",
* "Metadata": {
* "metadata1": "value1",
* "metadata2": "value2"
* }
* "Key": "HappyFace.jpg",
* "ServerSideEncryption": "AES256",
* "StorageClass": "STANDARD_IA"
* };
* const command = new PutObjectCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
* "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
* "ServerSideEncryption": "AES256",
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
* }
* *\/
* // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
* // example id: to-upload-an-object-(specify-optional-headers)
* ```
*
* @example To upload an object (specify optional headers)
* @example To upload object and specify user-defined metadata
* ```javascript
* // 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.
* // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.
* const input = {
* "Body": "HappyFace.jpg",
* "Body": "filetoupload",
* "Bucket": "examplebucket",
* "Key": "HappyFace.jpg",
* "ServerSideEncryption": "AES256",
* "StorageClass": "STANDARD_IA"
* "Key": "exampleobject",
* "Metadata": {
* "metadata1": "value1",
* "metadata2": "value2"
* }
* };
* const command = new PutObjectCommand(input);
* const response = await client.send(command);
* /* response ==
* {
* "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
* "ServerSideEncryption": "AES256",
* "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
* "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0"
* }
* *\/
* // example id: to-upload-an-object-(specify-optional-headers)
* // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
* ```
*
* @example To upload an object and specify canned ACL.
Expand Down
10 changes: 1 addition & 9 deletions clients/client-s3/src/protocols/Aws_restXml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ export const se_CompleteMultipartUploadCommand = async (
b.p("Bucket", () => input.Bucket!, "{Bucket}", false);
b.p("Key", () => input.Key!, "{Key+}", true);
const query: any = map({
[_xi]: [, "CompleteMultipartUpload"],
[_uI]: [, __expectNonNull(input[_UI]!, `UploadId`)],
});
let body: any;
Expand Down Expand Up @@ -658,7 +657,6 @@ export const se_CreateMultipartUploadCommand = async (
b.p("Key", () => input.Key!, "{Key+}", true);
const query: any = map({
[_u]: [, ""],
[_xi]: [, "CreateMultipartUpload"],
});
let body: any;
b.m("POST").h(headers).q(query).b(body);
Expand Down Expand Up @@ -1004,7 +1002,6 @@ export const se_DeleteObjectsCommand = async (
b.p("Bucket", () => input.Bucket!, "{Bucket}", false);
const query: any = map({
[_d]: [, ""],
[_xi]: [, "DeleteObjects"],
});
let body: any;
let contents: any;
Expand Down Expand Up @@ -2909,7 +2906,6 @@ export const se_RestoreObjectCommand = async (
b.p("Key", () => input.Key!, "{Key+}", true);
const query: any = map({
[_res]: [, ""],
[_xi]: [, "RestoreObject"],
[_vI]: [, input[_VI]!],
});
let body: any;
Expand Down Expand Up @@ -2945,7 +2941,6 @@ export const se_SelectObjectContentCommand = async (
const query: any = map({
[_se]: [, ""],
[_st]: [, "2"],
[_xi]: [, "SelectObjectContent"],
});
let body: any;
body = _ve;
Expand Down Expand Up @@ -3108,9 +3103,6 @@ export const se_WriteGetObjectResponseCommand = async (
}, {})),
});
b.bp("/WriteGetObjectResponse");
const query: any = map({
[_xi]: [, "WriteGetObjectResponse"],
});
let body: any;
let contents: any;
if (input.Body !== undefined) {
Expand All @@ -3129,7 +3121,7 @@ export const se_WriteGetObjectResponseCommand = async (
}
}
b.hn(resolvedHostname);
b.m("POST").h(headers).q(query).b(body);
b.m("POST").h(headers).b(body);
return b.build();
};

Expand Down
Loading

0 comments on commit dcde25a

Please sign in to comment.