com.amazonaws.services.s3
Class AmazonS3EncryptionClient

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceClient
      extended by com.amazonaws.services.s3.AmazonS3Client
          extended by com.amazonaws.services.s3.AmazonS3EncryptionClient
All Implemented Interfaces:
AmazonS3

public class AmazonS3EncryptionClient
extends AmazonS3Client

The AmazonS3Encryption class extends the Amazon S3 Client, allowing you to store data securely in S3.

The encryption materials specified in the constructor will be used to encrypt and decrypt data.


Constructor Summary
AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterials encryptionMaterials)
           Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3.
AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterials encryptionMaterials, ClientConfiguration clientConfig, CryptoConfiguration cryptoConfig)
           Constructs a new Amazon S3 Encryption client using the specified AWS credentials and client configuration to access Amazon S3.
AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterials encryptionMaterials, CryptoConfiguration cryptoConfig)
           Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3.
AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterialsProvider encryptionMaterialsProvider)
           Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3.
AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterialsProvider encryptionMaterialsProvider, ClientConfiguration clientConfig, CryptoConfiguration cryptoConfig)
           
AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterialsProvider encryptionMaterialsProvider, CryptoConfiguration cryptoConfig)
           Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3.
AmazonS3EncryptionClient(AWSCredentialsProvider credentialsProvider, EncryptionMaterialsProvider encryptionMaterialsProvider)
           Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3.
AmazonS3EncryptionClient(AWSCredentialsProvider credentialsProvider, EncryptionMaterialsProvider encryptionMaterialsProvider, ClientConfiguration clientConfig, CryptoConfiguration cryptoConfig)
           
AmazonS3EncryptionClient(AWSCredentialsProvider credentialsProvider, EncryptionMaterialsProvider encryptionMaterialsProvider, CryptoConfiguration cryptoConfig)
           Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3.
AmazonS3EncryptionClient(EncryptionMaterials encryptionMaterials)
           Constructs a new Amazon S3 Encryption client that will make anonymous requests to Amazon S3.
AmazonS3EncryptionClient(EncryptionMaterials encryptionMaterials, CryptoConfiguration cryptoConfig)
           Constructs a new Amazon S3 Encryption client that will make anonymous requests to Amazon S3.
AmazonS3EncryptionClient(EncryptionMaterialsProvider encryptionMaterialsProvider)
           Constructs a new Amazon S3 Encryption client that will make anonymous requests to Amazon S3.
AmazonS3EncryptionClient(EncryptionMaterialsProvider encryptionMaterialsProvider, CryptoConfiguration cryptoConfig)
           Constructs a new Amazon S3 Encryption client that will make anonymous requests to Amazon S3.
 
Method Summary
<X extends AmazonWebServiceRequest>
X
appendUserAgent(X request, String userAgent)
           
 CompleteMultipartUploadResult completeMultipartUpload(CompleteMultipartUploadRequest completeMultipartUploadRequest)
          Completes a multipart upload by assembling previously uploaded parts.
 CopyPartResult copyPart(CopyPartRequest copyPartRequest)
          Copies a source object to a part of a multipart upload.
 void deleteObject(DeleteObjectRequest deleteObjectRequest)
           Deletes the specified object in the specified bucket.
 S3Object getObject(GetObjectRequest getObjectRequest)
           Gets the object stored in Amazon S3 under the specified bucket and key.
 ObjectMetadata getObject(GetObjectRequest getObjectRequest, File destinationFile)
           Gets the object metadata for the object stored in Amazon S3 under the specified bucket and key, and saves the object contents to the specified file.
 InitiateMultipartUploadResult initiateMultipartUpload(InitiateMultipartUploadRequest initiateMultipartUploadRequest)
          Initiates a multipart upload and returns an InitiateMultipartUploadResult which contains an upload ID.
 PutObjectResult putObject(PutObjectRequest putObjectRequest)
           Uploads a new object to the specified Amazon S3 bucket.
 UploadPartResult uploadPart(UploadPartRequest uploadPartRequest)
          Uploads a part in a multipart upload.
 
