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:09 UTC

[camel-kamelets] 08/13: Support DefaultCredentialProvider in the AWS Kamelets - AWS SQS 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 a8e7d9e4fd3f81fdb6b9cf54145a94edce5b6af3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 7 14:19:03 2022 +0100

    Support DefaultCredentialProvider in the AWS Kamelets - AWS SQS Sink
---
 .../resources/kamelets/aws-sqs-sink.kamelet.yaml   | 24 +++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-sink.kamelet.yaml
index 6777602..42e0688 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-sink.kamelet.yaml
@@ -31,11 +31,13 @@ spec:
   definition:
     title: AWS SQS Sink
     description: |-
-      Send message to an AWS SQS Queue
+      Send message to an AWS SQS 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:
@@ -80,7 +82,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:kamelet"
@@ -92,8 +101,9 @@ spec:
           uri: "aws2-sqs:{{queueNameOrArn}}"
           parameters:
             autoCreateQueue: "{{autoCreateQueue}}"
-            accessKey: "{{accessKey}}"
-            secretKey: "{{secretKey}}"
+            accessKey: "{{?accessKey}}"
+            secretKey: "{{?secretKey}}"
             region: "{{region}}"
             amazonAWSHost: "{{?amazonAWSHost}}"
-            protocol: "{{?protocol}}"            
+            protocol: "{{?protocol}}"
+            useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"