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/02/07 13:26:04 UTC

[camel-kamelets] 03/13: Support DefaultCredentialProvider in the AWS Kamelets - AWS SQS FIFO Sink

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

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

commit b1d51f922d318e40008cf81ad8b8be9eb94618ae
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 7 14:13:45 2022 +0100

    Support DefaultCredentialProvider in the AWS Kamelets - AWS SQS FIFO Sink
---
 kamelets/aws-sqs-fifo-sink.kamelet.yaml | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/kamelets/aws-sqs-fifo-sink.kamelet.yaml b/kamelets/aws-sqs-fifo-sink.kamelet.yaml
index dc93be8..59b8153 100644
--- a/kamelets/aws-sqs-fifo-sink.kamelet.yaml
+++ b/kamelets/aws-sqs-fifo-sink.kamelet.yaml
@@ -30,11 +30,15 @@ metadata:
 spec:
   definition:
     title: AWS SQS FIFO Sink
-    description: Send message to an AWS SQS FIFO Queue
+    description: |-
+
+      Send message to an AWS SQS FIFO Queue.
+
+      Access Key/Secret Key are the basic method for authenticating to the AWS SQS Service. These parameters are optional, because the Kamelet provide also the 'useDefaultCredentialsProvider'.
+      
+      When using a default Credentials Provider the SQS 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.
     required:
       - queueNameOrArn
-      - accessKey
-      - secretKey
       - region
     type: object
     properties:
@@ -86,7 +90,14 @@ spec:
         description: The underlying protocol used to communicate with SQS
         type: string
         example: http or https
-        default: https  
+        default: https
+      useDefaultCredentialsProvider:
+        title: Default Credentials Provider
+        description: Set whether the SQS client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.
+        type: boolean
+        x-descriptors:
+        - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: false  
   dependencies:
   - "camel:aws2-sqs"
   - "camel:core"
@@ -123,9 +134,10 @@ spec:
                 uri: "aws2-sqs:{{queueNameOrArn}}"
                 parameters:
                   autoCreateQueue: "{{autoCreateQueue}}"
-                  accessKey: "{{accessKey}}"
-                  secretKey: "{{secretKey}}"
+                  accessKey: "{{?accessKey}}"
+                  secretKey: "{{?secretKey}}"
                   region: "{{region}}"
+                  useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}" 
                   messageGroupIdStrategy: "usePropertyValue"
                   messageDeduplicationIdStrategy: "useContentBasedDeduplication"
           otherwise:
@@ -134,9 +146,10 @@ spec:
                 uri: "aws2-sqs:{{queueNameOrArn}}"
                 parameters:
                   autoCreateQueue: "{{autoCreateQueue}}"
-                  accessKey: "{{accessKey}}"
-                  secretKey: "{{secretKey}}"
+                  accessKey: "{{?accessKey}}"
+                  secretKey: "{{?secretKey}}"
                   region: "{{region}}"
+                  useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}" 
                   messageGroupIdStrategy: "usePropertyValue"
                   messageDeduplicationIdStrategy: "useExchangeId"
                   amazonAWSHost: "{{?amazonAWSHost}}"