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 4592462db6ba2c72719e27697f2ed80f78ca0cbb
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Mon Apr 24 10:28:55 2023 +0200

    CAMEL-19159 - Camel-AWS: Support Profile Credential provider as 
configuration - AWS SNS
    
    Signed-off-by: Andrea Cosentino <anco...@gmail.com>
---
 .../camel/component/aws2/sns/Sns2ComponentConfigurer.java    | 12 ++++++++++++
 .../camel/component/aws2/sns/Sns2EndpointConfigurer.java     | 12 ++++++++++++
 .../camel/component/aws2/sns/Sns2EndpointUriFactory.java     |  4 +++-
 .../org/apache/camel/component/aws2/sns/aws2-sns.json        |  4 ++++
 4 files changed, 31 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2ComponentConfigurer.java
 
b/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2ComponentConfigurer.java
index 831d0a0e73c..e18916ece0c 100644
--- 
a/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2ComponentConfigurer.java
+++ 
b/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2ComponentConfigurer.java
@@ -50,6 +50,8 @@ public class Sns2ComponentConfigurer extends 
PropertyConfigurerSupport implement
         case "overrideendpoint":
         case "overrideEndpoint": 
getOrCreateConfiguration(target).setOverrideEndpoint(property(camelContext, 
boolean.class, value)); return true;
         case "policy": 
getOrCreateConfiguration(target).setPolicy(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "profilecredentialsname":
+        case "profileCredentialsName": 
getOrCreateConfiguration(target).setProfileCredentialsName(property(camelContext,
 java.lang.String.class, value)); return true;
         case "proxyhost":
         case "proxyHost": 
getOrCreateConfiguration(target).setProxyHost(property(camelContext, 
java.lang.String.class, value)); return true;
         case "proxyport":
@@ -72,6 +74,8 @@ public class Sns2ComponentConfigurer extends 
PropertyConfigurerSupport implement
         case "uriEndpointOverride": 
getOrCreateConfiguration(target).setUriEndpointOverride(property(camelContext, 
java.lang.String.class, value)); return true;
         case "usedefaultcredentialsprovider":
         case "useDefaultCredentialsProvider": 
getOrCreateConfiguration(target).setUseDefaultCredentialsProvider(property(camelContext,
 boolean.class, value)); return true;
+        case "useprofilecredentialsprovider":
+        case "useProfileCredentialsProvider": 
getOrCreateConfiguration(target).setUseProfileCredentialsProvider(property(camelContext,
 boolean.class, value)); return true;
         default: return false;
         }
     }
@@ -106,6 +110,8 @@ public class Sns2ComponentConfigurer extends 
PropertyConfigurerSupport implement
         case "overrideendpoint":
         case "overrideEndpoint": return boolean.class;
         case "policy": return java.lang.String.class;
+        case "profilecredentialsname":
+        case "profileCredentialsName": return java.lang.String.class;
         case "proxyhost":
         case "proxyHost": return java.lang.String.class;
         case "proxyport":
@@ -128,6 +134,8 @@ public class Sns2ComponentConfigurer extends 
PropertyConfigurerSupport implement
         case "uriEndpointOverride": return java.lang.String.class;
         case "usedefaultcredentialsprovider":
         case "useDefaultCredentialsProvider": return boolean.class;
+        case "useprofilecredentialsprovider":
+        case "useProfileCredentialsProvider": return boolean.class;
         default: return null;
         }
     }
@@ -158,6 +166,8 @@ public class Sns2ComponentConfigurer extends 
PropertyConfigurerSupport implement
         case "overrideendpoint":
         case "overrideEndpoint": return 
getOrCreateConfiguration(target).isOverrideEndpoint();
         case "policy": return getOrCreateConfiguration(target).getPolicy();
+        case "profilecredentialsname":
+        case "profileCredentialsName": return 
getOrCreateConfiguration(target).getProfileCredentialsName();
         case "proxyhost":
         case "proxyHost": return 
getOrCreateConfiguration(target).getProxyHost();
         case "proxyport":
@@ -180,6 +190,8 @@ public class Sns2ComponentConfigurer extends 
PropertyConfigurerSupport implement
         case "uriEndpointOverride": return 
getOrCreateConfiguration(target).getUriEndpointOverride();
         case "usedefaultcredentialsprovider":
         case "useDefaultCredentialsProvider": return 
getOrCreateConfiguration(target).isUseDefaultCredentialsProvider();
+        case "useprofilecredentialsprovider":
+        case "useProfileCredentialsProvider": return 
getOrCreateConfiguration(target).isUseProfileCredentialsProvider();
         default: return null;
         }
     }
diff --git 
a/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointConfigurer.java
 
b/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointConfigurer.java
index 2efee9cf6b9..8346020ba95 100644
--- 
a/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointConfigurer.java
+++ 
b/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointConfigurer.java
@@ -42,6 +42,8 @@ public class Sns2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "overrideendpoint":
         case "overrideEndpoint": 
