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/22 15:45:26 UTC
[camel] 01/03: Camel-AWS2-Eventbridge: Added docs for removeTargets
operation
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 74ad2ee609ed8a37e2e11145682bc030eab3922b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Sep 22 17:42:37 2020 +0200
Camel-AWS2-Eventbridge: Added docs for removeTargets operation
---
.../src/main/docs/aws2-eventbridge-component.adoc | 21 +++++++++++++++++++++
1 file changed, 21 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 a681327..a149f5c 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
@@ -125,6 +125,7 @@ Camel-AWS2-Eventbridge component provides the following operation on the produce
- putRule
- putTargets
+- removeTargets
- PutRule: this operation create a rule related to an eventbus
@@ -165,6 +166,26 @@ This operation will create a rule named firstrule and it will use a json file fo
This operation will add the target sqs-queue with the arn reported to the targets of the firstrule rule.
+- RemoveTargets: this operation will remove a collection of target from the rule
+
+[source,java]
+--------------------------------------------------------------------------------
+ from("direct:start").process(new Processor() {
+
+ @Override
+ public void process(Exchange exchange) throws Exception {
+ exchange.getIn().setHeader(EventbridgeConstants.RULE_NAME, "firstrule");
+ List<String> ids = new ArrayList<String>();
+ targets.add("sqs-queue");
+ exchange.getIn().setHeader(EventbridgeConstants.TARGETS_IDS, targets);
+ }
+ })
+ .to("aws2-eventbridge://test?operation=removeTargets")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will remove the target sqs-queue from the firstrule rule.
+
== Automatic detection of EventbridgeClient client in registry
The component is capable of detecting the presence of an EventbridgeClient bean into the registry.