AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Namespace: Amazon.S3.Model
Assembly: AWSSDK.dll
Version: (assembly version)
public class CopyObjectResponse : AmazonWebServiceResponse
The CopyObjectResponse type exposes the following members
Name | Description | |
---|---|---|
CopyObjectResponse() |
Name | Type | Description | |
---|---|---|---|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
ETag | System.String | Gets and sets the ETag property. | |
Expiration | Amazon.S3.Model.Expiration | Gets and sets the Expiration property. Specifies the expiration date for the object and the rule governing the expiration. Is null if expiration is not applicable. | |
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
LastModified | System.String | Gets and sets the LastModified property. | |
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
ServerSideEncryptionKeyManagementServiceKeyId | System.String | The id of the AWS Key Management Service key that Amazon S3 uses to encrypt and decrypt the object. | |
ServerSideEncryptionMethod | Amazon.S3.ServerSideEncryptionMethod | The Server-side encryption algorithm used when storing this object in S3. | |
SourceVersionId | System.String | Gets and sets the SourceVersionId property. This is the Version Id of the Source Object |
This example shows how to copy an object from one bucket/key to a different bucket/key.
// Create a client AmazonS3Client client = new AmazonS3Client(); // Create a CopyObject request CopyObjectRequest request = new CopyObjectRequest { SourceBucket = "SampleBucket", SourceKey = "Item1", DestinationBucket = "AnotherBucket", DestinationKey = "Copy1", CannedACL = S3CannedACL.PublicRead }; // Issue request client.CopyObject(request);
.NET Framework:
Supported in: 4.5, 4.0, 3.5
.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8
.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8