This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit e87a2167b462629764f1da779bae6669c36cdc2e Author: Andrea Cosentino <[email protected]> AuthorDate: Wed Aug 26 08:29:33 2020 +0200 CAMEL-15380 - Added example of destinationBucketPrefix and suffix. --- .../camel-aws2-s3/src/main/docs/aws2-s3-component.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc b/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc index 8a88f1f..e45e4b4 100644 --- a/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc +++ b/components/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc @@ -533,6 +533,20 @@ This will require specifying the destinationBucket option. As example: In this case the objects consumed will be moved to myothercamelbucket bucket and deleted from the original one (because of deleteAfterRead set to true as default). +You have also the possibility of using a key prefix/suffix while moving the file to a different bucket. The options are destinationBucketPrefix and destinationBucketSuffix. + +Taking the above example, you could do something like: + +[source,java] +-------------------------------------------------------------------------------- + from("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&moveAfterRead=true&destinationBucket=myothercamelbucket&destinationBucketPrefix=RAW(pre-)&destinationBucketSuffix=RAW(-suff)") + .to("mock:result"); +-------------------------------------------------------------------------------- + +In this case the objects consumed will be moved to myothercamelbucket bucket and deleted from the original one (because of deleteAfterRead set to true as default). + +So if the file name is test, in the myothercamelbucket you should see a file called pre-test-suff. + == Using customer key as encryption We introduced also the customer key support (an alternative of using KMS). The following code shows an example.
