diff --git a/clients/client-s3/src/commands/CopyObjectCommand.ts b/clients/client-s3/src/commands/CopyObjectCommand.ts index 43d8dd8e8168..ba9c3ec8db3a 100644 --- a/clients/client-s3/src/commands/CopyObjectCommand.ts +++ b/clients/client-s3/src/commands/CopyObjectCommand.ts @@ -75,7 +75,9 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea * body.

* *

The copy request charge is based on the storage class and Region that you specify for - * the destination object. For pricing information, see Amazon S3 pricing.

+ * the destination object. The request can also result in a data retrieval charge for the + * source if the source storage class bills for data retrieval. For pricing information, see + * Amazon S3 pricing.

* *

Amazon S3 transfer acceleration does not support cross-Region copies. If you request a * cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad diff --git a/clients/client-s3/src/commands/CreateBucketCommand.ts b/clients/client-s3/src/commands/CreateBucketCommand.ts index a39bafd1e810..023051726afb 100644 --- a/clients/client-s3/src/commands/CreateBucketCommand.ts +++ b/clients/client-s3/src/commands/CreateBucketCommand.ts @@ -132,7 +132,7 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat * ACL: "private" || "public-read" || "public-read-write" || "authenticated-read", * Bucket: "STRING_VALUE", // required * CreateBucketConfiguration: { // CreateBucketConfiguration - * LocationConstraint: "af-south-1" || "ap-east-1" || "ap-northeast-1" || "ap-northeast-2" || "ap-northeast-3" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-southeast-3" || "ca-central-1" || "cn-north-1" || "cn-northwest-1" || "EU" || "eu-central-1" || "eu-north-1" || "eu-south-1" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "me-south-1" || "sa-east-1" || "us-east-2" || "us-gov-east-1" || "us-gov-west-1" || "us-west-1" || "us-west-2", + * LocationConstraint: "af-south-1" || "ap-east-1" || "ap-northeast-1" || "ap-northeast-2" || "ap-northeast-3" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-southeast-3" || "ca-central-1" || "cn-north-1" || "cn-northwest-1" || "EU" || "eu-central-1" || "eu-north-1" || "eu-south-1" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "me-south-1" || "sa-east-1" || "us-east-2" || "us-gov-east-1" || "us-gov-west-1" || "us-west-1" || "us-west-2" || "ap-south-2" || "eu-south-2", * }, * GrantFullControl: "STRING_VALUE", * GrantRead: "STRING_VALUE", @@ -169,39 +169,39 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat * @throws {@link S3ServiceException} *

Base exception class for all service exceptions from S3 service.

* - * @example To create a bucket + * @example To create a bucket in a specific region * ```javascript - * // The following example creates a bucket. + * // The following example creates a bucket. The request specifies an AWS region where to create the bucket. * const input = { - * "Bucket": "examplebucket" + * "Bucket": "examplebucket", + * "CreateBucketConfiguration": { + * "LocationConstraint": "eu-west-1" + * } * }; * const command = new CreateBucketCommand(input); * const response = await client.send(command); * /* response == * { - * "Location": "/examplebucket" + * "Location": "http://examplebucket..s3.amazonaws.com/" * } * *\/ - * // example id: to-create-a-bucket--1472851826060 + * // example id: to-create-a-bucket-in-a-specific-region-1483399072992 * ``` * - * @example To create a bucket in a specific region + * @example To create a bucket * ```javascript - * // The following example creates a bucket. The request specifies an AWS region where to create the bucket. + * // The following example creates a bucket. * const input = { - * "Bucket": "examplebucket", - * "CreateBucketConfiguration": { - * "LocationConstraint": "eu-west-1" - * } + * "Bucket": "examplebucket" * }; * const command = new CreateBucketCommand(input); * const response = await client.send(command); * /* response == * { - * "Location": "http://examplebucket..s3.amazonaws.com/" + * "Location": "/examplebucket" * } * *\/ - * // example id: to-create-a-bucket-in-a-specific-region-1483399072992 + * // example id: to-create-a-bucket--1472851826060 * ``` * */ diff --git a/clients/client-s3/src/commands/DeleteObjectCommand.ts b/clients/client-s3/src/commands/DeleteObjectCommand.ts index 18c8e523bb9e..9a31f6b746dc 100644 --- a/clients/client-s3/src/commands/DeleteObjectCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectCommand.ts @@ -96,28 +96,28 @@ export interface DeleteObjectCommandOutput extends DeleteObjectOutput, __Metadat * @throws {@link S3ServiceException} *

