You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/02/29 08:47:58 UTC

[camel] branch master updated (5dfd79a -> 1e8e138)

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

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 5dfd79a  CAMEL-14568 - Fixed camel-aws2-kms
     new b36824e  CAMEL-14568 - Fixed camel-aws2-lambda
     new 1e8e138  CAMEL-14568 - Fixed camel-aws2-mq

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../aws2/lambda/Lambda2ComponentConfigurer.java    | 11 ++--
 .../camel/component/aws2/lambda/aws2-lambda.json   | 12 ++---
 .../src/main/docs/aws2-lambda-component.adoc       |  6 +--
 .../component/aws2/lambda/Lambda2Component.java    | 46 +---------------
 .../aws2/lambda/Lambda2Configuration.java          |  2 +-
 .../lambda/LambdaComponentConfigurationTest.java   | 16 +++---
 .../component/aws2/mq/MQ2ComponentConfigurer.java  | 11 ++--
 .../component/aws2/mq/MQ2EndpointConfigurer.java   |  8 +--
 .../apache/camel/component/aws2/mq/aws2-mq.json    | 28 +++++-----
 .../src/main/docs/aws2-mq-component.adoc           | 10 ++--
 .../camel/component/aws2/mq/MQ2Component.java      | 46 +---------------
 .../camel/component/aws2/mq/MQ2Configuration.java  | 12 ++---
 .../aws2/mq/MQComponentConfigurationTest.java      | 16 +++---
 .../dsl/Aws2LambdaComponentBuilderFactory.java     | 62 +++++++++++-----------
 .../dsl/Aws2MqComponentBuilderFactory.java         | 62 +++++++++++-----------
 15 files changed, 131 insertions(+), 217 deletions(-)


[camel] 02/02: CAMEL-14568 - Fixed camel-aws2-mq

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1e8e138b2c3d818854508febe05d7966ee62c488
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Feb 29 09:47:40 2020 +0100

    CAMEL-14568 - Fixed camel-aws2-mq
---
 .../component/aws2/mq/MQ2ComponentConfigurer.java  | 11 ++--
 .../component/aws2/mq/MQ2EndpointConfigurer.java   |  8 +--
 .../apache/camel/component/aws2/mq/aws2-mq.json    | 28 +++++-----
 .../src/main/docs/aws2-mq-component.adoc           | 10 ++--
 .../camel/component/aws2/mq/MQ2Component.java      | 46 +---------------
 .../camel/component/aws2/mq/MQ2Configuration.java  | 12 ++---
 .../aws2/mq/MQComponentConfigurationTest.java      | 16 +++---
 .../dsl/Aws2MqComponentBuilderFactory.java         | 62 +++++++++++-----------
 8 files changed, 75 insertions(+), 118 deletions(-)

diff --git a/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2ComponentConfigurer.java b/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2ComponentConfigurer.java
index 2659f27..6bf1b3e 100644
--- a/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2ComponentConfigurer.java
+++ b/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2ComponentConfigurer.java
@@ -22,10 +22,9 @@ public class MQ2ComponentConfigurer extends PropertyConfigurerSupport implements
     public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
         MQ2Component target = (MQ2Component) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
-        case "accesskey":
-        case "accessKey": target.setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
         case "amazonmqclient":
         case "amazonMqClient": getOrCreateConfiguration(target).setAmazonMqClient(property(camelContext, software.amazon.awssdk.services.mq.MqClient.class, value)); return true;
+        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.mq.MQ2Configuration.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws2.mq.MQ2Operations.class, value)); return true;
@@ -35,13 +34,13 @@ public class MQ2ComponentConfigurer extends PropertyConfigurerSupport implements
         case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
         case "proxyprotocol":
         case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
-        case "region": target.setRegion(property(camelContext, java.lang.String.class, value)); return true;
         case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, java.lang.String.class, value)); return true;
-        case "secretkey":
-        case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
-        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.mq.MQ2Configuration.class, value)); return true;
+        case "accesskey":
+        case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+        case "secretkey":
+        case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         default: return false;
         }
     }
diff --git a/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2EndpointConfigurer.java b/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2EndpointConfigurer.java
index a7dee5a..fa5ba9b 100644
--- a/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2EndpointConfigurer.java
+++ b/components/camel-aws2-mq/src/generated/java/org/apache/camel/component/aws2/mq/MQ2EndpointConfigurer.java
@@ -15,8 +15,6 @@ public class MQ2EndpointConfigurer extends PropertyConfigurerSupport implements
     public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
         MQ2Endpoint target = (MQ2Endpoint) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
