You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/03/24 14:06:49 UTC

[camel-kamelets] branch main updated (590cf8c -> 8cfdf2b)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


    from 590cf8c  Use URI notation for some of the parameters we define in actions - XJ Action
     new 437d469  AWS S3 Sink: Add an optional keyName parameter
     new 8cfdf2b  AWS S3 Sink: Add an optional keyName parameter

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 kamelets/aws-s3-sink.kamelet.yaml                          | 14 +++++++-------
 .../src/main/resources/kamelets/aws-s3-sink.kamelet.yaml   | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

[camel-kamelets] 01/02: AWS S3 Sink: Add an optional keyName parameter

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 437d469359cc479f5486441b1e2e3ecf8b83ddd6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Mar 24 14:55:42 2022 +0100

    AWS S3 Sink: Add an optional keyName parameter
---
 kamelets/aws-s3-sink.kamelet.yaml                          | 14 +++++++-------
 .../src/main/resources/kamelets/aws-s3-sink.kamelet.yaml   | 10 +++++-----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/kamelets/aws-s3-sink.kamelet.yaml b/kamelets/aws-s3-sink.kamelet.yaml
index e8224c4..5838d29 100644
--- a/kamelets/aws-s3-sink.kamelet.yaml
+++ b/kamelets/aws-s3-sink.kamelet.yaml
@@ -37,11 +37,11 @@ spec:
       
       When using a default Credentials Provider the S3 client will load the credentials through this provider and won't use the static credential. This is reason for not having the access key and secret key as mandatory parameter for this Kamelet.
 
-      The Kamelet expects the following headers to be set:
+      The Kamelet can use the following header to be set:
 
       - `file` / `ce-file`: as the file name to upload
 
-      If the header won't be set the exchange ID will be used as file name.
+      If the header won't be set, the Kamelet parameter `keyName` should be populated. The `keyName` parameter could be a simple value language from the Apache Camel.
     required:
       - bucketNameOrArn
       - region
@@ -97,6 +97,10 @@ spec:
         x-descriptors:
           - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
         default: false
+      keyName:
+        title: Key Name
+        description: The key name for saving an element in the bucket.
+        type: string
   dependencies:
     - "camel:core"
     - "camel:aws2-s3"
@@ -117,11 +121,6 @@ spec:
             - set-header:
                 name: CamelAwsS3Key
                 simple: "${header[ce-file]}"
-          otherwise:
-            steps:
-            - set-header:
-                name: CamelAwsS3Key
-                simple: "${exchangeId}"
       - to:
           uri: "aws2-s3:{{bucketNameOrArn}}"
           parameters:
@@ -132,3 +131,4 @@ spec:
             useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
             uriEndpointOverride: "{{?uriEndpointOverride}}"
             overrideEndpoint: "{{overrideEndpoint}}"
+            keyName: "{{?keyName}}"
diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-sink.kamelet.yaml
index e8224c4..5b5a492 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-sink.kamelet.yaml
@@ -97,6 +97,10 @@ spec:
         x-descriptors:
           - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
         default: false
+      keyName:
+        title: Key Name
+        description: The key name for saving an element in the bucket.
+        type: string
   dependencies:
     - "camel:core"
     - "camel:aws2-s3"
@@ -117,11 +121,6 @@ spec:
             - set-header:
                 name: CamelAwsS3Key
                 simple: "${header[ce-file]}"
-          otherwise:
-            steps:
-            - set-header:
-                name: CamelAwsS3Key
-                simple: "${exchangeId}"
       - to:
           uri: "aws2-s3:{{bucketNameOrArn}}"
           parameters:
@@ -132,3 +131,4 @@ spec:
             useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
             uriEndpointOverride: "{{?uriEndpointOverride}}"
             overrideEndpoint: "{{overrideEndpoint}}"
+            keyName: "{{?keyName}}"

[camel-kamelets] 02/02: AWS S3 Sink: Add an optional keyName parameter

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 8cfdf2b3b05f2e88310e7e76d75aab3b682dc0c5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Mar 24 14:57:09 2022 +0100

    AWS S3 Sink: Add an optional keyName parameter
---
 .../src/main/resources/kamelets/aws-s3-sink.kamelet.yaml              | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-sink.kamelet.yaml
index 5b5a492..5838d29 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-sink.kamelet.yaml
@@ -37,11 +37,11 @@ spec:
       
       When using a default Credentials Provider the S3 client will load the credentials through this provider and won't use the static credential. This is reason for not having the access key and secret key as mandatory parameter for this Kamelet.
 
-      The Kamelet expects the following headers to be set:
+      The Kamelet can use the following header to be set:
 
       - `file` / `ce-file`: as the file name to upload
 
-      If the header won't be set the exchange ID will be used as file name.
+      If the header won't be set, the Kamelet parameter `keyName` should be populated. The `keyName` parameter could be a simple value language from the Apache Camel.
     required:
       - bucketNameOrArn
       - region