Methods inherited from class com.amazonaws.services.s3.AmazonS3Client
abortMultipartUpload, addRequestHandler, changeObjectStorageClass, copyObject, copyObject, createBucket, createBucket, createBucket, createBucket, deleteBucket, deleteBucket, deleteBucketCrossOriginConfiguration, deleteBucketLifecycleConfiguration, deleteBucketPolicy, deleteBucketPolicy, deleteBucketTaggingConfiguration, deleteBucketWebsiteConfiguration, deleteBucketWebsiteConfiguration, deleteObject, deleteObjects, deleteVersion, deleteVersion, doesBucketExist, generatePresignedUrl, generatePresignedUrl, generatePresignedUrl, getBucketAcl, getBucketAcl, getBucketCrossOriginConfiguration, getBucketLifecycleConfiguration, getBucketLocation, getBucketLocation, getBucketLoggingConfiguration, getBucketNotificationConfiguration, getBucketPolicy, getBucketPolicy, getBucketTaggingConfiguration, getBucketVersioningConfiguration, getBucketWebsiteConfiguration, getBucketWebsiteConfiguration, getCachedResponseMetadata, getObject, getObjectAcl, getObjectAcl, getObjectMetadata, getObjectMetadata, getResourceUrl, getS3AccountOwner, listBuckets, listBuckets, listMultipartUploads, listNextBatchOfObjects, listNextBatchOfVersions, listObjects, listObjects, listObjects, listParts, listVersions, listVersions, listVersions, putObject, putObject, setBucketAcl, setBucketAcl, setBucketAcl, setBucketCrossOriginConfiguration, setBucketLifecycleConfiguration, setBucketLoggingConfiguration, setBucketNotificationConfiguration, setBucketPolicy, setBucketPolicy, setBucketTaggingConfiguration, setBucketVersioningConfiguration, setBucketWebsiteConfiguration, setBucketWebsiteConfiguration, setObjectAcl, setObjectAcl, setObjectAcl, setObjectAcl
 
Methods inherited from class com.amazonaws.AmazonWebServiceClient
removeRequestHandler, setConfiguration, setEndpoint, shutdown
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.amazonaws.services.s3.AmazonS3
setEndpoint
 

Constructor Detail

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(EncryptionMaterials encryptionMaterials)

Constructs a new Amazon S3 Encryption client that will make anonymous requests to Amazon S3. If AmazonS3Client.getObject(String, String) is called, the object contents will be decrypted with the encryption materials provided.

Only a subset of the Amazon S3 API will work with anonymous (i.e. unsigned) requests, but this can prove useful in some situations. For example:

Parameters:
encryptionMaterials - The encryption materials to be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(EncryptionMaterialsProvider encryptionMaterialsProvider)

Constructs a new Amazon S3 Encryption client that will make anonymous requests to Amazon S3. If AmazonS3Client.getObject(String, String) is called, the object contents will be decrypted with the encryption materials provided.

Only a subset of the Amazon S3 API will work with anonymous (i.e. unsigned) requests, but this can prove useful in some situations. For example:

Parameters:
encryptionMaterialsProvider - A provider for the encryption materials to be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(EncryptionMaterials encryptionMaterials,
                                CryptoConfiguration cryptoConfig)

Constructs a new Amazon S3 Encryption client that will make anonymous requests to Amazon S3. If AmazonS3Client.getObject(String, String) is called, the object contents will be decrypted with the encryption materials provided. The encryption implementation of the provided crypto provider will be used to encrypt and decrypt data.

Only a subset of the Amazon S3 API will work with anonymous (i.e. unsigned) requests, but this can prove useful in some situations. For example:

Parameters:
encryptionMaterials - The encryption materials to be used to encrypt and decrypt data.
cryptoConfig - The crypto configuration whose parameters will be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(EncryptionMaterialsProvider encryptionMaterialsProvider,
                                CryptoConfiguration cryptoConfig)

