Class CopyPartRequest
Container for the parameters to the CopyPart operation.
Uploads a part by copying data from an existing object as data source.
public class CopyPartRequest : AmazonWebServiceRequest
- Inheritance
-
CopyPartRequest
Constructors
CopyPartRequest()
public CopyPartRequest()
Properties
CopySourceServerSideEncryptionCustomerMethod
The Server-side encryption algorithm to be used with the customer provided key.
public ServerSideEncryptionCustomerMethod CopySourceServerSideEncryptionCustomerMethod { get; set; }
Property Value
CopySourceServerSideEncryptionCustomerProvidedKey
The customer provided encryption key for the source object of the copy.
Important: Amazon S3 does not store the encryption key you provide.
public string CopySourceServerSideEncryptionCustomerProvidedKey { get; set; }
Property Value
CopySourceServerSideEncryptionCustomerProvidedKeyMD5
The MD5 of the customer encryption key specified in the CopySourceServerSideEncryptionCustomerProvidedKey property. The MD5 is base 64 encoded. This field is optional, the SDK will calculate the MD5 if this is not set.
public string CopySourceServerSideEncryptionCustomerProvidedKeyMD5 { get; set; }
Property Value
DestinationBucket
The name of the bucket to contain the copy of the source object.
When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this operation with an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using Access Points in the Amazon Simple Storage Service Developer Guide.
When using this API with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this operation using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon Simple Storage Service Developer Guide.
public string DestinationBucket { get; set; }
Property Value
DestinationKey
The key to be given to the copy of the source object.
public string DestinationKey { get; set; }
Property Value
Remarks
This property will be used as part of the resource path of the HTTP request. In .NET the System.Uri class is used to construct the uri for the request. The System.Uri class will canonicalize the uri string by compacting characters like "..". /// For example an object key of "foo/../bar/file.txt" will be transformed into "bar/file.txt" because the ".." is interpreted as use parent directory. For further information view the documentation for the Uri class: https://docs.microsoft.com/en-us/dotnet/api/system.uri
ETagToMatch
Collection of ETags to be matched as a pre-condition for copying the source object otherwise returns a PreconditionFailed.
public List<string> ETagToMatch { get; set; }
Property Value
Remarks
Copies the object if its entity tag (ETag) matches one of the specified tags; otherwise return a 412 (precondition failed). Constraints: This property can be used with IfUnmodifiedSince, but cannot be used with other conditional copy properties.
ETagsToNotMatch
Collection of ETags that must not be matched as a pre-condition for copying the source object otherwise returns a PreconditionFailed.
public List<string> ETagsToNotMatch { get; set; }
Property Value
Remarks
Copies the object if its entity tag (ETag) does not match any of the specified tags; otherwise returns a 412 (failed condition). Constraints: This header can be used with IfModifiedSince, but cannot be used with other conditional copy properties.
ExpectedBucketOwner
The account id of the expected destination bucket owner. If the destination bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
public string ExpectedBucketOwner { get; set; }
Property Value
ExpectedSourceBucketOwner
The account id of the expected source bucket owner. If the source bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
public string ExpectedSourceBucketOwner { get; set; }
Property Value
FirstByte
The location of the first byte in the range if only a portion of the source object is to be copied as the part.
public long FirstByte { get; set; }
Property Value
Remarks
The LastByte property must also be set or this value will be ignored.
LastByte
The location of the last byte in the range if only a portion of the source object is to be copied as the part.
public long LastByte { get; set; }
Property Value
Remarks
The FirstByte property must also be set or this value will be ignored.
ModifiedSinceDate
Copies the object if it has been modified since the specified time, otherwise returns a PreconditionFailed.
public DateTime ModifiedSinceDate { get; set; }
Property Value
Remarks
Copies the object if it has been modified since the specified time; otherwise returns a 412 (failed condition). Constraints: This property can be used with ETagToNotMatch, but cannot be used with other conditional copy properties.
PartNumber
The number of the part to be copied.
public int PartNumber { get; set; }
Property Value
Remarks
Valid part numbers are from 1 to 10,000 inclusive and will uniquely identify the part and determine the relative ordering within the destination object. If a part already exists with the PartNumber it will be overwritten.
ServerSideEncryptionCustomerMethod
The Server-side encryption algorithm to be used with the customer provided key.
public ServerSideEncryptionCustomerMethod ServerSideEncryptionCustomerMethod { get; set; }
Property Value
ServerSideEncryptionCustomerProvidedKey
The base64-encoded encryption key for Amazon S3 to use to encrypt the object
Using the encryption key you provide as part of your request Amazon S3 manages both the encryption, as it writes to disks, and decryption, when you access your objects. Therefore, you don't need to maintain any data encryption code. The only thing you do is manage the encryption keys you provide.
When you retrieve an object, you must provide the same encryption key as part of your request. Amazon S3 first verifies the encryption key you provided matches, and then decrypts the object before returning the object data to you.
Important: Amazon S3 does not store the encryption key you provide.
public string ServerSideEncryptionCustomerProvidedKey { get; set; }
Property Value
ServerSideEncryptionCustomerProvidedKeyMD5
The MD5 of the customer encryption key specified in the ServerSideEncryptionCustomerProvidedKey property. The MD5 is base 64 encoded. This field is optional, the SDK will calculate the MD5 if this is not set.
public string ServerSideEncryptionCustomerProvidedKeyMD5 { get; set; }
Property Value
ServerSideEncryptionKeyManagementServiceKeyId
This property is obsolete. Use ServerSideEncryptionKeyManagementServiceKeyId in InitiateMultipartUploadRequest instead.
[Obsolete("Use ServerSideEncryptionKeyManagementServiceKeyId in InitiateMultipartUploadRequest instead.")]
public string ServerSideEncryptionKeyManagementServiceKeyId { get; set; }
Property Value
ServerSideEncryptionMethod
This property is obsolete. Use ServerSideEncryptionMethod in InitiateMultipartUploadRequest instead.
Default: None
[Obsolete("Use ServerSideEncryptionMethod in InitiateMultipartUploadRequest instead.")]
public ServerSideEncryptionMethod ServerSideEncryptionMethod { get; set; }
Property Value
SourceBucket
The name of the bucket containing the object to copy.
public string SourceBucket { get; set; }
Property Value
SourceKey
The key of the object to copy.
public string SourceKey { get; set; }
Property Value
Remarks
This property will be used as part of the resource path of the HTTP request. In .NET the System.Uri class is used to construct the uri for the request. The System.Uri class will canonicalize the uri string by compacting characters like "..". /// For example an object key of "foo/../bar/file.txt" will be transformed into "bar/file.txt" because the ".." is interpreted as use parent directory. For further information view the documentation for the Uri class: https://docs.microsoft.com/en-us/dotnet/api/system.uri
SourceVersionId
Specifies a particular version of the source object to copy. By default the latest version is copied.
public string SourceVersionId { get; set; }
Property Value
UnmodifiedSinceDate
Copies the object if it has not been modified since the specified time, otherwise returns a PreconditionFailed.
public DateTime UnmodifiedSinceDate { get; set; }
Property Value
Remarks
Copies the object if it hasn't been modified since the specified time; otherwise returns a 412 (precondition failed). Constraints: This property can be used with ETagToMatch, but cannot be used with other conditional copy properties.
UploadId
The ID identifying multipart upload for which we are copying a part.
public string UploadId { get; set; }