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 2023/04/24 09:47:24 UTC
[camel] 03/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS SNS
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.git
commit 8a0a0a3fa2d3e5863c704682509fd725a0e5290f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Apr 24 10:25:33 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS SNS
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../main/java/org/apache/camel/component/aws2/sns/Sns2Component.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java b/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java
index 944ecb1ac66..2c19080b32b 100644
--- a/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java
+++ b/components/camel-aws/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Component.java
@@ -71,9 +71,9 @@ public class Sns2Component extends DefaultComponent {
Sns2Endpoint endpoint = new Sns2Endpoint(uri, this, epConfiguration);
setProperties(endpoint, nonTransientParameters);
- if (!epConfiguration.isUseDefaultCredentialsProvider() && epConfiguration.getAmazonSNSClient() == null
+ if (!epConfiguration.isUseDefaultCredentialsProvider() && !epConfiguration.isUseProfileCredentialsProvider() && epConfiguration.getAmazonSNSClient() == null
&& (epConfiguration.getAccessKey() == null || epConfiguration.getSecretKey() == null)) {
- throw new IllegalArgumentException("AmazonSNSClient or accessKey and secretKey must be specified");
+ throw new IllegalArgumentException("useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, AmazonSNSClient or accessKey and secretKey must be specified");
}
return endpoint;