public class ObjectOperations extends Object
| Constructor and Description |
|---|
ObjectOperations() |
| Modifier and Type | Method and Description |
|---|---|
void |
copyObject(S3Configuration configuration,
S3Connection connection,
String sourceBucketName,
String sourceKey,
String sourceVersionId,
String destinationBucketName,
String destinationKey,
ApiObjectACL destinationAcl,
ApiStorageClass storageClass,
Map<String,String> destinationUserMetadata,
LocalDateTime modifiedSince,
LocalDateTime unmodifiedSince,
String serverSideEncryption,
String sseCustomerKey,
String ssekmsKeyId,
String sseCustomerKeyMD5,
String sseCustomerAlgorithm,
String contentType,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<CopyObjectResponse,Void> callback)
Creates a copy of an object that is already stored in Amazon S3.
|
String |
createObjectPresignedUrl(S3Configuration config,
S3Connection connection,
String bucketName,
String key,
Integer partNumber,
String uploadId,
PresignedURLMethod method,
int duration,
TimeUnit durationTimeUnit,
String contentMd5,
String contentType,
String sseCustomerAlgorithm)
Returns a pre-signed URL for accessing an Amazon S3 object.
|
void |
deleteObject(S3Configuration configuration,
S3Connection connection,
String bucketName,
String key,
String versionId,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object.
|
void |
deleteObjects(S3Configuration configuration,
S3Connection connection,
String bucketName,
List<ApiObjectIdentifier> objectIdentifiers,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
This action enables you to delete multiple objects from a bucket using a single HTTP request.
|
void |
getObject(S3Configuration configuration,
S3Connection connection,
String bucketName,
String key,
Integer partNumber,
String range,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,GetObjectOperationAttributes> callback)
Retrieves objects from Amazon S3.
|
void |
getObjectAcl(S3Configuration configuration,
S3Connection connection,
String bucketName,
String key,
String versionId,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<GetObjectAclResponse,Void> callback)
Returns the access control list (ACL) of an object.
|
void |
getObjectAttributes(S3Configuration configuration,
S3Connection connection,
String bucketName,
String key,
String versionId,
ApiObjectAttributes objectAttributes,
Integer maxParts,
Integer partNumberMarker,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<GetObjectAttributesResponse,Void> callback)
Retrieves all the metadata from an object without returning the object itself.
|
void |
headObject(S3Configuration configuration,
S3Connection connection,
String bucketName,
String key,
String versionId,
ObjectMatchingConstraints objectMatchingConstraints,
Integer partNumber,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<HeadObjectResponse,Void> callback)
The HEAD action retrieves metadata from an object without returning the object itself.
|
org.mule.runtime.extension.api.runtime.streaming.PagingProvider<S3Connection,ApiS3Object> |
listObjects(S3Configuration configuration,
String bucketName,
String delimiter,
String prefix,
Integer pageSize,
ApiEncodingType encodingType)
Returns all objects in a bucket.
|
org.mule.runtime.extension.api.runtime.streaming.PagingProvider<S3Connection,ApiObjectVersion> |
listObjectVersions(S3Configuration configuration,
String bucketName,
String delimiter,
String keyMarker,
String prefix,
Integer pageSize,
String versionIdMarker,
ApiEncodingType encodingType)
Returns metadata about all versions of the objects in a bucket.
|
void |
putObject(S3Configuration configuration,
S3Connection connection,
String bucketName,
String key,
InputStream content,
ApiObjectACL objectACL,
ObjectMetadata objectMetadata,
ConditionalWrites conditionalWrites,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<PutObjectResponse,Void> callback)
Adds an object to a bucket.
|
void |
putObjectAcl(S3Configuration configuration,
S3Connection connection,
String bucketName,
String key,
String contentMD5,
String versionId,
ApiObjectACL objectACL,
ApiOwner owner,
List<ApiGrant> grants,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<String,Void> callback)
Uses the acl subresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket.
|
void |
restoreObject(S3Configuration configuration,
S3Connection connection,
String bucketName,
String key,
String versionId,
Integer days,
ApiTier glacierJobTier,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<RestoreObjectResponse,Void> callback)
Restores an archived copy of an object back into Amazon S3.
|
void |
selectObjectContent(S3Configuration configuration,
S3Connection connection,
String bucketName,
String key,
String expression,
String expressionType,
ApiInputSerialization inputSerialization,
ApiOutputSerialization outputSerialization,
ApiScanRange scanRange,
boolean requestProgressEnabled,
String sseCustomerAlgorithm,
String sseCustomerKey,
String sseCustomerKeyMD5,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,Void> callback)
This action filters the contents of an Amazon S3 object based on a simple structured query language (SQL) statement.
|
@Throws(value={InvalidObjectStateErrorProvider.class,S3ErrorProvider.class,NoSuchBucketErrorProvider.class,NoSuchKeyErrorProvider.class})
@DisplayName(value="Copy Object")
public void copyObject(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Source bucket name")
String sourceBucketName,
@DisplayName(value="Source object key")
String sourceKey,
@DisplayName(value="Source version id") @Optional
String sourceVersionId,
@DisplayName(value="Destination bucket name") @Optional
String destinationBucketName,
@DisplayName(value="Destination object key") @Optional
String destinationKey,
@DisplayName(value="Destination ACL") @Optional
ApiObjectACL destinationAcl,
@DisplayName(value="Destination storage class") @Optional
ApiStorageClass storageClass,
@DisplayName(value="Destination user metadata") @Optional @NullSafe
Map<String,String> destinationUserMetadata,
@DisplayName(value="Modified since") @Optional
LocalDateTime modifiedSince,
@DisplayName(value="Unmodified since") @Optional
LocalDateTime unmodifiedSince,
@DisplayName(value="Server side encryption") @Optional
String serverSideEncryption,
@DisplayName(value="Sse customer key") @Optional
String sseCustomerKey,
@DisplayName(value="Sse kms key id") @Optional
String ssekmsKeyId,
@DisplayName(value="Sse customer key md5") @Optional
String sseCustomerKeyMD5,
@DisplayName(value="Sse customer algorithm") @Optional
String sseCustomerAlgorithm,
@DisplayName(value="ContentType") @Optional
String contentType,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<CopyObjectResponse,Void> callback)
Creates a copy of an object that is already stored in Amazon S3.
You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic action using this API. However, to copy an object greater than 5 GB, you must use the multipart upload Upload Part - Copy API. For more information, see Copy Object Using the REST Multipart Upload API.
All copy requests must be authenticated. Additionally, you must have read access to the source object and write access to the destination bucket. For more information, see REST Authentication. Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account.
A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. If the error occurs before the copy action starts, you receive a standard Amazon S3 error. If the error occurs during the copy operation, the error response is embedded in the 200 OK response. This means that a 200 OK response can contain either a success or an error. Design your application to parse the contents of the response and handle it appropriately.
If the copy is successful, you receive a response with information about the copied object.
If the request is an HTTP 1.1 request, the response is chunk encoded. If it were not, it would not contain the content-length, and you would need to read the entire body.
The copy request charge is based on the storage class and Region that you specify for the destination object. For pricing information, see Amazon S3 pricing.
configuration - - configuration usedconnection - - active connectionsourceBucketName - - the name of the source bucketsourceKey - - the name of the source keysourceVersionId - - the version id of the source objectdestinationBucketName - - the name of the destination bucketdestinationKey - - the key of the destination objectdestinationAcl - - ACL settings of the copied object. ACL is not preserved and is set to private for the user making the request.
To override the default ACL setting, specify a new ACL when generating a copy requeststorageClass - - the storage class of the new objectdestinationUserMetadata - - when copying an object, you can preserve all metadata (default) or specify new metadatamodifiedSince - - copies the object only if it was modified after specified dateunmodifiedSince - - copies the object only if it was not modified after specified dateserverSideEncryption - - specifies encryption for the copied objectsseCustomerKey - - specifies the customer-provided encryption key for Amazon S3 to use in encrypting datassekmsKeyId - - specifies the AWS KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption while using SSE-KMS (server-side encryption with AWS Key Management Service).sseCustomerKeyMD5 - - specifies the 128-bit MD5 digest of the encryption keysseCustomerAlgorithm - - specifies the algorithm to use when encrypting the objectcontentType - - a standard MIME type describing the format of the object data@MediaType(value="text/plain") @DisplayName(value="Create Object Presigned Url") public String createObjectPresignedUrl(@Config S3Configuration config, @Connection S3Connection connection, String bucketName, String key, @Optional @Summary(value="Required for UPLOAD_PART. If the content size is equal, or less than 5MB then partNumber should be 1, else use a loop to increase the number[1,2.3..]. ") Integer partNumber, @Optional @Summary(value="Required for ABORT_MULTIPART_UPLOAD, COMPLETE_MULTIPART_UPLOAD, UPLOAD_PART ") String uploadId, @Optional(defaultValue="PUT_OBJECT") PresignedURLMethod method, @Summary(value="The duration for which this presigned request should be valid. After this time has expired, attempting to use the presigned request will fail. ") @Optional(defaultValue="3600") int duration, @Optional(defaultValue="SECONDS") @Summary(value="Time unit for the Duration value.") TimeUnit durationTimeUnit, @Optional @DisplayName(value="Content MD5") String contentMd5, @Optional String contentType, @Optional @Summary(value="Specifies the algorithm to use to when encrypting the object.") @Example(value="AES256 | aws:kms") String sseCustomerAlgorithm)
config - Configuration for Amazon S3 connector.connection - Amazon S3 connection instance.bucketName - the name of the bucket involved in this request.key - the key of the object involved in this request.method - type of object operation to be presignedduration - The length of time for which the presigned URL will be valid.durationTimeUnit - The time unit of durationsseCustomerAlgorithm - the encryption method (KMS, AES256) to use for the presigned URL. This field is not allowed for the HTTP GET method. If you set a value for this field and use the HTTP GET method, you will get an error.@Throws(value={S3ErrorProvider.class,NoSuchBucketErrorProvider.class})
@DisplayName(value="Delete Object")
public void deleteObject(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object key")
String key,
@DisplayName(value="Object version Id") @Optional
String versionId,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects but will still respond that the command was successful.
To remove a specific version, you must be the bucket owner and you must use the version Id subresource. Using this subresource permanently deletes the version.
configuration - - configuration usedconnection - - active connectionbucketName - - The bucket name of the bucket containing the object.versionId - - versionId used to reference a specific version of the object.key - - Key name of the object to delete.@Throws(value={S3ErrorProvider.class,NoSuchBucketErrorProvider.class})
@DisplayName(value="Delete Objects")
public void deleteObjects(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object identifiers")
List<ApiObjectIdentifier> objectIdentifiers,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> callback)
This action enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this action provides a suitable alternative to sending individual delete requests, reducing per-request overhead.
The request contains a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a delete action and returns the result of that delete, success, or failure, in the response. Note that if the object specified in the request is not found, Amazon S3 returns the result as deleted.
The action supports two modes for the response: verbose and quiet. By default, the action uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete action encountered an error. For a successful deletion, the action does not return any information about the delete in the response body.
configuration - - configuration usedconnection - - active connectionbucketName - - the bucket name containing the objects to deleteobjectIdentifiers - - the list of the object identifier containing object key and version if of the object to delete@DisplayName(value="Get Object")
@Throws(value={InvalidObjectStateErrorProvider.class,NoSuchKeyErrorProvider.class,NoSuchBucketErrorProvider.class,S3ErrorProvider.class})
@MediaType(value="application/octet-stream",
strict=false)
public void getObject(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object key")
String key,
@Optional
Integer partNumber,
@Example(value="bytes=0-9") @Optional
String range,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,GetObjectOperationAttributes> callback)
Retrieves objects from Amazon S3. To use GET, you must have READ access to the object. If you grant READ access to the anonymous user, you can return the object without using an authorization header.
If the object you are retrieving is stored in the S3 Glacier or S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a copy using Restore Object operation. Otherwise, this action returns an InvalidObjectState error. For information about restoring archived objects, see Restoring Archived Objects.
configuration - - configuration usedconnection - - active connectionbucketName - - the bucket name of the bucket containing the objectkey - - key of the object to getpartNumber - - part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an objectrange - - range of the bytes that will be copied from source object from first to last byte@Throws(value={NoSuchKeyErrorProvider.class,S3ErrorProvider.class,NoSuchBucketErrorProvider.class})
@DisplayName(value="Get Object ACL")
public void getObjectAcl(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object key")
String key,
@DisplayName(value="Object version Id") @Optional
String versionId,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<GetObjectAclResponse,Void> callback)
Returns the access control list (ACL) of an object. To use this operation, you must have s3:GetObjectAcl permissions or READ_ACP access to the object.
This action is not supported by Amazon S3 on Outposts.
configuration - - configuration usedconnection - - active connectionbucketName - - the bucket name that contains the object for which to get the ACL informationkey - - the key of the object for which to get the ACL informationversionId - - versionId used to reference a specific version of the object@Throws(value={NoSuchKeyErrorProvider.class,S3ErrorProvider.class,NoSuchBucketErrorProvider.class})
@DisplayName(value="Get Object Attributes")
public void getObjectAttributes(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object key")
String key,
@DisplayName(value="Object version Id") @Optional
String versionId,
ApiObjectAttributes objectAttributes,
@Optional
Integer maxParts,
@Optional
Integer partNumberMarker,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<GetObjectAttributesResponse,Void> callback)
Retrieves all the metadata from an object without returning the object itself. This action is useful if you're interested only in an object's metadata. To use GetObjectAttributes, you must have READ access to the object.
configuration - - configuration usedconnection - - active connectionbucketName - - the bucket name of the bucket containing the objectkey - - the object keyversionId - - versionId used to reference a specific version of the objectobjectAttributes - - specifies the fields at the root level that you want returned to the response. Fields that you do not specify are not returned.maxParts - - sets the maximum number of parts to returnpartNumberMarker - - specifies the part after which listing should begin. Only parts with higher part numbers will be listed@Throws(value={NoSuchKeyErrorProvider.class,S3ErrorProvider.class,NoSuchBucketErrorProvider.class})
@DisplayName(value="Head Object")
public void headObject(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object key")
String key,
@DisplayName(value="Object version Id") @Optional
String versionId,
@ParameterGroup(name="Object Matching Constraints")
ObjectMatchingConstraints objectMatchingConstraints,
@Optional
Integer partNumber,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<HeadObjectResponse,Void> callback)
The HEAD action retrieves metadata from an object without returning the object itself. This action is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.
A HEAD request has the same options as a GET action on an object. The response is identical to the GET response except that there is no response body.
configuration - - configuration usedconnection - - active connectionbucketName - - the name of the bucket containing the objectkey - - the object keyversionId - - versionId used to reference a specific version of the objectobjectMatchingConstraints - - retrieves object metadata if it matches specified constraintspartNumber - - part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object@DisplayName(value="List Objects")
@Throws(value={NoSuchBucketErrorProvider.class,S3ErrorProvider.class})
public org.mule.runtime.extension.api.runtime.streaming.PagingProvider<S3Connection,ApiS3Object> listObjects(@Config
S3Configuration configuration,
@DisplayName(value="Bucket name")
String bucketName,
@Optional
String delimiter,
@Optional
String prefix,
@Optional
Integer pageSize,
@Optional
ApiEncodingType encodingType)
Returns all objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately. Objects are returned sorted in an ascending order of the respective key names in the list.
To use this operation, you must have READ access to the bucket.
To use this action in an AWS Identity and Access Management (IAM) policy, you must have permissions to perform the s3:ListBucket action. The bucket owner has this permission by default and can grant this permission to others.
configuration - - configuration usedbucketName - - bucket name to listdelimiter - - a delimiter is a character you use to group keysprefix - - limits the response to keys that begin with the specified prefixpageSize - - sets the page size of the response. By default the page size is 1,000 objects.encodingType - - encoding type used by Amazon S3 to encode object keys in the response@DisplayName(value="List Object Versions") public org.mule.runtime.extension.api.runtime.streaming.PagingProvider<S3Connection,ApiObjectVersion> listObjectVersions(@Config S3Configuration configuration, @DisplayName(value="Bucket name") String bucketName, @Optional String delimiter, @Optional String keyMarker, @Optional String prefix, @Optional Integer pageSize, @Optional String versionIdMarker, @Optional ApiEncodingType encodingType)
Returns metadata about all versions of the objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions.
To use this operation, you must have READ access to the bucket.
configuration - - configuration usedbucketName - - bucket name to listdelimiter - - a delimiter is a character you use to group keyskeyMarker - - specifies the key to start with when listing objects in a bucketprefix - - limits the response to keys that begin with the specified prefixpageSize - - sets the page size of the response. By default the page size is 1,000 objects.versionIdMarker - - specifies the object version you want to start listing fromencodingType - - encoding type used by Amazon S3 to encode object keys in the response@Throws(value={S3ErrorProvider.class,NoSuchBucketErrorProvider.class})
@DisplayName(value="Put Object")
public void putObject(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object key")
String key,
@Content
InputStream content,
@Optional
ApiObjectACL objectACL,
@Placement(tab="Advanced") @ParameterGroup(name="Object metadata")
ObjectMetadata objectMetadata,
@ParameterGroup(name="Conditional Writes")
ConditionalWrites conditionalWrites,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<PutObjectResponse,Void> callback)
Adds an object to a bucket. You must have WRITE permissions on a bucket to add an object to it.
Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket.
Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. Amazon S3 does not provide object locking; if you need this, make sure to build it into your application layer or use versioning instead.
To ensure that data is not corrupted traversing the network, use the Content-MD5 parameter. When you use this parameter, Amazon S3 checks the object against the provided MD5 value and, if they do not match, returns an error. Additionally, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.configuration - - configuration usedconnection - - active connectionbucketName - - the bucket name to which the PUT action was initiatedkey - - object key for which the PUT action was initiatedcontent - - content of the object to be uploadedobjectACL - - the canned ACL to apply to the objectobjectMetadata - - additional object metadata@Throws(value={NoSuchKeyErrorProvider.class,S3ErrorProvider.class,NoSuchBucketErrorProvider.class})
@DisplayName(value="Put Object ACL")
@MediaType(value="text/plain")
public void putObjectAcl(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object key")
String key,
@DisplayName(value="ContentMD5") @Optional
String contentMD5,
@Optional
String versionId,
@Optional
ApiObjectACL objectACL,
@Optional
ApiOwner owner,
@Optional @NullSafe
List<ApiGrant> grants,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<String,Void> callback)
Uses the acl subresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket. You must have WRITE_ACP permission to set the ACL of an object.
You can set access permissions using one of the following methods:
configuration - - configuration usedconnection - - active connectionbucketName - - the bucket name that contains the object to which you want to attach the ACLkey - - key for which the action was initiatedcontentMD5 - - the base64 encoded 128-bit MD5 digest of the associated object (content - not including headers) according to RFC 1864versionId - - versionId used to reference a specific version of the objectobjectACL - - the canned ACL to apply to the objectowner - - the account ID of the expected bucket ownergrants - - a list of grants@Throws(value={RestoreObjectErrorProvider.class,InvalidObjectStateErrorProvider.class,S3ErrorProvider.class,NoSuchKeyErrorProvider.class,NoSuchBucketErrorProvider.class})
@DisplayName(value="Restore Object")
public void restoreObject(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object key")
String key,
@Optional
String versionId,
Integer days,
ApiTier glacierJobTier,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<RestoreObjectResponse,Void> callback)
Restores an archived copy of an object back into Amazon S3.
Objects that you archive to the S3 Glacier or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers are not accessible in real time. For objects in Archive Access or Deep Archive Access tiers you must first initiate a restore request, and then wait until the object is moved into the Frequent Access tier. For objects in S3 Glacier or S3 Glacier Deep Archive storage classes you must first initiate a restore request, and then wait until a temporary copy of the object is available. To access an archived object, you must restore the object for the duration (number of days) that you specify.
To restore a specific object version, you can provide a version ID. If you don't provide a version ID, Amazon S3 restores the current version.
configuration - - configuration usedconnection - - active connectionbucketName - - the bucket name containing the object to restorekey - - object key for which the action was initiatedversionId - - versionId used to reference a specific version of the objectdays - - lifetime of the active copy in days. Do not use with restores that specify OutputLocationglacierJobTier - - retrieval tier at which the restore will be processed@Throws(value={S3ErrorProvider.class,NoSuchKeyErrorProvider.class,NoSuchBucketErrorProvider.class})
@DisplayName(value="Select Object Content")
@MediaType(value="application/octet-stream",
strict=false)
public void selectObjectContent(@Config
S3Configuration configuration,
@Connection
S3Connection connection,
@DisplayName(value="Bucket name")
String bucketName,
@DisplayName(value="Object key")
String key,
@Example(value="Select * from S3Object")
String expression,
@Example(value="SQL")
String expressionType,
ApiInputSerialization inputSerialization,
ApiOutputSerialization outputSerialization,
@Optional
ApiScanRange scanRange,
@Optional
boolean requestProgressEnabled,
@Placement(tab="Advanced") @Optional
String sseCustomerAlgorithm,
@Placement(tab="Advanced") @Optional
String sseCustomerKey,
@Placement(tab="Advanced") @Optional
String sseCustomerKeyMD5,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<InputStream,Void> callback)
This action filters the contents of an Amazon S3 object based on a simple structured query language (SQL) statement. In the request, along with the SQL expression, you must also specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse object data into records, and returns only records that match the specified SQL expression. You must also specify the data serialization format for the response.
Object Data Formats
You can use Amazon S3 Select to query objects that have the following format properties:
CSV, JSON, and Parquet - Objects must be in CSV, JSON, or Parquet format.
UTF-8 - UTF-8 is the only encoding type Amazon S3 Select supports.
GZIP or BZIP2 - CSV and JSON files can be compressed using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object compression for Parquet objects.
configuration - - configuration usedconnection - - active connectionbucketName - - the bucket name containing the object content to selectkey - - the object key containing the content to selectexpression - - the expression that is used to query the object.expressionType - - the type of the provided expression .inputSerialization - - describes the format of the data in the object that is being queried.outputSerialization - - describes the format of the data that you want Amazon S3 to return in response.scanRange - - specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range.requestProgressEnabled - - specifies if periodic request progress information should be enabled.sseCustomerAlgorithm - - the server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm.sseCustomerKey - - the server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm.sseCustomerKeyMD5 - - the MD5 server-side encryption (SSE) customer managed key.Copyright © 2025 MuleSoft, Inc.. All rights reserved.