Base exception class for all service exceptions from S3 service.

* - * @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/DeleteObjectTaggingCommand.ts b/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts index 7fdad0f742c6..eb0ee3f6abf2 100644 --- a/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts @@ -85,39 +85,39 @@ export interface DeleteObjectTaggingCommandOutput extends DeleteObjectTaggingOut * @throws {@link S3ServiceException} *

Base exception class for all service exceptions from S3 service.

* - * @example To remove tag set from an object version + * @example To remove tag set from an object * ```javascript - * // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version. + * // 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. * const input = { * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "Key": "HappyFace.jpg" * }; * const command = new DeleteObjectTaggingCommand(input); * const response = await client.send(command); * /* response == * { - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "VersionId": "null" * } * *\/ - * // example id: to-remove-tag-set-from-an-object-version-1483145285913 + * // example id: to-remove-tag-set-from-an-object-1483145342862 * ``` * - * @example To remove tag set from an object + * @example To remove tag set from an object version * ```javascript - * // 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. + * // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version. * const input = { * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * "Key": "HappyFace.jpg", + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * }; * const command = new DeleteObjectTaggingCommand(input); * const response = await client.send(command); * /* response == * { - * "VersionId": "null" + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * } * *\/ - * // example id: to-remove-tag-set-from-an-object-1483145342862 + * // example id: to-remove-tag-set-from-an-object-version-1483145285913 * ``` * */ diff --git a/clients/client-s3/src/commands/GetBucketInventoryConfigurationCommand.ts b/clients/client-s3/src/commands/GetBucketInventoryConfigurationCommand.ts index d9fbfc54d40c..cf5b99348fc5 100644 --- a/clients/client-s3/src/commands/GetBucketInventoryConfigurationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketInventoryConfigurationCommand.ts @@ -108,7 +108,7 @@ export interface GetBucketInventoryConfigurationCommandOutput * // Id: "STRING_VALUE", // required * // IncludedObjectVersions: "All" || "Current", // required * // OptionalFields: [ // InventoryOptionalFields - * // "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm", + * // "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm" || "ObjectAccessControlList" || "ObjectOwner", * // ], * // Schedule: { // InventorySchedule * // Frequency: "Daily" || "Weekly", // required diff --git a/clients/client-s3/src/commands/GetBucketLocationCommand.ts b/clients/client-s3/src/commands/GetBucketLocationCommand.ts index f3560fa269cc..60d39836f81b 100644 --- a/clients/client-s3/src/commands/GetBucketLocationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketLocationCommand.ts @@ -75,7 +75,7 @@ export interface GetBucketLocationCommandOutput extends GetBucketLocationOutput, * const command = new GetBucketLocationCommand(input); * const response = await client.send(command); * // { // GetBucketLocationOutput - * // LocationConstraint: "af-south-1" || "ap-east-1" || "ap-northeast-1" || "ap-northeast-2" || "ap-northeast-3" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-southeast-3" || "ca-central-1" || "cn-north-1" || "cn-northwest-1" || "EU" || "eu-central-1" || "eu-north-1" || "eu-south-1" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "me-south-1" || "sa-east-1" || "us-east-2" || "us-gov-east-1" || "us-gov-west-1" || "us-west-1" || "us-west-2", + * // LocationConstraint: "af-south-1" || "ap-east-1" || "ap-northeast-1" || "ap-northeast-2" || "ap-northeast-3" || "ap-south-1" || "ap-southeast-1" || "ap-southeast-2" || "ap-southeast-3" || "ca-central-1" || "cn-north-1" || "cn-northwest-1" || "EU" || "eu-central-1" || "eu-north-1" || "eu-south-1" || "eu-west-1" || "eu-west-2" || "eu-west-3" || "me-south-1" || "sa-east-1" || "us-east-2" || "us-gov-east-1" || "us-gov-west-1" || "us-west-1" || "us-west-2" || "ap-south-2" || "eu-south-2", * // }; * * ``` diff --git a/clients/client-s3/src/commands/ListBucketInventoryConfigurationsCommand.ts b/clients/client-s3/src/commands/ListBucketInventoryConfigurationsCommand.ts index 320fe4ac8247..d200b9636a7c 100644 --- a/clients/client-s3/src/commands/ListBucketInventoryConfigurationsCommand.ts +++ b/clients/client-s3/src/commands/ListBucketInventoryConfigurationsCommand.ts @@ -118,7 +118,7 @@ export interface ListBucketInventoryConfigurationsCommandOutput * // Id: "STRING_VALUE", // required * // IncludedObjectVersions: "All" || "Current", // required * // OptionalFields: [ // InventoryOptionalFields - * // "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm", + * // "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm" || "ObjectAccessControlList" || "ObjectOwner", * // ], * // Schedule: { // InventorySchedule * // Frequency: "Daily" || "Weekly", // required diff --git a/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts index 55af300efd93..ca6130fd1b28 100644 --- a/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts @@ -157,7 +157,7 @@ export interface PutBucketInventoryConfigurationCommandOutput extends __Metadata * Id: "STRING_VALUE", // required * IncludedObjectVersions: "All" || "Current", // required * OptionalFields: [ // InventoryOptionalFields - * "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm", + * "Size" || "LastModifiedDate" || "StorageClass" || "ETag" || "IsMultipartUploaded" || "ReplicationStatus" || "EncryptionStatus" || "ObjectLockRetainUntilDate" || "ObjectLockMode" || "ObjectLockLegalHoldStatus" || "IntelligentTieringAccessTier" || "BucketKeyStatus" || "ChecksumAlgorithm" || "ObjectAccessControlList" || "ObjectOwner", * ], * Schedule: { // InventorySchedule * Frequency: "Daily" || "Weekly", // required diff --git a/clients/client-s3/src/commands/PutObjectCommand.ts b/clients/client-s3/src/commands/PutObjectCommand.ts index 23b320ae9cad..9576a14b5352 100644 --- a/clients/client-s3/src/commands/PutObjectCommand.ts +++ b/clients/client-s3/src/commands/PutObjectCommand.ts @@ -218,68 +218,65 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * @throws {@link S3ServiceException} *

Base exception class for all service exceptions from S3 service.

* - * @example To upload object and specify user-defined metadata + * @example To create an object. * ```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 creates an object. If the bucket is versioning enabled, S3 returns version ID in response. * const input = { * "Body": "filetoupload", * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "Metadata": { - * "metadata1": "value1", - * "metadata2": "value2" - * } + * "Key": "objectkey" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0" + * "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ" * } * *\/ - * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757 + * // example id: to-create-an-object-1483147613675 * ``` * - * @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 create an object. + * @example To upload an object * ```javascript - * // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response. + * // 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": "filetoupload", + * "Body": "HappyFace.jpg", * "Bucket": "examplebucket", - * "Key": "objectkey" + * "Key": "HappyFace.jpg" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ" + * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" * } * *\/ - * // example id: to-create-an-object-1483147613675 + * // example id: to-upload-an-object-1481760101010 * ``` * * @example To upload an object and specify canned ACL. @@ -302,33 +299,35 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571 * ``` * - * @example To upload an object + * @example To upload an object (specify optional headers) * ```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 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": "HappyFace.jpg", * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * "Key": "HappyFace.jpg", + * "ServerSideEncryption": "AES256", + * "StorageClass": "STANDARD_IA" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" + * "ServerSideEncryption": "AES256", + * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp" * } * *\/ - * // example id: to-upload-an-object-1481760101010 + * // example id: to-upload-an-object-(specify-optional-headers) * ``` * - * @example To upload an object and specify server-side encryption and object tags + * @example To upload an object and specify optional tags * ```javascript - * // 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. + * // 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 = { - * "Body": "filetoupload", + * "Body": "c:\\HappyFace.jpg", * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "ServerSideEncryption": "AES256", + * "Key": "HappyFace.jpg", * "Tagging": "key1=value1&key2=value2" * }; * const command = new PutObjectCommand(input); @@ -336,20 +335,20 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "ServerSideEncryption": "AES256", - * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" + * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" * } * *\/ - * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831 + * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955 * ``` * - * @example To upload an object and specify optional tags + * @example To upload an object and specify server-side encryption and object tags * ```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. 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. * const input = { - * "Body": "c:\\HappyFace.jpg", + * "Body": "filetoupload", * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", + * "Key": "exampleobject", + * "ServerSideEncryption": "AES256", * "Tagging": "key1=value1&key2=value2" * }; * const command = new PutObjectCommand(input); @@ -357,10 +356,11 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" + * "ServerSideEncryption": "AES256", + * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" * } * *\/ - * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955 + * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831 * ``` * */ diff --git a/clients/client-s3/src/commands/UploadPartCopyCommand.ts b/clients/client-s3/src/commands/UploadPartCopyCommand.ts index 9a049626e3be..abb0f9b95403 100644 --- a/clients/client-s3/src/commands/UploadPartCopyCommand.ts +++ b/clients/client-s3/src/commands/UploadPartCopyCommand.ts @@ -270,14 +270,15 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met * @throws {@link S3ServiceException} *

Base exception class for all service exceptions from S3 service.

* - * @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); @@ -285,23 +286,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); @@ -309,12 +309,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 * ``` * */ diff --git a/clients/client-s3/src/models/models_0.ts b/clients/client-s3/src/models/models_0.ts index 996d3f01b930..2ebeb73f160b 100644 --- a/clients/client-s3/src/models/models_0.ts +++ b/clients/client-s3/src/models/models_0.ts @@ -1233,6 +1233,7 @@ export const BucketLocationConstraint = { ap_northeast_2: "ap-northeast-2", ap_northeast_3: "ap-northeast-3", ap_south_1: "ap-south-1", + ap_south_2: "ap-south-2", ap_southeast_1: "ap-southeast-1", ap_southeast_2: "ap-southeast-2", ap_southeast_3: "ap-southeast-3", @@ -1242,6 +1243,7 @@ export const BucketLocationConstraint = { eu_central_1: "eu-central-1", eu_north_1: "eu-north-1", eu_south_1: "eu-south-1", + eu_south_2: "eu-south-2", eu_west_1: "eu-west-1", eu_west_2: "eu-west-2", eu_west_3: "eu-west-3", @@ -4874,9 +4876,11 @@ export const InventoryOptionalField = { IntelligentTieringAccessTier: "IntelligentTieringAccessTier", IsMultipartUploaded: "IsMultipartUploaded", LastModifiedDate: "LastModifiedDate", + ObjectAccessControlList: "ObjectAccessControlList", ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus", ObjectLockMode: "ObjectLockMode", ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate", + ObjectOwner: "ObjectOwner", ReplicationStatus: "ReplicationStatus", Size: "Size", StorageClass: "StorageClass", diff --git a/codegen/sdk-codegen/aws-models/s3.json b/codegen/sdk-codegen/aws-models/s3.json index afaf8819719e..5c890ad98de4 100644 --- a/codegen/sdk-codegen/aws-models/s3.json +++ b/codegen/sdk-codegen/aws-models/s3.json @@ -21051,6 +21051,18 @@ "traits": { "smithy.api#enumValue": "us-west-2" } + }, + "ap_south_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-south-2" + } + }, + "eu_south_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-south-2" + } } } }, @@ -21809,7 +21821,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a copy of an object that is already stored in Amazon S3.

