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.
This is the response object from the CopyObject operation.
Namespace: Amazon.S3.Model
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z
public class CopyObjectResponse : AmazonWebServiceResponse
The CopyObjectResponse type exposes the following members
| Name | Description | |
|---|---|---|
|
CopyObjectResponse() |
| Name | Type | Description | |
|---|---|---|---|
|
BucketKeyEnabled | System.Nullable<System.Boolean> |
Gets and sets the property BucketKeyEnabled. Indicates whether the copied object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS). |
|
ChecksumCRC32 | System.String |
Gets and sets the property ChecksumCRC32.
The Base64 encoded, 32-bit |
|
ChecksumCRC32C | System.String |
Gets and sets the property ChecksumCRC32C.
The Base64 encoded, 32-bit |
|
ChecksumCRC64NVME | System.String |
Gets and sets the property ChecksumCRC64NVME.
The Base64 encoded, 64-bit |
|
ChecksumSHA1 | System.String |
Gets and sets the property ChecksumSHA1.
The Base64 encoded, 160-bit |
|
ChecksumSHA256 | System.String |
Gets and sets the property ChecksumSHA256.
The Base64 encoded, 256-bit |
|
ChecksumType | Amazon.S3.ChecksumType |
Gets and sets the property ChecksumType. The checksum type that is used to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide. |
|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
|
ETag | System.String |
Gets and sets the property ETag. Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata. |
|
Expiration | Amazon.S3.Model.Expiration |
Gets and sets the property Expiration. If the object expiration is configured, the response includes this header.
Object expiration information is not returned in directory buckets and this header
returns the value " |
|
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
|
LastModified | System.String |
Gets and sets the property LastModified. Creation date of the object. |
|
RequestCharged | Amazon.S3.RequestCharged |
Gets and sets the property RequestCharged. |
|
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
|
ServerSideEncryptionCustomerMethod | Amazon.S3.ServerSideEncryptionCustomerMethod |
Gets and sets the property ServerSideEncryptionCustomerMethod. If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used. This functionality is not supported for directory buckets. |
|
ServerSideEncryptionCustomerProvidedKeyMD5 | System.String |
Gets and sets the property ServerSideEncryptionCustomerProvidedKeyMD5. If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key. This functionality is not supported for directory buckets. |
|
ServerSideEncryptionKeyManagementServiceEncryptionContext | System.String |
Gets and sets the property ServerSideEncryptionKeyManagementServiceEncryptionContext. If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption context key-value pairs. |
|
ServerSideEncryptionKeyManagementServiceKeyId | System.String |
Gets and sets the property ServerSideEncryptionKeyManagementServiceKeyId. If present, indicates the ID of the KMS key that was used for object encryption. |
|
ServerSideEncryptionMethod | Amazon.S3.ServerSideEncryptionMethod |
Gets and sets the property ServerSideEncryptionMethod. The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.
When accessing data stored in Amazon FSx file systems using S3 access points, the
only valid server side encryption option is |
|
SourceVersionId | System.String |
Gets and sets the property SourceVersionId. Version ID of the source object that was copied. This functionality is not supported when the source object is in a directory bucket. |
|
VersionId | System.String |
Gets and sets the property VersionId. Version ID of the newly created copy. This functionality is not supported for directory buckets. |
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 = "amzn-s3-demo-bucket",
SourceKey = "Item1",
DestinationBucket = "AnotherBucket",
DestinationKey = "Copy1",
CannedACL = S3CannedACL.PublicRead
};
// Issue request
await client.CopyObjectAsync(request);
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer