@RequiresEnterpriseLicense(allowEval=true) @ReconnectOn(exceptions=S3ClientException.class) @Connector(name="s3", schemaVersion="2.0", friendlyName="Amazon S3") public class S3Connector extends Object
Constructor and Description |
---|
S3Connector() |
Modifier and Type | Method and Description |
---|---|
void |
abortMultipartUpload(String bucketName,
String key,
String uploadId)
Aborts a multipart upload.
|
CompleteMultipartUploadResult |
completeMultipartUpload(String bucketName,
String key,
String uploadId,
List<PartETag> partETags)
Completes a multipart upload by assembling previously uploaded parts.
|
ObjectResult |
copyObject(String sourceBucketName,
String sourceKey,
String sourceVersionId,
String destinationBucketName,
String destinationKey,
CannedAccessControlList destinationAcl,
StorageClass destinationStorageClass,
Map<String,String> destinationUserMetadata,
Date modifiedSince,
Date unmodifiedSince,
String encryption,
String contentType)
Copies a source object to a new destination; to copy an object, the caller's account must have read access to the source object and write access to the destination bucket.
|
Bucket |
createBucket(String bucketName,
Region region,
CannedAccessControlList acl)
Creates a new bucket; connector must not be configured as anonymous for this operation to succeed.
|
ObjectResult |
createObject(String bucketName,
String key,
Object content,
Long contentLength,
String contentMd5,
String contentType,
String contentDisposition,
CannedAccessControlList acl,
StorageClass storageClass,
Map<String,String> userMetadata,
String encryption,
String kmsMasterKey)
Uploads an object to S3.
|
URI |
createObjectPresignedUri(String bucketName,
String key,
Date expiration,
String contentMd5,
String contentType,
HttpMethod method,
SSEAlgorithm sseS3Encryption)
Returns a pre-signed URL for accessing an Amazon S3 object.
|
void |
deleteBucket(String bucketName,
boolean force)
Deletes the specified bucket.
|
void |
deleteBucketCorsConfiguration(String bucketName)
Deletes the Cross Origin Configuration information set for the bucket.
|
void |
deleteBucketLifecycleConfiguration(String bucketName)
Deletes the lifecycle configuration from the specified bucket.
|
void |
deleteBucketPolicy(String bucketName)
Deletes the bucket's policy.
|
void |
deleteBucketTaggingConfiguration(String bucketName)
Deletes the tagging configuration associated with the specified bucket.
|
void |
deleteBucketWebsiteConfiguration(String bucketName)
Removes the website configuration for a bucket; this operation requires the DeleteBucketWebsite permission.
|
void |
deleteObject(String bucketName,
String key,
String versionId)
Deletes a given object, only the owner of the bucket containing the version can perform this operation.
|
void |
deleteObjects(String bucketName,
List<KeyVersion> keys)
Deletes multiple objects in a single bucket from S3.
|
AccessControlList |
getBucketAcl(String bucketName)
Answers the access control list of the specified bucket.
|
List<CORSRule> |
getBucketCorsConfiguration(String bucketName)
Answers the cors configuration information set for the bucket.
|
List<BLCRule> |
getBucketLifecycleConfiguration(String bucketName)
Returns the lifecycle configuration information set on the bucket.
|
String |
getBucketLocation(String bucketName)
Gets the geographical region where Amazon S3 stores the specified bucket.
|
BucketLoggingConfiguration |
getBucketLoggingConfiguration(String bucketName)
Answers the logging status of a bucket and the permissions users have to view and modify that status.
|
Map<String,TopicConfiguration> |
getBucketNotificationConfiguration(String bucketName)
Return the notification configuration of a bucket.
|
String |
getBucketPolicy(String bucketName)
Answers the policy for the given bucket.
|
List<TagSet> |
getBucketTaggingConfiguration(String bucketName)
Return the tag set associated with the bucket.
|
BucketVersioningConfiguration |
getBucketVersioningConfiguration(String bucketName)
Returns the versioning configuration for the specified bucket.
|
BucketWebsiteConfiguration |
getBucketWebsiteConfiguration(String bucketName)
Answers the website of the given bucket.
|
Config |
getConfig() |
S3Object |
getObject(String bucketName,
String key,
String versionId,
Date modifiedSince,
Date unmodifiedSince)
Gets the object stored in Amazon S3 under the specified bucket and key.
|
AccessControlList |
getObjectAcl(String bucketName,
String key,
String versionId)
Returns the access control list (ACL) of an object.
|
org.mule.devkit.api.transformer.TransformingValue<com.amazonaws.services.s3.model.S3ObjectInputStream,org.mule.api.transformer.DataType<com.amazonaws.services.s3.model.S3ObjectInputStream>> |
getObjectContent(String bucketName,
String key,
String versionId,
Date modifiedSince,
Date unmodifiedSince,
String mimeType,
String encoding)
Gets the content of an object stored in Amazon S3 under the specified bucket and key.
|
S3ObjectMetadata |
getObjectMetadata(String bucketName,
String key,
String versionId)
Gets the metadata for the specified Amazon S3 object without actually fetching the object itself.
|
String |
initiateMultipartUpload(String bucketName,
String key,
S3ObjectMetadata objectMetadata,
CannedAccessControlList acl,
StorageClass storageClass,
String redirectLocation)
Initiates a multipart upload and returns an upload ID.
|
List<Bucket> |
listBuckets(Region region)
Answers a list of all Amazon S3 buckets that the authenticated sender of the request owns.
|
MultipartUploadListing |
listMultipartUploads(String bucketName,
String delimiter,
String encodingType,
String keyMarker,
Integer maxUploads,
String prefix,
String uploadIdMarker)
Lists in-progress multipart uploads.
|
ObjectListing |
listNextBatchOfObjects(ObjectListing previousObjectListing)
Provides an easy way to continue a truncated object listing and retrieve the next page of results.
|
VersionListing |
listNextBatchOfVersions(VersionListing previousVersionListing)
Provides an easy way to continue a truncated VersionListing and retrieve the next page of results.
|
ObjectListing |
listObjects(String bucketName,
String prefix,
String marker,
String delimiter,
Integer maxKeys,
EncodingType encodingType)
Lazily lists all objects for a given prefix.
|
PartListing |
listParts(String bucketName,
String key,
String uploadId,
String encodingType,
Integer maxParts,
Integer partNumberMarker)
Lists the parts that have been uploaded for a specific multipart upload.
|
VersionListing |
listVersions(String bucketName,
String prefix,
String keyMarker,
String versionIdMarker,
String delimiter,
Integer maxResults,
EncodingType encodingType)
Lazily lists all object versions for a given bucket that has versioning enabled.
|
void |
setBucketAcl(String bucketName,
AccessControlList acl)
Set the permissions on an existing bucket using access control lists (ACL)
|
void |
setBucketCorsConfiguration(String bucketName,
List<CORSRule> crossOriginConfigurationRules)
Sets the cors configuration for your bucket.
|
void |
setBucketLifecycleConfiguration(String bucketName,
List<BLCRule> lifecycleConfigurationRules)
Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration.
|
void |
setBucketLoggingConfiguration(String bucketName,
String destinationBucketName,
String logFilePrefix)
Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters.
|
void |
setBucketNotificationConfiguration(String bucketName,
Map<String,TopicConfiguration> topicConfigurations)
Sets the notification configuration for the specified bucket.
|
void |
setBucketPolicy(String bucketName,
String policyText)
Sets the bucket's policy, overriding any previously set.
|
void |
setBucketTaggingConfiguration(String bucketName,
List<TagSet> tagSets)
Add a set of tags to an existing bucket
|
void |
setBucketVersioningConfiguration(String bucketName,
VersioningStatus status)
Sets the versioning status for the given bucket.
|
void |
setBucketWebsiteConfiguration(String bucketName,
BucketWebsiteConfiguration bucketWebsiteConfiguration)
Sets the given bucket's website configuration.
|
void |
setConfig(Config config) |
void |
setObjectAcl(String bucketName,
String key,
String versionId,
AccessControlList acl)
Set the access control list (ACL) permissions for an object that already exists in a bucket
|
void |
setObjectStorageClass(String bucketName,
String key,
StorageClass storageClass)
Sets the Amazon S3 storage class for the given object.
|
UploadPartResult |
uploadPart(String bucketName,
String key,
String uploadId,
Integer partNumber,
Long partSize,
String md5Digest,
InputStream content,
File file,
Long fileOffset,
boolean isLastPart)
Uploads a part in a multipart upload.
|
CopyPartResult |
uploadPartCopy(String sourceBucketName,
String sourceKey,
String sourceVersionId,
String destinationBucketName,
String destinationKey,
String uploadId,
Integer partNumber,
List<String> matchingETagConstraints,
Date modifiedSince,
Date unmodifiedSince,
Long firstByte,
Long lastByte)
Copies a source object to a part of a multipart upload.
|
@Processor public Bucket createBucket(@NotNull String bucketName, @Default(value="US_STANDARD") Region region, @FriendlyName(value="Canned ACL")@Default(value="PRIVATE") CannedAccessControlList acl)
bucketName
- The bucket to create. It must not exist yet.region
- the region where to create the new bucketacl
- the access control list of the new bucket@Processor public void deleteBucket(@NotNull String bucketName, @Default(value="false") boolean force)
bucketName
- the bucket to deleteforce
- optional true if the bucket must be deleted even if it is not empty, false if operation should fail in such scenario.@Processor public void deleteBucketCorsConfiguration(@NotNull String bucketName)
bucketName
- the bucket to delete Cross Origin Configuration.@Processor public void deleteBucketLifecycleConfiguration(@NotNull String bucketName)
bucketName
- the bucket whose lifecycle configuration to delete.@Processor public void deleteBucketPolicy(@NotNull String bucketName)
bucketName
- the bucket whose policy to delete@Processor public void deleteBucketTaggingConfiguration(@NotNull String bucketName)
bucketName
- the bucket whose tag to delete.@Processor public void deleteBucketWebsiteConfiguration(@NotNull String bucketName)
S3:DeleteBucketWebsite
permission. Calling this operation on a bucket with no website configuration does not fail, but calling this operation a bucket that does
not exist does.
bucketName
- the bucket whose website configuration to delete@Processor public List<Bucket> listBuckets(@Optional Region region)
region
- the region from where to list the buckets.@Processor public AccessControlList getBucketAcl(@NotNull String bucketName)
bucketName
- the bucket whose acl to retrieve.@Processor public List<CORSRule> getBucketCorsConfiguration(@NotNull String bucketName)
bucketName
- the bucket whose cors to retrieve.@Processor public List<BLCRule> getBucketLifecycleConfiguration(@NotNull String bucketName)
bucketName
- the bucket whose lifecycle configuration information to retrieve.@Processor public String getBucketPolicy(@NotNull String bucketName)
bucketName
- the bucket whose policy to retrieve@Processor public String getBucketLocation(@NotNull String bucketName)
bucketName
- The target bucket name.@Processor public BucketLoggingConfiguration getBucketLoggingConfiguration(@NotNull String bucketName)
bucketName
- the bucket whose logging status to retrieve.@Processor @MetaDataScope(value=BucketNotificationCategory.class) public Map<String,TopicConfiguration> getBucketNotificationConfiguration(@NotNull String bucketName)
bucketName
- the bucket whose notification configuration to retrieve.@Processor public List<TagSet> getBucketTaggingConfiguration(@NotNull String bucketName)
bucketName
- the bucket whose tagging configuration to retrieve.@Processor public BucketVersioningConfiguration getBucketVersioningConfiguration(@NotNull String bucketName)
bucketName
- The bucket whose versioning configuration will be retrieved.@Processor public BucketWebsiteConfiguration getBucketWebsiteConfiguration(@NotNull String bucketName)
bucketName
- the target bucket's name@Processor public void setBucketAcl(@NotNull String bucketName, @FriendlyName(value="ACL")@Default(value="#[payload]") AccessControlList acl)
bucketName
- the bucket nameacl
- the ACL of a bucket.@Processor public void setBucketCorsConfiguration(@NotNull String bucketName, @NotNull List<CORSRule> crossOriginConfigurationRules)
bucketName
- the bucket namecrossOriginConfigurationRules
- the cross-origin rules of a bucket.@Processor public void setBucketLifecycleConfiguration(@NotNull String bucketName, @NotNull List<BLCRule> lifecycleConfigurationRules)
bucketName
- the bucket namelifecycleConfigurationRules
- the lifecycle configuration rules of a bucket.@Processor public void setBucketPolicy(@NotNull String bucketName, @NotNull String policyText)
bucketName
- the bucket namepolicyText
- the policy text@Processor public void setBucketLoggingConfiguration(@NotNull String bucketName, @NotNull String destinationBucketName, @NotNull String logFilePrefix)
bucketName
- the bucket namedestinationBucketName
- the destination bucket namelogFilePrefix
- the prefix for the keys that the log files will be stored under.@Processor @MetaDataScope(value=BucketNotificationCategory.class) public void setBucketNotificationConfiguration(@NotNull String bucketName, @Default(value="#[payload]") Map<String,TopicConfiguration> topicConfigurations)
bucketName
- The name of the Amazon S3 bucket whose notification configuration is being set.topicConfigurations
- The request object containing all options for setting the bucket notification configuration.@Processor public void setBucketTaggingConfiguration(@NotNull String bucketName, @NotNull List<TagSet> tagSets)
bucketName
- the bucket nametagSets
- a set of tags@Processor public void setBucketWebsiteConfiguration(@NotNull String bucketName, @Default(value="#[payload]") BucketWebsiteConfiguration bucketWebsiteConfiguration)
bucketName
- the bucket namebucketWebsiteConfiguration
- the bucket website configuration@Processor public void setBucketVersioningConfiguration(@NotNull String bucketName, @Default(value="OFF") VersioningStatus status)
bucketName
- the bucket namestatus
- the version status to set@Processor public ObjectResult createObject(@NotNull String bucketName, String key, @Default(value="#[payload]") Object content, @Optional Long contentLength, @FriendlyName(value="Content MD5")@Optional String contentMd5, @Optional String contentType, @Optional String contentDisposition, @FriendlyName(value="Canned ACL")@Default(value="PRIVATE") CannedAccessControlList acl, @Default(value="STANDARD") StorageClass storageClass, @Optional Map<String,String> userMetadata, @Optional String encryption, @Optional String kmsMasterKey) throws IOException
bucketName
- the object's bucketkey
- the object's keycontent
- the content to be uploaded to S3, capable of creating a PutObjectRequest
.contentLength
- the content length. If content is a InputStream, this parameter should be specified, as not doing so will introduce a performance loss as the contents will have
to be persisted on disk before being uploaded. Otherwise, it is ignored. An exception to this rule are InputStreams returned by Mule Http Connector: if stream has
Content-Length information, it will be used. In any case a content length of 0 is interpreted as an unspecified content lengthcontentMd5
- the content md5, encoded in base 64. If content is a file, it is ignored.contentType
- the content type of the new object.contentDisposition
- the content disposition of the new object.acl
- the access control list of the new objectstorageClass
- the storage class of the new objectuserMetadata
- a map of arbitrary object properties keys and valuesencryption
- Encryption method for server-side encryption. Supported value AES256.kmsMasterKey
- Encrypt objects uploaded to S3 buckets with AWS KMS master keyIOException
- if there are problems manipulating the File or InputStream content@Processor public void deleteObject(@NotNull String bucketName, @NotNull String key, @Optional String versionId)
bucketName
- the object's bucketkey
- the object's keyversionId
- the specific version of the object to delete, if versioning is enabled.@Processor public void deleteObjects(@NotNull String bucketName, @NotNull List<KeyVersion> keys)
MultiObjectDeleteException
with details of the error.
bucketName
- the objects bucket namekeys
- the objects keys, version is optional@Processor public ObjectListing listObjects(@NotNull String bucketName, @Optional String prefix, @Optional String marker, @Optional String delimiter, @Optional Integer maxKeys, @Default(value="NOT_ENCODED") EncodingType encodingType)
bucketName
- the target bucket's nameprefix
- the prefix of the objects to be listed. If unspecified, all objects are listedmarker
- where in the bucket to begin listing. The list will only include keys that occur lexicographically after the markerdelimiter
- causes keys that contain the same string between a prefix and the first occurrence of the delimiter to be rolled up into a single result element. These rolled-up
keys are not returned elsewhere in the response. The most commonly used delimiter is "/", which simulates a hierarchical organization similar to a file system
directory structure.maxKeys
- The maximum number of keys to include in the response. If maxKeys is not specified, Amazon S3 will limit the number of results in the response.encodingType
- The encoding method to be applied on the response.@Processor public ObjectListing listNextBatchOfObjects(@NotNull ObjectListing previousObjectListing)
previousObjectListing
- The previous truncated ObjectListing. If a non-truncated ObjectListing is passed in, an empty ObjectListing is returned without ever contacting Amazon S3.@Processor public VersionListing listVersions(@NotNull String bucketName, @Optional String prefix, @Optional String keyMarker, @Optional String versionIdMarker, @Optional String delimiter, @Optional Integer maxResults, @Default(value="NOT_ENCODED") EncodingType encodingType)
bucketName
- the target bucket's nameprefix
- optional parameter restricting the response to keys which begin with the specified prefix. You can use prefixes to separate a bucket into different sets of keys
in a way similar to how a file system uses folders.keyMarker
- where in the sorted list of all versions in the specified bucket to begin returning results. Results are always ordered first lexicographically (i.e.
alphabetically) and then from most recent version to least recent version. If a keyMarker is used without a versionIdMarker, results begin immediately after that
key's last version. When a keyMarker is used with a versionIdMarker, results begin immediately after the version with the specified key and version ID.versionIdMarker
- where in the sorted list of all versions in the specified bucket to begin returning results. Results are always ordered first lexicographically (i.e.
alphabetically) and then from most recent version to least recent version. A keyMarker must be specified when specifying a versionIdMarker. Results begin
immediately after the version with the specified key and version ID.delimiter
- causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the
VersionListing.getCommonPrefixes()
list. These rolled-up keys are not returned elsewhere in the response. The most commonly used delimiter is "/", which
simulates a hierarchical organization similar to a file system directory structure.maxResults
- the maximum number of results to include in the response.encodingType
- the encoding method to be applied on the response. An object key can contain any Unicode character; however, XML 1.0 parser cannot parse some characters, such as
characters with an ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the
keys in the response.@Processor public VersionListing listNextBatchOfVersions(@NotNull VersionListing previousVersionListing)
previousVersionListing
- The previous truncated VersionListing. If a non-truncated VersionListing is passed in, an empty VersionListing is returned without ever contacting Amazon S3.@Processor public void setObjectStorageClass(@NotNull String bucketName, @NotNull String key, @Default(value="STANDARD") StorageClass storageClass)
bucketName
- the object's bucket namekey
- the object's keystorageClass
- the storage class to set@Processor public void setObjectAcl(@NotNull String bucketName, @NotNull String key, @Optional String versionId, @FriendlyName(value="ACL")@Default(value="#[payload]") AccessControlList acl)
bucketName
- the object's bucket namekey
- the object's keyversionId
- the specific version of the objectacl
- the access control list of the object@Processor public ObjectResult copyObject(@NotNull@Placement(order=1) String sourceBucketName, @NotNull@Placement(order=2) String sourceKey, @Placement(order=3)@Optional String sourceVersionId, @Placement(order=4)@Optional String destinationBucketName, @NotNull@Placement(order=5) String destinationKey, @Placement(order=6)@FriendlyName(value="Canned ACL")@Default(value="PRIVATE") CannedAccessControlList destinationAcl, @Placement(order=7)@Default(value="STANDARD") StorageClass destinationStorageClass, @Placement(order=8)@Optional Map<String,String> destinationUserMetadata, @Placement(order=9)@Optional Date modifiedSince, @Placement(order=10)@Optional Date unmodifiedSince, @Placement(order=11)@Optional String encryption, @Placement(order=12)@Optional String contentType)
sourceBucketName
- the source object's bucketsourceKey
- the source object's keysourceVersionId
- the specific version of the source object to copy, if versioning is enabled. Left unspecified if the latest version is desired, or versioning is not enabled.destinationBucketName
- the destination object's bucket. If none provided, a local copy is performed, that is, it is copied within the same bucket.destinationKey
- the destination object's keydestinationAcl
- the acl of the destination object.destinationStorageClass
- one of StorageClass
enumerated values, defaults to StorageClass.STANDARD
destinationUserMetadata
- the new metadata of the destination object, that if specified, overrides that copied from the source objectmodifiedSince
- The modified constraint that restricts this request to executing only if the object has been modified after the specified date. This constraint is specified but
does not match, no copy is performedunmodifiedSince
- The unmodified constraint that restricts this request to executing only if the object has not been modified after this date. This constraint is specified but does
not match, no copy is performedencryption
- Encryption method for server-side encryption. Supported value AES256.contentType
- the destination object's Content-Type HTTP header@Processor public URI createObjectPresignedUri(@NotNull String bucketName, @NotNull String key, @Optional Date expiration, @FriendlyName(value="Content MD5")@Optional String contentMd5, @Optional String contentType, @Default(value="PUT") HttpMethod method, @Optional SSEAlgorithm sseS3Encryption)
bucketName
- the name of the bucket involved in this request.key
- the key of the object involved in this request.expiration
- the expiration date at which point the new pre-signed URL will no longer be accepted by Amazon S3.contentMd5
- the expected content-md5 header of the request.contentType
- the expected content-type of the request.method
- the HTTP method (GET, PUT, DELETE, HEAD) to be used in this request.sseS3Encryption
- the encryption method (KMS, AES256) to use for the presigned URL.@Processor @UserDefinedMetaData public org.mule.devkit.api.transformer.TransformingValue<com.amazonaws.services.s3.model.S3ObjectInputStream,org.mule.api.transformer.DataType<com.amazonaws.services.s3.model.S3ObjectInputStream>> getObjectContent(@NotNull String bucketName, @NotNull String key, @Optional String versionId, @Optional Date modifiedSince, @Optional Date unmodifiedSince, @Optional String mimeType, @Optional String encoding)
bucketName
- the object's bucketkey
- the object's keyversionId
- the specific version of the object to get its contents, if versioning is enabled, left unspecified if the latest version is desired, or versioning is not enabled.modifiedSince
- The modified constraint that restricts this request to executing only if the object has been modified after the specified date.unmodifiedSince
- The unmodified constraint that restricts this request to executing only if the object has not been modified after this date.mimeType
- Specifies the mimetype of the objectencoding
- Specifies the encding used for the ObjectContent@Processor public S3Object getObject(@NotNull String bucketName, @NotNull String key, @Optional String versionId, @Optional Date modifiedSince, @Optional Date unmodifiedSince)
Permission.Read
access to the object. 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.
Regarding conditional get constraints, Amazon S3 will ignore any dates occurring in the future.
bucketName
- the object's bucketkey
- the object's keyversionId
- the specific version of the object to get its contents, if versioning is enabled. Left unspecified if the latest version is desired, or versioning is not enabled.modifiedSince
- The modified constraint that restricts this request to executing only if the object has been modified after the specified date.unmodifiedSince
- The unmodified constraint that restricts this request to executing only if the object has not been modified after this date.@Processor public AccessControlList getObjectAcl(@NotNull String bucketName, @NotNull String key, @Optional String versionId)
bucketName
- the object's bucketkey
- the object's keyversionId
- the object's version id@Processor public S3ObjectMetadata getObjectMetadata(@NotNull String bucketName, @NotNull String key, @Optional String versionId)
bucketName
- the object's bucketkey
- the object's keyversionId
- the object metadata for the given bucketName and key@Processor public String initiateMultipartUpload(@NotNull String bucketName, @NotNull String key, @Placement(order=9)@Optional S3ObjectMetadata objectMetadata, @FriendlyName(value="Canned ACL")@Default(value="PRIVATE") CannedAccessControlList acl, @Default(value="STANDARD") StorageClass storageClass, @Optional String redirectLocation)
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, content encoding, user metadata, etc.acl
- the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed.storageClass
- the optional storage class to use when storing this upload's data in S3.redirectLocation
- Gets the optional redirect location for the new object.@Processor public UploadPartResult uploadPart(@NotNull String bucketName, @NotNull String key, @NotNull String uploadId, @NotNull Integer partNumber, @NotNull Long partSize, @Optional String md5Digest, @Optional InputStream content, @Optional File file, @Optional Long fileOffset, @Default(value="false") boolean isLastPart)
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.file
- the file containing the data to upload.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.@Processor public CopyPartResult uploadPartCopy(@NotNull String sourceBucketName, @NotNull String sourceKey, @Optional String sourceVersionId, @NotNull String destinationBucketName, @NotNull String destinationKey, @NotNull String uploadId, @NotNull Integer partNumber, @FriendlyName(value="Matching ETag Constraints")@Optional List<String> matchingETagConstraints, @Optional Date modifiedSince, @Optional Date unmodifiedSince, @Optional Long firstByte, @Optional Long lastByte)
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.@Processor public void abortMultipartUpload(@NotNull String bucketName, @NotNull String key, @NotNull String uploadId)
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.@Processor public CompleteMultipartUploadResult completeMultipartUpload(@NotNull String bucketName, @NotNull String key, @NotNull String uploadId, @NotNull@FriendlyName(value="Part ETags") List<PartETag> partETags)
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.@Processor public MultipartUploadListing listMultipartUploads(@NotNull String bucketName, @Optional String delimiter, @Optional String encodingType, @Optional String keyMarker, @Optional Integer maxUploads, @Optional String prefix, @Optional String uploadIdMarker)
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 elementencodingType
- 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.@Processor public PartListing listParts(@NotNull String bucketName, @NotNull String key, @NotNull String uploadId, @Optional String encodingType, @Optional Integer maxParts, @Optional Integer partNumberMarker)
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.public Config getConfig()
public void setConfig(Config config)
Copyright © 2010–2017. All rights reserved.