\n \n

You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your\n object up to 5 GB in size in a single atomic action using this API. However, to copy an\n object greater than 5 GB, you must use the multipart upload Upload Part - Copy\n (UploadPartCopy) API. For more information, see Copy Object Using the\n REST Multipart Upload API.

\n
\n

All copy requests must be authenticated. Additionally, you must have\n read access to the source object and write\n access to the destination bucket. For more information, see REST Authentication. Both the\n Region that you want to copy the object from and the Region that you want to copy the\n object to must be enabled for your account.

\n

A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3\n is copying the files. If the error occurs before the copy action starts, you receive a\n standard Amazon S3 error. If the error occurs during the copy operation, the error response is\n embedded in the 200 OK response. This means that a 200 OK\n response can contain either a success or an error. If you call the S3 API directly, make\n sure to design your application to parse the contents of the response and handle it\n appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the\n embedded error and apply error handling per your configuration settings (including\n automatically retrying the request as appropriate). If the condition persists, the SDKs\n throws an exception (or, for the SDKs that don't use exceptions, they return the\n error).

\n

If the copy is successful, you receive a response with information about the copied\n object.

\n \n

If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not,\n it would not contain the content-length, and you would need to read the entire\n body.

\n
\n

The copy request charge is based on the storage class and Region that you specify for\n the destination object. For pricing information, see Amazon S3 pricing.

\n \n

Amazon S3 transfer acceleration does not support cross-Region copies. If you request a\n cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad\n Request error. For more information, see Transfer\n Acceleration.

\n
\n
\n
Metadata
\n
\n

When copying an object, you can preserve all metadata (the default) or specify new metadata.\n However, the access control list (ACL) is not preserved and is set to private for the user making the request. To\n override the default ACL setting, specify a new ACL when generating a copy request. For\n more information, see Using ACLs.

\n

To specify whether you want the object metadata copied from the source object or\n replaced with metadata provided in the request, you can optionally add the\n x-amz-metadata-directive header. When you grant permissions, you can use\n the s3:x-amz-metadata-directive condition key to enforce certain metadata\n behavior when objects are uploaded. For more information, see Specifying Conditions in a\n Policy in the Amazon S3 User Guide. For a complete list of\n Amazon S3-specific condition keys, see Actions, Resources, and Condition Keys for\n Amazon S3.

\n \n

\n x-amz-website-redirect-location is unique to each object and must be\n specified in the request headers to copy the value.

\n
\n
\n
x-amz-copy-source-if Headers
\n
\n

To only copy an object under certain conditions, such as whether the Etag\n matches or whether the object was modified before or after a specified date, use the\n following request parameters:

\n
    \n
  • \n

    \n x-amz-copy-source-if-match\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-none-match\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-unmodified-since\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-modified-since\n

    \n
  • \n
\n

If both the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request\n and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

\n
    \n
  • \n

    \n x-amz-copy-source-if-match condition evaluates to true

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-unmodified-since condition evaluates to\n false

    \n
  • \n
\n

If both the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request and\n evaluate as follows, Amazon S3 returns the 412 Precondition Failed response\n code:

\n
    \n
  • \n

    \n x-amz-copy-source-if-none-match condition evaluates to false

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-modified-since condition evaluates to\n true

    \n
  • \n
\n \n

All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed.

\n
\n
\n
Server-side encryption
\n
\n

Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When\n copying an object, if you don't specify encryption information in your copy\n request, the encryption setting of the target object is set to the default\n encryption configuration of the destination bucket. By default, all buckets have a\n base level of encryption configuration that uses server-side encryption with Amazon S3\n managed keys (SSE-S3). If the destination bucket has a default encryption\n configuration that uses server-side encryption with Key Management Service (KMS) keys\n (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or\n server-side encryption with customer-provided encryption keys (SSE-C), Amazon S3 uses\n the corresponding KMS key, or a customer-provided key to encrypt the target\n object copy.

\n

When you perform a CopyObject operation, if you want to use a different type\n of encryption setting for the target object, you can use other appropriate\n encryption-related headers to encrypt the target object with a KMS key, an Amazon S3 managed\n key, or a customer-provided key. With server-side encryption, Amazon S3 encrypts your data as it\n writes your data to disks in its data centers and decrypts the data when you access it. If the\n encryption setting in your request is different from the default encryption configuration\n of the destination bucket, the encryption setting in your request takes precedence. If the\n source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary\n encryption information in your request so that Amazon S3 can decrypt the object for copying. For\n more information about server-side encryption, see Using Server-Side\n Encryption.

\n

If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the\n object. For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.

\n
\n
Access Control List (ACL)-Specific Request\n Headers
\n
\n

When copying an object, you can optionally use headers to grant ACL-based permissions.\n By default, all objects are private. Only the owner has full access control. When adding a\n new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups\n that are defined by Amazon S3. These permissions are then added to the ACL on the object. For more\n information, see Access Control List (ACL) Overview and Managing ACLs Using the REST\n API.

\n

If the bucket that you're copying objects to uses the bucket owner enforced setting for\n S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use\n this setting only accept PUT requests that don't specify an ACL or PUT requests that\n specify bucket owner full control ACLs, such as the bucket-owner-full-control\n canned ACL or an equivalent form of this ACL expressed in the XML format.

\n

For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n

If your bucket uses the bucket owner enforced setting for Object Ownership, all\n objects written to the bucket by any account will be owned by the bucket owner.

\n
\n
\n
Checksums
\n
\n

When copying an object, if it has a checksum, that checksum will be copied to the new\n object by default. When you copy the object over, you can optionally specify a different\n checksum algorithm to use with the x-amz-checksum-algorithm header.

\n
\n
Storage Class Options
\n
\n

You can use the CopyObject action to change the storage class of an object\n that is already stored in Amazon S3 by using the StorageClass parameter. For more\n information, see Storage Classes in the\n Amazon S3 User Guide.

\n

If the source object's storage class is GLACIER, you must restore a copy of\n this object before you can use it as a source object for the copy operation. For\n more information, see RestoreObject. For\n more information, see Copying\n Objects.

\n
\n
Versioning
\n
\n

By default, x-amz-copy-source header identifies the current version of an object\n to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was\n deleted. To copy a different version, use the versionId subresource.

\n

If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for\n the object being copied. This version ID is different from the version ID of the source\n object. Amazon S3 returns the version ID of the copied object in the\n x-amz-version-id response header in the response.

\n

If you do not enable versioning or suspend it on the target bucket, the version ID that\n Amazon S3 generates is always null.

\n
\n
\n

The following operations are related to CopyObject:

\n ", + "smithy.api#documentation": "

Creates a copy of an object that is already stored in Amazon S3.

\n \n

You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your\n object up to 5 GB in size in a single atomic action using this API. However, to copy an\n object greater than 5 GB, you must use the multipart upload Upload Part - Copy\n (UploadPartCopy) API. For more information, see Copy Object Using the\n REST Multipart Upload API.

\n
\n

All copy requests must be authenticated. Additionally, you must have\n read access to the source object and write\n access to the destination bucket. For more information, see REST Authentication. Both the\n Region that you want to copy the object from and the Region that you want to copy the\n object to must be enabled for your account.

\n

A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3\n is copying the files. If the error occurs before the copy action starts, you receive a\n standard Amazon S3 error. If the error occurs during the copy operation, the error response is\n embedded in the 200 OK response. This means that a 200 OK\n response can contain either a success or an error. If you call the S3 API directly, make\n sure to design your application to parse the contents of the response and handle it\n appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the\n embedded error and apply error handling per your configuration settings (including\n automatically retrying the request as appropriate). If the condition persists, the SDKs\n throws an exception (or, for the SDKs that don't use exceptions, they return the\n error).

\n

If the copy is successful, you receive a response with information about the copied\n object.

\n \n

If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not,\n it would not contain the content-length, and you would need to read the entire\n body.

\n
\n

The copy request charge is based on the storage class and Region that you specify for\n the destination object. The request can also result in a data retrieval charge for the\n source if the source storage class bills for data retrieval. For pricing information, see\n Amazon S3 pricing.

\n \n

Amazon S3 transfer acceleration does not support cross-Region copies. If you request a\n cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad\n Request error. For more information, see Transfer\n Acceleration.

\n
\n
\n
Metadata
\n
\n

When copying an object, you can preserve all metadata (the default) or specify new metadata.\n However, the access control list (ACL) is not preserved and is set to private for the user making the request. To\n override the default ACL setting, specify a new ACL when generating a copy request. For\n more information, see Using ACLs.

\n

To specify whether you want the object metadata copied from the source object or\n replaced with metadata provided in the request, you can optionally add the\n x-amz-metadata-directive header. When you grant permissions, you can use\n the s3:x-amz-metadata-directive condition key to enforce certain metadata\n behavior when objects are uploaded. For more information, see Specifying Conditions in a\n Policy in the Amazon S3 User Guide. For a complete list of\n Amazon S3-specific condition keys, see Actions, Resources, and Condition Keys for\n Amazon S3.

\n \n

\n x-amz-website-redirect-location is unique to each object and must be\n specified in the request headers to copy the value.

\n
\n
\n
x-amz-copy-source-if Headers
\n
\n

To only copy an object under certain conditions, such as whether the Etag\n matches or whether the object was modified before or after a specified date, use the\n following request parameters:

\n
    \n
  • \n

    \n x-amz-copy-source-if-match\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-none-match\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-unmodified-since\n

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-modified-since\n

    \n
  • \n
\n

If both the x-amz-copy-source-if-match and\n x-amz-copy-source-if-unmodified-since headers are present in the request\n and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

\n
    \n
  • \n

    \n x-amz-copy-source-if-match condition evaluates to true

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-unmodified-since condition evaluates to\n false

    \n
  • \n
\n

If both the x-amz-copy-source-if-none-match and\n x-amz-copy-source-if-modified-since headers are present in the request and\n evaluate as follows, Amazon S3 returns the 412 Precondition Failed response\n code:

\n
    \n
  • \n

    \n x-amz-copy-source-if-none-match condition evaluates to false

    \n
  • \n
  • \n

    \n x-amz-copy-source-if-modified-since condition evaluates to\n true

    \n
  • \n
\n \n

All headers with the x-amz- prefix, including\n x-amz-copy-source, must be signed.

\n
\n
\n
Server-side encryption
\n
\n

Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When\n copying an object, if you don't specify encryption information in your copy\n request, the encryption setting of the target object is set to the default\n encryption configuration of the destination bucket. By default, all buckets have a\n base level of encryption configuration that uses server-side encryption with Amazon S3\n managed keys (SSE-S3). If the destination bucket has a default encryption\n configuration that uses server-side encryption with Key Management Service (KMS) keys\n (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or\n server-side encryption with customer-provided encryption keys (SSE-C), Amazon S3 uses\n the corresponding KMS key, or a customer-provided key to encrypt the target\n object copy.

\n

When you perform a CopyObject operation, if you want to use a different type\n of encryption setting for the target object, you can use other appropriate\n encryption-related headers to encrypt the target object with a KMS key, an Amazon S3 managed\n key, or a customer-provided key. With server-side encryption, Amazon S3 encrypts your data as it\n writes your data to disks in its data centers and decrypts the data when you access it. If the\n encryption setting in your request is different from the default encryption configuration\n of the destination bucket, the encryption setting in your request takes precedence. If the\n source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary\n encryption information in your request so that Amazon S3 can decrypt the object for copying. For\n more information about server-side encryption, see Using Server-Side\n Encryption.

\n

If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the\n object. For more information, see Amazon S3 Bucket Keys in the\n Amazon S3 User Guide.

\n
\n
Access Control List (ACL)-Specific Request\n Headers
\n
\n

When copying an object, you can optionally use headers to grant ACL-based permissions.\n By default, all objects are private. Only the owner has full access control. When adding a\n new object, you can grant permissions to individual Amazon Web Services accounts or to predefined groups\n that are defined by Amazon S3. These permissions are then added to the ACL on the object. For more\n information, see Access Control List (ACL) Overview and Managing ACLs Using the REST\n API.

\n

If the bucket that you're copying objects to uses the bucket owner enforced setting for\n S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use\n this setting only accept PUT requests that don't specify an ACL or PUT requests that\n specify bucket owner full control ACLs, such as the bucket-owner-full-control\n canned ACL or an equivalent form of this ACL expressed in the XML format.

\n

For more information, see Controlling ownership of\n objects and disabling ACLs in the Amazon S3 User Guide.

\n \n

If your bucket uses the bucket owner enforced setting for Object Ownership, all\n objects written to the bucket by any account will be owned by the bucket owner.

\n
\n
\n
Checksums
\n
\n

When copying an object, if it has a checksum, that checksum will be copied to the new\n object by default. When you copy the object over, you can optionally specify a different\n checksum algorithm to use with the x-amz-checksum-algorithm header.

\n
\n
Storage Class Options
\n
\n

You can use the CopyObject action to change the storage class of an object\n that is already stored in Amazon S3 by using the StorageClass parameter. For more\n information, see Storage Classes in the\n Amazon S3 User Guide.

\n

If the source object's storage class is GLACIER, you must restore a copy of\n this object before you can use it as a source object for the copy operation. For\n more information, see RestoreObject. For\n more information, see Copying\n Objects.

\n
\n
Versioning
\n
\n

By default, x-amz-copy-source header identifies the current version of an object\n to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was\n deleted. To copy a different version, use the versionId subresource.

\n

If you enable versioning on the target bucket, Amazon S3 generates a unique version ID for\n the object being copied. This version ID is different from the version ID of the source\n object. Amazon S3 returns the version ID of the copied object in the\n x-amz-version-id response header in the response.

\n

If you do not enable versioning or suspend it on the target bucket, the version ID that\n Amazon S3 generates is always null.

\n
\n
\n

The following operations are related to CopyObject:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/{Bucket}/{Key+}?x-id=CopyObject", @@ -28012,6 +28024,18 @@ "traits": { "smithy.api#enumValue": "ChecksumAlgorithm" } + }, + "ObjectAccessControlList": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectAccessControlList" + } + }, + "ObjectOwner": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ObjectOwner" + } } } },