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/28 07:30:44 UTC

[camel] branch master updated (e5a9014 -> 245ec3e)

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

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


    from e5a9014  CAMEL-15581: Fix loading of XML rest definitions with camel-main
     new e69f147  CAMEL-15561 - Camel-AWS2-Eventbridge: More producer operations - listRuleNamesByTarget
     new 87c5a0a  Camel-AWS2-Eventbridge: Regen
     new b8b5339  Camel-AWS2-Eventbridge: Regen
     new bc4a920  Camel-AWS2-Eventbridge: Added docs for listRuleNamesByTarget
     new 486f306  Camel-AWS2-Eventbridge: Regen docs
     new 245ec3e  Camel-AWS2-Eventbridge: Added test for listRuleNamesByTarget Localstack

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


Summary of changes:
 .../camel/catalog/components/aws2-eventbridge.json |  4 +--
 .../catalog/docs/aws2-eventbridge-component.adoc   | 22 ++++++++++--
 .../EventbridgeComponentConfigurer.java            | 39 +++++++++------------
 .../eventbridge/EventbridgeEndpointConfigurer.java | 40 +++++++++-------------
 .../eventbridge/EventbridgeEndpointUriFactory.java |  1 +
 .../aws2/eventbridge/aws2-eventbridge.json         |  4 +--
 .../src/main/docs/aws2-eventbridge-component.adoc  | 22 ++++++++++--
 .../aws2/eventbridge/EventbridgeConstants.java     |  1 +
 .../aws2/eventbridge/EventbridgeOperations.java    |  3 +-
 .../aws2/eventbridge/EventbridgeProducer.java      | 39 +++++++++++++++++++++
 ...bridgeListRuleNamesByTargetLocalstackTest.java} | 20 ++++++-----
 .../dsl/EventbridgeEndpointBuilderFactory.java     |  3 +-
 .../ROOT/pages/aws2-eventbridge-component.adoc     | 22 ++++++++++--
 13 files changed, 154 insertions(+), 66 deletions(-)
 copy components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/localstack/{EventbridgeListTargetsByRuleLocalstackTest.java => EventbridgeListRuleNamesByTargetLocalstackTest.java} (83%)


[camel] 05/06: Camel-AWS2-Eventbridge: Regen docs

Posted by ac...@apache.org.
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 486f306d7b08ea69b9acb53b869c7f9cf80d039e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 28 09:24:26 2020 +0200

    Camel-AWS2-Eventbridge: Regen docs
---
 .../camel/catalog/docs/aws2-eventbridge-component.adoc | 18 ++++++++++++++++++
 .../modules/ROOT/pages/aws2-eventbridge-component.adoc | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
index d007b72..11995b2 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
@@ -131,6 +131,7 @@ Camel-AWS2-Eventbridge component provides the following operation on the produce
 - listRules
 - describeRule
 - listTargetsByRule
+- listRuleNamesByTarget
 
 - PutRule: this operation create a rule related to an eventbus
 
@@ -293,6 +294,23 @@ This operation will describe the firstrule rule from the test eventbus.
 
 this operation will return a list of targets associated with the firstrule rule.
 
+- ListRuleNamesByTarget: this operation will return a list of rule associated with a target
+
+[source,java]
+--------------------------------------------------------------------------------
+  from("direct:start").process(new Processor() {
+                    
+      @Override
+      public void process(Exchange exchange) throws Exception {
+          exchange.getIn().setHeader(EventbridgeConstants.TARGET_ARN, "firstrule");
+      }
+  })
+  .to("aws2-eventbridge://test?operation=listRuleNamesByTarget")
+  .to("mock:result");
+--------------------------------------------------------------------------------
+
+this operation will return a list of rule associated with a target.
+
 == Automatic detection of EventbridgeClient client in registry
 
 The component is capable of detecting the presence of an EventbridgeClient bean into the registry.
diff --git a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
index 4f30158..b0e24bd 100644
--- a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
@@ -133,6 +133,7 @@ Camel-AWS2-Eventbridge component provides the following operation on the produce
 - listRules
 - describeRule
 - listTargetsByRule
+- listRuleNamesByTarget
 
 - PutRule: this operation create a rule related to an eventbus
 
@@ -295,6 +296,23 @@ This operation will describe the firstrule rule from the test eventbus.
 
 this operation will return a list of targets associated with the firstrule rule.
 
