@Throws(value=S3ErrorTypeProvider.class) public class UploadOperations extends S3Operations<UploadService>
DEFAULT_CANNED_ACL, NOT_ENCODED, REGION_DEFAULT| Constructor and Description |
|---|
UploadOperations() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortMultipartUpload(S3Configuration config,
S3Connection connection,
String bucketName,
String key,
String uploadId)
Aborts a multipart upload.
|
CompleteMultipartUploadResult |
completeMultipartUpload(S3Configuration config,
S3Connection connection,
String bucketName,
String key,
String uploadId,
List<PartETag> partETags)
Completes a multipart upload by assembling previously uploaded parts.
|
String |
initiateMultipartUpload(S3Configuration config,
S3Connection connection,
String bucketName,
String key,
ObjectMetadataParameterGroup objectMetadata,
CannedAccessControlList acl,
String redirectLocation)
Initiates a multipart upload and returns an upload ID.
|
MultipartUploadListing |
listMultipartUploads(S3Configuration config,
S3Connection connection,
String bucketName,
String delimiter,
String encodingType,
String keyMarker,
Integer maxUploads,
String prefix,
String uploadIdMarker)
Lists in-progress multipart uploads.
|
PartListing |
listParts(S3Configuration config,
S3Connection connection,
String bucketName,
String key,
String uploadId,
String encodingType,
Integer maxParts,
Integer partNumberMarker)
Lists the parts that have been uploaded for a specific multipart upload.
|
UploadPartResult |
uploadPart(S3Configuration config,
S3Connection connection,
String bucketName,
String key,
String uploadId,
Integer partNumber,
Long partSize,
String md5Digest,
InputStream content,
Long fileOffset,
boolean isLastPart)
Uploads a part in a multipart upload.
|
CopyPartResult |
uploadPartCopy(S3Configuration config,
S3Connection connection,
String sourceBucketName,
String sourceKey,
String sourceVersionId,
String destinationBucketName,
String destinationKey,
String uploadId,
Integer partNumber,
List<String> matchingETagConstraints,
LocalDateTime modifiedSince,
LocalDateTime unmodifiedSince,
Long firstByte,
Long lastByte)
Copies a source object to a part of a multipart upload.
|
@MediaType(value="application/plain") public String initiateMultipartUpload(@Config S3Configuration config, @Connection S3Connection connection, String bucketName, String key, @Placement(order=9) @Summary(value="The additional information about the new object being created, such as content type & encoding, etc.") @Optional ObjectMetadataParameterGroup objectMetadata, @Summary(value="The optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.") @DisplayName(value="Canned ACL") @Optional(defaultValue="PRIVATE") CannedAccessControlList acl, @Optional String redirectLocation)
config - Configuration for Amazon S3 connector.connection - Amazon S3 connection instance.bucketName - the name of the bucket in which to create the new multipart upload.key - the key by which to store the new multipart upload.objectMetadata - the additional information about the new object being created, such as content type & encoding, etc.acl - the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.redirectLocation - Gets the optional redirect location for the new object.public UploadPartResult uploadPart(@Config S3Configuration config, @Connection S3Connection connection, @Summary(value="The name of the bucket containing the existing, initiated multipart upload, with which this new part will be associated.") String bucketName, String key, @Summary(value="The ID of the existing, initiated multipart upload with which this new part will be associated.") String uploadId, @Summary(value="the part number describing this part\'s position relative to the other parts in the multipart upload.") Integer partNumber, Long partSize, @Optional String md5Digest, @Content InputStream content, @Summary(value="The optional offset in the specified file, at which to begin uploading data for this part.") @Optional Long fileOffset, @Summary(value="True if the creator of this request has indicated this part is the last part being uploaded in a multipart upload.") @Optional(defaultValue="false") boolean isLastPart)
config - Configuration for Amazon S3 connector.connection - Amazon S3 connection instance.bucketName - the name of the bucket containing the existing, initiated multipart upload, with which this new part will be associated.key - the key of the initiated multipart upload.uploadId - the ID of the existing, initiated multipart upload with which this new part will be associated.partNumber - the part number describing this part's position relative to the other parts in the multipart upload.partSize - the size of this part, in bytes.md5Digest - optional, but recommended, MD5 hash of the content of this part.content - the stream containing the data to upload for the new part.fileOffset - the optional offset in the specified file, at which to begin uploading data for this part.isLastPart - true if the creator of this request has indicated this part is the last part being uploaded in a multipart upload.public CopyPartResult uploadPartCopy(@Config S3Configuration config, @Connection S3Connection connection, String sourceBucketName, String sourceKey, @Summary(value="The version of the source object that was copied, if you have enabled versioning on the source bucket.") @Optional String sourceVersionId, String destinationBucketName, String destinationKey, @Summary(value="The ID of the existing, initiated multipart upload with which this new part will be associated.") String uploadId, @Summary(value="The part number describing this part\'s position relative to the other parts in the multipart upload.") Integer partNumber, @Summary(value="Perform a copy if the source object entity tag (ETag) matches the specified value.") @DisplayName(value="Matching ETag Constraints") @Optional List<String> matchingETagConstraints, @Summary(value="The optional modified constraint that restricts this request to executing only if the source object has been modified after the specified date.") @Optional LocalDateTime modifiedSince, @Summary(value="The optional unmodified constraint that restricts this request to executing only if the source object has not been modified after the specified date.") @Optional LocalDateTime unmodifiedSince, @Summary(value="The optional first byte from the source bucket to start copy from (starts from 0).") @Optional Long firstByte, @Optional Long lastByte)
config - Configuration for Amazon S3 connector.connection - Amazon S3 connection instance.sourceBucketName - the name of the bucket containing the source object to be copied.sourceKey - the source bucket key under which the source object to be copied is stored.sourceVersionId - the version of the source object that was copied, if you have enabled versioning on the source bucket.uploadId - the ID of the existing, initiated multipart upload with which this new part will be associated.partNumber - the part number describing this part's position relative to the other parts in the multipart upload.matchingETagConstraints - perform a copy if the source object entity tag (ETag) matches the specified value.destinationBucketName - the destination bucket name which will contain the new, copied object.destinationKey - the destination bucket key under which the new, copied object will be stored.modifiedSince - the optional modified constraint that restricts this request to executing only if the source object has been modified after the specified date.unmodifiedSince - the optional unmodified constraint that restricts this request to executing only if the source object has not been modified after the specified date.firstByte - the optional first byte from the source bucket to start copy from (starts from 0).lastByte - the optional last byte from the source bucket to copy till.public void abortMultipartUpload(@Config
S3Configuration config,
@Connection
S3Connection connection,
String bucketName,
String key,
String uploadId)
config - Configuration for Amazon S3 connector.connection - Amazon S3 connection instance.bucketName - the name of the bucket containing the multipart upload to abort.key - the key of the multipart upload to abort.uploadId - the ID of the upload to abort.public CompleteMultipartUploadResult completeMultipartUpload(@Config S3Configuration config, @Connection S3Connection connection, String bucketName, String key, String uploadId, @Summary(value="The list of part numbers and ETags that identify the individual parts of the multipart upload to complete.") @Content @DisplayName(value="Part ETags") List<PartETag> partETags)
config - Configuration for Amazon S3 connector.connection - Amazon S3 connection instance.bucketName - the name of the bucket containing the multipart upload to complete.key - the key under which the multipart upload to complete is stored.uploadId - the ID of the multipart upload to complete.partETags - the list of part numbers and ETags that identify the individual parts of the multipart upload to complete.public MultipartUploadListing listMultipartUploads(@Config S3Configuration config, @Connection S3Connection connection, String bucketName, @Summary(value="The optional delimiter parameter that causes multipart uploads for keys that contain the same string between the prefix and the first occurrence of the delimiter to be combined into a single result element.") @Optional String delimiter, @Summary(value="The optional encodingType parameter indicating the encoding method to be applied on the response.") @Optional String encodingType, @Optional String keyMarker, @Summary(value="The optional maximum number of uploads to return, or null if no maximum number of uploads has been set for this request.") @Optional Integer maxUploads, @Summary(value="The optional prefix parameter that restricts the response to multipart uploads for keys that begin with the specified prefix.") @Optional String prefix, @Optional String uploadIdMarker)
config - Configuration for Amazon S3 connector.connection - Amazon S3 connection instance.bucketName - the name of the bucket containing the uploads to list.delimiter - the optional delimiter parameter that causes multipart uploads for keys that contain the same string between the prefix and the first occurrence of the delimiter
to be combined into a single result element.encodingType - the optional encodingType parameter indicating the encoding method to be applied on the response.keyMarker - the optional key marker indicating where in the results to begin listing.maxUploads - the optional maximum number of uploads to return, or null if no maximum number of uploads has been set for this request.prefix - the optional prefix parameter that restricts the response to multipart uploads for keys that begin with the specified prefix.uploadIdMarker - the optional upload ID marker indicating where in the results to begin listing.public PartListing listParts(@Config S3Configuration config, @Connection S3Connection connection, @Summary(value="The name of the bucket containing the multipart upload whose parts are being listed.") String bucketName, String key, String uploadId, @Summary(value="The optional encodingType parameter indicating the encoding method to be applied on the response.") @Optional String encodingType, @Optional Integer maxParts, @Summary(value="The optional part number marker indicating where in the results to being listing parts.") @Optional Integer partNumberMarker)
config - Configuration for Amazon S3 connector.connection - Amazon S3 connection instance.bucketName - the name of the bucket containing the multipart upload whose parts are being listed.key - the key of the associated multipart upload whose parts are being listed.uploadId - the ID of the multipart upload whose parts are being listed.encodingType - the optional encodingType parameter indicating the encoding method to be applied on the response.maxParts - the optional maximum number of parts to be returned in the part listing.partNumberMarker - the optional part number marker indicating where in the results to being listing parts.Copyright © 2021 MuleSoft, Inc.. All rights reserved.