target.getConfiguration().setOverrideEndpoint(property(camelContext, 
boolean.class, value)); return true;
         case "policy": 
target.getConfiguration().setPolicy(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "profilecredentialsname":
+        case "profileCredentialsName": 
target.getConfiguration().setProfileCredentialsName(property(camelContext, 
java.lang.String.class, value)); return true;
         case "proxyhost":
         case "proxyHost": 
target.getConfiguration().setProxyHost(property(camelContext, 
java.lang.String.class, value)); return true;
         case "proxyport":
@@ -64,6 +66,8 @@ public class Sns2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "uriEndpointOverride": 
target.getConfiguration().setUriEndpointOverride(property(camelContext, 
java.lang.String.class, value)); return true;
         case "usedefaultcredentialsprovider":
         case "useDefaultCredentialsProvider": 
target.getConfiguration().setUseDefaultCredentialsProvider(property(camelContext,
 boolean.class, value)); return true;
+        case "useprofilecredentialsprovider":
+        case "useProfileCredentialsProvider": 
target.getConfiguration().setUseProfileCredentialsProvider(property(camelContext,
 boolean.class, value)); return true;
         default: return false;
         }
     }
@@ -97,6 +101,8 @@ public class Sns2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "overrideendpoint":
         case "overrideEndpoint": return boolean.class;
         case "policy": return java.lang.String.class;
+        case "profilecredentialsname":
+        case "profileCredentialsName": return java.lang.String.class;
         case "proxyhost":
         case "proxyHost": return java.lang.String.class;
         case "proxyport":
@@ -119,6 +125,8 @@ public class Sns2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "uriEndpointOverride": return java.lang.String.class;
         case "usedefaultcredentialsprovider":
         case "useDefaultCredentialsProvider": return boolean.class;
+        case "useprofilecredentialsprovider":
+        case "useProfileCredentialsProvider": return boolean.class;
         default: return null;
         }
     }
@@ -148,6 +156,8 @@ public class Sns2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "overrideendpoint":
         case "overrideEndpoint": return 
target.getConfiguration().isOverrideEndpoint();
         case "policy": return target.getConfiguration().getPolicy();
+        case "profilecredentialsname":
+        case "profileCredentialsName": return 
target.getConfiguration().getProfileCredentialsName();
         case "proxyhost":
         case "proxyHost": return target.getConfiguration().getProxyHost();
         case "proxyport":
@@ -170,6 +180,8 @@ public class Sns2EndpointConfigurer extends 
PropertyConfigurerSupport implements
         case "uriEndpointOverride": return 
target.getConfiguration().getUriEndpointOverride();
         case "usedefaultcredentialsprovider":
         case "useDefaultCredentialsProvider": return 
target.getConfiguration().isUseDefaultCredentialsProvider();
+        case "useprofilecredentialsprovider":
+        case "useProfileCredentialsProvider": return 
target.getConfiguration().isUseProfileCredentialsProvider();
         default: return null;
         }
     }
diff --git 
a/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointUriFactory.java
 
