This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit bf2c630047d137f3e9b6c1e606609f6455d2d822 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Tue Nov 17 08:24:59 2020 +0100 CAMEL-15836 - Camel-AWS2-Lambda: enable autowire on the Lambda Client, regen component and configurers --- .../camel/catalog/docs/aws2-lambda-component.adoc | 10 +++----- .../aws2/lambda/Lambda2ComponentConfigurer.java | 11 ++++---- .../aws2/lambda/Lambda2EndpointConfigurer.java | 11 ++++---- .../aws2/lambda/Lambda2EndpointUriFactory.java | 3 +-- .../camel/component/aws2/lambda/aws2-lambda.json | 6 ++--- .../src/main/docs/aws2-lambda-component.adoc | 10 +++----- .../component/aws2/lambda/Lambda2Component.java | 3 --- .../dsl/Aws2LambdaComponentBuilderFactory.java | 16 ------------ .../dsl/Lambda2EndpointBuilderFactory.java | 30 ---------------------- .../modules/ROOT/pages/aws2-lambda-component.adoc | 10 +++----- 10 files changed, 25 insertions(+), 85 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-lambda-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-lambda-component.adoc index ca8bd1a..c1e4cac 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-lambda-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-lambda-component.adoc @@ -44,14 +44,13 @@ You can append query options to the URI in the following format, // component options: START -The AWS 2 Lambda component supports 14 options, which are listed below. +The AWS 2 Lambda component supports 13 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean | *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. There are 18 enums and 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 | [...] @@ -59,7 +58,7 @@ The AWS 2 Lambda component supports 14 options, which are listed below. | *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 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean -| *awsLambdaClient* (advanced) | To use a existing configured AwsLambdaClient as client | | LambdaClient +| *awsLambdaClient* (advanced) | *Autowired* To use a existing configured AwsLambdaClient as client | | LambdaClient | *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. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol @@ -90,19 +89,18 @@ with the following path and query parameters: |=== -=== Query Parameters (13 parameters): +=== Query Parameters (12 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean | *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. There are 18 enums and 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 | [...] | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean | *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 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean -| *awsLambdaClient* (advanced) | To use a existing configured AwsLambdaClient as client | | LambdaClient +| *awsLambdaClient* (advanced) | *Autowired* To use a existing configured AwsLambdaClient as client | | LambdaClient | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean | *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 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 7d073cf..1a46381 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 @@ -30,8 +30,6 @@ public class Lambda2ComponentConfigurer extends PropertyConfigurerSupport implem switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true; - case "autodiscoverclient": - case "autoDiscoverClient": getOrCreateConfiguration(target).setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true; case "autowiredenabled": case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true; case "awslambdaclient": @@ -58,12 +56,15 @@ public class Lambda2ComponentConfigurer extends PropertyConfigurerSupport implem } @Override + public String[] getAutowiredNames() { + return new String[]{"awsLambdaClient"}; + } + + @Override public Class<?> getOptionType(String name, boolean ignoreCase) { switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": return java.lang.String.class; - case "autodiscoverclient": - case "autoDiscoverClient": return boolean.class; case "autowiredenabled": case "autowiredEnabled": return boolean.class; case "awslambdaclient": @@ -95,8 +96,6 @@ public class Lambda2ComponentConfigurer extends PropertyConfigurerSupport implem switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": return getOrCreateConfiguration(target).getAccessKey(); - case "autodiscoverclient": - case "autoDiscoverClient": return getOrCreateConfiguration(target).isAutoDiscoverClient(); case "autowiredenabled": case "autowiredEnabled": return target.isAutowiredEnabled(); case "awslambdaclient": diff --git a/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2EndpointConfigurer.java b/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2EndpointConfigurer.java index 90953f5..498d01d 100644 --- a/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2EndpointConfigurer.java +++ b/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2EndpointConfigurer.java @@ -23,8 +23,6 @@ public class Lambda2EndpointConfigurer extends PropertyConfigurerSupport impleme switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true; - case "autodiscoverclient": - case "autoDiscoverClient": target.getConfiguration().setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true; case "awslambdaclient": case "awsLambdaClient": target.getConfiguration().setAwsLambdaClient(property(camelContext, software.amazon.awssdk.services.lambda.LambdaClient.class, value)); return true; case "lazystartproducer": @@ -49,12 +47,15 @@ public class Lambda2EndpointConfigurer extends PropertyConfigurerSupport impleme } @Override + public String[] getAutowiredNames() { + return new String[]{"awsLambdaClient"}; + } + + @Override public Class<?> getOptionType(String name, boolean ignoreCase) { switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": return java.lang.String.class; - case "autodiscoverclient": - case "autoDiscoverClient": return boolean.class; case "awslambdaclient": case "awsLambdaClient": return software.amazon.awssdk.services.lambda.LambdaClient.class; case "lazystartproducer": @@ -84,8 +85,6 @@ public class Lambda2EndpointConfigurer extends PropertyConfigurerSupport impleme switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": return target.getConfiguration().getAccessKey(); - case "autodiscoverclient": - case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient(); case "awslambdaclient": case "awsLambdaClient": return target.getConfiguration().getAwsLambdaClient(); case "lazystartproducer": diff --git a/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2EndpointUriFactory.java b/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2EndpointUriFactory.java index 3fa5bc3..2c69e24 100644 --- a/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2EndpointUriFactory.java +++ b/components/camel-aws2-lambda/src/generated/java/org/apache/camel/component/aws2/lambda/Lambda2EndpointUriFactory.java @@ -20,8 +20,7 @@ public class Lambda2EndpointUriFactory extends org.apache.camel.support.componen private static final Set<String> PROPERTY_NAMES; private static final Set<String> SECRET_PROPERTY_NAMES; static { - Set<String> props = new HashSet<>(14); - props.add("autoDiscoverClient"); + Set<String> props = new HashSet<>(13); props.add("proxyProtocol"); props.add("secretKey"); props.add("synchronous"); 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 a9beac3..a8e96da 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 @@ -22,7 +22,6 @@ "lenientProperties": false }, "componentProperties": { - "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a clien [...] "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "deprecated": false, "autowired": 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, "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 otherwise fail during star [...] "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 [...] @@ -30,7 +29,7 @@ "region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": 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 r [...] "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.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" }, "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 [...] - "awsLambdaClient": { "kind": "property", "displayName": "Aws Lambda Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.lambda.LambdaClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsLambdaClient as client" }, + "awsLambdaClient": { "kind": "property", "displayName": "Aws Lambda Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.lambda.LambdaClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsLambdaClient [...] "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": 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, "autowired": 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, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instant [...] @@ -39,13 +38,12 @@ }, "properties": { "function": { "kind": "path", "displayName": "Function", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the Lambda function." }, - "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a clie [...] "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "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 otherwise fail during sta [...] "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", " [...] "pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "region": { "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": 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 [...] "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.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" }, - "awsLambdaClient": { "kind": "parameter", "displayName": "Aws Lambda Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.lambda.LambdaClient", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsLambdaClient as client" }, + "awsLambdaClient": { "kind": "parameter", "displayName": "Aws Lambda Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.lambda.LambdaClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To use a existing configured AwsLambdaClient [...] "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }, "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": 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": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.lambda.Lambda2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Lambda client" }, 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 ca8bd1a..c1e4cac 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,14 +44,13 @@ You can append query options to the URI in the following format, // component options: START -The AWS 2 Lambda component supports 14 options, which are listed below. +The AWS 2 Lambda component supports 13 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean | *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. There are 18 enums and 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 | [...] @@ -59,7 +58,7 @@ The AWS 2 Lambda component supports 14 options, which are listed below. | *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 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean -| *awsLambdaClient* (advanced) | To use a existing configured AwsLambdaClient as client | | LambdaClient +| *awsLambdaClient* (advanced) | *Autowired* To use a existing configured AwsLambdaClient as client | | LambdaClient | *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. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol @@ -90,19 +89,18 @@ with the following path and query parameters: |=== -=== Query Parameters (13 parameters): +=== Query Parameters (12 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean | *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. There are 18 enums and 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 | [...] | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean | *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 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean -| *awsLambdaClient* (advanced) | To use a existing configured AwsLambdaClient as client | | LambdaClient +| *awsLambdaClient* (advanced) | *Autowired* To use a existing configured AwsLambdaClient as client | | LambdaClient | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean | *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 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 b7f0fbb..c46f1ae 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 @@ -17,17 +17,14 @@ package org.apache.camel.component.aws2.lambda; import java.util.Map; -import java.util.Set; import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Component; import org.apache.camel.support.DefaultComponent; -import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import software.amazon.awssdk.services.lambda.LambdaClient; /** * For working with Amazon Lambda SDK v2. 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 e014ebd..20692dd 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 @@ -49,21 +49,6 @@ public interface Aws2LambdaComponentBuilderFactory { extends ComponentBuilder<Lambda2Component> { /** - * Setting the autoDiscoverClient mechanism, if true, the component will - * look for a client instance in the registry automatically otherwise it - * will skip that checking. - * - * The option is a: <code>boolean</code> type. - * - * Default: true - * Group: common - */ - default Aws2LambdaComponentBuilder autoDiscoverClient( - boolean autoDiscoverClient) { - doSetProperty("autoDiscoverClient", autoDiscoverClient); - return this; - } - /** * Component configuration. * * The option is a: @@ -267,7 +252,6 @@ public interface Aws2LambdaComponentBuilderFactory { String name, Object value) { switch (name) { - case "autoDiscoverClient": getOrCreateConfiguration((Lambda2Component) component).setAutoDiscoverClient((boolean) 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; diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Lambda2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Lambda2EndpointBuilderFactory.java index 734937a..56d7f3c 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Lambda2EndpointBuilderFactory.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Lambda2EndpointBuilderFactory.java @@ -38,36 +38,6 @@ public interface Lambda2EndpointBuilderFactory { return (AdvancedLambda2EndpointBuilder) this; } /** - * Setting the autoDiscoverClient mechanism, if true, the component will - * look for a client instance in the registry automatically otherwise it - * will skip that checking. - * - * The option is a: <code>boolean</code> type. - * - * Default: true - * Group: common - */ - default Lambda2EndpointBuilder autoDiscoverClient( - boolean autoDiscoverClient) { - doSetProperty("autoDiscoverClient", autoDiscoverClient); - return this; - } - /** - * Setting the autoDiscoverClient mechanism, if true, the component will - * look for a client instance in the registry automatically otherwise it - * will skip that checking. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: true - * Group: common - */ - default Lambda2EndpointBuilder autoDiscoverClient( - String autoDiscoverClient) { - doSetProperty("autoDiscoverClient", autoDiscoverClient); - return this; - } - /** * 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 diff --git a/docs/components/modules/ROOT/pages/aws2-lambda-component.adoc b/docs/components/modules/ROOT/pages/aws2-lambda-component.adoc index e93d4a0..dc2e045 100644 --- a/docs/components/modules/ROOT/pages/aws2-lambda-component.adoc +++ b/docs/components/modules/ROOT/pages/aws2-lambda-component.adoc @@ -46,14 +46,13 @@ You can append query options to the URI in the following format, // component options: START -The AWS 2 Lambda component supports 14 options, which are listed below. +The AWS 2 Lambda component supports 13 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean | *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. There are 18 enums and 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 | [...] @@ -61,7 +60,7 @@ The AWS 2 Lambda component supports 14 options, which are listed below. | *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 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean | *autowiredEnabled* (advanced) | 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 then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean -| *awsLambdaClient* (advanced) | To use a existing configured AwsLambdaClient as client | | LambdaClient +| *awsLambdaClient* (advanced) | *Autowired* To use a existing configured AwsLambdaClient as client | | LambdaClient | *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. There are 2 enums and the value can be one of: HTTP, HTTPS | HTTPS | Protocol @@ -92,19 +91,18 @@ with the following path and query parameters: |=== -=== Query Parameters (13 parameters): +=== Query Parameters (12 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean | *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. There are 18 enums and 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 | [...] | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean | *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 | *trustAllCertificates* (producer) | If we want to trust all certificates in case of overriding the endpoint | false | boolean -| *awsLambdaClient* (advanced) | To use a existing configured AwsLambdaClient as client | | LambdaClient +| *awsLambdaClient* (advanced) | *Autowired* To use a existing configured AwsLambdaClient as client | | LambdaClient | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean | *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