| Namespace | http://www.mulesoft.org/schema/mule/s3 |
|---|---|
| Schema Location | http://www.mulesoft.org/schema/mule/s3/2.0/mule-s3.xsd |
| Version | 2.0 |
| Minimum Mule Version | 3.2 |
Amazon S3 (Simple Storage Service) is an online storage web service offered by Amazon Web Services. Amazon S3
provides storage through web services interfaces (REST, SOAP, and BitTorrent).
| Configuration | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Configure an instance of this module
| |||||||||||
| Message Processors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
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.
| |||||||||||
Creates a new bucket; connector must not be configured as anonymous for this
operation to succeed.
| |||||||||||
Uploads an object to S3.
| |||||||||||
Returns a pre-signed URL for accessing an Amazon S3 object.
| |||||||||||
Creates an http URI for the given object id.
| |||||||||||
Deletes the specified bucket.
| |||||||||||
Deletes the bucket's policy.
| |||||||||||
Removes the website configuration for a bucket; this operation requires the
DeleteBucketWebsite permission.
| |||||||||||
Deletes a given object, only the owner of the bucket containing the version
can perform this operation.
| |||||||||||
Answers the policy for the given bucket.
| |||||||||||
Answers the website of the given bucket.
| |||||||||||
Gets the object stored in Amazon S3 under the specified bucket and key.
| |||||||||||
Gets the content of an object stored in Amazon S3 under the specified bucket
and key.
| |||||||||||
Gets the metadata for the specified Amazon S3 object without actually fetching
the object itself.
| |||||||||||
Answers a list of all Amazon S3 buckets that the authenticated sender of the
request owns.
| |||||||||||
Lazily lists all object versions for a given bucket that has versioning enabled.
| |||||||||||
Lazily lists all objects for a given prefix.
| |||||||||||
Sets the bucket's policy, overriding any previously set.
| |||||||||||
Sets the versioning status for the given bucket.
| |||||||||||
Sets the given bucket's website configuration.
| |||||||||||
Sets the Amazon S3 storage class for the given object.
| |||||||||||
To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s3="http://www.mulesoft.org/schema/mule/s3"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/s3
http://www.mulesoft.org/schema/mule/s3/2.0/mule-s3.xsd">
<!-- here goes your flows and configuration elements -->
</mule>
This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necesary as long as each carries its own name.
Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.
| Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Name | Default Value | Description | Optional. Give a name to this configuration so it can be later referenced. | |||||||
| Optional. The optional proxy port | |||||||||||
| Optional. The optional proxy password | |||||||||||
| Optional. The optional proxy port | |||||||||||
| Optional. The optional proxy username | |||||||||||
This connector offers automatic connection management via the use of a connection pool. The pool will act a storage mechanism for all the connections that are in-use by the user of this connector.
Prior to execution of a processor, the connector will attempt to lookup an already established connection and if one doesn't exists it will create one. That lookup mechanism is done in the connection pool via the use of connection variables declared as keys.
The user of the connector can configure the pool by adding a connection-pooling-profile to the connector configuration like this:
<s3:connection-pooling-profile maxActive="10" maxIdle="10"
exhaustedAction="WHEN_EXHAUSTED_GROW" maxWait="120"/>
The following is a list of connection attributes, each connection attribute can be configured at the config element level or they can also be added to each processor. If they are used at the processor level they get the benefit of full expression resolution.
| Connection Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Name | Description | ||||||||||
| The access key provided by Amazon, needed for non annoynous operations |
|||||||||||
| The secrete key provided by Amazon, needed for non annoynous operations |
|||||||||||
Also this connector offers automatic retry for certain operations. There are a couple of situations in which a retry may solve the problem at hand, like for example if the system is currently busy or if the session has expired. Those kind of situations are solvable by reacquiring a connection and retrying the operation.
By default, the connector will automatically attempt to retry the operation only once. You can at your choosing specify a greater ammount of retries by using the retryMax attribute on each operation.
... retryMax="3"/>
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. By default, all object metadata for the source object are
copied to the new destination object, unless new object metadata in the
specified is provided. The AccesControlList is not copied to the new object,
and, unless another ACL specified, PRIVATE is assumed. If no destination
bucket is specified, the same that the source bucket is used - local copy.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The source object's bucket |
||
| The source object's key |
||
| Optional. 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. |
||
| Optional. The destination object's bucket. If none
provided, a local copy is performed, that is, it is copied within
the same bucket. |
||
| The destination object's key |
||
| Optional. The acl of the destination object. |
||
Optional. One of StorageClass enumerated values, defaults to STANDARD |
||
| Optional. The new metadata of the destination object,
that if specified, overrides that copied from the source object |
||
| Optional. 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 performed |
||
| Optional. 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 performed |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Creates a new bucket; connector must not be configured as anonymous for this
operation to succeed. Bucket names must be unique across all of Amazon S3,
that is, among all their users. Bucket ownership is similar to the ownership
of Internet domain names. Within Amazon S3, only a single user owns each
bucket. Once a uniquely named bucket is created in Amazon S3, organize and
name the objects within the bucket in any way. Ownership of the bucket is
retained as long as the owner has an Amazon S3 account. To conform with DNS
requirements, buckets names must: not contain underscores, be between 3 and 63
characters long, not end with a dash, not contain adjacent periods, not
contain dashes next to periods and not contain uppercase characters. Do not
make bucket create or delete calls in the high availability code path of an
application. Create or delete buckets in a separate initialization or setup.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The bucket to create. It must not exist yet. |
||
| Optional. The region where to create the new bucket |
||
| Optional. The access control list of the new bucket |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Uploads an object to S3. Supported contents are InputStreams, Strings, byte
arrays and Files.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The object's bucket |
||
| The object's key |
||
| The content to be uploaded to S3, capable of creating a PutObjectRequest. |
||
| Optional. 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 length |
||
| Optional. The content md5, encoded in base 64. If content is a file,
it is ignored. |
||
| Optional. The content type of the new object. |
||
| Optional. The access control list of the new object |
||
| Optional. The storage class of the new object |
||
| Optional. A map of arbitrary object properties keys and values |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Returns a pre-signed URL for accessing an Amazon S3 object. The pre-signed URL
can be shared to other users, allowing access to the resource without
providing an account's AWS security credentials.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The object's bucket |
||
| The object's key |
||
| Optional. The specific version of the object to create the URI, if
versioning is enabled. Left unspecified if the latest version is
desired, or versioning is not enabled. |
||
| Optional. The time at which the returned pre-signed URL will expire. |
||
| Optional. The HTTP method verb to use for this URL |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Creates an http URI for the given object id. The useDefaultServer option
enables using default US Amazon server subdomain in the URI regardless of the
region. The main benefit of such feature is that this operation does not need
to hit the Amazon servers, but the drawback is that using the given URI as an
URL to the resource have unnecessary latency penalties for standard regions
other than US_STANDARD.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The object's bucket |
||
| The object's key |
||
| Optional. If the default US Amazon server subdomain should be
used in the URI regardless of the region. |
||
| Optional. Whether to use http or https |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Deletes the specified bucket. All objects (and all object versions, if
versioning was ever enabled) in the bucket must be deleted before the bucket
itself can be deleted; this restriction can be relaxed by specifying the
attribute force="true".
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The bucket to delete |
||
| Optional. Optional true if the bucket must be deleted even if it is not empty, false if operation should fail in such scenario.
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Deletes the bucket's policy. Only the owner of the bucket can delete the
bucket policy. Bucket policies provide access control management at the bucket
level for both the bucket resource and contained object resources.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The bucket whose policy to delete
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Removes the website configuration for a bucket; this operation requires the
DeleteBucketWebsite permission. By default, only the bucket owner can delete
the website configuration attached to a bucket. However, bucket owners can
grant other users permission to delete the website configuration by writing a
bucket policy granting them the 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.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The bucket whose policy to delete
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Deletes a given object, only the owner of the bucket containing the version
can perform this operation. If version is specified, versioning must be
enabled, and once deleted, there is no method to restore such version.
Otherwise, 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.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The object's bucket |
||
| The object's key |
||
| Optional. The specific version of the object to delete, if versioning
is enabled. Left unspecified if the latest version is desired, or
versioning is not enabled.
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Answers the policy for the given bucket. Only the owner of the bucket can
retrieve it. If no policy has been set for the bucket, then a null policy text
field will be returned.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The bucket whose policy to retrieve |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Answers the website of the given bucket. This operation requires the
GetBucketWebsite permission. By default, only the bucket owner can read the
bucket website configuration. However, bucket owners can allow other users to
read the website configuration by writing a bucket policy granting them the
GetBucketWebsite permission.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The target bucket's name |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Gets the object stored in Amazon S3 under the specified bucket and key.
Returns null if the specified constraints weren't met. To get an object from
Amazon S3, the caller must have 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.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The object's bucket |
||
| The object's key |
||
| Optional. 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. |
||
| Optional. The modified constraint that restricts this request to
executing only if the object has been modified after the specified
date. |
||
| Optional. The unmodified constraint that restricts this request
to executing only if the object has not been modified after this
date. |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Gets the content of an object stored in Amazon S3 under the specified bucket
and key. Returns null if the specified constraints weren't met. To get an
object's content from Amazon S3, the caller must have Read
access to the object. Regarding conditional get constraints, Amazon S3 will
ignore any dates occurring in the future.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The object's bucket |
||
| The object's key |
||
| Optional. 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. |
||
| Optional. The modified constraint that restricts this request to
executing only if the object has been modified after the specified
date. |
||
| Optional. The unmodified constraint that restricts this request
to executing only if the object has not been modified after this
date. |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Gets the metadata for the specified Amazon S3 object without actually fetching
the object itself. This is useful in obtaining only the object metadata, and
avoids wasting bandwidth on fetching the object data.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The object's bucket |
||
| The object's key |
||
| Optional. The object metadata for the given bucketName and key |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Answers a list of all Amazon S3 buckets that the authenticated sender of the
request owns. Users must authenticate with a valid AWS Access Key ID that is
registered with Amazon S3. Anonymous requests cannot list buckets, and users
cannot list buckets that they did not create.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Lazily lists all object versions for a given bucket that has versioning enabled.
As S3 does not limit in any way
the number of objects, such listing can retrieve an arbitrary amount of
object versions, and may need to perform extra calls to the api while it is iterated.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The target bucket's name |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Lazily lists all objects for a given prefix. As S3 does not limit in any way
the number of objects, such listing can retrieve an arbitrary amount of
objects, and may need to perform extra calls to the api while it is iterated.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The target bucket's name |
||
| Optional. The prefix of the objects to be listed. If unspecified, all
objects are listed |
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Sets the bucket's policy, overriding any previously set. Only the owner of the
bucket can set a bucket policy. Bucket policies provide access control
management at the bucket level for both the bucket resource and contained
object resources. Only one policy can be specified per-bucket.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The bucket name |
||
| The policy text
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Sets the versioning status for the given bucket. A bucket's versioning
configuration can be in one of three possible states: Off, Enabled and
Suspended. By default, new buckets are in the Off state. Once versioning is
enabled for a bucket the status can never be reverted to Off.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The target bucket name |
||
| The version status to set
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Sets the given bucket's website configuration. This operation requires the
PutBucketWebsite permission. By default, only the bucket owner can configure
the website attached to a bucket. However, bucket owners can allow other users
to set the website configuration by writing a bucket policy granting them the
S3:PutBucketWebsite permission.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The target bucket's name |
||
| The document to serve when a directory is specified, relative to
the requested resource |
||
| Optional. The full path to error document the bucket will use as
error page for 4XX errors
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |
Sets the Amazon S3 storage class for the given object. Changing the storage
class of an object in a bucket that has enabled versioning creates a new
version of the object with the new storage class. The existing version of the
object preservers the previous storage class.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| The object's bucket name |
||
| The object's key |
||
| The storage class to set
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically | |
| Optional. The access key provided by Amazon, needed for non annoynous operations |
||
| Optional. The secrete key provided by Amazon, needed for non annoynous operations |