You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/09/21 16:30:35 UTC
[camel] 02/10: CAMEL-15375 - Camel-AWS2-Eventbridge: More work
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 6fc2e5650b595e081dbb4d4c73bdd214b26afc9c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 21 11:15:52 2020 +0200
CAMEL-15375 - Camel-AWS2-Eventbridge: More work
---
...er.java => EventbridgeComponentConfigurer.java} | 25 +-
...rer.java => EventbridgeEndpointConfigurer.java} | 17 +-
.../services/org/apache/camel/component.properties | 8 +-
.../org/apache/camel/component/aws2-eventbridge | 2 +
.../services/org/apache/camel/component/aws2-sts | 2 -
.../camel/configurer/aws2-eventbridge-component | 2 +
.../camel/configurer/aws2-eventbridge-endpoint | 2 +
.../org/apache/camel/configurer/aws2-sts-component | 2 -
.../org/apache/camel/configurer/aws2-sts-endpoint | 2 -
.../sts/{aws2-sts.json => aws2-eventbridge.json} | 64 +--
.../{sts => eventbridge}/EvenbridgeOperations.java | 2 +-
.../{sts => eventbridge}/EventbridgeComponent.java | 6 +-
.../EventbridgeComponentVerifierExtension.java | 2 +-
.../EventbridgeConfiguration.java | 2 +-
.../{sts => eventbridge}/EventbridgeConstants.java | 3 +-
.../{sts => eventbridge}/EventbridgeEndpoint.java | 11 +-
.../{sts => eventbridge}/EventbridgeProducer.java | 28 +-
.../EventbridgeComponentConfigurationTest.java} | 19 +-
.../component/aws2/sts/AmazonSTSClientMock.java | 64 ---
.../aws2/sts/STS2ComponentClientRegistryTest.java | 71 ----
.../sts/STS2ComponentVerifierExtensionTest.java | 94 -----
.../component/aws2/sts/STS2ProducerSpringTest.java | 94 -----
.../camel/component/aws2/sts/STS2ProducerTest.java | 109 -----
core/camel-allcomponents/pom.xml | 4 +
.../component/ComponentsBuilderFactory.java | 11 +
.../Aws2EventbridgeComponentBuilderFactory.java | 288 +++++++++++++
.../src/generated/resources/metadata.json | 22 +
.../builder/endpoint/EndpointBuilderFactory.java | 1 +
.../camel/builder/endpoint/EndpointBuilders.java | 1 +
.../builder/endpoint/StaticEndpointBuilders.java | 41 ++
.../dsl/EventbridgeEndpointBuilderFactory.java | 458 +++++++++++++++++++++
parent/pom.xml | 5 +
32 files changed, 935 insertions(+), 527 deletions(-)
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/EventbridgeComponentConfigurer.java
similarity index 82%
rename from components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java
rename to components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/EventbridgeComponentConfigurer.java
index 8b0b46a..6e7c85f 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurer.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/EventbridgeComponentConfigurer.java
@@ -4,6 +4,7 @@ package org.apache.camel.component.aws2.sts;
import java.util.Map;
import org.apache.camel.CamelContext;
+import org.apache.camel.component.aws2.eventbridge.EventbridgeComponent;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.util.CaseInsensitiveMap;
@@ -13,11 +14,11 @@ import org.apache.camel.support.component.PropertyConfigurerSupport;
* Generated by camel build tools - do NOT edit this file!
*/
@SuppressWarnings("unchecked")
-public class STS2ComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
- private org.apache.camel.component.aws2.sts.EventbridgeConfiguration getOrCreateConfiguration(EventbridgeComponent target) {
+ private org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration getOrCreateConfiguration(EventbridgeComponent target) {
if (target.getConfiguration() == null) {
- target.setConfiguration(new org.apache.camel.component.aws2.sts.EventbridgeConfiguration());
+ target.setConfiguration(new org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration());
}
return target.getConfiguration();
}
@@ -32,10 +33,12 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
case "autoDiscoverClient": getOrCreateConfiguration(target).setAutoDiscoverClient(property(camelContext, boolean.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.sts.EventbridgeConfiguration.class, value)); return true;
+ case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration.class, value)); return true;
+ case "eventbridgeclient":
+ case "eventbridgeClient": getOrCreateConfiguration(target).setEventbridgeClient(property(camelContext, software.amazon.awssdk.services.eventbridge.EventBridgeClient.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.sts.EvenbridgeOperations.class, value)); return true;
+ case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws2.eventbridge.EvenbridgeOperations.class, value)); return true;
case "pojorequest":
case "pojoRequest": getOrCreateConfiguration(target).setPojoRequest(property(camelContext, boolean.class, value)); return true;
case "proxyhost":
@@ -47,8 +50,6 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
case "region": getOrCreateConfiguration(target).setRegion(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;
- case "stsclient":
- case "stsClient": getOrCreateConfiguration(target).setStsClient(property(camelContext, software.amazon.awssdk.services.sts.StsClient.class, value)); return true;
case "trustallcertificates":
case "trustAllCertificates": getOrCreateConfiguration(target).setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
default: return false;
@@ -61,16 +62,16 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
answer.put("accessKey", java.lang.String.class);
answer.put("autoDiscoverClient", boolean.class);
answer.put("basicPropertyBinding", boolean.class);
- answer.put("configuration", org.apache.camel.component.aws2.sts.EventbridgeConfiguration.class);
+ answer.put("configuration", org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration.class);
+ answer.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
answer.put("lazyStartProducer", boolean.class);
- answer.put("operation", org.apache.camel.component.aws2.sts.EvenbridgeOperations.class);
+ answer.put("operation", org.apache.camel.component.aws2.eventbridge.EvenbridgeOperations.class);
answer.put("pojoRequest", boolean.class);
answer.put("proxyHost", java.lang.String.class);
answer.put("proxyPort", java.lang.Integer.class);
answer.put("proxyProtocol", software.amazon.awssdk.core.Protocol.class);
answer.put("region", java.lang.String.class);
answer.put("secretKey", java.lang.String.class);
- answer.put("stsClient", software.amazon.awssdk.services.sts.StsClient.class);
answer.put("trustAllCertificates", boolean.class);
return answer;
}
@@ -86,6 +87,8 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
case "basicpropertybinding":
case "basicPropertyBinding": return target.isBasicPropertyBinding();
case "configuration": return target.getConfiguration();
+ case "eventbridgeclient":
+ case "eventbridgeClient": return getOrCreateConfiguration(target).getEventbridgeClient();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
case "operation": return getOrCreateConfiguration(target).getOperation();
@@ -100,8 +103,6 @@ public class STS2ComponentConfigurer extends PropertyConfigurerSupport implement
case "region": return getOrCreateConfiguration(target).getRegion();
case "secretkey":
case "secretKey": return getOrCreateConfiguration(target).getSecretKey();
- case "stsclient":
- case "stsClient": return getOrCreateConfiguration(target).getStsClient();
case "trustallcertificates":
case "trustAllCertificates": return getOrCreateConfiguration(target).isTrustAllCertificates();
default: return null;
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/EventbridgeEndpointConfigurer.java
similarity index 86%
rename from components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java
rename to components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/EventbridgeEndpointConfigurer.java
index 71609fd..4dadaf8 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/STS2EndpointConfigurer.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/sts/EventbridgeEndpointConfigurer.java
@@ -4,6 +4,7 @@ package org.apache.camel.component.aws2.sts;
import java.util.Map;
import org.apache.camel.CamelContext;
+import org.apache.camel.component.aws2.eventbridge.EventbridgeEndpoint;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.util.CaseInsensitiveMap;
@@ -13,7 +14,7 @@ import org.apache.camel.support.component.PropertyConfigurerSupport;
* Generated by camel build tools - do NOT edit this file!
*/
@SuppressWarnings("unchecked")
-public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
@@ -25,9 +26,11 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "autoDiscoverClient": target.getConfiguration().setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
case "basicpropertybinding":
case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
+ case "eventbridgeclient":
+ case "eventbridgeClient": target.getConfiguration().setEventbridgeClient(property(camelContext, software.amazon.awssdk.services.eventbridge.EventBridgeClient.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
- case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws2.sts.EvenbridgeOperations.class, value)); return true;
+ case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws2.eventbridge.EvenbridgeOperations.class, value)); return true;
case "pojorequest":
case "pojoRequest": target.getConfiguration().setPojoRequest(property(camelContext, boolean.class, value)); return true;
case "proxyhost":
@@ -39,8 +42,6 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
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 "stsclient":
- case "stsClient": target.getConfiguration().setStsClient(property(camelContext, software.amazon.awssdk.services.sts.StsClient.class, value)); return true;
case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
case "trustallcertificates":
case "trustAllCertificates": target.getConfiguration().setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
@@ -54,15 +55,15 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
answer.put("accessKey", java.lang.String.class);
answer.put("autoDiscoverClient", boolean.class);
answer.put("basicPropertyBinding", boolean.class);
+ answer.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
answer.put("lazyStartProducer", boolean.class);
- answer.put("operation", org.apache.camel.component.aws2.sts.EvenbridgeOperations.class);
+ answer.put("operation", org.apache.camel.component.aws2.eventbridge.EvenbridgeOperations.class);
answer.put("pojoRequest", boolean.class);
answer.put("proxyHost", java.lang.String.class);
answer.put("proxyPort", java.lang.Integer.class);
answer.put("proxyProtocol", software.amazon.awssdk.core.Protocol.class);
answer.put("region", java.lang.String.class);
answer.put("secretKey", java.lang.String.class);
- answer.put("stsClient", software.amazon.awssdk.services.sts.StsClient.class);
answer.put("synchronous", boolean.class);
answer.put("trustAllCertificates", boolean.class);
return answer;
@@ -78,6 +79,8 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
case "basicpropertybinding":
case "basicPropertyBinding": return target.isBasicPropertyBinding();
+ case "eventbridgeclient":
+ case "eventbridgeClient": return target.getConfiguration().getEventbridgeClient();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
case "operation": return target.getConfiguration().getOperation();
@@ -92,8 +95,6 @@ public class STS2EndpointConfigurer extends PropertyConfigurerSupport implements
case "region": return target.getConfiguration().getRegion();
case "secretkey":
case "secretKey": return target.getConfiguration().getSecretKey();
- case "stsclient":
- case "stsClient": return target.getConfiguration().getStsClient();
case "synchronous": return target.isSynchronous();
case "trustallcertificates":
case "trustAllCertificates": return target.getConfiguration().isTrustAllCertificates();
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component.properties
index f52f268..4edcf47 100644
--- a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component.properties
+++ b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -1,7 +1,7 @@
# Generated by camel build tools - do NOT edit this file!
-components=aws2-sts
+components=aws2-eventbridge
groupId=org.apache.camel
-artifactId=camel-aws2-sts
+artifactId=camel-aws2-eventbridge
version=3.6.0-SNAPSHOT
-projectName=Camel :: AWS2 STS
-projectDescription=A Camel Amazon STS Web Service Component Version 2
+projectName=Camel :: AWS2 Eventbridge
+projectDescription=A Camel Amazon Eventbridge Web Service Component Version 2
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-eventbridge b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-eventbridge
new file mode 100644
index 0000000..c13ec88
--- /dev/null
+++ b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-eventbridge
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.sts.EventbridgeComponent
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-sts b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-sts
deleted file mode 100644
index 4d0c549..0000000
--- a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-sts
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.aws2.sts.STS2Component
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-eventbridge-component b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-eventbridge-component
new file mode 100644
index 0000000..93bbb8d
--- /dev/null
+++ b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-eventbridge-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.sts.EventbridgeComponentConfigurer
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-eventbridge-endpoint b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-eventbridge-endpoint
new file mode 100644
index 0000000..ad9e1de
--- /dev/null
+++ b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-eventbridge-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.sts.EventbridgeEndpointConfigurer
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-sts-component b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-sts-component
deleted file mode 100644
index da92f0a..0000000
--- a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-sts-component
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.aws2.sts.STS2ComponentConfigurer
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-sts-endpoint b/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-sts-endpoint
deleted file mode 100644
index ccdf76f..0000000
--- a/components/camel-aws2-eventbridge/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-sts-endpoint
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.aws2.sts.STS2EndpointConfigurer
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-eventbridge.json
similarity index 60%
rename from components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
rename to components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-eventbridge.json
index e5f9498..8b1ea66 100644
--- a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
+++ b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-eventbridge.json
@@ -1,20 +1,20 @@
{
"component": {
"kind": "component",
- "name": "aws2-sts",
- "title": "AWS 2 Security Token Service (STS)",
- "description": "Manage AWS STS cluster instances using AWS SDK version 2.x.",
+ "name": "aws2-eventbridge",
+ "title": "AWS 2 Eventbridge",
+ "description": "Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.",
"deprecated": false,
- "firstVersion": "3.5.0",
+ "firstVersion": "3.6.0",
"label": "cloud,management",
- "javaType": "org.apache.camel.component.aws2.sts.STS2Component",
+ "javaType": "org.apache.camel.component.aws2.sts.EventbridgeComponent",
"supportLevel": "Preview",
"groupId": "org.apache.camel",
- "artifactId": "camel-aws2-sts",
+ "artifactId": "camel-aws2-eventbridge",
"version": "3.6.0-SNAPSHOT",
- "scheme": "aws2-sts",
+ "scheme": "aws2-eventbridge",
"extendsScheme": "",
- "syntax": "aws2-sts:label",
+ "syntax": "aws2-eventbridge:label",
"async": false,
"api": false,
"consumerOnly": false,
@@ -22,36 +22,36 @@
"lenientProperties": false
},
"componentProperties": {
- "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the regist [...]
- "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Configuration", "deprecated": false, "secret": false, "description": "Component configuration" },
+ "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the [...]
+ "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "deprecated": false, "secret": false, "description": "Component configuration" },
+ "eventbridgeClient": { "kind": "property", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
"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": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken", "getFederationToken" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description" [...]
- "pojoRequest": { "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
- "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.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS 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.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS 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.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the STS client" },
- "region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of t [...]
- "stsClient": { "kind": "property", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
- "trustAllCertificates": { "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.EvenbridgeOperations", "enum": [ "putRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "The operation to perform" },
+ "pojoRequest": { "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "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.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS 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.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS 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.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the STS client" },
+ "region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase na [...]
+ "trustAllCertificates": { "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
"basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": true, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
- "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.sts.STS2Configuration", "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.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "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.sts.EventbridgeConfiguration", "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.sts.EventbridgeConfiguration", "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.sts.STS2Configuration", "configurationField": "configuration", "description": "Logical name" },
- "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the regis [...]
+ "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.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "Logical name" },
+ "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in th [...]
+ "eventbridgeClient": { "kind": "parameter", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge 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": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken", "getFederationToken" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description [...]
- "pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
- "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.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS 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.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS 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.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the STS client" },
- "region": { "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase name of [...]
- "stsClient": { "kind": "parameter", "displayName": "Sts Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.sts.StsClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS STS as client" },
- "trustAllCertificates": { "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.EvenbridgeOperations", "enum": [ "putRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "The operation to perform" },
+ "pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "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.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS 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.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS 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.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the STS client" },
+ "region": { "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "aws-global", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "The region in which STS client needs to work. When using this parameter, the configuration will expect the lowercase n [...]
+ "trustAllCertificates": { "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
"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)." },
- "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.sts.STS2Configuration", "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.sts.STS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "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.sts.EventbridgeConfiguration", "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.sts.EventbridgeConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
}
}
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EvenbridgeOperations.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EvenbridgeOperations.java
similarity index 94%
rename from components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EvenbridgeOperations.java
rename to components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EvenbridgeOperations.java
index c3e4ad5..0aa4338 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EvenbridgeOperations.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EvenbridgeOperations.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.aws2.sts;
+package org.apache.camel.component.aws2.eventbridge;
public enum EvenbridgeOperations {
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeComponent.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java
similarity index 94%
rename from components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeComponent.java
rename to components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java
index e45edfb..6eeecbd 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeComponent.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponent.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.aws2.sts;
+package org.apache.camel.component.aws2.eventbridge;
import java.util.Map;
import java.util.Set;
@@ -27,7 +27,6 @@ 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.eventbridge.EventBridgeClient;
/**
@@ -53,7 +52,8 @@ public class EventbridgeComponent extends DefaultComponent {
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
- EventbridgeConfiguration configuration = this.configuration != null ? this.configuration.copy() : new EventbridgeConfiguration();
+ EventbridgeConfiguration configuration
+ = this.configuration != null ? this.configuration.copy() : new EventbridgeConfiguration();
EventbridgeEndpoint endpoint = new EventbridgeEndpoint(uri, this, configuration);
setProperties(endpoint, parameters);
if (endpoint.getConfiguration().isAutoDiscoverClient()) {
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeComponentVerifierExtension.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentVerifierExtension.java
similarity index 98%
rename from components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeComponentVerifierExtension.java
rename to components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentVerifierExtension.java
index b68adcd..dd2869b 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeComponentVerifierExtension.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentVerifierExtension.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.aws2.sts;
+package org.apache.camel.component.aws2.eventbridge;
import java.util.Map;
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeConfiguration.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
similarity index 99%
rename from components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeConfiguration.java
rename to components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
index 15245ee..9b7707d 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeConfiguration.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.aws2.sts;
+package org.apache.camel.component.aws2.eventbridge;
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.spi.Metadata;
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeConstants.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java
similarity index 89%
rename from components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeConstants.java
rename to components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java
index 3a30b23..eecf9ca 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeConstants.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.aws2.sts;
+package org.apache.camel.component.aws2.eventbridge;
/**
* Constants used in Camel AWS2 STS module
@@ -22,4 +22,5 @@ package org.apache.camel.component.aws2.sts;
public interface EventbridgeConstants {
String OPERATION = "CamelAwsEventbridgeOperation";
String RULE_NAME = "CamelAwsEventbridgeRuleName";
+ String EVENT_PATTERN = "CamelAwsEventbridgeEventPattern";
}
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeEndpoint.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java
similarity index 93%
rename from components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeEndpoint.java
rename to components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java
index 7e9b456..15f8a39 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeEndpoint.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpoint.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.aws2.sts;
+package org.apache.camel.component.aws2.eventbridge;
import java.net.URI;
@@ -71,14 +71,15 @@ public class EventbridgeEndpoint extends DefaultEndpoint {
public void doStart() throws Exception {
super.doStart();
- eventbridgeClient = configuration.getEventbridgeClient() != null ? configuration.getEventbridgeClient() : createStsClient();
+ eventbridgeClient
+ = configuration.getEventbridgeClient() != null ? configuration.getEventbridgeClient() : createStsClient();
}
@Override
public void doStop() throws Exception {
if (ObjectHelper.isEmpty(configuration.getEventbridgeClient())) {
if (eventbridgeClient != null) {
- eventbridgeClient.close();
+ eventbridgeClient.close();
}
}
super.doStop();
@@ -93,8 +94,8 @@ public class EventbridgeEndpoint extends DefaultEndpoint {
}
EventBridgeClient createStsClient() {
- EventBridgeClient client = null;
- EventBridgeClientBuilder clientBuilder = EventBridgeClient.builder();
+ EventBridgeClient client = null;
+ EventBridgeClientBuilder clientBuilder = EventBridgeClient.builder();
ProxyConfiguration.Builder proxyConfig = null;
ApacheHttpClient.Builder httpClientBuilder = null;
boolean isClientConfigFound = false;
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeProducer.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
similarity index 82%
rename from components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeProducer.java
rename to components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
index 1f7bce0..74a6671 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/sts/EventbridgeProducer.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
@@ -14,27 +14,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.aws2.sts;
+package org.apache.camel.component.aws2.eventbridge;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.InvalidPayloadException;
import org.apache.camel.Message;
-import org.apache.camel.component.aws2.eks.EKS2Constants;
import org.apache.camel.support.DefaultProducer;
import org.apache.camel.util.ObjectHelper;
import org.apache.camel.util.URISupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
-import software.amazon.awssdk.services.eks.model.ListClustersRequest;
-import software.amazon.awssdk.services.eks.model.ListClustersResponse;
import software.amazon.awssdk.services.eventbridge.EventBridgeClient;
import software.amazon.awssdk.services.eventbridge.model.PutRuleRequest;
import software.amazon.awssdk.services.eventbridge.model.PutRuleResponse;
/**
- * A Producer which sends messages to the Amazon Eventbridge Service SDK v2 <a href="http://aws.amazon.com/sts/">AWS STS</a>
+ * A Producer which sends messages to the Amazon Eventbridge Service SDK v2 <a href="http://aws.amazon.com/sts/">AWS
+ * STS</a>
*/
public class EventbridgeProducer extends DefaultProducer {
@@ -57,7 +55,7 @@ public class EventbridgeProducer extends DefaultProducer {
}
}
- private EvenbridgeOperations determineOperation(Exchange exchange) {
+ private EvenbridgeOperations determineOperation(Exchange exchange) {
EvenbridgeOperations operation = exchange.getIn().getHeader(EventbridgeConstants.OPERATION, EvenbridgeOperations.class);
if (operation == null) {
operation = getConfiguration().getOperation();
@@ -72,12 +70,12 @@ public class EventbridgeProducer extends DefaultProducer {
@Override
public String toString() {
if (eventbridgeProducerToString == null) {
- eventbridgeProducerToString = "EventbridgeProducer[" + URISupport.sanitizeUri(getEndpoint().getEndpointUri()) + "]";
+ eventbridgeProducerToString = "EventbridgeProducer[" + URISupport.sanitizeUri(getEndpoint().getEndpointUri()) + "]";
}
return eventbridgeProducerToString;
}
-
- private void putRule(EventBridgeClient eventbridgeClient, Exchange exchange) {
+
+ private void putRule(EventBridgeClient eventbridgeClient, Exchange exchange) throws InvalidPayloadException {
if (getConfiguration().isPojoRequest()) {
Object payload = exchange.getIn().getMandatoryBody();
if (payload instanceof PutRuleRequest) {
@@ -97,17 +95,21 @@ public class EventbridgeProducer extends DefaultProducer {
String ruleName = exchange.getIn().getHeader(EventbridgeConstants.RULE_NAME, String.class);
builder.name(ruleName);
}
- ListClustersResponse result;
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(EventbridgeConstants.EVENT_PATTERN))) {
+ String eventPattern = exchange.getIn().getHeader(EventbridgeConstants.EVENT_PATTERN, String.class);
+ builder.eventPattern(eventPattern);
+ }
+ PutRuleResponse result;
try {
- result = eksClient.listClusters(builder.build());
+ result = eventbridgeClient.putRule(builder.build());
} catch (AwsServiceException ase) {
- LOG.trace("List Clusters command returned the error code {}", ase.awsErrorDetails().errorCode());
+ LOG.trace("Put Rule command returned the error code {}", ase.awsErrorDetails().errorCode());
throw ase;
}
Message message = getMessageForResponse(exchange);
message.setBody(result);
}
- }
+ }
@Override
public EventbridgeEndpoint getEndpoint() {
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurationTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurationTest.java
similarity index 79%
rename from components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurationTest.java
rename to components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurationTest.java
index b657f75..1b9cd94 100644
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentConfigurationTest.java
+++ b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurationTest.java
@@ -14,8 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.aws2.sts;
+package org.apache.camel.component.aws2.eventbridge;
+import org.apache.camel.component.aws2.eventbridge.EventbridgeComponent;
+import org.apache.camel.component.aws2.eventbridge.EventbridgeEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Test;
import software.amazon.awssdk.core.Protocol;
@@ -23,14 +25,14 @@ import software.amazon.awssdk.regions.Region;
import static org.junit.jupiter.api.Assertions.assertEquals;
-public class STS2ComponentConfigurationTest extends CamelTestSupport {
+public class EventbridgeComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentElements() throws Exception {
- EventbridgeComponent component = context.getComponent("aws2-sts", EventbridgeComponent.class);
+ EventbridgeComponent component = context.getComponent("aws2-eventbridge", EventbridgeComponent.class);
component.getConfiguration().setAccessKey("XXX");
component.getConfiguration().setSecretKey("YYY");
- EventbridgeEndpoint endpoint = (EventbridgeEndpoint) component.createEndpoint("aws2-sts://label");
+ EventbridgeEndpoint endpoint = (EventbridgeEndpoint) component.createEndpoint("aws2-eventbridge://label");
assertEquals("XXX", endpoint.getConfiguration().getAccessKey());
assertEquals("YYY", endpoint.getConfiguration().getSecretKey());
@@ -38,12 +40,13 @@ public class STS2ComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentAndEndpointElements() throws Exception {
- EventbridgeComponent component = context.getComponent("aws2-sts", EventbridgeComponent.class);
+ EventbridgeComponent component = context.getComponent("aws2-eventbridge", EventbridgeComponent.class);
component.getConfiguration().setAccessKey("XXX");
component.getConfiguration().setSecretKey("YYY");
component.getConfiguration().setRegion(Region.US_WEST_1.toString());
EventbridgeEndpoint endpoint
- = (EventbridgeEndpoint) component.createEndpoint("aws2-sts://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
+ = (EventbridgeEndpoint) component
+ .createEndpoint("aws2-eventbridge://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
@@ -52,13 +55,13 @@ public class STS2ComponentConfigurationTest extends CamelTestSupport {
@Test
public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
- EventbridgeComponent component = context.getComponent("aws2-sts", EventbridgeComponent.class);
+ EventbridgeComponent component = context.getComponent("aws2-eventbridge", EventbridgeComponent.class);
component.getConfiguration().setAccessKey("XXX");
component.getConfiguration().setSecretKey("YYY");
component.getConfiguration().setRegion(Region.US_WEST_1.toString());
EventbridgeEndpoint endpoint = (EventbridgeEndpoint) component
.createEndpoint(
- "aws2-sts://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
+ "aws2-eventbridge://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/AmazonSTSClientMock.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/AmazonSTSClientMock.java
deleted file mode 100644
index e083368..0000000
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/AmazonSTSClientMock.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.aws2.sts;
-
-import software.amazon.awssdk.services.sts.StsClient;
-import software.amazon.awssdk.services.sts.model.AssumeRoleRequest;
-import software.amazon.awssdk.services.sts.model.AssumeRoleResponse;
-import software.amazon.awssdk.services.sts.model.AssumedRoleUser;
-import software.amazon.awssdk.services.sts.model.Credentials;
-import software.amazon.awssdk.services.sts.model.GetFederationTokenRequest;
-import software.amazon.awssdk.services.sts.model.GetFederationTokenResponse;
-import software.amazon.awssdk.services.sts.model.GetSessionTokenRequest;
-import software.amazon.awssdk.services.sts.model.GetSessionTokenResponse;
-
-public class AmazonSTSClientMock implements StsClient {
-
- public AmazonSTSClientMock() {
- }
-
- @Override
- public AssumeRoleResponse assumeRole(AssumeRoleRequest assumeRoleRequest) {
- return AssumeRoleResponse.builder().assumedRoleUser(AssumedRoleUser.builder().arn("arn").build()).build();
- }
-
- @Override
- public GetSessionTokenResponse getSessionToken(GetSessionTokenRequest getSessionTokenRequest) {
- return GetSessionTokenResponse.builder()
- .credentials(Credentials.builder().accessKeyId("xxx").secretAccessKey("yyy").sessionToken("test").build())
- .build();
- }
-
- @Override
- public GetFederationTokenResponse getFederationToken(GetFederationTokenRequest getFederationTokenRequest) {
- return GetFederationTokenResponse.builder()
- .credentials(Credentials.builder().accessKeyId("xxx").secretAccessKey("yyy").sessionToken("test").build())
- .build();
- }
-
- @Override
- public String serviceName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void close() {
- // TODO Auto-generated method stub
-
- }
-}
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java
deleted file mode 100644
index 9491dff..0000000
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentClientRegistryTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.aws2.sts;
-
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNotSame;
-import static org.junit.jupiter.api.Assertions.assertSame;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-
-public class STS2ComponentClientRegistryTest extends CamelTestSupport {
-
- @Test
- public void createEndpointWithMinimalSTSClientConfiguration() throws Exception {
-
- AmazonSTSClientMock clientMock = new AmazonSTSClientMock();
- context.getRegistry().bind("amazonStsClient", clientMock);
- EventbridgeComponent component = context.getComponent("aws2-sts", EventbridgeComponent.class);
- EventbridgeEndpoint endpoint = (EventbridgeEndpoint) component.createEndpoint("aws2-sts://TestDomain");
-
- assertNotNull(endpoint.getConfiguration().getStsClient());
- }
-
- @Test
- public void createEndpointWithMinimalSTSClientMisconfiguration() throws Exception {
-
- EventbridgeComponent component = context.getComponent("aws2-sts", EventbridgeComponent.class);
- assertThrows(IllegalArgumentException.class, () -> {
- component.createEndpoint("aws2-sts://TestDomain");
- });
- }
-
- @Test
- public void createEndpointWithAutoDiscoverClientFalse() throws Exception {
-
- AmazonSTSClientMock clientMock = new AmazonSTSClientMock();
- context.getRegistry().bind("amazonStsClient", clientMock);
- EventbridgeComponent component = context.getComponent("aws2-sts", EventbridgeComponent.class);
- EventbridgeEndpoint endpoint = (EventbridgeEndpoint) component
- .createEndpoint("aws2-sts://TestDomain?accessKey=xxx&secretKey=yyy&autoDiscoverClient=false");
-
- assertNotSame(clientMock, endpoint.getConfiguration().getStsClient());
- }
-
- @Test
- public void createEndpointWithAutoDiscoverClientTrue() throws Exception {
-
- AmazonSTSClientMock clientMock = new AmazonSTSClientMock();
- context.getRegistry().bind("amazonStsClient", clientMock);
- EventbridgeComponent component = context.getComponent("aws2-sts", EventbridgeComponent.class);
- EventbridgeEndpoint endpoint = (EventbridgeEndpoint) component.createEndpoint("aws2-sts://TestDomain?accessKey=xxx&secretKey=yyy");
-
- assertSame(clientMock, endpoint.getConfiguration().getStsClient());
- }
-}
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentVerifierExtensionTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentVerifierExtensionTest.java
deleted file mode 100644
index c4b280c..0000000
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ComponentVerifierExtensionTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.aws2.sts;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.Component;
-import org.apache.camel.component.extension.ComponentVerifierExtension;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class STS2ComponentVerifierExtensionTest extends CamelTestSupport {
-
- // *************************************************
- // Tests (parameters)
- // *************************************************
- @Override
- public boolean isUseRouteBuilder() {
- return false;
- }
-
- @Test
- public void testParameters() throws Exception {
- Component component = context().getComponent("aws2-sts");
-
- ComponentVerifierExtension verifier
- = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new);
-
- Map<String, Object> parameters = new HashMap<>();
- parameters.put("secretKey", "l");
- parameters.put("accessKey", "k");
- parameters.put("region", "l");
- parameters.put("label", "test");
- parameters.put("operation", EvenbridgeOperations.assumeRole);
-
- ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
-
- assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
- }
-
- @Test
- public void testConnectivity() throws Exception {
- Component component = context().getComponent("aws2-sts");
- ComponentVerifierExtension verifier
- = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new);
-
- Map<String, Object> parameters = new HashMap<>();
- parameters.put("secretKey", "l");
- parameters.put("accessKey", "k");
- parameters.put("region", "US_EAST_1");
- parameters.put("label", "test");
- parameters.put("operation", EvenbridgeOperations.assumeRole);
-
- ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
-
- assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
- }
-
- @Test
- public void testConnectivityAndRegion() throws Exception {
- Component component = context().getComponent("aws2-sts");
- ComponentVerifierExtension verifier
- = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new);
-
- Map<String, Object> parameters = new HashMap<>();
- parameters.put("secretKey", "l");
- parameters.put("accessKey", "k");
- parameters.put("region", "l");
- parameters.put("label", "test");
- parameters.put("operation", EvenbridgeOperations.assumeRole);
-
- ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
-
- assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
- }
-
-}
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerSpringTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerSpringTest.java
deleted file mode 100644
index d2b46e1..0000000
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerSpringTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.aws2.sts;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import software.amazon.awssdk.services.sts.model.AssumeRoleResponse;
-import software.amazon.awssdk.services.sts.model.GetFederationTokenResponse;
-import software.amazon.awssdk.services.sts.model.GetSessionTokenResponse;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class STS2ProducerSpringTest extends CamelSpringTestSupport {
-
- @EndpointInject("mock:result")
- private MockEndpoint mock;
-
- @Test
- public void stsAssumeRoleTest() throws Exception {
-
- mock.expectedMessageCount(1);
- Exchange exchange = template.request("direct:assumeRole", new Processor() {
- @Override
- public void process(Exchange exchange) throws Exception {
- exchange.getIn().setHeader(EventbridgeConstants.OPERATION, EvenbridgeOperations.assumeRole);
- exchange.getIn().setHeader(EventbridgeConstants.ROLE_ARN, "arn");
- exchange.getIn().setHeader(EventbridgeConstants.ROLE_SESSION_NAME, "sessionarn");
- }
- });
-
- assertMockEndpointsSatisfied();
-
- AssumeRoleResponse resultGet = (AssumeRoleResponse) exchange.getIn().getBody();
- assertEquals("arn", resultGet.assumedRoleUser().arn());
- }
-
- @Test
- public void stsGetSessionTokenTest() throws Exception {
-
- mock.expectedMessageCount(1);
- Exchange exchange = template.request("direct:getSessionToken", new Processor() {
- @Override
- public void process(Exchange exchange) throws Exception {
- exchange.getIn().setHeader(EventbridgeConstants.OPERATION, EvenbridgeOperations.getSessionToken);
- }
- });
-
- assertMockEndpointsSatisfied();
-
- GetSessionTokenResponse resultGet = (GetSessionTokenResponse) exchange.getIn().getBody();
- assertEquals("xxx", resultGet.credentials().accessKeyId());
- }
-
- public void stsGetFederationTokenTest() throws Exception {
-
- mock.expectedMessageCount(1);
- Exchange exchange = template.request("direct:getFederationToken", new Processor() {
- @Override
- public void process(Exchange exchange) throws Exception {
- exchange.getIn().setHeader(EventbridgeConstants.OPERATION, EvenbridgeOperations.getFederationToken);
- exchange.getIn().setHeader(EventbridgeConstants.FEDERATED_NAME, "federation-account");
- }
- });
-
- assertMockEndpointsSatisfied();
-
- GetFederationTokenResponse resultGet = (GetFederationTokenResponse) exchange.getIn().getBody();
- assertEquals("xxx", resultGet.credentials().accessKeyId());
- }
-
- @Override
- protected ClassPathXmlApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/component/aws2/sts/STSComponentSpringTest-context.xml");
- }
-}
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java
deleted file mode 100644
index 8ed942f..0000000
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.aws2.sts;
-
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-import software.amazon.awssdk.services.sts.model.AssumeRoleResponse;
-import software.amazon.awssdk.services.sts.model.GetFederationTokenResponse;
-import software.amazon.awssdk.services.sts.model.GetSessionTokenResponse;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class STS2ProducerTest extends CamelTestSupport {
-
- @BindToRegistry("amazonStsClient")
- AmazonSTSClientMock clientMock = new AmazonSTSClientMock();
-
- @EndpointInject("mock:result")
- private MockEndpoint mock;
-
- @Test
- public void stsAssumeRoleTest() throws Exception {
-
- mock.expectedMessageCount(1);
- Exchange exchange = template.request("direct:assumeRole", new Processor() {
- @Override
- public void process(Exchange exchange) throws Exception {
- exchange.getIn().setHeader(EventbridgeConstants.OPERATION, EvenbridgeOperations.assumeRole);
- exchange.getIn().setHeader(EventbridgeConstants.ROLE_ARN, "arn");
- exchange.getIn().setHeader(EventbridgeConstants.ROLE_SESSION_NAME, "sessionarn");
- }
- });
-
- assertMockEndpointsSatisfied();
-
- AssumeRoleResponse resultGet = (AssumeRoleResponse) exchange.getIn().getBody();
- assertEquals("arn", resultGet.assumedRoleUser().arn());
- }
-
- @Test
- public void stsGetSessionTokenTest() throws Exception {
-
- mock.expectedMessageCount(1);
- Exchange exchange = template.request("direct:getSessionToken", new Processor() {
- @Override
- public void process(Exchange exchange) throws Exception {
- exchange.getIn().setHeader(EventbridgeConstants.OPERATION, EvenbridgeOperations.getSessionToken);
- }
- });
-
- assertMockEndpointsSatisfied();
-
- GetSessionTokenResponse resultGet = (GetSessionTokenResponse) exchange.getIn().getBody();
- assertEquals("xxx", resultGet.credentials().accessKeyId());
- }
-
- @Test
- public void stsGetFederationTokenTest() throws Exception {
-
- mock.expectedMessageCount(1);
- Exchange exchange = template.request("direct:getFederationToken", new Processor() {
- @Override
- public void process(Exchange exchange) throws Exception {
- exchange.getIn().setHeader(EventbridgeConstants.OPERATION, EvenbridgeOperations.getFederationToken);
- exchange.getIn().setHeader(EventbridgeConstants.FEDERATED_NAME, "federation-account");
- }
- });
-
- assertMockEndpointsSatisfied();
-
- GetFederationTokenResponse resultGet = (GetFederationTokenResponse) exchange.getIn().getBody();
- assertEquals("xxx", resultGet.credentials().accessKeyId());
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("direct:assumeRole").to("aws2-sts://test?stsClient=#amazonStsClient&operation=assumeRole")
- .to("mock:result");
- from("direct:getSessionToken").to("aws2-sts://test?stsClient=#amazonStsClient&operation=getSessionToken")
- .to("mock:result");
- from("direct:getFederationToken").to("aws2-sts://test?stsClient=#amazonStsClient&operation=getFederationToken")
- .to("mock:result");
- }
- };
- }
-}
diff --git a/core/camel-allcomponents/pom.xml b/core/camel-allcomponents/pom.xml
index bcf99b1..ecf8daf 100644
--- a/core/camel-allcomponents/pom.xml
+++ b/core/camel-allcomponents/pom.xml
@@ -196,6 +196,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws2-eventbridge</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-aws2-iam</artifactId>
</dependency>
<dependency>
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index e18e72f..da13164 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -538,6 +538,17 @@ public interface ComponentsBuilderFactory {
return org.apache.camel.builder.component.dsl.Aws2EksComponentBuilderFactory.aws2Eks();
}
/**
+ * AWS 2 Eventbridge (camel-aws2-eventbridge)
+ * Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
+ *
+ * Category: cloud,management
+ * Since: 3.6
+ * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
+ */
+ static org.apache.camel.builder.component.dsl.Aws2EventbridgeComponentBuilderFactory.Aws2EventbridgeComponentBuilder aws2Eventbridge() {
+ return org.apache.camel.builder.component.dsl.Aws2EventbridgeComponentBuilderFactory.aws2Eventbridge();
+ }
+ /**
* AWS 2 Identity and Access Management (IAM) (camel-aws2-iam)
* Manage AWS IAM instances using AWS SDK version 2.x.
*
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java
new file mode 100644
index 0000000..00114c8
--- /dev/null
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java
@@ -0,0 +1,288 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.component.dsl;
+
+import javax.annotation.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.aws2.sts.EventbridgeComponent;
+
+/**
+ * Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface Aws2EventbridgeComponentBuilderFactory {
+
+ /**
+ * AWS 2 Eventbridge (camel-aws2-eventbridge)
+ * Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
+ *
+ * Category: cloud,management
+ * Since: 3.6
+ * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
+ */
+ static Aws2EventbridgeComponentBuilder aws2Eventbridge() {
+ return new Aws2EventbridgeComponentBuilderImpl();
+ }
+
+ /**
+ * Builder for the AWS 2 Eventbridge component.
+ */
+ interface Aws2EventbridgeComponentBuilder
+ extends
+ ComponentBuilder<EventbridgeComponent> {
+ /**
+ * 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 Aws2EventbridgeComponentBuilder autoDiscoverClient(
+ boolean autoDiscoverClient) {
+ doSetProperty("autoDiscoverClient", autoDiscoverClient);
+ return this;
+ }
+ /**
+ * Component configuration.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.sts.EventbridgeConfiguration</code> type.
+ *
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder configuration(
+ org.apache.camel.component.aws2.sts.EventbridgeConfiguration configuration) {
+ doSetProperty("configuration", configuration);
+ return this;
+ }
+ /**
+ * To use a existing configured AWS Eventbridge as client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.eventbridge.EventBridgeClient</code> type.
+ *
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder eventbridgeClient(
+ software.amazon.awssdk.services.eventbridge.EventBridgeClient eventbridgeClient) {
+ doSetProperty("eventbridgeClient", eventbridgeClient);
+ 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
+ * 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 starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder lazyStartProducer(
+ boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * The operation to perform.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.sts.EvenbridgeOperations</code>
+ * type.
+ *
+ * Default: assumeRole
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder operation(
+ org.apache.camel.component.aws2.sts.EvenbridgeOperations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder pojoRequest(boolean pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * To define a proxy host when instantiating the STS client.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder proxyHost(
+ java.lang.String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the STS client.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder proxyPort(
+ java.lang.Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the STS client.
+ *
+ * The option is a: <code>software.amazon.awssdk.core.Protocol</code>
+ * type.
+ *
+ * Default: HTTPS
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder proxyProtocol(
+ software.amazon.awssdk.core.Protocol proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * The region in which STS 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().
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Default: aws-global
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder region(java.lang.String region) {
+ doSetProperty("region", region);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder trustAllCertificates(
+ boolean trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * Whether the component should use basic property binding (Camel 2.x)
+ * or the newer property binding with additional capabilities.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: advanced
+ */
+ @Deprecated
+ default Aws2EventbridgeComponentBuilder basicPropertyBinding(
+ boolean basicPropertyBinding) {
+ doSetProperty("basicPropertyBinding", basicPropertyBinding);
+ return this;
+ }
+ /**
+ * Amazon AWS Access Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ */
+ default Aws2EventbridgeComponentBuilder 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 Aws2EventbridgeComponentBuilder secretKey(
+ java.lang.String secretKey) {
+ doSetProperty("secretKey", secretKey);
+ return this;
+ }
+ }
+
+ class Aws2EventbridgeComponentBuilderImpl
+ extends
+ AbstractComponentBuilder<EventbridgeComponent>
+ implements
+ Aws2EventbridgeComponentBuilder {
+ @Override
+ protected EventbridgeComponent buildConcreteComponent() {
+ return new EventbridgeComponent();
+ }
+ private org.apache.camel.component.aws2.sts.EventbridgeConfiguration getOrCreateConfiguration(
+ org.apache.camel.component.aws2.sts.EventbridgeComponent component) {
+ if (component.getConfiguration() == null) {
+ component.setConfiguration(new org.apache.camel.component.aws2.sts.EventbridgeConfiguration());
+ }
+ return component.getConfiguration();
+ }
+ @Override
+ protected boolean setPropertyOnComponent(
+ Component component,
+ String name,
+ Object value) {
+ switch (name) {
+ case "autoDiscoverClient": getOrCreateConfiguration((EventbridgeComponent) component).setAutoDiscoverClient((boolean) value); return true;
+ case "configuration": ((EventbridgeComponent) component).setConfiguration((org.apache.camel.component.aws2.sts.EventbridgeConfiguration) value); return true;
+ case "eventbridgeClient": getOrCreateConfiguration((EventbridgeComponent) component).setEventbridgeClient((software.amazon.awssdk.services.eventbridge.EventBridgeClient) value); return true;
+ case "lazyStartProducer": ((EventbridgeComponent) component).setLazyStartProducer((boolean) value); return true;
+ case "operation": getOrCreateConfiguration((EventbridgeComponent) component).setOperation((org.apache.camel.component.aws2.sts.EvenbridgeOperations) value); return true;
+ case "pojoRequest": getOrCreateConfiguration((EventbridgeComponent) component).setPojoRequest((boolean) value); return true;
+ case "proxyHost": getOrCreateConfiguration((EventbridgeComponent) component).setProxyHost((java.lang.String) value); return true;
+ case "proxyPort": getOrCreateConfiguration((EventbridgeComponent) component).setProxyPort((java.lang.Integer) value); return true;
+ case "proxyProtocol": getOrCreateConfiguration((EventbridgeComponent) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
+ case "region": getOrCreateConfiguration((EventbridgeComponent) component).setRegion((java.lang.String) value); return true;
+ case "trustAllCertificates": getOrCreateConfiguration((EventbridgeComponent) component).setTrustAllCertificates((boolean) value); return true;
+ case "basicPropertyBinding": ((EventbridgeComponent) component).setBasicPropertyBinding((boolean) value); return true;
+ case "accessKey": getOrCreateConfiguration((EventbridgeComponent) component).setAccessKey((java.lang.String) value); return true;
+ case "secretKey": getOrCreateConfiguration((EventbridgeComponent) component).setSecretKey((java.lang.String) value); return true;
+ default: return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/core/camel-componentdsl/src/generated/resources/metadata.json b/core/camel-componentdsl/src/generated/resources/metadata.json
index dc1bd98..66f094f 100644
--- a/core/camel-componentdsl/src/generated/resources/metadata.json
+++ b/core/camel-componentdsl/src/generated/resources/metadata.json
@@ -576,6 +576,28 @@
"producerOnly": true,
"lenientProperties": false
},
+ "Aws2EventbridgeComponentBuilderFactory": {
+ "kind": "component",
+ "name": "aws2-eventbridge",
+ "title": "AWS 2 Eventbridge",
+ "description": "Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.",
+ "deprecated": false,
+ "firstVersion": "3.6.0",
+ "label": "cloud,management",
+ "javaType": "org.apache.camel.component.aws2.sts.EventbridgeComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-aws2-eventbridge",
+ "version": "3.6.0-SNAPSHOT",
+ "scheme": "aws2-eventbridge",
+ "extendsScheme": "",
+ "syntax": "aws2-eventbridge:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false
+ },
"Aws2IamComponentBuilderFactory": {
"kind": "component",
"name": "aws2-iam",
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index e91bbfc..58f0630 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -116,6 +116,7 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.EtcdWatchEndpointBuilderFactory.EtcdWatchBuilders,
org.apache.camel.builder.endpoint.dsl.EventEndpointBuilderFactory.EventBuilders,
org.apache.camel.builder.endpoint.dsl.EventHubsEndpointBuilderFactory.EventHubsBuilders,
+ org.apache.camel.builder.endpoint.dsl.EventbridgeEndpointBuilderFactory.EventbridgeBuilders,
org.apache.camel.builder.endpoint.dsl.ExecEndpointBuilderFactory.ExecBuilders,
org.apache.camel.builder.endpoint.dsl.FacebookEndpointBuilderFactory.FacebookBuilders,
org.apache.camel.builder.endpoint.dsl.FhirEndpointBuilderFactory.FhirBuilders,
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index 8927626..7f20529 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -113,6 +113,7 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.EtcdWatchEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.EventEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.EventHubsEndpointBuilderFactory,
+ org.apache.camel.builder.endpoint.dsl.EventbridgeEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.ExecEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.FacebookEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.FhirEndpointBuilderFactory,
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 3a8a9b6..450e5cd 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -1121,6 +1121,47 @@ public class StaticEndpointBuilders {
return org.apache.camel.builder.endpoint.dsl.EKS2EndpointBuilderFactory.endpointBuilder(componentName, path);
}
/**
+ * AWS 2 Eventbridge (camel-aws2-eventbridge)
+ * Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
+ *
+ * Category: cloud,management
+ * Since: 3.6
+ * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
+ *
+ * Syntax: <code>aws2-eventbridge:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path label
+ */
+ public static org.apache.camel.builder.endpoint.dsl.EventbridgeEndpointBuilderFactory.EventbridgeEndpointBuilder aws2Eventbridge(
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.EventbridgeEndpointBuilderFactory.endpointBuilder("aws2-eventbridge", path);
+ }
+ /**
+ * AWS 2 Eventbridge (camel-aws2-eventbridge)
+ * Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
+ *
+ * Category: cloud,management
+ * Since: 3.6
+ * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
+ *
+ * Syntax: <code>aws2-eventbridge:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path label
+ */
+ public static org.apache.camel.builder.endpoint.dsl.EventbridgeEndpointBuilderFactory.EventbridgeEndpointBuilder aws2Eventbridge(
+ String componentName,
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.EventbridgeEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+ /**
* AWS 2 Identity and Access Management (IAM) (camel-aws2-iam)
* Manage AWS IAM instances using AWS SDK version 2.x.
*
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
new file mode 100644
index 0000000..286a9dd
--- /dev/null
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
@@ -0,0 +1,458 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.endpoint.dsl;
+
+import javax.annotation.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface EventbridgeEndpointBuilderFactory {
+
+
+ /**
+ * Builder for endpoint for the AWS 2 Eventbridge component.
+ */
+ public interface EventbridgeEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default AdvancedEventbridgeEndpointBuilder advanced() {
+ return (AdvancedEventbridgeEndpointBuilder) 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 EventbridgeEndpointBuilder 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 EventbridgeEndpointBuilder autoDiscoverClient(
+ String autoDiscoverClient) {
+ doSetProperty("autoDiscoverClient", autoDiscoverClient);
+ return this;
+ }
+ /**
+ * To use a existing configured AWS Eventbridge as client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.eventbridge.EventBridgeClient</code> type.
+ *
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder eventbridgeClient(
+ Object eventbridgeClient) {
+ doSetProperty("eventbridgeClient", eventbridgeClient);
+ return this;
+ }
+ /**
+ * To use a existing configured AWS Eventbridge as client.
+ *
+ * The option will be converted to a
+ * <code>software.amazon.awssdk.services.eventbridge.EventBridgeClient</code> type.
+ *
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder eventbridgeClient(
+ String eventbridgeClient) {
+ doSetProperty("eventbridgeClient", eventbridgeClient);
+ 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
+ * 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 starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder lazyStartProducer(
+ boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ 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
+ * 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 starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder lazyStartProducer(
+ String lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * The operation to perform.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.sts.EvenbridgeOperations</code>
+ * type.
+ *
+ * Required: true
+ * Default: assumeRole
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder operation(
+ EvenbridgeOperations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * The operation to perform.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.aws2.sts.EvenbridgeOperations</code>
+ * type.
+ *
+ * Required: true
+ * Default: assumeRole
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder operation(String operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder pojoRequest(boolean pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder pojoRequest(String pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * To define a proxy host when instantiating the STS client.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder proxyHost(String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the STS client.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder proxyPort(Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the STS client.
+ *
+ * The option will be converted to a <code>java.lang.Integer</code>
+ * type.
+ *
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder proxyPort(String proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the STS client.
+ *
+ * The option is a: <code>software.amazon.awssdk.core.Protocol</code>
+ * type.
+ *
+ * Default: HTTPS
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder proxyProtocol(Protocol proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the STS client.
+ *
+ * The option will be converted to a
+ * <code>software.amazon.awssdk.core.Protocol</code> type.
+ *
+ * Default: HTTPS
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder proxyProtocol(String proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * The region in which STS 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().
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Default: aws-global
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder region(String region) {
+ doSetProperty("region", region);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder trustAllCertificates(
+ boolean trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder trustAllCertificates(
+ String trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * Amazon AWS Access Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ */
+ default EventbridgeEndpointBuilder accessKey(String accessKey) {
+ doSetProperty("accessKey", accessKey);
+ return this;
+ }
+ /**
+ * Amazon AWS Secret Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ */
+ default EventbridgeEndpointBuilder secretKey(String secretKey) {
+ doSetProperty("secretKey", secretKey);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint for the AWS 2 Eventbridge component.
+ */
+ public interface AdvancedEventbridgeEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default EventbridgeEndpointBuilder basic() {
+ return (EventbridgeEndpointBuilder) this;
+ }
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: advanced
+ */
+ default AdvancedEventbridgeEndpointBuilder basicPropertyBinding(
+ boolean basicPropertyBinding) {
+ doSetProperty("basicPropertyBinding", basicPropertyBinding);
+ return this;
+ }
+ /**
+ * Whether the endpoint should use basic property binding (Camel 2.x) or
+ * the newer property binding with additional capabilities.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: advanced
+ */
+ default AdvancedEventbridgeEndpointBuilder basicPropertyBinding(
+ String basicPropertyBinding) {
+ doSetProperty("basicPropertyBinding", basicPropertyBinding);
+ return this;
+ }
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported).
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: advanced
+ */
+ default AdvancedEventbridgeEndpointBuilder synchronous(
+ boolean synchronous) {
+ doSetProperty("synchronous", synchronous);
+ return this;
+ }
+ /**
+ * Sets whether synchronous processing should be strictly used, or Camel
+ * is allowed to use asynchronous processing (if supported).
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: advanced
+ */
+ default AdvancedEventbridgeEndpointBuilder synchronous(
+ String synchronous) {
+ doSetProperty("synchronous", synchronous);
+ return this;
+ }
+ }
+
+ /**
+ * Proxy enum for
+ * <code>org.apache.camel.component.aws2.sts.EvenbridgeOperations</code>
+ * enum.
+ */
+ enum EvenbridgeOperations {
+ putRule;
+ }
+
+ /**
+ * Proxy enum for <code>software.amazon.awssdk.core.Protocol</code> enum.
+ */
+ enum Protocol {
+ HTTP,
+ HTTPS;
+ }
+
+ public interface EventbridgeBuilders {
+ /**
+ * AWS 2 Eventbridge (camel-aws2-eventbridge)
+ * Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
+ *
+ * Category: cloud,management
+ * Since: 3.6
+ * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
+ *
+ * Syntax: <code>aws2-eventbridge:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path label
+ */
+ default EventbridgeEndpointBuilder aws2Eventbridge(String path) {
+ return EventbridgeEndpointBuilderFactory.endpointBuilder("aws2-eventbridge", path);
+ }
+ /**
+ * AWS 2 Eventbridge (camel-aws2-eventbridge)
+ * Manage AWS Eventbridge cluster instances using AWS SDK version 2.x.
+ *
+ * Category: cloud,management
+ * Since: 3.6
+ * Maven coordinates: org.apache.camel:camel-aws2-eventbridge
+ *
+ * Syntax: <code>aws2-eventbridge:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path label
+ */
+ default EventbridgeEndpointBuilder aws2Eventbridge(
+ String componentName,
+ String path) {
+ return EventbridgeEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+ }
+ static EventbridgeEndpointBuilder endpointBuilder(
+ String componentName,
+ String path) {
+ class EventbridgeEndpointBuilderImpl extends AbstractEndpointBuilder implements EventbridgeEndpointBuilder, AdvancedEventbridgeEndpointBuilder {
+ public EventbridgeEndpointBuilderImpl(String path) {
+ super(componentName, path);
+ }
+ }
+ return new EventbridgeEndpointBuilderImpl(path);
+ }
+}
\ No newline at end of file
diff --git a/parent/pom.xml b/parent/pom.xml
index f0343a0..4497e40 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -959,6 +959,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws2-eventbridge</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-aws2-iam</artifactId>
<version>${project.version}</version>
</dependency>