AWS SDK for .NET Documentation
CopyTo Method (newBucket, newKey, overwrite)
AmazonAmazon.S3.IOS3FileInfoCopyTo(String, String, Boolean) Did this page help you?   Yes   No    Tell us about it...
Copies this file's content to the file indicated by the S3 bucket and object key. If the file already exists in S3 and overwrite is set to false than an ArgumentException is thrown.
Declaration Syntax
C#
public S3FileInfo CopyTo(
	string newBucket,
	string newKey,
	bool overwrite
)
Parameters
newBucket (String)
S3 bucket to copy the file to.
newKey (String)
S3 object key to copy the file to.
overwrite (Boolean)
Determines whether the file can be overwritten.
Return Value
S3FileInfo of the newly copied file.
Exceptions
ExceptionCondition
IOExceptionIf the file already exists in S3 and overwrite is set to false.
ArgumentException
WebException
AmazonS3Exception

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)