diff --git a/clients/client-b2bi/src/commands/CreateTransformerCommand.ts b/clients/client-b2bi/src/commands/CreateTransformerCommand.ts index 2786d2632c73..1f6727cd360d 100644 --- a/clients/client-b2bi/src/commands/CreateTransformerCommand.ts +++ b/clients/client-b2bi/src/commands/CreateTransformerCommand.ts @@ -204,29 +204,17 @@ export interface CreateTransformerCommandOutput extends CreateTransformerRespons * ```javascript * // * const input = { - * "name": "transformX12", + * "name": "transformJSON", * "clientToken": "foo", - * "inputConversion": { - * "formatOptions": { - * "x12": { - * "version": "VERSION_4010", - * "transactionSet": "X12_110" - * } - * }, - * "fromFormat": "X12" - * }, - * "mapping": { - * "template": "{}", - * "templateLanguage": "JSONATA" - * }, - * "sampleDocuments": { - * "bucketName": "test-bucket", - * "keys": [ - * { - * "input": "sampleDoc.txt" - * } - * ] + * "ediType": { + * "x12Details": { + * "version": "VERSION_4010", + * "transactionSet": "X12_110" + * } * }, + * "fileFormat": "JSON", + * "mappingTemplate": "{}", + * "sampleDocument": "s3://test-bucket/sampleDoc.txt", * "tags": [ * { * "Key": "sampleKey", @@ -238,29 +226,17 @@ export interface CreateTransformerCommandOutput extends CreateTransformerRespons * const response = await client.send(command); * /* response == * { - * "name": "transformX12", + * "name": "transformJSON", * "createdAt": "2023-11-01T21:51:05.504Z", - * "inputConversion": { - * "formatOptions": { - * "x12": { - * "version": "VERSION_4010", - * "transactionSet": "X12_110" - * } - * }, - * "fromFormat": "X12" - * }, - * "mapping": { - * "template": "{}", - * "templateLanguage": "JSONATA" - * }, - * "sampleDocuments": { - * "bucketName": "test-bucket", - * "keys": [ - * { - * "input": "sampleDoc.txt" - * } - * ] + * "ediType": { + * "x12Details": { + * "version": "VERSION_4010", + * "transactionSet": "X12_110" + * } * }, + * "fileFormat": "JSON", + * "mappingTemplate": "$", + * "sampleDocument": "s3://test-bucket/sampleDoc.txt", * "status": "inactive", * "transformerArn": "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9", * "transformerId": "tr-974c129999f84d8c9" diff --git a/clients/client-b2bi/src/commands/GetTransformerCommand.ts b/clients/client-b2bi/src/commands/GetTransformerCommand.ts index 4da6b21910a5..f113f59c7b61 100644 --- a/clients/client-b2bi/src/commands/GetTransformerCommand.ts +++ b/clients/client-b2bi/src/commands/GetTransformerCommand.ts @@ -127,29 +127,18 @@ export interface GetTransformerCommandOutput extends GetTransformerResponse, __M * const response = await client.send(command); * /* response == * { - * "name": "transformX12", + * "name": "transformJSON", * "createdAt": "2023-11-01T21:51:05.504Z", - * "inputConversion": { - * "formatOptions": { - * "x12": { - * "version": "VERSION_4010", - * "transactionSet": "X12_110" - * } - * }, - * "fromFormat": "X12" - * }, - * "mapping": { - * "template": "{}", - * "templateLanguage": "JSONATA" - * }, - * "sampleDocuments": { - * "bucketName": "test-bucket", - * "keys": [ - * { - * "input": "sampleDoc.txt" - * } - * ] + * "ediType": { + * "x12Details": { + * "version": "VERSION_4010", + * "transactionSet": "X12_110" + * } * }, + * "fileFormat": "JSON", + * "mappingTemplate": "$", + * "modifiedAt": "2023-11-01T21:51:05.504Z", + * "sampleDocument": "s3://test-bucket/sampleDoc.txt", * "status": "inactive", * "transformerArn": "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9", * "transformerId": "tr-974c129999f84d8c9" diff --git a/clients/client-b2bi/src/commands/UpdateTransformerCommand.ts b/clients/client-b2bi/src/commands/UpdateTransformerCommand.ts index 3da0b82bf460..c4d2fd2b533d 100644 --- a/clients/client-b2bi/src/commands/UpdateTransformerCommand.ts +++ b/clients/client-b2bi/src/commands/UpdateTransformerCommand.ts @@ -169,28 +169,16 @@ export interface UpdateTransformerCommandOutput extends UpdateTransformerRespons * ```javascript * // * const input = { - * "name": "transformX12", - * "inputConversion": { - * "formatOptions": { - * "x12": { - * "version": "VERSION_4010", - * "transactionSet": "X12_110" - * } - * }, - * "fromFormat": "X12" - * }, - * "mapping": { - * "template": "{}", - * "templateLanguage": "JSONATA" - * }, - * "sampleDocuments": { - * "bucketName": "test-bucket", - * "keys": [ - * { - * "input": "sampleDoc.txt" - * } - * ] + * "name": "transformJSON", + * "ediType": { + * "x12Details": { + * "version": "VERSION_4010", + * "transactionSet": "X12_110" + * } * }, + * "fileFormat": "JSON", + * "mappingTemplate": "{}", + * "sampleDocument": "s3://test-bucket/sampleDoc.txt", * "status": "inactive", * "transformerId": "tr-974c129999f84d8c9" * }; @@ -198,32 +186,20 @@ export interface UpdateTransformerCommandOutput extends UpdateTransformerRespons * const response = await client.send(command); * /* response == * { - * "name": "transformX12", + * "name": "transformJSON", * "createdAt": "2023-11-01T21:51:05.504Z", - * "inputConversion": { - * "formatOptions": { - * "x12": { - * "version": "VERSION_4010", - * "transactionSet": "X12_110" - * } - * }, - * "fromFormat": "X12" - * }, - * "mapping": { - * "template": "{}", - * "templateLanguage": "JSONATA" - * }, - * "modifiedAt": "2023-11-02T22:31:05.504Z", - * "sampleDocuments": { - * "bucketName": "test-bucket", - * "keys": [ - * { - * "input": "sampleDoc.txt" - * } - * ] + * "ediType": { + * "x12Details": { + * "version": "VERSION_4010", + * "transactionSet": "X12_110" + * } * }, + * "fileFormat": "JSON", + * "mappingTemplate": "$", + * "modifiedAt": "2023-11-01T21:51:05.504Z", + * "sampleDocument": "s3://test-bucket/sampleDoc.txt", * "status": "inactive", - * "transformerArn": "arn:aws:b2bi:us-west-2:123456789012:transformer/tr-974c129999f84d8c9", + * "transformerArn": "arn:aws:b2bi:us-west-2:607686414464:transformer/tr-974c129999f84d8c9", * "transformerId": "tr-974c129999f84d8c9" * } * *\/ diff --git a/clients/client-s3/src/commands/DeleteObjectCommand.ts b/clients/client-s3/src/commands/DeleteObjectCommand.ts index 3e7e5c89da4f..053c7afeb76e 100644 --- a/clients/client-s3/src/commands/DeleteObjectCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectCommand.ts @@ -163,28 +163,28 @@ export interface DeleteObjectCommandOutput extends DeleteObjectOutput, __Metadat *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To delete an object + * @example To delete an object (from a non-versioned bucket) * ```javascript - * // The following example deletes an object from an S3 bucket. + * // The following example deletes an object from a non-versioned bucket. * const input = { - * "Bucket": "examplebucket", - * "Key": "objectkey.jpg" + * "Bucket": "ExampleBucket", + * "Key": "HappyFace.jpg" * }; * const command = new DeleteObjectCommand(input); * await client.send(command); - * // example id: to-delete-an-object-1472850136595 + * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089 * ``` * - * @example To delete an object (from a non-versioned bucket) + * @example To delete an object * ```javascript - * // The following example deletes an object from a non-versioned bucket. + * // The following example deletes an object from an S3 bucket. * const input = { - * "Bucket": "ExampleBucket", - * "Key": "HappyFace.jpg" + * "Bucket": "examplebucket", + * "Key": "objectkey.jpg" * }; * const command = new DeleteObjectCommand(input); * await client.send(command); - * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089 + * // example id: to-delete-an-object-1472850136595 * ``` * */ diff --git a/clients/client-s3/src/commands/DeleteObjectsCommand.ts b/clients/client-s3/src/commands/DeleteObjectsCommand.ts index 57727ddec80d..a41f2e1d2762 100644 --- a/clients/client-s3/src/commands/DeleteObjectsCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectsCommand.ts @@ -213,18 +213,20 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To delete multiple objects from a versioned bucket + * @example To delete multiple object versions from a versioned bucket * ```javascript - * // 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. + * // 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. * const input = { * "Bucket": "examplebucket", * "Delete": { * "Objects": [ * { - * "Key": "objectkey1" + * "Key": "HappyFace.jpg", + * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" * }, * { - * "Key": "objectkey2" + * "Key": "HappyFace.jpg", + * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" * } * ], * "Quiet": false @@ -236,35 +238,31 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad * { * "Deleted": [ * { - * "DeleteMarker": "true", - * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", - * "Key": "objectkey1" + * "Key": "HappyFace.jpg", + * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" * }, * { - * "DeleteMarker": "true", - * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", - * "Key": "objectkey2" + * "Key": "HappyFace.jpg", + * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" * } * ] * } * *\/ - * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805 + * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737 * ``` * - * @example To delete multiple object versions from a versioned bucket + * @example To delete multiple objects from a versioned bucket * ```javascript - * // 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. + * // 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. * const input = { * "Bucket": "examplebucket", * "Delete": { * "Objects": [ * { - * "Key": "HappyFace.jpg", - * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + * "Key": "objectkey1" * }, * { - * "Key": "HappyFace.jpg", - * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + * "Key": "objectkey2" * } * ], * "Quiet": false @@ -276,17 +274,19 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad * { * "Deleted": [ * { - * "Key": "HappyFace.jpg", - * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + * "DeleteMarker": "true", + * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", + * "Key": "objectkey1" * }, * { - * "Key": "HappyFace.jpg", - * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + * "DeleteMarker": "true", + * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", + * "Key": "objectkey2" * } * ] * } * *\/ - * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737 + * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805 * ``` * */ diff --git a/clients/client-s3/src/commands/GetObjectCommand.ts b/clients/client-s3/src/commands/GetObjectCommand.ts index acfb28282a71..e7b067246d85 100644 --- a/clients/client-s3/src/commands/GetObjectCommand.ts +++ b/clients/client-s3/src/commands/GetObjectCommand.ts @@ -292,53 +292,53 @@ export interface GetObjectCommandOutput extends Omit, _ *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To retrieve a byte range of an object + * @example To retrieve an object * ```javascript - * // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range. + * // The following example retrieves an object for an S3 bucket. * const input = { * "Bucket": "examplebucket", - * "Key": "SampleFile.txt", - * "Range": "bytes=0-9" + * "Key": "HappyFace.jpg" * }; * const command = new GetObjectCommand(input); * const response = await client.send(command); * /* response == * { * "AcceptRanges": "bytes", - * "ContentLength": "10", - * "ContentRange": "bytes 0-9/43", - * "ContentType": "text/plain", - * "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"", - * "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT", + * "ContentLength": "3191", + * "ContentType": "image/jpeg", + * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + * "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT", * "Metadata": {}, + * "TagCount": 2, * "VersionId": "null" * } * *\/ - * // example id: to-retrieve-a-byte-range-of-an-object--1481832674603 + * // example id: to-retrieve-an-object-1481827837012 * ``` * - * @example To retrieve an object + * @example To retrieve a byte range of an object * ```javascript - * // The following example retrieves an object for an S3 bucket. + * // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range. * const input = { * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * "Key": "SampleFile.txt", + * "Range": "bytes=0-9" * }; * const command = new GetObjectCommand(input); * const response = await client.send(command); * /* response == * { * "AcceptRanges": "bytes", - * "ContentLength": "3191", - * "ContentType": "image/jpeg", - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT", + * "ContentLength": "10", + * "ContentRange": "bytes 0-9/43", + * "ContentType": "text/plain", + * "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"", + * "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT", * "Metadata": {}, - * "TagCount": 2, * "VersionId": "null" * } * *\/ - * // example id: to-retrieve-an-object-1481827837012 + * // example id: to-retrieve-a-byte-range-of-an-object--1481832674603 * ``` * */ diff --git a/clients/client-s3/src/commands/GetObjectTaggingCommand.ts b/clients/client-s3/src/commands/GetObjectTaggingCommand.ts index 32326f4bc9dc..7d84170e5e3f 100644 --- a/clients/client-s3/src/commands/GetObjectTaggingCommand.ts +++ b/clients/client-s3/src/commands/GetObjectTaggingCommand.ts @@ -98,12 +98,13 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To retrieve tag set of an object + * @example To retrieve tag set of a specific object version * ```javascript - * // The following example retrieves tag set of an object. + * // The following example retrieves tag set of an object. The request specifies object version. * const input = { * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * "Key": "exampleobject", + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * }; * const command = new GetObjectTaggingCommand(input); * const response = await client.send(command); @@ -111,27 +112,22 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ * { * "TagSet": [ * { - * "Key": "Key4", - * "Value": "Value4" - * }, - * { - * "Key": "Key3", - * "Value": "Value3" + * "Key": "Key1", + * "Value": "Value1" * } * ], - * "VersionId": "null" + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * } * *\/ - * // example id: to-retrieve-tag-set-of-an-object-1481833847896 + * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663 * ``` * - * @example To retrieve tag set of a specific object version + * @example To retrieve tag set of an object * ```javascript - * // The following example retrieves tag set of an object. The request specifies object version. + * // The following example retrieves tag set of an object. * const input = { * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "Key": "HappyFace.jpg" * }; * const command = new GetObjectTaggingCommand(input); * const response = await client.send(command); @@ -139,14 +135,18 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ * { * "TagSet": [ * { - * "Key": "Key1", - * "Value": "Value1" + * "Key": "Key4", + * "Value": "Value4" + * }, + * { + * "Key": "Key3", + * "Value": "Value3" * } * ], - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "VersionId": "null" * } * *\/ - * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663 + * // example id: to-retrieve-tag-set-of-an-object-1481833847896 * ``` * */ diff --git a/clients/client-s3/src/commands/PutObjectCommand.ts b/clients/client-s3/src/commands/PutObjectCommand.ts index 92410019d42b..db31135c3013 100644 --- a/clients/client-s3/src/commands/PutObjectCommand.ts +++ b/clients/client-s3/src/commands/PutObjectCommand.ts @@ -249,24 +249,24 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To upload an object and specify canned ACL. + * @example To upload an object and specify optional tags * ```javascript - * // 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. + * // 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. * const input = { - * "ACL": "authenticated-read", - * "Body": "filetoupload", + * "Body": "c:\\HappyFace.jpg", * "Bucket": "examplebucket", - * "Key": "exampleobject" + * "Key": "HappyFace.jpg", + * "Tagging": "key1=value1&key2=value2" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr" + * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" * } * *\/ - * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571 + * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955 * ``` * * @example To create an object. @@ -288,43 +288,46 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * // example id: to-create-an-object-1483147613675 * ``` * - * @example To upload an object + * @example To upload object and specify user-defined metadata * ```javascript - * // 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. + * // 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" + * "Key": "exampleobject", + * "Metadata": { + * "metadata1": "value1", + * "metadata2": "value2" + * } * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" + * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0" * } * *\/ - * // example id: to-upload-an-object-1481760101010 + * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757 * ``` * - * @example To upload an object and specify optional tags + * @example To upload an object * ```javascript - * // 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. + * // 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. * const input = { - * "Body": "c:\\HappyFace.jpg", + * "Body": "HappyFace.jpg", * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", - * "Tagging": "key1=value1&key2=value2" + * "Key": "HappyFace.jpg" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" + * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" * } * *\/ - * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955 + * // example id: to-upload-an-object-1481760101010 * ``` * * @example To upload an object and specify server-side encryption and object tags @@ -349,49 +352,46 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831 * ``` * - * @example To upload an object (specify optional headers) + * @example To upload an object and specify canned ACL. * ```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 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. * const input = { - * "Body": "HappyFace.jpg", + * "ACL": "authenticated-read", + * "Body": "filetoupload", * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", - * "ServerSideEncryption": "AES256", - * "StorageClass": "STANDARD_IA" + * "Key": "exampleobject" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "ServerSideEncryption": "AES256", - * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp" + * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr" * } * *\/ - * // example id: to-upload-an-object-(specify-optional-headers) + * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571 * ``` * - * @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) * ``` * */ diff --git a/clients/client-s3/src/commands/UploadPartCopyCommand.ts b/clients/client-s3/src/commands/UploadPartCopyCommand.ts index a330ba4d28b9..3ea96249be70 100644 --- a/clients/client-s3/src/commands/UploadPartCopyCommand.ts +++ b/clients/client-s3/src/commands/UploadPartCopyCommand.ts @@ -305,14 +305,15 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To upload a part by copying data from an existing object as data source + * @example To upload a part by copying byte range from an existing object as data source * ```javascript - * // The following example uploads a part of a multipart upload by copying data from an existing object as data source. + * // The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source. * const input = { * "Bucket": "examplebucket", * "CopySource": "/bucketname/sourceobjectkey", + * "CopySourceRange": "bytes=1-100000", * "Key": "examplelargeobject", - * "PartNumber": "1", + * "PartNumber": "2", * "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" * }; * const command = new UploadPartCopyCommand(input); @@ -320,23 +321,22 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met * /* response == * { * "CopyPartResult": { - * "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"", - * "LastModified": "2016-12-29T21:24:43.000Z" + * "ETag": "\"65d16d19e65a7508a51f043180edcc36\"", + * "LastModified": "2016-12-29T21:44:28.000Z" * } * } * *\/ - * // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348 + * // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594 * ``` * - * @example To upload a part by copying byte range from an existing object as data source + * @example To upload a part by copying data from an existing object as data source * ```javascript - * // The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source. + * // The following example uploads a part of a multipart upload by copying data from an existing object as data source. * const input = { * "Bucket": "examplebucket", * "CopySource": "/bucketname/sourceobjectkey", - * "CopySourceRange": "bytes=1-100000", * "Key": "examplelargeobject", - * "PartNumber": "2", + * "PartNumber": "1", * "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" * }; * const command = new UploadPartCopyCommand(input); @@ -344,12 +344,12 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met * /* response == * { * "CopyPartResult": { - * "ETag": "\"65d16d19e65a7508a51f043180edcc36\"", - * "LastModified": "2016-12-29T21:44:28.000Z" + * "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"", + * "LastModified": "2016-12-29T21:24:43.000Z" * } * } * *\/ - * // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594 + * // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348 * ``` * */