CopyObjectResponse Class

.NET Framework 4.5
 
 
 
Did this page help you?  Yes  No   Tell us about it...
Returns information about the CopyObject response and response metadata.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.S3.Model.CopyObjectResponse

Namespace: Amazon.S3.Model
Assembly: AWSSDK.dll
Version: 2.0.0.3

Syntax

C#
public class CopyObjectResponse : AmazonWebServiceResponse

The CopyObjectResponse type exposes the following members

Constructors

  Name Description
Public Method CopyObjectResponse()

Properties

  Name Description
Public Property ContentLength Returns the content length of the HTTP response.
Public Property ETag Gets and sets the ETag property.
Public Property 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.
Public Property HttpStatusCode Returns the status code of the HTTP response.
Public Property LastModified Gets and sets the LastModified property.
Public Property ResponseMetadata Contains additional information about the request, such as the Request Id.
Public Property ServerSideEncryptionMethod The Server-side encryption algorithm used when storing this object in S3.
Public Property SourceVersionId Gets and sets the SourceVersionId property. This is the Version Id of the Source Object

Examples

This example shows how to copy an object from one bucket/key to a different bucket/key.

CopyObject sample


// 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);

                

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

.NET for Windows Store apps:
Supported in: Windows 8

.NET for Windows Phone:
Supported in: Window Phone 8