-        case "accesskey":
-        case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
         case "amazonmqclient":
         case "amazonMqClient": target.getConfiguration().setAmazonMqClient(property(camelContext, software.amazon.awssdk.services.mq.MqClient.class, value)); return true;
         case "lazystartproducer":
@@ -29,11 +27,13 @@ public class MQ2EndpointConfigurer extends PropertyConfigurerSupport implements
         case "proxyprotocol":
         case "proxyProtocol": target.getConfiguration().setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
         case "region": target.getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true;
-        case "secretkey":
-        case "secretKey": target.getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
         case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
+        case "accesskey":
+        case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+        case "secretkey":
+        case "secretKey": target.getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         default: return false;
         }
     }
diff --git a/components/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json b/components/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json
index beb59de..6952ba0 100644
--- a/components/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json
+++ b/components/camel-aws2-mq/src/generated/resources/org/apache/camel/component/aws2/mq/aws2-mq.json
@@ -19,30 +19,30 @@
     "version": "3.2.0-SNAPSHOT"
   },
   "componentProperties": {
-    "accessKey": { "kind": "property", "displayName": "Access Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Access Key" },
-    "amazonMqClient": { "kind": "property", "displayName": "Amazon Mq Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.mq.MqClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To use a existing configured AmazonMQClient as client" },
+    "amazonMqClient": { "kind": "property", "displayName": "Amazon Mq Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.mq.MqClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To use a existing configured AmazonMQClient as client" },
+    "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.mq.MQ2Configuration", "deprecated": false, "secret": false, "description": "Component configuration" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 otherwise fail during starting and cause the r [...]
-    "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration [...]
-    "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the MQ client" },
-    "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MQ client" },
+    "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "desc [...]
+    "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the MQ client" },
+    "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MQ 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, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the MQ client" },
     "region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The region in which MQ client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) [...]
-    "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Secret Key" },
     "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
-    "configuration": { "kind": "property", "displayName": "Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.mq.MQ2Configuration", "deprecated": false, "secret": false, "description": "The AWS MQ default configuration" }
+    "accessKey": { "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "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, "secret": true, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   },
   "properties": {
     "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Logical name" },