+- ListRuleNamesByTarget: this operation will return a list of rule associated with a target
+
+[source,java]
+--------------------------------------------------------------------------------
+  from("direct:start").process(new Processor() {
+                    
+      @Override
+      public void process(Exchange exchange) throws Exception {
+          exchange.getIn().setHeader(EventbridgeConstants.TARGET_ARN, "firstrule");
+      }
+  })
+  .to("aws2-eventbridge://test?operation=listRuleNamesByTarget")
+  .to("mock:result");
+--------------------------------------------------------------------------------
+
+this operation will return a list of rule associated with a target.
+
 == Automatic detection of EventbridgeClient client in registry
 
 The component is capable of detecting the presence of an EventbridgeClient bean into the registry.


[camel] 03/06: Camel-AWS2-Eventbridge: Regen

Posted by ac...@apache.org.
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 b8b533954178536ed713c90121d49ade536d9d02
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 28 09:04:51 2020 +0200

    Camel-AWS2-Eventbridge: Regen
---
 .../org/apache/camel/catalog/components/aws2-eventbridge.json         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eventbridge.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eventbridge.json
index a165738..e4b0695 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eventbridge.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-eventbridge.json
@@ -27,7 +27,7 @@
     "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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
     "eventPatternFile": { "kind": "property", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
     "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.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel [...]
+    "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule", "listRuleNamesByTarget" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configuration [...]
     "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.eventbridge.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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Eventbridge 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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Eventbridge client" },
@@ -44,7 +44,7 @@
     "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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
     "eventPatternFile": { "kind": "parameter", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
     "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.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.came [...]
+    "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule", "listRuleNamesByTarget" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configuratio [...]
     "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.eventbridge.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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Eventbridge 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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Eventbridge client" },


[camel] 01/06: CAMEL-15561 - Camel-AWS2-Eventbridge: More producer operations - listRuleNamesByTarget

Posted by ac...@apache.org.
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 e69f14779edabd5f446dc556c086b3a8105939b1
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 28 09:03:14 2020 +0200

    CAMEL-15561 - Camel-AWS2-Eventbridge: More producer operations - listRuleNamesByTarget
---
 .../aws2/eventbridge/EventbridgeConstants.java     |  1 +
 .../aws2/eventbridge/EventbridgeOperations.java    |  3 +-
 .../aws2/eventbridge/EventbridgeProducer.java      | 38 ++++++++++++++++++++++
 3 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java
index bf7bcfd..deb3df4 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConstants.java
@@ -26,4 +26,5 @@ public interface EventbridgeConstants {
     String EVENT_PATTERN = "CamelAwsEventbridgeEventPattern";
     String TARGETS = "CamelAwsEventbridgeTargets";
     String TARGETS_IDS = "CamelAwsEventbridgeTargetsIds";
+    String TARGET_ARN = "CamelAwsEventbridgeTargetArn";
 }
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeOperations.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeOperations.java
index ae2b6da..0b42b9f 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeOperations.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeOperations.java
@@ -26,5 +26,6 @@ public enum EventbridgeOperations {
     disableRule,
     describeRule,
     listRules,
-    listTargetsByRule
+    listTargetsByRule,
+    listRuleNamesByTarget
 }
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
index 055647c..208c017 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
@@ -42,6 +42,8 @@ import software.amazon.awssdk.services.eventbridge.model.DisableRuleRequest;
 import software.amazon.awssdk.services.eventbridge.model.DisableRuleResponse;
 import software.amazon.awssdk.services.eventbridge.model.EnableRuleRequest;
 import software.amazon.awssdk.services.eventbridge.model.EnableRuleResponse;
+import software.amazon.awssdk.services.eventbridge.model.ListRuleNamesByTargetRequest;
+import software.amazon.awssdk.services.eventbridge.model.ListRuleNamesByTargetResponse;
 import software.amazon.awssdk.services.eventbridge.model.ListRulesRequest;
 import software.amazon.awssdk.services.eventbridge.model.ListRulesResponse;
 import software.amazon.awssdk.services.eventbridge.model.ListTargetsByRuleRequest;
@@ -98,6 +100,9 @@ public class EventbridgeProducer extends DefaultProducer {
             case listTargetsByRule:
                 listTargetsByRule(getEndpoint().getEventbridgeClient(), exchange);
                 break;
+            case listRuleNamesByTarget:
+                listRuleNamesByTarget(getEndpoint().getEventbridgeClient(), exchange);
+                break;
             default:
                 throw new IllegalArgumentException("Unsupported operation");
         }