Constructs a new Amazon S3 Encryption client that will make anonymous requests to Amazon S3. If AmazonS3Client.getObject(String, String) is called, the object contents will be decrypted with the encryption materials provided. The encryption implementation of the provided crypto provider will be used to encrypt and decrypt data.

Only a subset of the Amazon S3 API will work with anonymous (i.e. unsigned) requests, but this can prove useful in some situations. For example:

Parameters:
encryptionMaterialsProvider - A provider for the encryption materials to be used to encrypt and decrypt data.
cryptoConfig - The crypto configuration whose parameters will be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(AWSCredentials credentials,
                                EncryptionMaterials encryptionMaterials)

Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3. Object contents will be encrypted and decrypted with the encryption materials provided.

Parameters:
credentials - The AWS credentials to use when making requests to Amazon S3 with this client.
encryptionMaterials - The encryption materials to be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(AWSCredentials credentials,
                                EncryptionMaterialsProvider encryptionMaterialsProvider)

Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3. Object contents will be encrypted and decrypted with the encryption materials provided.

Parameters:
credentials - The AWS credentials to use when making requests to Amazon S3 with this client.
encryptionMaterialsProvider - A provider for the encryption materials to be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(AWSCredentialsProvider credentialsProvider,
                                EncryptionMaterialsProvider encryptionMaterialsProvider)

Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3. Object contents will be encrypted and decrypted with the encryption materials provided.

Parameters:
credentialsProvider - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
encryptionMaterialsProvider - A provider for the encryption materials to be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(AWSCredentials credentials,
                                EncryptionMaterials encryptionMaterials,
                                CryptoConfiguration cryptoConfig)

Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3. Object contents will be encrypted and decrypted with the encryption materials provided. The encryption implementation of the provided crypto provider will be used to encrypt and decrypt data.

Parameters:
credentials - The AWS credentials to use when making requests to Amazon S3 with this client.
encryptionMaterials - The encryption materials to be used to encrypt and decrypt data.
cryptoConfig - The crypto configuration whose parameters will be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(AWSCredentials credentials,
                                EncryptionMaterialsProvider encryptionMaterialsProvider,
                                CryptoConfiguration cryptoConfig)

Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3. Object contents will be encrypted and decrypted with the encryption materials provided. The encryption implementation of the provided crypto provider will be used to encrypt and decrypt data.

Parameters:
credentials - The AWS credentials to use when making requests to Amazon S3 with this client.
encryptionMaterialsProvider - A provider for the encryption materials to be used to encrypt and decrypt data.
cryptoConfig - The crypto configuration whose parameters will be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(AWSCredentialsProvider credentialsProvider,
                                EncryptionMaterialsProvider encryptionMaterialsProvider,
                                CryptoConfiguration cryptoConfig)

Constructs a new Amazon S3 Encryption client using the specified AWS credentials to access Amazon S3. Object contents will be encrypted and decrypted with the encryption materials provided. The encryption implementation of the provided crypto provider will be used to encrypt and decrypt data.

Parameters:
credentialsProvider - The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
encryptionMaterialsProvider - A provider for the encryption materials to be used to encrypt and decrypt data.
cryptoConfig - The crypto configuration whose parameters will be used to encrypt and decrypt data.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(AWSCredentials credentials,
                                EncryptionMaterials encryptionMaterials,
                                ClientConfiguration clientConfig,
                                CryptoConfiguration cryptoConfig)

Constructs a new Amazon S3 Encryption client using the specified AWS credentials and client configuration to access Amazon S3. Object contents will be encrypted and decrypted with the encryption materials provided. The crypto provider and storage mode denoted in the specified crypto configuration will be used to encrypt and decrypt data.