-    "accessKey": { "kind": "parameter", "displayName": "Access Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
-    "amazonMqClient": { "kind": "parameter", "displayName": "Amazon Mq Client", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.mq.MqClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To use a existing configured AmazonMQClient as client" },
+    "amazonMqClient": { "kind": "parameter", "displayName": "Amazon Mq Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.mq.MqClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To use a existing configured AmazonMQClient as client" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 otherwise fail during starting and cause the  [...]
-    "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuratio [...]
-    "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the MQ client" },
-    "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MQ client" },
+    "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.mq.MQ2Operations", "enum": [ "listBrokers", "createBroker", "deleteBroker", "rebootBroker", "updateBroker", "describeBroker" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "des [...]
+    "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the MQ client" },
+    "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the MQ 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, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the MQ client" },
     "region": { "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "The region in which MQ client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1 [...]
-    "secretKey": { "kind": "parameter", "displayName": "Secret Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
     "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
-    "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }
+    "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." },
+    "accessKey": { "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "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, "secret": true, "configurationClass": "org.apache.camel.component.aws2.mq.MQ2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   }
 }
diff --git a/components/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc b/components/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
index 3d44877..fe62f6a 100644
--- a/components/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
+++ b/components/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
@@ -42,17 +42,17 @@ The AWS 2 MQ component supports 11 options, which are listed below.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *accessKey* (producer) | Amazon AWS Access Key |  | String
 | *amazonMqClient* (producer) | To use a existing configured AmazonMQClient as client |  | MqClient
+| *configuration* (producer) | Component configuration |  | MQ2Configuration
 | *lazyStartProducer* (producer) | 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 otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *operation* (producer) | *Required* The operation to perform. It can be listBrokers,createBroker,deleteBroker. The value can be one of: listBrokers, createBroker, deleteBroker, rebootBroker, updateBroker, describeBroker |  | MQ2Operations
 | *proxyHost* (producer) | To define a proxy host when instantiating the MQ client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the MQ client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the MQ client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which MQ client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() |  | String
-| *secretKey* (producer) | Amazon AWS Secret Key |  | String
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
-| *configuration* (advanced) | The AWS MQ default configuration |  | MQ2Configuration
+| *accessKey* (security) | Amazon AWS Access Key |  | String
+| *secretKey* (security) | Amazon AWS Secret Key |  | String
 |===
 // component options: END
 
@@ -84,7 +84,6 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *accessKey* (producer) | Amazon AWS Access Key |  | String
 | *amazonMqClient* (producer) | To use a existing configured AmazonMQClient as client |  | MqClient
 | *lazyStartProducer* (producer) | 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 otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *operation* (producer) | *Required* The operation to perform. It can be listBrokers,createBroker,deleteBroker. The value can be one of: listBrokers, createBroker, deleteBroker, rebootBroker, updateBroker, describeBroker |  | MQ2Operations
@@ -92,9 +91,10 @@ with the following path and query parameters:
 | *proxyPort* (producer) | To define a proxy port when instantiating the MQ client |  | Integer
 | *proxyProtocol* (producer) | To define a proxy protocol when instantiating the MQ client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *region* (producer) | The region in which MQ client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() |  | String
-| *secretKey* (producer) | Amazon AWS Secret Key |  | String
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
+| *accessKey* (security) | Amazon AWS Access Key |  | String
+| *secretKey* (security) | Amazon AWS Secret Key |  | String
 |===
 // endpoint options: END
 
diff --git a/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Component.java b/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Component.java
index 5fa591d..eb6619f 100644
--- a/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Component.java
+++ b/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Component.java
@@ -33,13 +33,7 @@ import software.amazon.awssdk.services.mq.MqClient;
 public class MQ2Component extends DefaultComponent {
 
     @Metadata
-    private String accessKey;
-    @Metadata
-    private String secretKey;
-    @Metadata
-    private String region;
-    @Metadata(label = "advanced")
-    private MQ2Configuration configuration;
+    private MQ2Configuration configuration = new MQ2Configuration();
 
     public MQ2Component() {
         this(null);
@@ -55,9 +49,6 @@ public class MQ2Component extends DefaultComponent {
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         MQ2Configuration configuration = this.configuration != null ? this.configuration.copy() : new MQ2Configuration();
         MQ2Endpoint endpoint = new MQ2Endpoint(uri, this, configuration);
-        endpoint.getConfiguration().setAccessKey(accessKey);
-        endpoint.getConfiguration().setSecretKey(secretKey);
-        endpoint.getConfiguration().setRegion(region);
         setProperties(endpoint, parameters);
         checkAndSetRegistryClient(configuration);
         if (configuration.getAmazonMqClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
@@ -72,45 +63,12 @@ public class MQ2Component extends DefaultComponent {
     }
 
     /**
-     * The AWS MQ default configuration
+     * Component configuration
      */
     public void setConfiguration(MQ2Configuration configuration) {
         this.configuration = configuration;
     }
 
-    public String getAccessKey() {
-        return accessKey;
-    }
-
-    /**
-     * Amazon AWS Access Key
-     */
-    public void setAccessKey(String accessKey) {
-        this.accessKey = accessKey;
-    }
-
-    public String getSecretKey() {
-        return secretKey;
-    }
-
-    /**
-     * Amazon AWS Secret Key
-     */
-    public void setSecretKey(String secretKey) {
-        this.secretKey = secretKey;
-    }
-
-    public String getRegion() {
-        return region;
-    }
-
-    /**
-     * The region in which MQ client needs to work
-     */
-    public void setRegion(String region) {
-        this.region = region;
-    }
-
     private void checkAndSetRegistryClient(MQ2Configuration configuration) {
         Set<MqClient> clients = getCamelContext().getRegistry().findByType(MqClient.class);
         if (clients.size() == 1) {
diff --git a/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java b/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java
index f2d749b..32efa04 100644
--- a/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java
+++ b/components/camel-aws2-mq/src/main/java/org/apache/camel/component/aws2/mq/MQ2Configuration.java
@@ -30,20 +30,20 @@ public class MQ2Configuration implements Cloneable {
     @UriPath(description = "Logical name")
     @Metadata(required = true)
     private String label;
-    @UriParam(label = "producer")
+    @UriParam
     private MqClient amazonMqClient;
-    @UriParam(label = "producer", secret = true)
+    @UriParam(label = "security", secret = true)
     private String accessKey;
-    @UriParam(label = "producer", secret = true)
+    @UriParam(label = "security", secret = true)
     private String secretKey;
-    @UriParam(label = "producer")
+    @UriParam
     @Metadata(required = true)
     private MQ2Operations operation;
     @UriParam(enums = "HTTP,HTTPS", defaultValue = "HTTPS")
     private Protocol proxyProtocol = Protocol.HTTPS;
-    @UriParam(label = "producer")
+    @UriParam
     private String proxyHost;
-    @UriParam(label = "producer")
+    @UriParam
     private Integer proxyPort;
     @UriParam
     private String region;
diff --git a/components/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentConfigurationTest.java b/components/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentConfigurationTest.java
index 2308107..013f370 100644
--- a/components/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentConfigurationTest.java
+++ b/components/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentConfigurationTest.java
@@ -26,8 +26,8 @@ public class MQComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentElements() throws Exception {
         MQ2Component component = context.getComponent("aws2-mq", MQ2Component.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
         MQ2Endpoint endpoint = (MQ2Endpoint)component.createEndpoint("aws2-mq://MyQueue");
 
         assertEquals("XXX", endpoint.getConfiguration().getAccessKey());
@@ -37,9 +37,9 @@ public class MQComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentAndEndpointElements() throws Exception {
         MQ2Component component = context.getComponent("aws2-mq", MQ2Component.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Region.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Region.US_WEST_1.toString());
         MQ2Endpoint endpoint = (MQ2Endpoint)component.createEndpoint("aws2-mq://MyQueue?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1");
 
         assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
@@ -50,9 +50,9 @@ public class MQComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
         MQ2Component component = context.getComponent("aws2-mq", MQ2Component.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Region.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Region.US_WEST_1.toString());
         MQ2Endpoint endpoint = (MQ2Endpoint)component
             .createEndpoint("aws2-mq://label?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
 
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java
index cd8a38c..1e046dc 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2MqComponentBuilderFactory.java
@@ -47,27 +47,30 @@ public interface Aws2MqComponentBuilderFactory {
      */
     interface Aws2MqComponentBuilder extends ComponentBuilder<MQ2Component> {
         /**
-         * Amazon AWS Access Key.
+         * To use a existing configured AmazonMQClient as client.
          * 
-         * The option is a: <code>java.lang.String</code> type.
+         * The option is a:
+         * <code>software.amazon.awssdk.services.mq.MqClient</code> type.
          * 
          * Group: producer
          */
-        default Aws2MqComponentBuilder accessKey(java.lang.String accessKey) {
-            doSetProperty("accessKey", accessKey);
+        default Aws2MqComponentBuilder amazonMqClient(
+                software.amazon.awssdk.services.mq.MqClient amazonMqClient) {
+            doSetProperty("amazonMqClient", amazonMqClient);
             return this;
         }
         /**
-         * To use a existing configured AmazonMQClient as client.
+         * Component configuration.
          * 
          * The option is a:
-         * <code>software.amazon.awssdk.services.mq.MqClient</code> type.
+         * <code>org.apache.camel.component.aws2.mq.MQ2Configuration</code>
+         * type.
          * 
          * Group: producer
          */
-        default Aws2MqComponentBuilder amazonMqClient(
-                software.amazon.awssdk.services.mq.MqClient amazonMqClient) {
-            doSetProperty("amazonMqClient", amazonMqClient);
+        default Aws2MqComponentBuilder configuration(
+                org.apache.camel.component.aws2.mq.MQ2Configuration configuration) {
+            doSetProperty("configuration", configuration);
             return this;
         }
         /**
@@ -156,17 +159,6 @@ public interface Aws2MqComponentBuilderFactory {
             return this;
         }
         /**
-         * Amazon AWS Secret Key.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: producer
-         */
-        default Aws2MqComponentBuilder secretKey(java.lang.String secretKey) {
-            doSetProperty("secretKey", secretKey);
-            return this;
-        }
-        /**
          * Whether the component should use basic property binding (Camel 2.x)
          * or the newer property binding with additional capabilities.
          * 
@@ -181,17 +173,25 @@ public interface Aws2MqComponentBuilderFactory {
             return this;
         }
         /**
-         * The AWS MQ default configuration.
+         * Amazon AWS Access Key.
          * 
-         * The option is a:
-         * <code>org.apache.camel.component.aws2.mq.MQ2Configuration</code>
-         * type.
+         * The option is a: <code>java.lang.String</code> type.
          * 
-         * Group: advanced
+         * Group: security
          */
-        default Aws2MqComponentBuilder configuration(
-                org.apache.camel.component.aws2.mq.MQ2Configuration configuration) {
-            doSetProperty("configuration", configuration);
+        default Aws2MqComponentBuilder accessKey(java.lang.String accessKey) {
+            doSetProperty("accessKey", accessKey);
+            return this;
+        }
+        /**
+         * Amazon AWS Secret Key.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: security
+         */
+        default Aws2MqComponentBuilder secretKey(java.lang.String secretKey) {
+            doSetProperty("secretKey", secretKey);
             return this;
         }
     }
@@ -218,17 +218,17 @@ public interface Aws2MqComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
-            case "accessKey": ((MQ2Component) component).setAccessKey((java.lang.String) value); return true;
             case "amazonMqClient": getOrCreateConfiguration((MQ2Component) component).setAmazonMqClient((software.amazon.awssdk.services.mq.MqClient) value); return true;
+            case "configuration": ((MQ2Component) component).setConfiguration((org.apache.camel.component.aws2.mq.MQ2Configuration) value); return true;
             case "lazyStartProducer": ((MQ2Component) component).setLazyStartProducer((boolean) value); return true;
             case "operation": getOrCreateConfiguration((MQ2Component) component).setOperation((org.apache.camel.component.aws2.mq.MQ2Operations) value); return true;
             case "proxyHost": getOrCreateConfiguration((MQ2Component) component).setProxyHost((java.lang.String) value); return true;
             case "proxyPort": getOrCreateConfiguration((MQ2Component) component).setProxyPort((java.lang.Integer) value); return true;
             case "proxyProtocol": getOrCreateConfiguration((MQ2Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
             case "region": getOrCreateConfiguration((MQ2Component) component).setRegion((java.lang.String) value); return true;
-            case "secretKey": ((MQ2Component) component).setSecretKey((java.lang.String) value); return true;
             case "basicPropertyBinding": ((MQ2Component) component).setBasicPropertyBinding((boolean) value); return true;
-            case "configuration": ((MQ2Component) component).setConfiguration((org.apache.camel.component.aws2.mq.MQ2Configuration) value); return true;
+            case "accessKey": getOrCreateConfiguration((MQ2Component) component).setAccessKey((java.lang.String) value); return true;
+            case "secretKey": getOrCreateConfiguration((MQ2Component) component).setSecretKey((java.lang.String) value); return true;
             default: return false;
             }
         }


[camel] 01/02: CAMEL-14568 - Fixed camel-aws2-lambda

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b36824e85e00c9c7b06cc0784efd189c83832d14
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Feb 29 09:38:47 2020 +0100

    CAMEL-14568 - Fixed camel-aws2-lambda
---
 .../aws2/lambda/Lambda2ComponentConfigurer.java    | 11 ++--
 .../camel/component/aws2/lambda/aws2-lambda.json   | 12 ++---
 .../src/main/docs/aws2-lambda-component.adoc       |  6 +--
 .../component/aws2/lambda/Lambda2Component.java    | 46 +---------------
 .../aws2/lambda/Lambda2Configuration.java          |  2 +-
 .../lambda/LambdaComponentConfigurationTest.java   | 16 +++---
 .../dsl/Aws2LambdaComponentBuilderFactory.java     | 62 +++++++++++-----------
 7 files changed, 56 insertions(+), 99 deletions(-)

diff --git a/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2ComponentConfigurer.java b/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2ComponentConfigurer.java
index a3e0b67..4db29b0 100644
--- a/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2ComponentConfigurer.java
+++ b/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2ComponentConfigurer.java
@@ -22,26 +22,25 @@ public class Lambda2ComponentConfigurer extends PropertyConfigurerSupport implem
     public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
         Lambda2Component target = (Lambda2Component) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
-        case "accesskey":
-        case "accessKey": target.setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.lambda.Lambda2Configuration.class, value)); return true;
         case "lazystartproducer":
         case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
         case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws2.lambda.Lambda2Operations.class, value)); return true;
-        case "region": target.setRegion(property(camelContext, java.lang.String.class, value)); return true;
         case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, java.lang.String.class, value)); return true;
-        case "secretkey":
-        case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "awslambdaclient":
         case "awsLambdaClient": getOrCreateConfiguration(target).setAwsLambdaClient(property(camelContext, software.amazon.awssdk.services.lambda.LambdaClient.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
-        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.lambda.Lambda2Configuration.class, value)); return true;
         case "proxyhost":
         case "proxyHost": getOrCreateConfiguration(target).setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
         case "proxyport":
         case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
         case "proxyprotocol":
         case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
+        case "accesskey":
+        case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+        case "secretkey":
+        case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         default: return false;
         }
     }
diff --git a/components/camel-aws2-lambda/src/generated/resources/org/apache/camel/component/aws2/lambda/aws2-lambda.json b/components/camel-aws2-lambda/src/generated/resources/org/apache/camel/component/aws2/lambda/aws2-lambda.json
index 0017ccd..71427a8 100644
--- a/components/camel-aws2-lambda/src/generated/resources/org/apache/camel/component/aws2/lambda/aws2-lambda.json
+++ b/components/camel-aws2-lambda/src/generated/resources/org/apache/camel/component/aws2/lambda/aws2-lambda.json
@@ -19,23 +19,23 @@
     "version": "3.2.0-SNAPSHOT"
   },
   "componentProperties": {
-    "accessKey": { "kind": "property", "displayName": "Access Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Access Key" },
+    "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "deprecated": false, "secret": false, "description": "Component configuration" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 otherwise fail during starting and cause the r [...]
     "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.lambda.Lambda2Operations", "enum": [ "listFunctions", "getFunction", "createAlias", "deleteAlias", "getAlias", "listAliases", "createFunction", "deleteFunction", "invokeFunction", "updateFunction", "createEventSourceMapping", "deleteEventSourceMapping", "listEventSourceMapping", "listTags", "tagResource", "u [...]
-    "region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "The region in which ECS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for e [...]
-    "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Secret Key" },
+    "region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "The region in which ECS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example a [...]
     "awsLambdaClient": { "kind": "property", "displayName": "Aws Lambda Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.lambda.LambdaClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsLambdaClient as client" },
     "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
-    "configuration": { "kind": "property", "displayName": "Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "deprecated": false, "secret": false, "description": "The AWS Lambda default configuration" },
     "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Lambda client" },
     "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Lambda client" },
-    "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the Lambda client" }
+    "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the Lambda cl [...]
+    "accessKey": { "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "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, "secret": true, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   },
   "properties": {
     "function": { "kind": "path", "displayName": "Function", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Name of the Lambda function." },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 otherwise fail during starting and cause the  [...]
     "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.lambda.Lambda2Operations", "enum": [ "listFunctions", "getFunction", "createAlias", "deleteAlias", "getAlias", "listAliases", "createFunction", "deleteFunction", "invokeFunction", "updateFunction", "createEventSourceMapping", "deleteEventSourceMapping", "listEventSourceMapping", "listTags", "tagResource", " [...]
-    "region": { "kind": "parameter", "displayName": "Region", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "The region in which ECS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for  [...]
+    "region": { "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "The region in which ECS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example  [...]
     "awsLambdaClient": { "kind": "parameter", "displayName": "Aws Lambda Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.lambda.LambdaClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsLambdaClient as client" },
     "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
     "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." },
diff --git a/components/camel-aws2-lambda/src/main/docs/aws2-lambda-component.adoc b/components/camel-aws2-lambda/src/main/docs/aws2-lambda-component.adoc
index 6713a19..13cbbd4 100644
--- a/components/camel-aws2-lambda/src/main/docs/aws2-lambda-component.adoc
+++ b/components/camel-aws2-lambda/src/main/docs/aws2-lambda-component.adoc
@@ -44,17 +44,17 @@ The AWS Lambda component supports 11 options, which are listed below.
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *accessKey* (producer) | Amazon AWS Access Key |  | String
+| *configuration* (producer) | Component configuration |  | Lambda2Configuration
 | *lazyStartProducer* (producer) | 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 otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *operation* (producer) | The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction or invokeFunction. The value can be one of: listFunctions, getFunction, createAlias, deleteAlias, getAlias, listAliases, createFunction, deleteFunction, invokeFunction, updateFunction, createEventSourceMapping, deleteEventSourceMapping, listEventSourceMapping, listTags, tagResource, untagResource, publishVersion, listVersions | invokeFunction | Lambda2Operations
 | *region* (producer) | The region in which ECS client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() |  | String
-| *secretKey* (producer) | Amazon AWS Secret Key |  | String
 | *awsLambdaClient* (advanced) | To use a existing configured AwsLambdaClient as client |  | LambdaClient
 | *basicPropertyBinding* (advanced) | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
-| *configuration* (advanced) | The AWS Lambda default configuration |  | Lambda2Configuration
 | *proxyHost* (proxy) | To define a proxy host when instantiating the Lambda client |  | String
 | *proxyPort* (proxy) | To define a proxy port when instantiating the Lambda client |  | Integer
 | *proxyProtocol* (proxy) | To define a proxy protocol when instantiating the Lambda client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
+| *accessKey* (security) | Amazon AWS Access Key |  | String
+| *secretKey* (security) | Amazon AWS Secret Key |  | String
 |===
 // component options: END
 
diff --git a/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Component.java b/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Component.java
index e91ffb0..a86b8d4 100644
--- a/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Component.java
+++ b/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Component.java
@@ -33,13 +33,7 @@ import software.amazon.awssdk.services.lambda.LambdaClient;
 public class Lambda2Component extends DefaultComponent {
 
     @Metadata
-    private String accessKey;
-    @Metadata
-    private String secretKey;
-    @Metadata
-    private String region;
-    @Metadata(label = "advanced")
-    private Lambda2Configuration configuration;
+    private Lambda2Configuration configuration = new Lambda2Configuration();
 
     public Lambda2Component() {
         this(null);
@@ -55,9 +49,6 @@ public class Lambda2Component extends DefaultComponent {
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         Lambda2Configuration configuration = this.configuration != null ? this.configuration.copy() : new Lambda2Configuration();
         Lambda2Endpoint endpoint = new Lambda2Endpoint(uri, this, configuration);
-        endpoint.getConfiguration().setAccessKey(accessKey);
-        endpoint.getConfiguration().setSecretKey(secretKey);
-        endpoint.getConfiguration().setRegion(region);
         setProperties(endpoint, parameters);
         endpoint.setFunction(remaining);
         checkAndSetRegistryClient(configuration);
@@ -73,45 +64,12 @@ public class Lambda2Component extends DefaultComponent {
     }
 
     /**
-     * The AWS Lambda default configuration
+     * Component configuration
      */
     public void setConfiguration(Lambda2Configuration configuration) {
         this.configuration = configuration;
     }
 
-    public String getAccessKey() {
-        return accessKey;
-    }
-
-    /**
-     * Amazon AWS Access Key
-     */
-    public void setAccessKey(String accessKey) {
-        this.accessKey = accessKey;
-    }
-
-    public String getSecretKey() {
-        return secretKey;
-    }
-
-    /**
-     * Amazon AWS Secret Key
-     */
-    public void setSecretKey(String secretKey) {
-        this.secretKey = secretKey;
-    }
-
-    public String getRegion() {
-        return region;
-    }
-
-    /**
-     * Amazon AWS Region
-     */
-    public void setRegion(String region) {
-        this.region = region;
-    }
-
     private void checkAndSetRegistryClient(Lambda2Configuration configuration) {
         Set<LambdaClient> clients = getCamelContext().getRegistry().findByType(LambdaClient.class);
         if (clients.size() == 1) {
diff --git a/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Configuration.java b/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Configuration.java
index e759d47..e42b1dd 100644
--- a/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Configuration.java
+++ b/components/camel-aws2-lambda/src/main/java/org/apache/camel/component/aws2/lambda/Lambda2Configuration.java
@@ -31,7 +31,7 @@ public class Lambda2Configuration implements Cloneable {
     private String accessKey;
     @UriParam(label = "security", secret = true)
     private String secretKey;
-    @UriParam(label = "producer")
+    @UriParam
     private String region;
     @UriParam(label = "proxy", enums = "HTTP,HTTPS", defaultValue = "HTTPS")
     private Protocol proxyProtocol = Protocol.HTTPS;
diff --git a/components/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentConfigurationTest.java b/components/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentConfigurationTest.java
index ce53951..7409b76 100644
--- a/components/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentConfigurationTest.java
+++ b/components/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentConfigurationTest.java
@@ -72,8 +72,8 @@ public class LambdaComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentElements() throws Exception {
         Lambda2Component component = context.getComponent("aws2-lambda", Lambda2Component.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
         Lambda2Endpoint endpoint = (Lambda2Endpoint)component.createEndpoint("aws2-lambda://myFunction");
 
         assertEquals("myFunction", endpoint.getFunction());
@@ -84,9 +84,9 @@ public class LambdaComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentAndEndpointElements() throws Exception {
         Lambda2Component component = context.getComponent("aws2-lambda", Lambda2Component.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Region.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Region.US_WEST_1.toString());
         Lambda2Endpoint endpoint = (Lambda2Endpoint)component.createEndpoint("aws2-lambda://myFunction?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1");
 
         assertEquals("myFunction", endpoint.getFunction());
@@ -98,9 +98,9 @@ public class LambdaComponentConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
         Lambda2Component component = context.getComponent("aws2-lambda", Lambda2Component.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Region.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Region.US_WEST_1.toString());
         Lambda2Endpoint endpoint = (Lambda2Endpoint)component
             .createEndpoint("aws2-lambda://label?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
 
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2LambdaComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2LambdaComponentBuilderFactory.java
index c0181a5..561947f 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2LambdaComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2LambdaComponentBuilderFactory.java
@@ -51,14 +51,16 @@ public interface Aws2LambdaComponentBuilderFactory {
             extends
                 ComponentBuilder<Lambda2Component> {
         /**
-         * Amazon AWS Access Key.
+         * Component configuration.
          * 
-         * The option is a: <code>java.lang.String</code> type.
+         * The option is a:
+         * <code>org.apache.camel.component.aws2.lambda.Lambda2Configuration</code> type.
          * 
          * Group: producer
          */
-        default Aws2LambdaComponentBuilder accessKey(java.lang.String accessKey) {
-            doSetProperty("accessKey", accessKey);
+        default Aws2LambdaComponentBuilder configuration(
+                org.apache.camel.component.aws2.lambda.Lambda2Configuration configuration) {
+            doSetProperty("configuration", configuration);
             return this;
         }
         /**
@@ -113,17 +115,6 @@ public interface Aws2LambdaComponentBuilderFactory {
             return this;
         }
         /**
-         * Amazon AWS Secret Key.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: producer
-         */
-        default Aws2LambdaComponentBuilder secretKey(java.lang.String secretKey) {
-            doSetProperty("secretKey", secretKey);
-            return this;
-        }
-        /**
          * To use a existing configured AwsLambdaClient as client.
          * 
          * The option is a:
@@ -152,19 +143,6 @@ public interface Aws2LambdaComponentBuilderFactory {
             return this;
         }
         /**
-         * The AWS Lambda default configuration.
-         * 
-         * The option is a:
-         * <code>org.apache.camel.component.aws2.lambda.Lambda2Configuration</code> type.
-         * 
-         * Group: advanced
-         */
-        default Aws2LambdaComponentBuilder configuration(
-                org.apache.camel.component.aws2.lambda.Lambda2Configuration configuration) {
-            doSetProperty("configuration", configuration);
-            return this;
-        }
-        /**
          * To define a proxy host when instantiating the Lambda client.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -200,6 +178,28 @@ public interface Aws2LambdaComponentBuilderFactory {
             doSetProperty("proxyProtocol", proxyProtocol);
             return this;
         }
+        /**
+         * Amazon AWS Access Key.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: security
+         */
+        default Aws2LambdaComponentBuilder accessKey(java.lang.String accessKey) {
+            doSetProperty("accessKey", accessKey);
+            return this;
+        }
+        /**
+         * Amazon AWS Secret Key.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: security
+         */
+        default Aws2LambdaComponentBuilder secretKey(java.lang.String secretKey) {
+            doSetProperty("secretKey", secretKey);
+            return this;
+        }
     }
 
     class Aws2LambdaComponentBuilderImpl
@@ -224,17 +224,17 @@ public interface Aws2LambdaComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
-            case "accessKey": ((Lambda2Component) component).setAccessKey((java.lang.String) value); return true;
+            case "configuration": ((Lambda2Component) component).setConfiguration((org.apache.camel.component.aws2.lambda.Lambda2Configuration) value); return true;
             case "lazyStartProducer": ((Lambda2Component) component).setLazyStartProducer((boolean) value); return true;
             case "operation": getOrCreateConfiguration((Lambda2Component) component).setOperation((org.apache.camel.component.aws2.lambda.Lambda2Operations) value); return true;
             case "region": getOrCreateConfiguration((Lambda2Component) component).setRegion((java.lang.String) value); return true;
-            case "secretKey": ((Lambda2Component) component).setSecretKey((java.lang.String) value); return true;
             case "awsLambdaClient": getOrCreateConfiguration((Lambda2Component) component).setAwsLambdaClient((software.amazon.awssdk.services.lambda.LambdaClient) value); return true;
             case "basicPropertyBinding": ((Lambda2Component) component).setBasicPropertyBinding((boolean) value); return true;
-            case "configuration": ((Lambda2Component) component).setConfiguration((org.apache.camel.component.aws2.lambda.Lambda2Configuration) value); return true;
             case "proxyHost": getOrCreateConfiguration((Lambda2Component) component).setProxyHost((java.lang.String) value); return true;
             case "proxyPort": getOrCreateConfiguration((Lambda2Component) component).setProxyPort((java.lang.Integer) value); return true;
             case "proxyProtocol": getOrCreateConfiguration((Lambda2Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
+            case "accessKey": getOrCreateConfiguration((Lambda2Component) component).setAccessKey((java.lang.String) value); return true;
+            case "secretKey": getOrCreateConfiguration((Lambda2Component) component).setSecretKey((java.lang.String) value); return true;
             default: return false;
             }
         }