@@ -441,6 +446,39 @@ public class EventbridgeProducer extends DefaultProducer {
             message.setBody(result);
         }
     }
+    
+    private void listRuleNamesByTarget(EventBridgeClient eventbridgeClient, Exchange exchange) throws InvalidPayloadException {
+        if (getConfiguration().isPojoRequest()) {
+            Object payload = exchange.getIn().getMandatoryBody();
+            if (payload instanceof ListRuleNamesByTargetRequest) {
+                ListRuleNamesByTargetResponse result;
+                try {
+                    result = eventbridgeClient.listRuleNamesByTarget((ListRuleNamesByTargetRequest) payload);
+                } catch (AwsServiceException ase) {
+                    LOG.trace("List Rule Name by Targets command returned the error code {}", ase.awsErrorDetails().errorCode());
+                    throw ase;
+                }
+                Message message = getMessageForResponse(exchange);
+                message.setBody(result);
+            }
+        } else {
+        	ListRuleNamesByTargetRequest.Builder builder = ListRuleNamesByTargetRequest.builder();
+            if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(EventbridgeConstants.TARGET_ARN))) {
+                String targetArn = exchange.getIn().getHeader(EventbridgeConstants.TARGET_ARN, String.class);
+                builder.targetArn(targetArn);
+            }
+            builder.eventBusName(getConfiguration().getEventbusName());
+            ListRuleNamesByTargetResponse result;
+            try {
+                result = eventbridgeClient.listRuleNamesByTarget(builder.build());
+            } catch (AwsServiceException ase) {
+                LOG.trace("List Rule by Target command returned the error code {}", ase.awsErrorDetails().errorCode());
+                throw ase;
+            }
+            Message message = getMessageForResponse(exchange);
+            message.setBody(result);
+        }
+    }
 
     @Override
     public EventbridgeEndpoint getEndpoint() {


[camel] 02/06: Camel-AWS2-Eventbridge: Regen

Posted by ac...@apache.org.
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 87c5a0af8a45991af8a479573d91e700755ba4cd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 28 09:03:50 2020 +0200

    Camel-AWS2-Eventbridge: Regen
---
 .../catalog/docs/aws2-eventbridge-component.adoc   |  4 +--
 .../EventbridgeComponentConfigurer.java            | 39 +++++++++------------
 .../eventbridge/EventbridgeEndpointConfigurer.java | 40 +++++++++-------------
 .../eventbridge/EventbridgeEndpointUriFactory.java |  1 +
 .../aws2/eventbridge/aws2-eventbridge.json         |  4 +--
 .../src/main/docs/aws2-eventbridge-component.adoc  |  4 +--
 .../aws2/eventbridge/EventbridgeProducer.java      |  7 ++--
 .../dsl/EventbridgeEndpointBuilderFactory.java     |  3 +-
 .../ROOT/pages/aws2-eventbridge-component.adoc     |  4 +--
 9 files changed, 49 insertions(+), 57 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
index a2d6dbc..d007b72 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-eventbridge-component.adoc
@@ -59,7 +59,7 @@ The AWS 2 Eventbridge component supports 15 options, which are listed below.
 | *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
-| *operation* (producer) | *Required* The operation to perform. There are 9 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
@@ -104,7 +104,7 @@ with the following path and query parameters:
 | *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
-| *operation* (producer) | *Required* The operation to perform. There are 9 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java
index 67fa7dd..b9c00a1 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java
@@ -15,27 +15,6 @@ import org.apache.camel.support.component.PropertyConfigurerSupport;
 @SuppressWarnings("unchecked")
 public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
 
-    private static final Map<String, Object> ALL_OPTIONS;
-    static {
-        Map<String, Object> map = new CaseInsensitiveMap();
-        map.put("autoDiscoverClient", boolean.class);
-        map.put("configuration", org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration.class);
-        map.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
-        map.put("eventPatternFile", java.lang.String.class);
-        map.put("lazyStartProducer", boolean.class);
-        map.put("operation", org.apache.camel.component.aws2.eventbridge.EventbridgeOperations.class);
-        map.put("pojoRequest", boolean.class);
-        map.put("proxyHost", java.lang.String.class);
-        map.put("proxyPort", java.lang.Integer.class);
-        map.put("proxyProtocol", software.amazon.awssdk.core.Protocol.class);
-        map.put("region", java.lang.String.class);
-        map.put("trustAllCertificates", boolean.class);
-        map.put("basicPropertyBinding", boolean.class);
-        map.put("accessKey", java.lang.String.class);
-        map.put("secretKey", java.lang.String.class);
-        ALL_OPTIONS = map;
-    }
-
     private org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration getOrCreateConfiguration(EventbridgeComponent target) {
         if (target.getConfiguration() == null) {
             target.setConfiguration(new org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration());
@@ -80,7 +59,23 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
 
     @Override
     public Map<String, Object> getAllOptions(Object target) {
-        return ALL_OPTIONS;
+        Map<String, Object> answer = new CaseInsensitiveMap();
+        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.eventbridge.EventbridgeConfiguration.class);
+        answer.put("eventPatternFile", java.lang.String.class);
+        answer.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
+        answer.put("lazyStartProducer", boolean.class);
+        answer.put("operation", org.apache.camel.component.aws2.eventbridge.EventbridgeOperations.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("trustAllCertificates", boolean.class);
+        return answer;
     }
 
     @Override
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java
index 1537c1d..8f26101 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java
@@ -15,28 +15,6 @@ import org.apache.camel.support.component.PropertyConfigurerSupport;
 @SuppressWarnings("unchecked")
 public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
 
-    private static final Map<String, Object> ALL_OPTIONS;
-    static {
-        Map<String, Object> map = new CaseInsensitiveMap();
-        map.put("eventbusNameOrArn", java.lang.String.class);
-        map.put("autoDiscoverClient", boolean.class);
-        map.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
-        map.put("eventPatternFile", java.lang.String.class);
-        map.put("lazyStartProducer", boolean.class);
-        map.put("operation", org.apache.camel.component.aws2.eventbridge.EventbridgeOperations.class);
-        map.put("pojoRequest", boolean.class);
-        map.put("proxyHost", java.lang.String.class);
-        map.put("proxyPort", java.lang.Integer.class);
-        map.put("proxyProtocol", software.amazon.awssdk.core.Protocol.class);
-        map.put("region", java.lang.String.class);
-        map.put("trustAllCertificates", boolean.class);
-        map.put("basicPropertyBinding", boolean.class);
-        map.put("synchronous", boolean.class);
-        map.put("accessKey", java.lang.String.class);
-        map.put("secretKey", java.lang.String.class);
-        ALL_OPTIONS = map;
-    }
-
     @Override
     public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
         EventbridgeEndpoint target = (EventbridgeEndpoint) obj;
@@ -74,7 +52,23 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
 
     @Override
     public Map<String, Object> getAllOptions(Object target) {
-        return ALL_OPTIONS;
+        Map<String, Object> answer = new CaseInsensitiveMap();
+        answer.put("accessKey", java.lang.String.class);
+        answer.put("autoDiscoverClient", boolean.class);
+        answer.put("basicPropertyBinding", boolean.class);
+        answer.put("eventPatternFile", java.lang.String.class);
+        answer.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
+        answer.put("lazyStartProducer", boolean.class);
+        answer.put("operation", org.apache.camel.component.aws2.eventbridge.EventbridgeOperations.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("synchronous", boolean.class);
+        answer.put("trustAllCertificates", boolean.class);
+        return answer;
     }
 
     @Override
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java
index 0c370cb..87ac2b9 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointUriFactory.java
@@ -38,6 +38,7 @@ public class EventbridgeEndpointUriFactory extends org.apache.camel.support.comp
         PROPERTY_NAMES = set;
     }
 
+
     @Override
     public boolean isEnabled(String scheme) {
         return "aws2-eventbridge".equals(scheme);
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
index a165738..e4b0695 100644
--- a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
+++ b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
@@ -27,7 +27,7 @@
     "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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
     "eventPatternFile": { "kind": "property", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
     "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.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.camel [...]
+    "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule", "listRuleNamesByTarget" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configuration [...]
     "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.eventbridge.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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Eventbridge 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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Eventbridge client" },
@@ -44,7 +44,7 @@
     "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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
     "eventPatternFile": { "kind": "parameter", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
     "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.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configurationClass": "org.apache.came [...]
+    "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeOperations", "enum": [ "putRule", "putTargets", "removeTargets", "deleteRule", "enableRule", "disableRule", "describeRule", "listRules", "listTargetsByRule", "listRuleNamesByTarget" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "putRule", "configuratio [...]
     "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.eventbridge.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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Eventbridge 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.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Eventbridge client" },
diff --git a/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc b/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
index a2d6dbc..d007b72 100644
--- a/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
+++ b/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
@@ -59,7 +59,7 @@ The AWS 2 Eventbridge component supports 15 options, which are listed below.
 | *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
-| *operation* (producer) | *Required* The operation to perform. There are 9 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
@@ -104,7 +104,7 @@ with the following path and query parameters:
 | *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
-| *operation* (producer) | *Required* The operation to perform. There are 9 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
index 208c017..f88184a 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
@@ -446,7 +446,7 @@ public class EventbridgeProducer extends DefaultProducer {
             message.setBody(result);
         }
     }
-    
+
     private void listRuleNamesByTarget(EventBridgeClient eventbridgeClient, Exchange exchange) throws InvalidPayloadException {
         if (getConfiguration().isPojoRequest()) {
             Object payload = exchange.getIn().getMandatoryBody();
@@ -455,14 +455,15 @@ public class EventbridgeProducer extends DefaultProducer {
                 try {
                     result = eventbridgeClient.listRuleNamesByTarget((ListRuleNamesByTargetRequest) payload);
                 } catch (AwsServiceException ase) {
-                    LOG.trace("List Rule Name by Targets command returned the error code {}", ase.awsErrorDetails().errorCode());
+                    LOG.trace("List Rule Name by Targets command returned the error code {}",
+                            ase.awsErrorDetails().errorCode());
                     throw ase;
                 }
                 Message message = getMessageForResponse(exchange);
                 message.setBody(result);
             }
         } else {
-        	ListRuleNamesByTargetRequest.Builder builder = ListRuleNamesByTargetRequest.builder();
+            ListRuleNamesByTargetRequest.Builder builder = ListRuleNamesByTargetRequest.builder();
             if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(EventbridgeConstants.TARGET_ARN))) {
                 String targetArn = exchange.getIn().getHeader(EventbridgeConstants.TARGET_ARN, String.class);
                 builder.targetArn(targetArn);
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
index ed033b8..373b53e 100644
--- 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
@@ -408,7 +408,8 @@ public interface EventbridgeEndpointBuilderFactory {
         disableRule,
         describeRule,
         listRules,
-        listTargetsByRule;
+        listTargetsByRule,
+        listRuleNamesByTarget;
     }
 
     /**
diff --git a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
index e8c8723..4f30158 100644
--- a/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-eventbridge-component.adoc
@@ -61,7 +61,7 @@ The AWS 2 Eventbridge component supports 15 options, which are listed below.
 | *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
-| *operation* (producer) | *Required* The operation to perform. There are 9 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer
@@ -106,7 +106,7 @@ with the following path and query parameters:
 | *eventbridgeClient* (producer) | To use a existing configured AWS Eventbridge as client |  | EventBridgeClient
 | *eventPatternFile* (producer) | EventPattern File |  | String
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
-| *operation* (producer) | *Required* The operation to perform. There are 9 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule | putRule | EventbridgeOperations
+| *operation* (producer) | *Required* The operation to perform. There are 10 enums and the value can be one of: putRule, putTargets, removeTargets, deleteRule, enableRule, disableRule, describeRule, listRules, listTargetsByRule, listRuleNamesByTarget | putRule | EventbridgeOperations
 | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean
 | *proxyHost* (producer) | To define a proxy host when instantiating the Eventbridge client |  | String
 | *proxyPort* (producer) | To define a proxy port when instantiating the Eventbridge client |  | Integer


[camel] 06/06: Camel-AWS2-Eventbridge: Added test for listRuleNamesByTarget Localstack

Posted by ac...@apache.org.
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 245ec3e5bc6826daadaed2afd189ecd0624048f7
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 28 09:24:45 2020 +0200

    Camel-AWS2-Eventbridge: Added test for listRuleNamesByTarget Localstack
---
 ...tbridgeListRuleNamesByTargetLocalstackTest.java | 99 ++++++++++++++++++++++
 1 file changed, 99 insertions(+)

diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/localstack/EventbridgeListRuleNamesByTargetLocalstackTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/localstack/EventbridgeListRuleNamesByTargetLocalstackTest.java
new file mode 100644
index 0000000..8d1e40a
--- /dev/null
+++ b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/localstack/EventbridgeListRuleNamesByTargetLocalstackTest.java
@@ -0,0 +1,99 @@
+/*
+ * 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.eventbridge.localstack;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.aws2.eventbridge.EventbridgeConstants;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.eventbridge.model.ListRuleNamesByTargetResponse;
+import software.amazon.awssdk.services.eventbridge.model.Target;
+
+import static org.junit.Assert.assertEquals;
+
+public class EventbridgeListRuleNamesByTargetLocalstackTest extends Aws2EventbridgeBaseTest {
+
+    @EndpointInject
+    private ProducerTemplate template;
+
+    @EndpointInject("mock:result")
+    private MockEndpoint result;
+
+    @Test
+    public void sendIn() throws Exception {
+        result.expectedMessageCount(1);
+
+        template.send("direct:evs", new Processor() {
+
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(EventbridgeConstants.RULE_NAME, "firstrule");
+            }
+        });
+
+        template.send("direct:evs-targets", new Processor() {
+
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(EventbridgeConstants.RULE_NAME, "firstrule");
+                Target target = Target.builder().id("sqs-queue").arn("arn:aws:sqs:eu-west-1:780410022472:camel-connector-test")
+                        .build();
+                List<Target> targets = new ArrayList<Target>();
+                targets.add(target);
+                exchange.getIn().setHeader(EventbridgeConstants.TARGETS, targets);
+            }
+        });
+
+        template.send("direct:list-rule-name", new Processor() {
+
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(EventbridgeConstants.TARGET_ARN,
+                        "arn:aws:sqs:eu-west-1:780410022472:camel-connector-test");
+            }
+        });
+
+        assertMockEndpointsSatisfied();
+        assertEquals(1, result.getExchanges().size());
+        assertEquals(1, result.getExchanges().get(0).getIn().getBody(ListRuleNamesByTargetResponse.class).ruleNames().size());
+        assertEquals("firstrule",
+                result.getExchanges().get(0).getIn().getBody(ListRuleNamesByTargetResponse.class).ruleNames().get(0));
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                String awsEndpoint
+                        = "aws2-eventbridge://default?operation=putRule&eventPatternFile=file:src/test/resources/eventpattern.json";
+                String target = "aws2-eventbridge://default?operation=putTargets";
+                String listRule = "aws2-eventbridge://default?operation=listRuleNamesByTarget";
+                from("direct:evs").to(awsEndpoint);
+                from("direct:evs-targets").to(target);
+                from("direct:list-rule-name").to(listRule).to("mock:result");
+            }
+        };
+    }
+}


[camel] 04/06: Camel-AWS2-Eventbridge: Added docs for listRuleNamesByTarget

Posted by ac...@apache.org.
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 bc4a920b8b6d759281e46d958ea30c8c23ed6d65
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 28 09:14:24 2020 +0200

    Camel-AWS2-Eventbridge: Added docs for listRuleNamesByTarget
---
 .../src/main/docs/aws2-eventbridge-component.adoc      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc b/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
index d007b72..11995b2 100644
--- a/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
+++ b/components/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
@@ -131,6 +131,7 @@ Camel-AWS2-Eventbridge component provides the following operation on the produce
 - listRules
 - describeRule
 - listTargetsByRule
+- listRuleNamesByTarget
 
 - PutRule: this operation create a rule related to an eventbus
 
@@ -293,6 +294,23 @@ This operation will describe the firstrule rule from the test eventbus.
 
 this operation will return a list of targets associated with the firstrule rule.
 
+- ListRuleNamesByTarget: this operation will return a list of rule associated with a target
+
+[source,java]
+--------------------------------------------------------------------------------
+  from("direct:start").process(new Processor() {
+                    
+      @Override
+      public void process(Exchange exchange) throws Exception {
+          exchange.getIn().setHeader(EventbridgeConstants.TARGET_ARN, "firstrule");
+      }
+  })
+  .to("aws2-eventbridge://test?operation=listRuleNamesByTarget")
+  .to("mock:result");
+--------------------------------------------------------------------------------
+
+this operation will return a list of rule associated with a target.
+
 == Automatic detection of EventbridgeClient client in registry
 
 The component is capable of detecting the presence of an EventbridgeClient bean into the registry.