Parameters:
credentials - The AWS credentials to use when making requests to Amazon S3 with this client.
encryptionMaterials - The encryption materials to be used to encrypt and decrypt data.
clientConfiguration - The client configuration options controlling how this client connects to Amazon S3 (ex: proxy settings, retry counts, etc).
cryptoConfig - The crypto configuration whose parameters will be used to encrypt and decrypt data.
Throws:
IllegalArgumentException - If either of the encryption materials or crypto configuration parameters are null.

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(AWSCredentials credentials,
                                EncryptionMaterialsProvider encryptionMaterialsProvider,
                                ClientConfiguration clientConfig,
                                CryptoConfiguration cryptoConfig)

AmazonS3EncryptionClient

public AmazonS3EncryptionClient(AWSCredentialsProvider credentialsProvider,
                                EncryptionMaterialsProvider encryptionMaterialsProvider,
                                ClientConfiguration clientConfig,
                                CryptoConfiguration cryptoConfig)
Method Detail

putObject

public PutObjectResult putObject(PutObjectRequest putObjectRequest)
                          throws AmazonClientException,
                                 AmazonServiceException
Description copied from interface: AmazonS3

Uploads a new object to the specified Amazon S3 bucket. The PutObjectRequest contains all the details of the request, including the bucket to upload to, the key the object will be uploaded under, and the file or input stream containing the data to upload.

Amazon S3 never stores partial objects; if during this call an exception wasn't thrown, the entire object was stored.

Depending on whether a file or input stream is being uploaded, this method has slightly different behavior.

When uploading a file:

When uploading directly from an input stream:

If versioning is enabled for the specified bucket, this operation will never overwrite an existing object with the same key, but will keep the existing object as an older version until that version is explicitly deleted (see AmazonS3.deleteVersion(String, String, String).

If versioning is not enabled, this operation will overwrite an existing object with the same key; Amazon S3 will store the last write request. Amazon S3 does not provide object locking. If Amazon S3 receives multiple write requests for the same object nearly simultaneously, all of the objects might be stored. However, a single object will be stored with the final write request.

When specifying a location constraint when creating a bucket, all objects added to the bucket are stored in the bucket's region. For example, if specifying a Europe (EU) region constraint for a bucket, all of that bucket's objects are stored in the EU region.

The specified bucket must already exist and the caller must have Permission.Write permission to the bucket to upload an object.

Specified by:
putObject in interface AmazonS3
Overrides:
putObject in class AmazonS3Client
Parameters:
putObjectRequest - The request object containing all the parameters to upload a new object to Amazon S3.
Returns:
A PutObjectResult object containing the information returned by Amazon S3 for the newly created object.
Throws:
AmazonClientException - If any errors are encountered in the client while making the request or handling the response.
AmazonServiceException - If any errors occurred in Amazon S3 while processing the request.
See Also:
AmazonS3.putObject(String, String, File), AmazonS3.putObject(String, String, InputStream, ObjectMetadata)

getObject

public S3Object getObject(GetObjectRequest getObjectRequest)
                   throws AmazonClientException,
                          AmazonServiceException
Description copied from interface: AmazonS3

Gets the object stored in Amazon S3 under the specified bucket and key. Returns null if the specified constraints weren't met.

Callers should be very careful when using this method; the returned Amazon S3 object contains a direct stream of data from the HTTP connection. The underlying HTTP connection cannot be closed until the user finishes reading the data and closes the stream. Callers should therefore:

If callers do not follow those rules, then the client can run out of resources if allocating too many open, but unused, HTTP connections.

To get an object from Amazon S3, the caller must have Permission.Read access to the object.

If the object fetched is publicly readable, it can also read it by pasting its URL into a browser.

When specifying constraints in the request object, the client needs to be prepared to handle this method returning null if the provided constraints aren't met when Amazon S3 receives the request.

If the advanced options provided in GetObjectRequest aren't needed, use the simpler AmazonS3.getObject(String bucketName, String key) method.

Specified by:
getObject in interface AmazonS3
Overrides:
getObject in class AmazonS3Client
Parameters:
getObjectRequest - The request object containing all the options on how to download the object.
Returns:
The object stored in Amazon S3 in the specified bucket and key. Returns null if constraints were specified but not met.
Throws:
AmazonClientException - If any errors are encountered in the client while making the request or handling the response.
AmazonServiceException - If any errors occurred in Amazon S3 while processing the request.
See Also:
AmazonS3.getObject(String, String), AmazonS3.getObject(GetObjectRequest, File)

getObject

public ObjectMetadata getObject(GetObjectRequest getObjectRequest,
                                File destinationFile)
                         throws AmazonClientException,
                                AmazonServiceException
Description copied from interface: AmazonS3

Gets the object metadata for the object stored in Amazon S3 under the specified bucket and key, and saves the object contents to the specified file. Returns null if the specified constraints weren't met.

Instead of using AmazonS3.getObject(GetObjectRequest), use this method to ensure that the underlying HTTP stream resources are automatically closed as soon as possible. The Amazon S3 clients handles immediate storage of the object contents to the specified file.

To get an object from Amazon S3, the caller must have Permission.Read access to the object.

If the object fetched is publicly readable, it can also read it by pasting its URL into a browser.

When specifying constraints in the request object, the client needs to be prepared to handle this method returning null if the provided constraints aren't met when Amazon S3 receives the request.

Specified by:
getObject in interface AmazonS3
Overrides:
getObject in class AmazonS3Client
Parameters:
getObjectRequest - The request object containing all the options on how to download the Amazon S3 object content.
destinationFile - Indicates the file (which might already exist) where to save the object content being downloading from Amazon S3.
Returns:
All S3 object metadata for the specified object. Returns null if constraints were specified but not met.
Throws:
AmazonClientException - If any errors are encountered in the client while making the request, handling the response, or writing the incoming data from S3 to the specified destination file.
AmazonServiceException - If any errors occurred in Amazon S3 while processing the request.
See Also:
AmazonS3.getObject(String, String), AmazonS3.getObject(GetObjectRequest)

deleteObject

public void deleteObject(DeleteObjectRequest deleteObjectRequest)
Description copied from interface: AmazonS3

Deletes the specified object in the specified bucket. Once deleted, the object can only be restored if versioning was enabled when the object was deleted.

If attempting to delete an object that does not exist, Amazon S3 will return a success message instead of an error message.

Specified by:
deleteObject in interface AmazonS3
Overrides:
deleteObject in class AmazonS3Client
Parameters:
deleteObjectRequest - The request object containing all options for deleting an Amazon S3 object.
See Also:
AmazonS3Client.deleteObject(String, String)

completeMultipartUpload

public CompleteMultipartUploadResult completeMultipartUpload(CompleteMultipartUploadRequest completeMultipartUploadRequest)
                                                      throws AmazonClientException,
                                                             AmazonServiceException
Description copied from interface: AmazonS3
Completes a multipart upload by assembling previously uploaded parts.

You first upload all parts using the AmazonS3.uploadPart(UploadPartRequest) method. After successfully uploading all individual parts of an upload, you call this operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the CompleteMultipartUpload request, you must provide the parts list. For each part in the list, you provide the part number and the ETag header value, returned after that part was uploaded.

Processing of a CompleteMultipartUpload request may take several minutes to complete.

Specified by:
completeMultipartUpload in interface AmazonS3
Overrides:
completeMultipartUpload in class AmazonS3Client
Parameters:
completeMultipartUploadRequest - The CompleteMultipartUploadRequest object that specifies all the parameters of this operation.
Returns:
A CompleteMultipartUploadResult from S3 containing the ETag for the new object composed of the individual parts.
Throws:
AmazonClientException - If any errors are encountered in the client while making the request or handling the response.
AmazonServiceException - If any errors occurred in Amazon S3 while processing the request.

initiateMultipartUpload

public InitiateMultipartUploadResult initiateMultipartUpload(InitiateMultipartUploadRequest initiateMultipartUploadRequest)
                                                      throws AmazonClientException,
                                                             AmazonServiceException
Description copied from interface: AmazonS3
Initiates a multipart upload and returns an InitiateMultipartUploadResult which contains an upload ID. This upload ID associates all the parts in the specific upload and is used in each of your subsequent AmazonS3.uploadPart(UploadPartRequest) requests. You also include this upload ID in the final request to either complete, or abort the multipart upload request.

Specified by:
initiateMultipartUpload in interface AmazonS3
Overrides:
initiateMultipartUpload in class AmazonS3Client
Parameters:
initiateMultipartUploadRequest - The InitiateMultipartUploadRequest object that specifies all the parameters of this operation.
Returns:
An InitiateMultipartUploadResult from Amazon S3.
Throws:
AmazonClientException - If any errors are encountered in the client while making the request or handling the response.
AmazonServiceException - If any errors occurred in Amazon S3 while processing the request.

uploadPart

public UploadPartResult uploadPart(UploadPartRequest uploadPartRequest)
                            throws AmazonClientException,
                                   AmazonServiceException
Uploads a part in a multipart upload. You must initiate a multipart upload before you can upload any part.

Your UploadPart request must include an upload ID and a part number. The upload ID is the ID returned by Amazon S3 in response to your Initiate Multipart Upload request. Part number can be any number between 1 and 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being uploaded. If you upload a new part using the same part number that was specified in uploading a previous part, the previously uploaded part is overwritten.

To ensure data is not corrupted traversing the network, specify the Content-MD5 header in the Upload Part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error.

When you upload a part, the returned UploadPartResult contains an ETag property. You should record this ETag property value and the part number. After uploading all parts, you must send a CompleteMultipartUpload request. At that time Amazon S3 constructs a complete object by concatenating all the parts you uploaded, in ascending order based on the part numbers. The CompleteMultipartUpload request requires you to send all the part numbers and the corresponding ETag values.

NOTE: Because the encryption process requires context from block N-1 in order to encrypt block N, parts uploaded with the AmazonS3EncryptionClient (as opposed to the normal AmazonS3Client) must be uploaded serially, and in order. Otherwise, the previous encryption context isn't available to use when encrypting the current part.

Specified by:
uploadPart in interface AmazonS3
Overrides:
uploadPart in class AmazonS3Client
Parameters:
uploadPartRequest - The UploadPartRequest object that specifies all the parameters of this operation.
Returns:
An UploadPartResult from Amazon S3 containing the part number and ETag of the new part.
Throws:
AmazonClientException - If any errors are encountered in the client while making the request or handling the response.
AmazonServiceException - If any errors occurred in Amazon S3 while processing the request.

copyPart

public CopyPartResult copyPart(CopyPartRequest copyPartRequest)
Description copied from class: AmazonS3Client
Copies a source object to a part of a multipart upload. To copy an object, the caller's account must have read access to the source object and write access to the destination bucket.

If constraints are specified in the CopyPartRequest (e.g. CopyPartRequest.setMatchingETagConstraints(List)) and are not satisfied when Amazon S3 receives the request, this method returns null. This method returns a non-null result under all other circumstances.

Specified by:
copyPart in interface AmazonS3
Overrides:
copyPart in class AmazonS3Client
Parameters:
copyPartRequest - The request object containing all the options for copying an Amazon S3 object.
Returns:
A CopyPartResult object containing the information returned by Amazon S3 about the newly created object, or null if constraints were specified that weren't met when Amazon S3 attempted to copy the object.
See Also:
AmazonS3.copyObject(CopyObjectRequest), AmazonS3.initiateMultipartUpload(InitiateMultipartUploadRequest)

appendUserAgent

public <X extends AmazonWebServiceRequest> X appendUserAgent(X request,
                                                             String userAgent)


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.