b/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointUriFactory.java
index beb3b700674..a069b071bae 100644
--- 
a/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointUriFactory.java
+++ 
b/components/camel-aws/camel-aws2-sns/src/generated/java/org/apache/camel/component/aws2/sns/Sns2EndpointUriFactory.java
@@ -21,7 +21,7 @@ public class Sns2EndpointUriFactory extends 
org.apache.camel.support.component.E
     private static final Set<String> SECRET_PROPERTY_NAMES;
     private static final Set<String> MULTI_VALUE_PREFIXES;
     static {
-        Set<String> props = new HashSet<>(24);
+        Set<String> props = new HashSet<>(26);
         props.add("accessKey");
         props.add("amazonSNSClient");
         props.add("autoCreateTopic");
@@ -33,6 +33,7 @@ public class Sns2EndpointUriFactory extends 
org.apache.camel.support.component.E
         props.add("messageStructure");
         props.add("overrideEndpoint");
         props.add("policy");
+        props.add("profileCredentialsName");
         props.add("proxyHost");
         props.add("proxyPort");
         props.add("proxyProtocol");
@@ -46,6 +47,7 @@ public class Sns2EndpointUriFactory extends 
org.apache.camel.support.component.E
         props.add("trustAllCertificates");
         props.add("uriEndpointOverride");
         props.add("useDefaultCredentialsProvider");
+        props.add("useProfileCredentialsProvider");
         PROPERTY_NAMES = Collections.unmodifiableSet(props);
         Set<String> secretProps = new HashSet<>(2);
         secretProps.add("accessKey");
diff --git 
a/components/camel-aws/camel-aws2-sns/src/generated/resources/org/apache/camel/component/aws2/sns/aws2-sns.json
 
b/components/camel-aws/camel-aws2-sns/src/generated/resources/org/apache/camel/component/aws2/sns/aws2-sns.json
index 3f90859092d..98ee3632407 100644
--- 
a/components/camel-aws/camel-aws2-sns/src/generated/resources/org/apache/camel/component/aws2/sns/aws2-sns.json
+++ 
b/components/camel-aws/camel-aws2-sns/src/generated/resources/org/apache/camel/component/aws2/sns/aws2-sns.json
@@ -32,6 +32,7 @@
     "messageStructure": { "kind": "property", "displayName": "Message 
Structure", "group": "producer", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "The message structure to use such as json" },
     "overrideEndpoint": { "kind": "property", "displayName": "Override 
Endpoint", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "Set the need for overidding the endpoint. This 
option needs to be used in combination with uriEndpoi [...]
     "policy": { "kind": "property", "displayName": "Policy", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "The policy for this 
topic. Is loaded by default from classpath, but you can prefix with classpath:, 
file:, or http: to load the resource [...]
+    "profileCredentialsName": { "kind": "property", "displayName": "Profile 
Credentials Name", "group": "producer", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "If using a profile credentials provider this 
parameter will set the profile name" },
     "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "To define a proxy host 
when instantiating the SNS client" },
     "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": 
"producer", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "To define a proxy port 
when instantiating the SNS client" },
     "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", 
"group": "producer", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" 
], "deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"HTTPS", "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "To define a proxy protocol when instantiating 
t [...]
@@ -43,6 +44,7 @@
     "trustAllCertificates": { "kind": "property", "displayName": "Trust All 
Certificates", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "If we want to trust all certificates in case 
of overriding the endpoint" },
     "uriEndpointOverride": { "kind": "property", "displayName": "Uri Endpoint 
Override", "group": "producer", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "Set the overriding uri endpoint. This option 
needs to be used in combination with overrideEndpoint option" },
     "useDefaultCredentialsProvider": { "kind": "property", "displayName": "Use 
Default Credentials Provider", "group": "producer", "label": "", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "Set whether the SNS 
client should expect to load credentials on an AWS i [...]
+    "useProfileCredentialsProvider": { "kind": "property", "displayName": "Use 
Profile Credentials Provider", "group": "producer", "label": "", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "Set whether the SNS 
client should expect to load credentials through a p [...]
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired 
Enabled", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Whether autowiring is 
enabled. This is used for automatic autowiring options (the option must be 
marked as autowired) by looking up in the registry to find if there is a single 
instance of matching type, which t [...]
     "accessKey": { "kind": "property", "displayName": "Access Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "Amazon AWS Access Key" },
     "secretKey": { "kind": "property", "displayName": "Secret Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "Amazon AWS Secret Key" }
@@ -63,6 +65,7 @@
     "messageStructure": { "kind": "parameter", "displayName": "Message 
Structure", "group": "producer", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "The message structure to use such as json" },
     "overrideEndpoint": { "kind": "parameter", "displayName": "Override 
Endpoint", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "Set the need for overidding the endpoint. This 
option needs to be used in combination with uriEndpo [...]
     "policy": { "kind": "parameter", "displayName": "Policy", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "The policy for this 
topic. Is loaded by default from classpath, but you can prefix with classpath:, 
file:, or http: to load the resourc [...]
+    "profileCredentialsName": { "kind": "parameter", "displayName": "Profile 
Credentials Name", "group": "producer", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "If using a profile credentials provider this 
parameter will set the profile name" },
     "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "To define a proxy host 
when instantiating the SNS client" },
     "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": 
"producer", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "To define a proxy port 
when instantiating the SNS client" },
     "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", 
"group": "producer", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" 
], "deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"HTTPS", "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "To define a proxy protocol when instantiating  
[...]
@@ -74,6 +77,7 @@
     "trustAllCertificates": { "kind": "parameter", "displayName": "Trust All 
Certificates", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "If we want to trust all certificates in case 
of overriding the endpoint" },
     "uriEndpointOverride": { "kind": "parameter", "displayName": "Uri Endpoint 
Override", "group": "producer", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "Set the overriding uri endpoint. This option 
needs to be used in combination with overrideEndpoint option" },
     "useDefaultCredentialsProvider": { "kind": "parameter", "displayName": 
"Use Default Credentials Provider", "group": "producer", "label": "", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "Set whether the SNS 
client should expect to load credentials on an AWS  [...]
+    "useProfileCredentialsProvider": { "kind": "parameter", "displayName": 
"Use Profile Credentials Provider", "group": "producer", "label": "", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.aws2.sns.Sns2Configuration", 
"configurationField": "configuration", "description": "Set whether the SNS 
client should expect to load credentials through a  [...]
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start 
Producer", "group": "producer (advanced)", "label": "producer,advanced", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "Whether the producer should be started lazy (on the first 
message). By starting lazy you can use this to allow CamelContext and routes to 
startup in situations where a producer may other [...]
     "accessKey": { "kind": "parameter", "displayName": "Access Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "Amazon AWS Access Key" },
     "secretKey": { "kind": "parameter", "displayName": "Secret Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws2.sns.Sns2Configuration", "configurationField": 
"configuration", "description": "Amazon AWS Secret Key" }

Reply via email to