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

[camel-kamelets] 09/13: Support DefaultCredentialProvider in the AWS Kamelets - AWS SQS Source

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 b45ff43674def0ab98ea74d7cb902d2a8f97c2a8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Feb 7 14:20:16 2022 +0100

    Support DefaultCredentialProvider in the AWS Kamelets - AWS SQS Source
---
 kamelets/aws-sqs-source.kamelet.yaml | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/kamelets/aws-sqs-source.kamelet.yaml b/kamelets/aws-sqs-source.kamelet.yaml
index 32ecfd9..3eb688b 100644
--- a/kamelets/aws-sqs-source.kamelet.yaml
+++ b/kamelets/aws-sqs-source.kamelet.yaml
@@ -33,10 +33,12 @@ spec:
     title: "AWS SQS Source"
     description: |-
       Receive data from AWS SQS.
+
+      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:
@@ -103,6 +105,13 @@ spec:
         x-descriptors:
         - urn:keda:metadata:queueURL
         - urn:keda:required
+      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"
@@ -111,11 +120,12 @@ spec:
       uri: "aws2-sqs:{{queueNameOrArn}}"
       parameters:
         autoCreateQueue: "{{autoCreateQueue}}"
-        secretKey: "{{secretKey}}"
-        accessKey: "{{accessKey}}"
+        secretKey: "{{?secretKey}}"
+        accessKey: "{{?accessKey}}"
         region: "{{region}}"
         deleteAfterRead: "{{deleteAfterRead}}"
         amazonAWSHost: "{{?amazonAWSHost}}"
         protocol: "{{?protocol}}"
+        useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
       steps:
       - to: "kamelet:sink"