You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/06/17 13:52:11 UTC
(camel) branch main updated: chore(docs): add missing XML and YAML DSL tabs to component docs (#24081)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 0299c57e6694 chore(docs): add missing XML and YAML DSL tabs to component docs (#24081)
0299c57e6694 is described below
commit 0299c57e6694d37f00d8c6853eb96a2278219dc1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jun 17 15:52:04 2026 +0200
chore(docs): add missing XML and YAML DSL tabs to component docs (#24081)
Add XML and YAML DSL examples alongside existing Java DSL code snippets
in component documentation using AsciiDoc [tabs] markup. This covers
~190 documentation files and ~480 route examples across components,
data formats, and languages.
For YAML, uses the canonical format with parameters: blocks extracted
from URIs. For XML, properly escapes & as & and < as < in URIs
and expressions.
Signed-off-by: Claus Ibsen <cl...@gmail.com>
Co-authored-by: Claude <no...@anthropic.com>
---
.../src/main/docs/activemq-component.adoc | 75 +-
.../src/main/docs/activemq6-component.adoc | 77 +-
.../camel-djl/src/main/docs/djl-component.adoc | 58 +
.../src/main/docs/huggingface-component.adoc | 160 +++
.../docs/langchain4j-web-search-component.adoc | 33 +-
.../src/main/docs/openai-component.adoc | 44 +
.../src/main/docs/arangodb-component.adoc | 36 +-
.../src/main/docs/asterisk-component.adoc | 73 +-
.../camel-atom/src/main/docs/atom-component.adoc | 31 +-
.../main/docs/aws-parameter-store-component.adoc | 343 ++++++
.../src/main/docs/aws-security-hub-component.adoc | 36 +-
.../src/main/docs/aws2-athena-component.adoc | 163 ++-
.../src/main/docs/aws2-comprehend-component.adoc | 381 ++++++-
.../src/main/docs/aws2-cw-component.adoc | 66 +-
.../src/main/docs/aws2-ecs-component.adoc | 36 +-
.../src/main/docs/aws2-eks-component.adoc | 36 +-
.../src/main/docs/aws2-eventbridge-component.adoc | 37 +-
.../src/main/docs/aws2-iam-component.adoc | 1132 ++++++++++++++++++--
.../src/main/docs/aws2-kinesis-component.adoc | 77 +-
.../main/docs/aws2-kinesis-firehose-component.adoc | 37 +-
.../src/main/docs/aws2-kms-component.adoc | 160 ++-
.../src/main/docs/aws2-lambda-component.adoc | 480 ++++++++-
.../src/main/docs/aws2-mq-component.adoc | 134 ++-
.../src/main/docs/aws2-msk-component.adoc | 80 +-
.../src/main/docs/aws2-polly-component.adoc | 36 +-
.../main/docs/aws2-redshift-data-component.adoc | 36 +-
.../src/main/docs/aws2-rekognition-component.adoc | 36 +-
.../src/main/docs/aws2-s3-component.adoc | 779 +++++++++++---
.../src/main/docs/aws2-ses-component.adoc | 35 +-
.../src/main/docs/aws2-sns-component.adoc | 108 +-
.../src/main/docs/aws2-sqs-component.adoc | 187 +++-
.../main/docs/aws2-step-functions-component.adoc | 36 +-
.../src/main/docs/aws2-sts-component.adoc | 126 ++-
.../src/main/docs/aws2-timestream-component.adoc | 90 +-
.../src/main/docs/azure-cosmosdb-component.adoc | 118 +-
.../src/main/docs/azure-eventhubs-component.adoc | 37 +-
.../src/main/docs/azure-servicebus-component.adoc | 73 +-
.../main/docs/azure-storage-blob-component.adoc | 329 ++++--
.../docs/azure-storage-datalake-component.adoc | 103 +-
.../main/docs/azure-storage-queue-component.adoc | 114 +-
.../src/main/docs/bean-validator-component.adoc | 118 +-
.../camel-bean/src/main/docs/class-component.adoc | 142 ++-
.../src/main/docs/bonita-component.adoc | 39 +-
.../src/main/docs/braintree-component.adoc | 29 +-
.../src/main/docs/browse-component.adoc | 30 +
.../src/main/docs/caffeine-cache-component.adoc | 67 +-
.../camel-cbor/src/main/docs/cbor-dataformat.adoc | 34 +-
.../camel-chunk/src/main/docs/chunk-component.adoc | 161 ++-
.../src/main/docs/couchbase-component.adoc | 34 +-
.../camel-csv/src/main/docs/csv-dataformat.adoc | 39 +-
.../camel-dapr/src/main/docs/dapr-component.adoc | 149 ++-
.../src/main/docs/dataset-component.adoc | 41 +
.../src/main/docs/dataset-test-component.adoc | 33 +-
.../src/main/docs/debezium-db2-component.adoc | 54 +-
.../src/main/docs/debezium-mysql-component.adoc | 57 +-
.../src/main/docs/debezium-oracle-component.adoc | 54 +-
.../src/main/docs/debezium-postgres-component.adoc | 54 +-
.../main/docs/debezium-sqlserver-component.adoc | 54 +-
.../camel-dfdl/src/main/docs/dfdl-component.adoc | 64 +-
.../src/main/docs/disruptor-component.adoc | 48 +-
.../src/main/docs/docker-component.adoc | 68 +-
.../docs/elasticsearch-rest-client-component.adoc | 244 +++++
.../src/main/docs/elasticsearch-component.adoc | 97 +-
.../camel-event/src/main/docs/event-component.adoc | 195 ++++
.../camel-exec/src/main/docs/exec-component.adoc | 142 ++-
.../src/main/docs/fastjson-dataformat.adoc | 41 +-
.../src/main/docs/file-watch-component.adoc | 95 ++
.../camel-file/src/main/docs/file-component.adoc | 401 ++++++-
.../src/main/docs/flowable-component.adoc | 31 +-
.../camel-fop/src/main/docs/fop-component.adoc | 37 +-
.../src/main/docs/freemarker-component.adoc | 206 +++-
.../camel-ftp/src/main/docs/ftp-component.adoc | 192 +++-
.../src/main/docs/geocoder-component.adoc | 105 +-
.../camel-git/src/main/docs/git-component.adoc | 35 +-
.../src/main/docs/github2-component.adoc | 76 ++
.../src/main/docs/google-firestore-component.adoc | 362 ++++++-
.../src/main/docs/google-pubsub-component.adoc | 32 +-
.../main/docs/google-secret-manager-component.adoc | 36 +-
.../src/main/docs/google-storage-component.adoc | 194 +++-
.../src/main/docs/graphql-component.adoc | 165 ++-
.../camel-grok/src/main/docs/grok-dataformat.adoc | 84 +-
.../camel-gson/src/main/docs/gson-dataformat.adoc | 41 +-
.../camel-http/src/main/docs/http-component.adoc | 97 +-
.../src/main/docs/ibm-cos-component.adoc | 335 +++++-
.../camel-ical/src/main/docs/ical-dataformat.adoc | 48 +-
.../camel-iggy/src/main/docs/iggy-component.adoc | 74 ++
.../src/main/docs/influxdb-component.adoc | 32 +-
.../src/main/docs/influxdb2-component.adoc | 34 +-
.../src/main/docs/ironmq-component.adoc | 70 +-
.../src/main/docs/iso8583-dataformat.adoc | 91 +-
.../src/main/docs/jackson2-dataformat.adoc | 41 +-
.../src/main/docs/jackson3-dataformat.adoc | 40 +-
.../camel-jdbc/src/main/docs/jdbc-component.adoc | 126 ++-
.../camel-jetty/src/main/docs/jetty-component.adoc | 114 ++
.../src/main/docs/jgroups-raft-component.adoc | 67 +-
.../src/main/docs/jgroups-component.adoc | 65 +-
.../camel-jms/src/main/docs/jms-component.adoc | 279 ++++-
.../camel-jolt/src/main/docs/jolt-component.adoc | 124 ++-
.../camel-jpa/src/main/docs/jpa-component.adoc | 211 +++-
components/camel-jq/src/main/docs/jq-language.adoc | 55 +
.../camel-jslt/src/main/docs/jslt-component.adoc | 210 +++-
.../src/main/docs/json-validator-component.adoc | 34 +-
.../src/main/docs/jsonata-component.adoc | 120 ++-
.../src/main/docs/jsonb-dataformat.adoc | 41 +-
.../camel-jt400/src/main/docs/jt400-component.adoc | 138 ++-
.../camel-jte/src/main/docs/jte-component.adoc | 35 +-
.../camel-kafka/src/main/docs/kafka-component.adoc | 202 ++++
.../src/main/docs/kamelet-component.adoc | 29 +
.../src/main/docs/kubernetes-events-component.adoc | 43 +-
.../src/main/docs/language-component.adoc | 191 +++-
.../camel-log/src/main/docs/log-component.adoc | 126 ++-
.../src/main/docs/lumberjack-component.adoc | 48 +-
.../camel-lzf/src/main/docs/lzf-dataformat.adoc | 34 +-
.../camel-mail/src/main/docs/mail-component.adoc | 105 +-
.../src/main/docs/mapstruct-component.adoc | 29 +-
.../src/main/docs/master-component.adoc | 29 +-
.../src/main/docs/metrics-component.adoc | 286 +++++
.../src/main/docs/micrometer-component.adoc | 223 ++++
.../camel-minio/src/main/docs/minio-component.adoc | 238 +++-
.../src/main/docs/mongodb-component.adoc | 184 +++-
.../src/main/docs/mustache-component.adoc | 122 ++-
.../camel-mvel/src/main/docs/mvel-component.adoc | 129 ++-
.../src/main/docs/mybatis-bean-component.adoc | 29 +-
.../src/main/docs/mybatis-component.adoc | 335 +++++-
.../camel-nats/src/main/docs/nats-component.adoc | 146 ++-
.../src/main/docs/netty-http-component.adoc | 163 ++-
.../src/main/docs/oaipmh-component.adoc | 67 +-
.../camel-ocsf/src/main/docs/ocsf-dataformat.adoc | 64 ++
.../camel-once/src/main/docs/once-component.adoc | 63 +-
.../src/main/docs/opensearch-component.adoc | 97 +-
.../main/docs/opentelemetry-metrics-component.adoc | 223 ++++
.../src/main/docs/optaplanner-component.adoc | 74 +-
.../src/main/docs/paho-mqtt5-component.adoc | 118 +-
.../camel-paho/src/main/docs/paho-component.adoc | 116 ++
.../camel-pdf/src/main/docs/pdf-component.adoc | 30 +
.../main/docs/pg-replication-slot-component.adoc | 33 +
.../src/main/docs/platform-http-component.adoc | 29 +-
.../src/main/docs/pubnub-component.adoc | 132 +++
.../src/main/docs/quartz-component.adoc | 94 +-
.../src/main/docs/reactive-streams-component.adoc | 33 +-
.../src/main/docs/rest-openapi-component.adoc | 30 +
.../camel-rest/src/main/docs/rest-component.adoc | 155 +++
.../src/main/docs/robotframework-component.adoc | 29 +-
.../src/main/docs/rocketmq-component.adoc | 33 +
.../camel-rss/src/main/docs/rss-component.adoc | 68 ++
.../camel-rss/src/main/docs/rss-dataformat.adoc | 84 +-
.../camel-saxon/src/main/docs/xquery-language.adoc | 41 +-
.../src/main/docs/schematron-component.adoc | 131 ++-
.../camel-seda/src/main/docs/seda-component.adoc | 43 +
.../src/main/docs/servlet-component.adoc | 29 +
.../camel-shell/src/main/docs/shell-component.adoc | 58 +
.../camel-sjms/src/main/docs/sjms-component.adoc | 102 +-
.../camel-sjms2/src/main/docs/sjms2-component.adoc | 71 +-
.../camel-slack/src/main/docs/slack-component.adoc | 67 +-
.../camel-smpp/src/main/docs/smpp-component.adoc | 89 +-
.../src/main/docs/snakeYaml-dataformat.adoc | 38 +-
.../camel-snmp/src/main/docs/snmp-component.adoc | 44 +-
.../src/main/docs/splunk-hec-component.adoc | 35 +-
.../src/main/docs/splunk-component.adoc | 179 +++-
.../main/docs/spring-ai-embeddings-component.adoc | 30 +
.../src/main/docs/spring-batch-component.adoc | 70 +-
.../src/main/docs/spring-rabbitmq-component.adoc | 34 +-
.../src/main/docs/spring-ws-component.adoc | 69 +-
.../camel-sql/src/main/docs/sql-component.adoc | 236 +++-
.../src/main/docs/stream-component.adoc | 134 ++-
.../src/main/docs/string-template-component.adoc | 35 +-
.../src/main/docs/stripe-component.adoc | 58 +
.../src/main/docs/tarFile-dataformat.adoc | 129 ++-
.../src/main/docs/telegram-component.adoc | 167 ++-
.../src/main/docs/thymeleaf-component.adoc | 243 ++++-
.../camel-tika/src/main/docs/tika-component.adoc | 54 +
.../src/main/docs/undertow-component.adoc | 115 +-
.../src/main/docs/velocity-component.adoc | 253 ++++-
.../src/main/docs/vertx-http-component.adoc | 27 +
.../src/main/docs/vertx-websocket-component.adoc | 88 ++
.../camel-wasm/src/main/docs/wasm-component.adoc | 58 +-
.../src/main/docs/weather-component.adoc | 114 +-
.../camel-web3j/src/main/docs/web3j-component.adoc | 68 +-
.../src/main/docs/xchange-component.adoc | 37 +-
.../camel-xj/src/main/docs/xj-component.adoc | 132 ++-
.../camel-xmpp/src/main/docs/xmpp-component.adoc | 205 +++-
.../camel-xpath/src/main/docs/xpath-language.adoc | 118 +-
.../src/main/docs/xslt-saxon-component.adoc | 131 ++-
.../camel-xslt/src/main/docs/xslt-component.adoc | 101 +-
.../src/main/docs/gzipDeflater-dataformat.adoc | 30 +
.../src/main/docs/zipDeflater-dataformat.adoc | 30 +
.../src/main/docs/zipFile-dataformat.adoc | 104 ++
.../src/main/docs/zookeeper-master-component.adoc | 30 +-
.../src/main/docs/zookeeper-component.adoc | 172 ++-
189 files changed, 19496 insertions(+), 1455 deletions(-)
diff --git a/components/camel-activemq/src/main/docs/activemq-component.adoc b/components/camel-activemq/src/main/docs/activemq-component.adoc
index 1fd3d25dd779..e01db8162243 100644
--- a/components/camel-activemq/src/main/docs/activemq-component.adoc
+++ b/components/camel-activemq/src/main/docs/activemq-component.adoc
@@ -69,20 +69,81 @@ You'll need to provide a connectionFactory to the ActiveMQ Component, to have th
=== Producer Example
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("timer:mytimer?period=5000")
- .setBody(constant("HELLO from Camel!"))
- .to("activemq:queue:HELLO.WORLD");
---------------------------------------------------------------------------------
+ .setBody(constant("HELLO from Camel!"))
+ .to("activemq:queue:HELLO.WORLD");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="timer:mytimer?period=5000"/>
+ <setBody>
+ <constant>HELLO from Camel!</constant>
+ </setBody>
+ <to uri="activemq:queue:HELLO.WORLD"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: timer:mytimer
+ parameters:
+ period: 5000
+ steps:
+ - setBody:
+ constant: "HELLO from Camel!"
+ - to:
+ uri: activemq:queue:HELLO.WORLD
+----
+====
=== Consumer Example
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("activemq:queue:HELLO.WORLD")
- .log("Received a message - ${body}");
---------------------------------------------------------------------------------
+ .log("Received a message - ${body}");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="activemq:queue:HELLO.WORLD"/>
+ <log message="Received a message - ${body}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: activemq:queue:HELLO.WORLD
+ steps:
+ - log:
+ message: "Received a message - ${body}"
+----
+====
diff --git a/components/camel-activemq6/src/main/docs/activemq6-component.adoc b/components/camel-activemq6/src/main/docs/activemq6-component.adoc
index 29fa60358e37..9a0533166f59 100644
--- a/components/camel-activemq6/src/main/docs/activemq6-component.adoc
+++ b/components/camel-activemq6/src/main/docs/activemq6-component.adoc
@@ -69,20 +69,81 @@ You'll need to provide a connectionFactory to the ActiveMQ Component, to have th
=== Producer Example
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("timer:mytimer?period=5000")
- .setBody(constant("HELLO from Camel!"))
- .to("activemq:queue:HELLO.WORLD");
---------------------------------------------------------------------------------
+ .setBody(constant("HELLO from Camel!"))
+ .to("activemq6:queue:HELLO.WORLD");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="timer:mytimer?period=5000"/>
+ <setBody>
+ <constant>HELLO from Camel!</constant>
+ </setBody>
+ <to uri="activemq6:queue:HELLO.WORLD"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: timer:mytimer
+ parameters:
+ period: 5000
+ steps:
+ - setBody:
+ constant: "HELLO from Camel!"
+ - to:
+ uri: activemq6:queue:HELLO.WORLD
+----
+====
=== Consumer Example
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("activemq:queue:HELLO.WORLD")
- .log("Received a message - ${body}");
---------------------------------------------------------------------------------
+----
+from("activemq6:queue:HELLO.WORLD")
+ .log("Received a message - ${body}");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="activemq6:queue:HELLO.WORLD"/>
+ <log message="Received a message - ${body}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: activemq6:queue:HELLO.WORLD
+ steps:
+ - log:
+ message: "Received a message - ${body}"
+----
+====
diff --git a/components/camel-ai/camel-djl/src/main/docs/djl-component.adoc b/components/camel-ai/camel-djl/src/main/docs/djl-component.adoc
index c4a38adbcd67..0b7cbe509650 100644
--- a/components/camel-ai/camel-djl/src/main/docs/djl-component.adoc
+++ b/components/camel-ai/camel-djl/src/main/docs/djl-component.adoc
@@ -480,19 +480,77 @@ More information about https://docs.djl.ai/engines/mxnet/index.html[MXNet engine
== Examples
.MNIST image classification from file
+[tabs]
+====
+Java::
++
[source,java]
----
from("file:/data/mnist/0/10.png")
.to("djl:cv/image_classification?artifactId=ai.djl.mxnet:mlp:0.0.1");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="file:/data/mnist/0/10.png"/>
+ <to uri="djl:cv/image_classification?artifactId=ai.djl.mxnet:mlp:0.0.1"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: "file:/data/mnist/0/10.png"
+ steps:
+ - to:
+ uri: djl:cv/image_classification
+ parameters:
+ artifactId: "ai.djl.mxnet:mlp:0.0.1"
+----
+====
+
.Object detection
+[tabs]
+====
+Java::
++
[source,java]
----
from("file:/data/mnist/0/10.png")
.to("djl:cv/image_classification?artifactId=ai.djl.mxnet:mlp:0.0.1");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="file:/data/mnist/0/10.png"/>
+ <to uri="djl:cv/image_classification?artifactId=ai.djl.mxnet:mlp:0.0.1"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: "file:/data/mnist/0/10.png"
+ steps:
+ - to:
+ uri: djl:cv/image_classification
+ parameters:
+ artifactId: "ai.djl.mxnet:mlp:0.0.1"
+----
+====
+
.Custom deep learning model
[source,java]
----
diff --git a/components/camel-ai/camel-huggingface/src/main/docs/huggingface-component.adoc b/components/camel-ai/camel-huggingface/src/main/docs/huggingface-component.adoc
index 139ad87e3f2c..b7cbe04141ad 100644
--- a/components/camel-ai/camel-huggingface/src/main/docs/huggingface-component.adoc
+++ b/components/camel-ai/camel-huggingface/src/main/docs/huggingface-component.adoc
@@ -46,12 +46,41 @@ Where _model_ is the model name hosted on Hugging Face and _task_ is one of the
For example, to use the https://huggingface.co/Qwen/Qwen2.5-3B-Instruct[Qwen2.5-3B-Instruct] model with the _chat_ task:
.Object detection
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:start-chat")
.to("huggingface:chat?modelId=Qwen/Qwen2.5-3B-Instruct");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start-chat"/>
+ <to uri="huggingface:chat?modelId=Qwen/Qwen2.5-3B-Instruct"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start-chat
+ steps:
+ - to:
+ uri: huggingface:chat
+ parameters:
+ modelId: Qwen/Qwen2.5-3B-Instruct
+----
+====
+
=== Supported Tasks
The component supports the following tasks:
@@ -106,21 +135,84 @@ camel.oauth.hf.client-secret=my-secret
camel.oauth.hf.token-endpoint=https://idp.example.com/token
----
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:chat")
.to("huggingface:chat?modelId=mistralai/Mistral-7B-Instruct-v0.2&oauthProfile=hf");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:chat"/>
+ <to uri="huggingface:chat?modelId=mistralai/Mistral-7B-Instruct-v0.2&oauthProfile=hf"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:chat
+ steps:
+ - to:
+ uri: huggingface:chat
+ parameters:
+ modelId: mistralai/Mistral-7B-Instruct-v0.2
+ oauthProfile: hf
+----
+====
+
== Examples
.Classify sentiment of text:
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:start")
.to("huggingface:text-classification?modelId=modelId=cardiffnlp/twitter-roberta-base-sentiment-latest&topK=2")
.to("log:result");
----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="huggingface:text-classification?modelId=modelId=cardiffnlp/twitter-roberta-base-sentiment-latest&topK=2"/>
+ <to uri="log:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: huggingface:text-classification
+ parameters:
+ modelId: "cardiffnlp/twitter-roberta-base-sentiment-latest"
+ topK: 2
+ - to:
+ uri: log:result
+----
+====
[source,cmd]
----
Input : "I love this movie!"
@@ -129,12 +221,47 @@ Output : DJL Classifications [{"className" : "positive","probability" : 0.9847},
.Chat Example
Simple chat route with automatic history:
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:start-chat")
.to("huggingface:chat?modelId=mistralai/Mistral-7B-Instruct-v0.2&systemPrompt=You are a helpful assistant&maxTokens=100&temperature=0.7")
.to("log:response");
----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start-chat"/>
+ <to uri="huggingface:chat?modelId=mistralai/Mistral-7B-Instruct-v0.2&systemPrompt=You are a helpful assistant&maxTokens=100&temperature=0.7"/>
+ <to uri="log:response"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start-chat
+ steps:
+ - to:
+ uri: huggingface:chat
+ parameters:
+ modelId: mistralai/Mistral-7B-Instruct-v0.2
+ systemPrompt: You are a helpful assistant
+ maxTokens: 100
+ temperature: 0.7
+ - to:
+ uri: log:response
+----
+====
Send multiple messages to "direct:start-chat" — history is maintained automatically.
.Custom Task
@@ -152,12 +279,45 @@ public TranslationPredictor myCustomPredictor() {
}
----
Route:
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:start-custom")
.to("huggingface:custom?modelId=Helsinki-NLP/opus-mt-en-fr&predictorBean=myCustomPredictor")
.to("log:translated");
----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start-custom"/>
+ <to uri="huggingface:custom?modelId=Helsinki-NLP/opus-mt-en-fr&predictorBean=myCustomPredictor"/>
+ <to uri="log:translated"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start-custom
+ steps:
+ - to:
+ uri: huggingface:custom
+ parameters:
+ modelId: Helsinki-NLP/opus-mt-en-fr
+ predictorBean: myCustomPredictor
+ - to:
+ uri: log:translated
+----
+====
This allows extending the component for most HF tasks.
When using a large model for the first time, downloading can take some time so make sure to set the
diff --git a/components/camel-ai/camel-langchain4j-web-search/src/main/docs/langchain4j-web-search-component.adoc b/components/camel-ai/camel-langchain4j-web-search/src/main/docs/langchain4j-web-search-component.adoc
index ad0530d1c4d2..4c21e0dab5e1 100644
--- a/components/camel-ai/camel-langchain4j-web-search/src/main/docs/langchain4j-web-search-component.adoc
+++ b/components/camel-ai/camel-langchain4j-web-search/src/main/docs/langchain4j-web-search-component.adoc
@@ -82,11 +82,40 @@ WebSearchEngine tavilyWebSearchEngine = TavilyWebSearchEngine.builder()
The web search engine will be autowired automatically if its bound name is `web-search-engine`. Otherwise, it should be added as a configured parameter to the Camel route.
.Example:
+[tabs]
+====
+Java::
++
[source,java]
----
- from("direct:web-search")
- .to("langchain4j-web-search:test?webSearchEngine=#web-search-engine-test")
+from("direct:web-search")
+ .to("langchain4j-web-search:test?webSearchEngine=#web-search-engine-test");
+----
+
+XML::
++
+[source,xml]
----
+<route>
+ <from uri="direct:web-search"/>
+ <to uri="langchain4j-web-search:test?webSearchEngine=#web-search-engine-test"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:web-search
+ steps:
+ - to:
+ uri: langchain4j-web-search:test
+ parameters:
+ webSearchEngine: "#web-search-engine-test"
+----
+====
[NOTE]
====
diff --git a/components/camel-ai/camel-openai/src/main/docs/openai-component.adoc b/components/camel-ai/camel-openai/src/main/docs/openai-component.adoc
index d1f4f64dec47..cdef262e4a51 100644
--- a/components/camel-ai/camel-openai/src/main/docs/openai-component.adoc
+++ b/components/camel-ai/camel-openai/src/main/docs/openai-component.adoc
@@ -79,12 +79,42 @@ camel.oauth.azure.token-endpoint=https://login.microsoftonline.com/tenant/oauth2
camel.oauth.azure.scope=https://cognitiveservices.azure.com/.default
----
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:chat")
.to("openai:chat-completion?model=gpt-4&oauthProfile=azure");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:chat"/>
+ <to uri="openai:chat-completion?model=gpt-4&oauthProfile=azure"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:chat
+ steps:
+ - to:
+ uri: openai:chat-completion
+ parameters:
+ model: gpt-4
+ oauthProfile: azure
+----
+====
+
MCP servers can also use OAuth independently via per-server `oauthProfile`:
[source,java]
@@ -111,6 +141,20 @@ from("direct:chat")
.log("Response: ${body}");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:chat"/>
+ <setBody>
+ <constant>What is Apache Camel?</constant>
+ </setBody>
+ <to uri="openai:chat-completion"/>
+ <log message="Response: ${body}"/>
+</route>
+----
+
YAML::
+
[source,yaml]
diff --git a/components/camel-arangodb/src/main/docs/arangodb-component.adoc b/components/camel-arangodb/src/main/docs/arangodb-component.adoc
index 8bd1c0ebcb50..8ef5d9f6050b 100644
--- a/components/camel-arangodb/src/main/docs/arangodb-component.adoc
+++ b/components/camel-arangodb/src/main/docs/arangodb-component.adoc
@@ -49,11 +49,41 @@ include::partial$component-endpoint-headers.adoc[]
==== Save document on a collection
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:insert")
- .to("arangodb:testDb?documentCollection=collection&operation=SAVE_DOCUMENT");
---------------------------------------------------------------------------------
+ .to("arangodb:testDb?documentCollection=collection&operation=SAVE_DOCUMENT");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:insert"/>
+ <to uri="arangodb:testDb?documentCollection=collection&operation=SAVE_DOCUMENT"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:insert
+ steps:
+ - to:
+ uri: arangodb:testDb
+ parameters:
+ documentCollection: collection
+ operation: SAVE_DOCUMENT
+----
+====
And you can set as body a BaseDocument class
diff --git a/components/camel-asterisk/src/main/docs/asterisk-component.adoc b/components/camel-asterisk/src/main/docs/asterisk-component.adoc
index c927cdef1d53..80b49af7d8af 100644
--- a/components/camel-asterisk/src/main/docs/asterisk-component.adoc
+++ b/components/camel-asterisk/src/main/docs/asterisk-component.adoc
@@ -55,19 +55,82 @@ Supported actions are:
=== Producer Example
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:in")
- .to("asterisk://myVoIP?hostname=hostname&username=username&password=password&action=EXTENSION_STATE")
---------------------------------------------------------------------------------
+ .to("asterisk://myVoIP?hostname=hostname&username=username&password=password&action=EXTENSION_STATE");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:in"/>
+ <to uri="asterisk://myVoIP?hostname=hostname&username=username&password=password&action=EXTENSION_STATE"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:in
+ steps:
+ - to:
+ uri: asterisk://myVoIP
+ parameters:
+ hostname: hostname
+ username: username
+ password: password
+ action: EXTENSION_STATE
+----
+====
=== Consumer Example
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("asterisk:myVoIP?hostname=hostname&username=username&password=password")
.log("Received a message - ${body}");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="asterisk:myVoIP?hostname=hostname&username=username&password=password"/>
+ <log message="Received a message - ${body}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: asterisk:myVoIP
+ parameters:
+ hostname: hostname
+ username: username
+ password: password
+ steps:
+ - log:
+ message: "Received a message - ${body}"
+----
+====
include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-atom/src/main/docs/atom-component.adoc b/components/camel-atom/src/main/docs/atom-component.adoc
index 72eaba3b6309..d7964722286d 100644
--- a/components/camel-atom/src/main/docs/atom-component.adoc
+++ b/components/camel-atom/src/main/docs/atom-component.adoc
@@ -113,10 +113,37 @@ a MemoryIdempotentRepository, but the repository can be changes to any subclass
In this sample, we poll James Strachan's blog.
+[tabs]
+====
+Java::
++
[source,java]
----------------------------------------------------------------------------------
+----
from("atom://http://macstrac.blogspot.com/feeds/posts/default").to("seda:feeds");
----------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="atom://http://macstrac.blogspot.com/feeds/posts/default"/>
+ <to uri="seda:feeds"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: atom://http://macstrac.blogspot.com/feeds/posts/default
+ steps:
+ - to:
+ uri: seda:feeds
+----
+====
In this sample, we want to filter only good blogs we like to a SEDA
queue.
diff --git a/components/camel-aws/camel-aws-parameter-store/src/main/docs/aws-parameter-store-component.adoc b/components/camel-aws/camel-aws-parameter-store/src/main/docs/aws-parameter-store-component.adoc
index 6f68842bac2e..492bf176f2ca 100644
--- a/components/camel-aws/camel-aws-parameter-store/src/main/docs/aws-parameter-store-component.adoc
+++ b/components/camel-aws/camel-aws-parameter-store/src/main/docs/aws-parameter-store-component.adoc
@@ -208,6 +208,10 @@ Camel-AWS-Parameter-Store component provides the following operation on the prod
This operation retrieves a single parameter value by name.
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:getParameter")
@@ -215,10 +219,45 @@ from("direct:getParameter")
.to("aws-parameter-store://test?operation=getParameter");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getParameter"/>
+ <setHeader name="CamelAwsParameterStoreName">
+ <constant>/myapp/config/endpoint</constant>
+ </setHeader>
+ <to uri="aws-parameter-store://test?operation=getParameter"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getParameter
+ steps:
+ - setHeader:
+ name: CamelAwsParameterStoreName
+ constant: /myapp/config/endpoint
+ - to:
+ uri: aws-parameter-store://test
+ parameters:
+ operation: getParameter
+----
+====
+
==== getParameters
This operation retrieves multiple parameters by their names.
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:getParameters")
@@ -226,10 +265,45 @@ from("direct:getParameters")
.to("aws-parameter-store://test?operation=getParameters");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getParameters"/>
+ <setHeader name="CamelAwsParameterStoreNames">
+ <constant>/myapp/config/host,/myapp/config/port</constant>
+ </setHeader>
+ <to uri="aws-parameter-store://test?operation=getParameters"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getParameters
+ steps:
+ - setHeader:
+ name: CamelAwsParameterStoreNames
+ constant: "/myapp/config/host,/myapp/config/port"
+ - to:
+ uri: aws-parameter-store://test
+ parameters:
+ operation: getParameters
+----
+====
+
==== getParametersByPath
This operation retrieves all parameters within a hierarchy.
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:getParametersByPath")
@@ -238,10 +312,51 @@ from("direct:getParametersByPath")
.to("aws-parameter-store://test?operation=getParametersByPath");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getParametersByPath"/>
+ <setHeader name="CamelAwsParameterStorePath">
+ <constant>/myapp/config</constant>
+ </setHeader>
+ <setHeader name="CamelAwsParameterStoreRecursive">
+ <constant>true</constant>
+ </setHeader>
+ <to uri="aws-parameter-store://test?operation=getParametersByPath"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getParametersByPath
+ steps:
+ - setHeader:
+ name: CamelAwsParameterStorePath
+ constant: /myapp/config
+ - setHeader:
+ name: CamelAwsParameterStoreRecursive
+ constant: "true"
+ - to:
+ uri: aws-parameter-store://test
+ parameters:
+ operation: getParametersByPath
+----
+====
+
==== putParameter
This operation creates or updates a parameter.
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:putParameter")
@@ -251,8 +366,54 @@ from("direct:putParameter")
.to("aws-parameter-store://test?operation=putParameter");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:putParameter"/>
+ <setHeader name="CamelAwsParameterStoreName">
+ <constant>/myapp/config/endpoint</constant>
+ </setHeader>
+ <setHeader name="CamelAwsParameterStoreType">
+ <constant>String</constant>
+ </setHeader>
+ <setBody>
+ <constant>http://localhost:8080</constant>
+ </setBody>
+ <to uri="aws-parameter-store://test?operation=putParameter"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:putParameter
+ steps:
+ - setHeader:
+ name: CamelAwsParameterStoreName
+ constant: /myapp/config/endpoint
+ - setHeader:
+ name: CamelAwsParameterStoreType
+ constant: String
+ - setBody:
+ constant: "http://localhost:8080"
+ - to:
+ uri: aws-parameter-store://test
+ parameters:
+ operation: putParameter
+----
+====
+
For SecureString parameters:
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:putSecureParameter")
@@ -262,10 +423,56 @@ from("direct:putSecureParameter")
.to("aws-parameter-store://test?operation=putParameter");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:putSecureParameter"/>
+ <setHeader name="CamelAwsParameterStoreName">
+ <constant>/myapp/secrets/api-key</constant>
+ </setHeader>
+ <setHeader name="CamelAwsParameterStoreType">
+ <constant>SecureString</constant>
+ </setHeader>
+ <setBody>
+ <constant>my-secret-api-key</constant>
+ </setBody>
+ <to uri="aws-parameter-store://test?operation=putParameter"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:putSecureParameter
+ steps:
+ - setHeader:
+ name: CamelAwsParameterStoreName
+ constant: /myapp/secrets/api-key
+ - setHeader:
+ name: CamelAwsParameterStoreType
+ constant: SecureString
+ - setBody:
+ constant: my-secret-api-key
+ - to:
+ uri: aws-parameter-store://test
+ parameters:
+ operation: putParameter
+----
+====
+
==== deleteParameter
This operation deletes a single parameter.
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:deleteParameter")
@@ -273,10 +480,45 @@ from("direct:deleteParameter")
.to("aws-parameter-store://test?operation=deleteParameter");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteParameter"/>
+ <setHeader name="CamelAwsParameterStoreName">
+ <constant>/myapp/config/old-endpoint</constant>
+ </setHeader>
+ <to uri="aws-parameter-store://test?operation=deleteParameter"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteParameter
+ steps:
+ - setHeader:
+ name: CamelAwsParameterStoreName
+ constant: /myapp/config/old-endpoint
+ - to:
+ uri: aws-parameter-store://test
+ parameters:
+ operation: deleteParameter
+----
+====
+
==== deleteParameters
This operation deletes multiple parameters.
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:deleteParameters")
@@ -284,10 +526,45 @@ from("direct:deleteParameters")
.to("aws-parameter-store://test?operation=deleteParameters");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteParameters"/>
+ <setHeader name="CamelAwsParameterStoreNames">
+ <constant>/myapp/config/old1,/myapp/config/old2</constant>
+ </setHeader>
+ <to uri="aws-parameter-store://test?operation=deleteParameters"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteParameters
+ steps:
+ - setHeader:
+ name: CamelAwsParameterStoreNames
+ constant: "/myapp/config/old1,/myapp/config/old2"
+ - to:
+ uri: aws-parameter-store://test
+ parameters:
+ operation: deleteParameters
+----
+====
+
==== describeParameters
This operation lists parameter metadata.
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:describeParameters")
@@ -295,10 +572,45 @@ from("direct:describeParameters")
.to("aws-parameter-store://test?operation=describeParameters");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:describeParameters"/>
+ <setHeader name="CamelAwsParameterStoreMaxResults">
+ <constant>10</constant>
+ </setHeader>
+ <to uri="aws-parameter-store://test?operation=describeParameters"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:describeParameters
+ steps:
+ - setHeader:
+ name: CamelAwsParameterStoreMaxResults
+ constant: "10"
+ - to:
+ uri: aws-parameter-store://test
+ parameters:
+ operation: describeParameters
+----
+====
+
==== getParameterHistory
This operation retrieves the history of a parameter.
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:getParameterHistory")
@@ -306,6 +618,37 @@ from("direct:getParameterHistory")
.to("aws-parameter-store://test?operation=getParameterHistory");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getParameterHistory"/>
+ <setHeader name="CamelAwsParameterStoreName">
+ <constant>/myapp/config/endpoint</constant>
+ </setHeader>
+ <to uri="aws-parameter-store://test?operation=getParameterHistory"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getParameterHistory
+ steps:
+ - setHeader:
+ name: CamelAwsParameterStoreName
+ constant: /myapp/config/endpoint
+ - to:
+ uri: aws-parameter-store://test
+ parameters:
+ operation: getParameterHistory
+----
+====
+
== Dependencies
Maven users will need to add the following dependency to their pom.xml.
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/docs/aws-security-hub-component.adoc b/components/camel-aws/camel-aws-security-hub/src/main/docs/aws-security-hub-component.adoc
index dac42454ef29..bcde10dc7956 100644
--- a/components/camel-aws/camel-aws-security-hub/src/main/docs/aws-security-hub-component.adoc
+++ b/components/camel-aws/camel-aws-security-hub/src/main/docs/aws-security-hub-component.adoc
@@ -162,12 +162,44 @@ from("direct:updateFindings")
Get information about the Security Hub configuration in your account.
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:describeHub")
.to("aws-security-hub://hub?operation=describeHub")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:describeHub"/>
+ <to uri="aws-security-hub://hub?operation=describeHub"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:describeHub
+ steps:
+ - to:
+ uri: aws-security-hub://hub
+ parameters:
+ operation: describeHub
+ - to:
+ uri: mock:result
+----
+====
=== OCSF Integration
diff --git a/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc b/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
index 5d568de43e32..446c6909d522 100644
--- a/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
+++ b/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
@@ -63,14 +63,58 @@ from("direct:start")
Similarly, running the query and returning a path to the results in S3:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.setBody(constant("SELECT 1"))
.to("aws2-athena://label?waitTimeout=60000&outputLocation=s3://bucket/path/")
.to("aws2-athena://label?operation=getQueryResults&outputType=S3Pointer")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <setBody>
+ <constant>SELECT 1</constant>
+ </setBody>
+ <to uri="aws2-athena://label?waitTimeout=60000&outputLocation=s3://bucket/path/"/>
+ <to uri="aws2-athena://label?operation=getQueryResults&outputType=S3Pointer"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - setBody:
+ constant: SELECT 1
+ - to:
+ uri: aws2-athena://label
+ parameters:
+ waitTimeout: "60000"
+ outputLocation: s3://bucket/path/
+ - to:
+ uri: aws2-athena://label
+ parameters:
+ operation: getQueryResults
+ outputType: S3Pointer
+ - to:
+ uri: mock:result
+----
+====
=== Static credentials, Default Credential Provider and Profile Credentials Provider
@@ -133,12 +177,45 @@ Will cause the output location to be `s3://other/location/`.
- getQueryExecution: this operation returns information about a query given its query execution ID
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-athena://label?operation=getQueryExecution&queryExecutionId=11111111-1111-1111-1111-111111111111")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-athena://label?operation=getQueryExecution&queryExecutionId=11111111-1111-1111-1111-111111111111"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-athena://label
+ parameters:
+ operation: getQueryExecution
+ queryExecutionId: 11111111-1111-1111-1111-111111111111
+ - to:
+ uri: mock:result
+----
+====
The preceding example will yield an
https://docs.aws.amazon.com/athena/latest/APIReference/API_QueryExecution.html[Athena QueryExecution] in the body.
@@ -245,12 +322,44 @@ S3 path (e.g. `s3://bucket/path/`) in the body pointing to the results. The pat
- listQueryExecutions: this operation returns a list of query execution IDs
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-athena://label?operation=listQueryExecutions")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-athena://label?operation=listQueryExecutions"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-athena://label
+ parameters:
+ operation: listQueryExecutions
+ - to:
+ uri: mock:result
+----
+====
The preceding example will return a list of query executions in the body, plus the NextToken value as a
header (`CamelAwsAthenaNextToken`) than can be used for manual pagination of results.
@@ -258,13 +367,51 @@ header (`CamelAwsAthenaNextToken`) than can be used for manual pagination of res
- startQueryExecution: this operation starts the execution of a query. It supports waiting for the query to
complete before proceeding, and retrying the query based on a set of configurable failure conditions:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.setBody(constant("SELECT 1"))
.to("aws2-athena://label?operation=startQueryExecution&outputLocation=s3://bucket/path/")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <setBody>
+ <constant>SELECT 1</constant>
+ </setBody>
+ <to uri="aws2-athena://label?operation=startQueryExecution&outputLocation=s3://bucket/path/"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - setBody:
+ constant: SELECT 1
+ - to:
+ uri: aws2-athena://label
+ parameters:
+ operation: startQueryExecution
+ outputLocation: "s3://bucket/path/"
+ - to:
+ uri: mock:result
+----
+====
The preceding example will start the query `SELECT 1` and configure the
results to be saved to `s3://bucket/path/`, but will not wait for the query
diff --git a/components/camel-aws/camel-aws2-comprehend/src/main/docs/aws2-comprehend-component.adoc b/components/camel-aws/camel-aws2-comprehend/src/main/docs/aws2-comprehend-component.adoc
index 32887e13bb7c..3499d7528dd8 100644
--- a/components/camel-aws/camel-aws2-comprehend/src/main/docs/aws2-comprehend-component.adoc
+++ b/components/camel-aws/camel-aws2-comprehend/src/main/docs/aws2-comprehend-component.adoc
@@ -111,13 +111,52 @@ Common language codes: `en` (English), `es` (Spanish), `fr` (French), `de` (Germ
Automatically detect the language of the input text:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:detectLanguage")
.setBody(constant("This is a sample text written in English."))
.to("aws2-comprehend://test?operation=detectDominantLanguage&useDefaultCredentialsProvider=true®ion=us-east-1")
.log("Detected language: ${header.CamelAwsComprehendDetectedLanguage}");
-------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:detectLanguage"/>
+ <setBody>
+ <constant>This is a sample text written in English.</constant>
+ </setBody>
+ <to uri="aws2-comprehend://test?operation=detectDominantLanguage&useDefaultCredentialsProvider=true&region=us-east-1"/>
+ <log message="Detected language: ${header.CamelAwsComprehendDetectedLanguage}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:detectLanguage
+ steps:
+ - setBody:
+ constant: "This is a sample text written in English."
+ - to:
+ uri: aws2-comprehend://test
+ parameters:
+ operation: detectDominantLanguage
+ useDefaultCredentialsProvider: true
+ region: us-east-1
+ - log:
+ message: "Detected language: ${header.CamelAwsComprehendDetectedLanguage}"
+----
+====
The result body will contain a list of `DominantLanguage` objects with language codes and confidence scores.
The detected language code and score are also set as message headers.
@@ -126,15 +165,64 @@ The detected language code and score are also set as message headers.
Extract named entities from text:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:detectEntities")
.setBody(constant("Amazon was founded by Jeff Bezos in Seattle, Washington in 1994."))
.to("aws2-comprehend://test?operation=detectEntities&languageCode=en&useDefaultCredentialsProvider=true®ion=us-east-1")
.log("Found ${body.size()} entities")
.split(body())
.log("Entity: ${body.text} - Type: ${body.type} - Score: ${body.score}");
-------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:detectEntities"/>
+ <setBody>
+ <constant>Amazon was founded by Jeff Bezos in Seattle, Washington in 1994.</constant>
+ </setBody>
+ <to uri="aws2-comprehend://test?operation=detectEntities&languageCode=en&useDefaultCredentialsProvider=true&region=us-east-1"/>
+ <log message="Found ${body.size()} entities"/>
+ <split>
+ <simple>${body}</simple>
+ <log message="Entity: ${body.text} - Type: ${body.type} - Score: ${body.score}"/>
+ </split>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:detectEntities
+ steps:
+ - setBody:
+ constant: "Amazon was founded by Jeff Bezos in Seattle, Washington in 1994."
+ - to:
+ uri: aws2-comprehend://test
+ parameters:
+ operation: detectEntities
+ languageCode: en
+ useDefaultCredentialsProvider: true
+ region: us-east-1
+ - log:
+ message: "Found ${body.size()} entities"
+ - split:
+ simple: "${body}"
+ steps:
+ - log:
+ message: "Entity: ${body.text} - Type: ${body.type} - Score: ${body.score}"
+----
+====
This will detect entities like:
* Jeff Bezos (PERSON)
@@ -147,14 +235,57 @@ This will detect entities like:
Analyze the sentiment of text:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:analyzeSentiment")
.setBody(constant("I love this product! It works perfectly and exceeded my expectations."))
.to("aws2-comprehend://test?operation=detectSentiment&languageCode=en&useDefaultCredentialsProvider=true®ion=us-east-1")
.log("Sentiment: ${header.CamelAwsComprehendDetectedSentiment}")
.log("Sentiment scores: ${header.CamelAwsComprehendDetectedSentimentScore}");
-------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:analyzeSentiment"/>
+ <setBody>
+ <constant>I love this product! It works perfectly and exceeded my expectations.</constant>
+ </setBody>
+ <to uri="aws2-comprehend://test?operation=detectSentiment&languageCode=en&useDefaultCredentialsProvider=true&region=us-east-1"/>
+ <log message="Sentiment: ${header.CamelAwsComprehendDetectedSentiment}"/>
+ <log message="Sentiment scores: ${header.CamelAwsComprehendDetectedSentimentScore}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:analyzeSentiment
+ steps:
+ - setBody:
+ constant: "I love this product! It works perfectly and exceeded my expectations."
+ - to:
+ uri: aws2-comprehend://test
+ parameters:
+ operation: detectSentiment
+ languageCode: en
+ useDefaultCredentialsProvider: true
+ region: us-east-1
+ - log:
+ message: "Sentiment: ${header.CamelAwsComprehendDetectedSentiment}"
+ - log:
+ message: "Sentiment scores: ${header.CamelAwsComprehendDetectedSentimentScore}"
+----
+====
The sentiment will be one of: POSITIVE, NEGATIVE, NEUTRAL, or MIXED.
@@ -162,27 +293,119 @@ The sentiment will be one of: POSITIVE, NEGATIVE, NEUTRAL, or MIXED.
Extract key phrases from text:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:detectKeyPhrases")
.setBody(constant("Apache Camel is an open source integration framework that provides rule-based routing and mediation."))
.to("aws2-comprehend://test?operation=detectKeyPhrases&languageCode=en&useDefaultCredentialsProvider=true®ion=us-east-1")
.split(body())
.log("Key phrase: ${body.text} (score: ${body.score})");
-------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:detectKeyPhrases"/>
+ <setBody>
+ <constant>Apache Camel is an open source integration framework that provides rule-based routing and mediation.</constant>
+ </setBody>
+ <to uri="aws2-comprehend://test?operation=detectKeyPhrases&languageCode=en&useDefaultCredentialsProvider=true&region=us-east-1"/>
+ <split>
+ <simple>${body}</simple>
+ <log message="Key phrase: ${body.text} (score: ${body.score})"/>
+ </split>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:detectKeyPhrases
+ steps:
+ - setBody:
+ constant: "Apache Camel is an open source integration framework that provides rule-based routing and mediation."
+ - to:
+ uri: aws2-comprehend://test
+ parameters:
+ operation: detectKeyPhrases
+ languageCode: en
+ useDefaultCredentialsProvider: true
+ region: us-east-1
+ - split:
+ simple: "${body}"
+ steps:
+ - log:
+ message: "Key phrase: ${body.text} (score: ${body.score})"
+----
+====
=== Detect PII Entities
Identify personally identifiable information in text:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:detectPii")
.setBody(constant("Contact John at john.doe@example.com or call 555-123-4567. His SSN is 123-45-6789."))
.to("aws2-comprehend://test?operation=detectPiiEntities&languageCode=en&useDefaultCredentialsProvider=true®ion=us-east-1")
.split(body())
.log("PII found: ${body.type} at position ${body.beginOffset}-${body.endOffset}");
-------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:detectPii"/>
+ <setBody>
+ <constant>Contact John at john.doe@example.com or call 555-123-4567. His SSN is 123-45-6789.</constant>
+ </setBody>
+ <to uri="aws2-comprehend://test?operation=detectPiiEntities&languageCode=en&useDefaultCredentialsProvider=true&region=us-east-1"/>
+ <split>
+ <simple>${body}</simple>
+ <log message="PII found: ${body.type} at position ${body.beginOffset}-${body.endOffset}"/>
+ </split>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:detectPii
+ steps:
+ - setBody:
+ constant: "Contact John at john.doe@example.com or call 555-123-4567. His SSN is 123-45-6789."
+ - to:
+ uri: aws2-comprehend://test
+ parameters:
+ operation: detectPiiEntities
+ languageCode: en
+ useDefaultCredentialsProvider: true
+ region: us-east-1
+ - split:
+ simple: "${body}"
+ steps:
+ - log:
+ message: "PII found: ${body.type} at position ${body.beginOffset}-${body.endOffset}"
+----
+====
This detects PII types such as EMAIL, PHONE, SSN, CREDIT_DEBIT_NUMBER, etc.
@@ -190,14 +413,60 @@ This detects PII types such as EMAIL, PHONE, SSN, CREDIT_DEBIT_NUMBER, etc.
Analyze the grammatical structure of text:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:detectSyntax")
.setBody(constant("The quick brown fox jumps over the lazy dog."))
.to("aws2-comprehend://test?operation=detectSyntax&languageCode=en&useDefaultCredentialsProvider=true®ion=us-east-1")
.split(body())
.log("Token: ${body.text} - POS: ${body.partOfSpeech.tag}");
-------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:detectSyntax"/>
+ <setBody>
+ <constant>The quick brown fox jumps over the lazy dog.</constant>
+ </setBody>
+ <to uri="aws2-comprehend://test?operation=detectSyntax&languageCode=en&useDefaultCredentialsProvider=true&region=us-east-1"/>
+ <split>
+ <simple>${body}</simple>
+ <log message="Token: ${body.text} - POS: ${body.partOfSpeech.tag}"/>
+ </split>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:detectSyntax
+ steps:
+ - setBody:
+ constant: "The quick brown fox jumps over the lazy dog."
+ - to:
+ uri: aws2-comprehend://test
+ parameters:
+ operation: detectSyntax
+ languageCode: en
+ useDefaultCredentialsProvider: true
+ region: us-east-1
+ - split:
+ simple: "${body}"
+ steps:
+ - log:
+ message: "Token: ${body.text} - POS: ${body.partOfSpeech.tag}"
+----
+====
Returns part-of-speech tags like NOUN, VERB, ADJ (adjective), DET (determiner), etc.
@@ -205,13 +474,53 @@ Returns part-of-speech tags like NOUN, VERB, ADJ (adjective), DET (determiner),
Analyze text for toxic content:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:detectToxic")
.setBody(constant("This is a friendly and polite message."))
.to("aws2-comprehend://test?operation=detectToxicContent&languageCode=en&useDefaultCredentialsProvider=true®ion=us-east-1")
.log("Toxicity analysis: ${body}");
-------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:detectToxic"/>
+ <setBody>
+ <constant>This is a friendly and polite message.</constant>
+ </setBody>
+ <to uri="aws2-comprehend://test?operation=detectToxicContent&languageCode=en&useDefaultCredentialsProvider=true&region=us-east-1"/>
+ <log message="Toxicity analysis: ${body}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:detectToxic
+ steps:
+ - setBody:
+ constant: "This is a friendly and polite message."
+ - to:
+ uri: aws2-comprehend://test
+ parameters:
+ operation: detectToxicContent
+ languageCode: en
+ useDefaultCredentialsProvider: true
+ region: us-east-1
+ - log:
+ message: "Toxicity analysis: ${body}"
+----
+====
Returns toxicity scores for categories like PROFANITY, HATE_SPEECH, THREAT, INSULT, etc.
@@ -248,13 +557,53 @@ from("direct:dynamicOperation")
If you need to use explicit credentials:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:withCredentials")
.setBody(constant("Bonjour, comment allez-vous?"))
.to("aws2-comprehend://test?operation=detectDominantLanguage&accessKey=YOUR_ACCESS_KEY&secretKey=YOUR_SECRET_KEY®ion=eu-west-1")
.log("Detected language: ${header.CamelAwsComprehendDetectedLanguage}");
-------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:withCredentials"/>
+ <setBody>
+ <constant>Bonjour, comment allez-vous?</constant>
+ </setBody>
+ <to uri="aws2-comprehend://test?operation=detectDominantLanguage&accessKey=YOUR_ACCESS_KEY&secretKey=YOUR_SECRET_KEY&region=eu-west-1"/>
+ <log message="Detected language: ${header.CamelAwsComprehendDetectedLanguage}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:withCredentials
+ steps:
+ - setBody:
+ constant: "Bonjour, comment allez-vous?"
+ - to:
+ uri: aws2-comprehend://test
+ parameters:
+ operation: detectDominantLanguage
+ accessKey: YOUR_ACCESS_KEY
+ secretKey: YOUR_SECRET_KEY
+ region: eu-west-1
+ - log:
+ message: "Detected language: ${header.CamelAwsComprehendDetectedLanguage}"
+----
+====
=== Content Moderation Pipeline Example
diff --git a/components/camel-aws/camel-aws2-cw/src/main/docs/aws2-cw-component.adoc b/components/camel-aws/camel-aws2-cw/src/main/docs/aws2-cw-component.adoc
index 22977f035cc2..4e1886b60f8a 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/docs/aws2-cw-component.adoc
+++ b/components/camel-aws/camel-aws2-cw/src/main/docs/aws2-cw-component.adoc
@@ -76,11 +76,40 @@ If you need more control over the `CloudWatchClient` instance
configuration you can create your own instance and refer to it from the
URI:
+[tabs]
+====
+Java::
++
[source,java]
--------------------------------------------------
+----
from("direct:start")
-.to("aws2-cw://namespace?amazonCwClient=#client");
--------------------------------------------------
+ .to("aws2-cw://namespace?amazonCwClient=#client");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-cw://namespace?amazonCwClient=#client"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-cw://namespace
+ parameters:
+ amazonCwClient: "#client"
+----
+====
The `#client` refers to a `CloudWatchClient` in the
Registry.
@@ -106,11 +135,38 @@ where `${camel-version`} must be replaced by the actual version of Camel.
=== Producer Example
+[tabs]
+====
+Java::
++
[source,java]
--------------------------------
+----
from("direct:start")
.to("aws2-cw://http://camel.apache.org/aws-cw");
--------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-cw://http://camel.apache.org/aws-cw"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-cw://http://camel.apache.org/aws-cw
+----
+====
and sends something like
diff --git a/components/camel-aws/camel-aws2-ecs/src/main/docs/aws2-ecs-component.adoc b/components/camel-aws/camel-aws2-ecs/src/main/docs/aws2-ecs-component.adoc
index 94a8597e3738..e2907e8a2879 100644
--- a/components/camel-aws/camel-aws2-ecs/src/main/docs/aws2-ecs-component.adoc
+++ b/components/camel-aws/camel-aws2-ecs/src/main/docs/aws2-ecs-component.adoc
@@ -81,11 +81,41 @@ Camel-AWS ECS component provides the following operation on the producer side:
- listClusters: this operation will list the available clusters in ECS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listClusters")
- .to("aws2-ecs://test?ecsClient=#amazonEcsClient&operation=listClusters")
---------------------------------------------------------------------------------
+ .to("aws2-ecs://test?ecsClient=#amazonEcsClient&operation=listClusters");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listClusters"/>
+ <to uri="aws2-ecs://test?ecsClient=#amazonEcsClient&operation=listClusters"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listClusters
+ steps:
+ - to:
+ uri: aws2-ecs://test
+ parameters:
+ ecsClient: "#amazonEcsClient"
+ operation: listClusters
+----
+====
=== Using a POJO as body
diff --git a/components/camel-aws/camel-aws2-eks/src/main/docs/aws2-eks-component.adoc b/components/camel-aws/camel-aws2-eks/src/main/docs/aws2-eks-component.adoc
index 381ff439c362..36f51cbfc82c 100644
--- a/components/camel-aws/camel-aws2-eks/src/main/docs/aws2-eks-component.adoc
+++ b/components/camel-aws/camel-aws2-eks/src/main/docs/aws2-eks-component.adoc
@@ -85,11 +85,41 @@ Camel-AWS EKS component provides the following operation on the producer side:
- listClusters: this operation will list the available clusters in EKS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listClusters")
- .to("aws2-eks://test?eksClient=#amazonEksClient&operation=listClusters")
---------------------------------------------------------------------------------
+ .to("aws2-eks://test?eksClient=#amazonEksClient&operation=listClusters");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listClusters"/>
+ <to uri="aws2-eks://test?eksClient=#amazonEksClient&operation=listClusters"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listClusters
+ steps:
+ - to:
+ uri: aws2-eks://test
+ parameters:
+ eksClient: "#amazonEksClient"
+ operation: listClusters
+----
+====
=== Using a POJO as body
diff --git a/components/camel-aws/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc b/components/camel-aws/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
index 409b68b00512..f7391857860a 100644
--- a/components/camel-aws/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
+++ b/components/camel-aws/camel-aws2-eventbridge/src/main/docs/aws2-eventbridge-component.adoc
@@ -349,12 +349,45 @@ Standard `ScheduledPollConsumer` options (`delay`, `initialDelay`, `greedy`, etc
=== Consumer Example — Auto-Created Queue
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-eventbridge://default?ruleName=my-rule&delay=5000")
.log("Received EventBridge event: ${body}")
.to("direct:process");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-eventbridge://default?ruleName=my-rule&delay=5000"/>
+ <log message="Received EventBridge event: ${body}"/>
+ <to uri="direct:process"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-eventbridge://default
+ parameters:
+ ruleName: my-rule
+ delay: 5000
+ steps:
+ - log:
+ message: "Received EventBridge event: ${body}"
+ - to:
+ uri: direct:process
+----
+====
The consumer auto-creates an SQS queue, wires it to the `my-rule` EventBridge rule, and polls every 5 seconds.
diff --git a/components/camel-aws/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc b/components/camel-aws/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc
index 5c0e173f3f49..bf77169b599b 100644
--- a/components/camel-aws/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc
+++ b/components/camel-aws/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc
@@ -119,250 +119,1216 @@ Camel-AWS2 IAM component provides the following operation on the producer side:
- createUser: this operation will create a user in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createUser")
.setHeader(IAM2Constants.USERNAME, constant("camel"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createUser")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createUser");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createUser"/>
+ <setHeader name="CamelAwsIAMUsername">
+ <constant>camel</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=createUser"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createUser
+ steps:
+ - setHeader:
+ name: CamelAwsIAMUsername
+ constant: camel
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: createUser
+----
+====
- deleteUser: this operation will delete a user in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:deleteUser")
.setHeader(IAM2Constants.USERNAME, constant("camel"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteUser")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteUser");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteUser"/>
+ <setHeader name="CamelAwsIAMUsername">
+ <constant>camel</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteUser"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteUser
+ steps:
+ - setHeader:
+ name: CamelAwsIAMUsername
+ constant: camel
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: deleteUser
+----
+====
- listUsers: this operation will list the users in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listUsers")
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listUsers")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listUsers");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listUsers"/>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=listUsers"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listUsers
+ steps:
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: listUsers
+----
+====
- createGroup: this operation will add a group in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("direct:deleteUser")
+----
+from("direct:createGroup")
.setHeader(IAM2Constants.GROUP_NAME, constant("camel"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createGroup")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createGroup");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createGroup"/>
+ <setHeader name="CamelAwsIAMGroupName">
+ <constant>camel</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=createGroup"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createGroup
+ steps:
+ - setHeader:
+ name: CamelAwsIAMGroupName
+ constant: camel
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: createGroup
+----
+====
- deleteGroup: this operation will delete a group in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("direct:deleteUser")
+----
+from("direct:deleteGroup")
.setHeader(IAM2Constants.GROUP_NAME, constant("camel"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteGroup")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteGroup");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteGroup"/>
+ <setHeader name="CamelAwsIAMGroupName">
+ <constant>camel</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteGroup"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteGroup
+ steps:
+ - setHeader:
+ name: CamelAwsIAMGroupName
+ constant: camel
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: deleteGroup
+----
+====
- listGroups: this operation will list the groups in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("direct:listUsers")
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listGroups")
---------------------------------------------------------------------------------
+----
+from("direct:listGroups")
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listGroups");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listGroups"/>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=listGroups"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listGroups
+ steps:
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: listGroups
+----
+====
==== Role Operations
- createRole: this operation will create a role in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createRole")
.setHeader(IAM2Constants.ROLE_NAME, constant("myRole"))
.setHeader(IAM2Constants.ASSUME_ROLE_POLICY_DOCUMENT, constant("{...}"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createRole")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createRole");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createRole"/>
+ <setHeader name="CamelAwsIAMRoleName">
+ <constant>myRole</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMAssumeRolePolicyDocument">
+ <constant>{...}</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=createRole"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createRole
+ steps:
+ - setHeader:
+ name: CamelAwsIAMRoleName
+ constant: myRole
+ - setHeader:
+ name: CamelAwsIAMAssumeRolePolicyDocument
+ constant: "{...}"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: createRole
+----
+====
- deleteRole: this operation will delete a role in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:deleteRole")
.setHeader(IAM2Constants.ROLE_NAME, constant("myRole"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteRole")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteRole");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteRole"/>
+ <setHeader name="CamelAwsIAMRoleName">
+ <constant>myRole</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteRole"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteRole
+ steps:
+ - setHeader:
+ name: CamelAwsIAMRoleName
+ constant: myRole
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: deleteRole
+----
+====
- getRole: this operation will get a role in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getRole")
.setHeader(IAM2Constants.ROLE_NAME, constant("myRole"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=getRole")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=getRole");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getRole"/>
+ <setHeader name="CamelAwsIAMRoleName">
+ <constant>myRole</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=getRole"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getRole
+ steps:
+ - setHeader:
+ name: CamelAwsIAMRoleName
+ constant: myRole
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: getRole
+----
+====
- listRoles: this operation will list the roles in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listRoles")
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listRoles")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listRoles");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listRoles"/>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=listRoles"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listRoles
+ steps:
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: listRoles
+----
+====
==== Policy Operations
- createPolicy: this operation will create a policy in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createPolicy")
.setHeader(IAM2Constants.POLICY_NAME, constant("myPolicy"))
.setHeader(IAM2Constants.POLICY_DOCUMENT, constant("{...}"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createPolicy")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createPolicy");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createPolicy"/>
+ <setHeader name="CamelAwsIAMPolicyName">
+ <constant>myPolicy</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMPolicyDocument">
+ <constant>{...}</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=createPolicy"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createPolicy
+ steps:
+ - setHeader:
+ name: CamelAwsIAMPolicyName
+ constant: myPolicy
+ - setHeader:
+ name: CamelAwsIAMPolicyDocument
+ constant: "{...}"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: createPolicy
+----
+====
- deletePolicy: this operation will delete a policy in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:deletePolicy")
.setHeader(IAM2Constants.POLICY_ARN, constant("arn:aws:iam::123456789012:policy/myPolicy"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deletePolicy")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deletePolicy");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deletePolicy"/>
+ <setHeader name="CamelAwsIAMPolicyArn">
+ <constant>arn:aws:iam::123456789012:policy/myPolicy</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=deletePolicy"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deletePolicy
+ steps:
+ - setHeader:
+ name: CamelAwsIAMPolicyArn
+ constant: "arn:aws:iam::123456789012:policy/myPolicy"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: deletePolicy
+----
+====
- getPolicy: this operation will get a policy in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getPolicy")
.setHeader(IAM2Constants.POLICY_ARN, constant("arn:aws:iam::123456789012:policy/myPolicy"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=getPolicy")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=getPolicy");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getPolicy"/>
+ <setHeader name="CamelAwsIAMPolicyArn">
+ <constant>arn:aws:iam::123456789012:policy/myPolicy</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=getPolicy"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getPolicy
+ steps:
+ - setHeader:
+ name: CamelAwsIAMPolicyArn
+ constant: "arn:aws:iam::123456789012:policy/myPolicy"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: getPolicy
+----
+====
- listPolicies: this operation will list the policies in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listPolicies")
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listPolicies")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listPolicies");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listPolicies"/>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=listPolicies"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listPolicies
+ steps:
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: listPolicies
+----
+====
==== Policy Attachment Operations
- attachUserPolicy: this operation will attach a policy to a user
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:attachUserPolicy")
.setHeader(IAM2Constants.USERNAME, constant("camel"))
.setHeader(IAM2Constants.POLICY_ARN, constant("arn:aws:iam::123456789012:policy/myPolicy"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=attachUserPolicy")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=attachUserPolicy");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:attachUserPolicy"/>
+ <setHeader name="CamelAwsIAMUsername">
+ <constant>camel</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMPolicyArn">
+ <constant>arn:aws:iam::123456789012:policy/myPolicy</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=attachUserPolicy"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:attachUserPolicy
+ steps:
+ - setHeader:
+ name: CamelAwsIAMUsername
+ constant: camel
+ - setHeader:
+ name: CamelAwsIAMPolicyArn
+ constant: "arn:aws:iam::123456789012:policy/myPolicy"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: attachUserPolicy
+----
+====
- detachUserPolicy: this operation will detach a policy from a user
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:detachUserPolicy")
.setHeader(IAM2Constants.USERNAME, constant("camel"))
.setHeader(IAM2Constants.POLICY_ARN, constant("arn:aws:iam::123456789012:policy/myPolicy"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=detachUserPolicy")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=detachUserPolicy");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:detachUserPolicy"/>
+ <setHeader name="CamelAwsIAMUsername">
+ <constant>camel</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMPolicyArn">
+ <constant>arn:aws:iam::123456789012:policy/myPolicy</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=detachUserPolicy"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:detachUserPolicy
+ steps:
+ - setHeader:
+ name: CamelAwsIAMUsername
+ constant: camel
+ - setHeader:
+ name: CamelAwsIAMPolicyArn
+ constant: "arn:aws:iam::123456789012:policy/myPolicy"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: detachUserPolicy
+----
+====
- attachGroupPolicy: this operation will attach a policy to a group
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:attachGroupPolicy")
.setHeader(IAM2Constants.GROUP_NAME, constant("myGroup"))
.setHeader(IAM2Constants.POLICY_ARN, constant("arn:aws:iam::123456789012:policy/myPolicy"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=attachGroupPolicy")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=attachGroupPolicy");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:attachGroupPolicy"/>
+ <setHeader name="CamelAwsIAMGroupName">
+ <constant>myGroup</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMPolicyArn">
+ <constant>arn:aws:iam::123456789012:policy/myPolicy</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=attachGroupPolicy"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:attachGroupPolicy
+ steps:
+ - setHeader:
+ name: CamelAwsIAMGroupName
+ constant: myGroup
+ - setHeader:
+ name: CamelAwsIAMPolicyArn
+ constant: "arn:aws:iam::123456789012:policy/myPolicy"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: attachGroupPolicy
+----
+====
- detachGroupPolicy: this operation will detach a policy from a group
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:detachGroupPolicy")
.setHeader(IAM2Constants.GROUP_NAME, constant("myGroup"))
.setHeader(IAM2Constants.POLICY_ARN, constant("arn:aws:iam::123456789012:policy/myPolicy"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=detachGroupPolicy")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=detachGroupPolicy");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:detachGroupPolicy"/>
+ <setHeader name="CamelAwsIAMGroupName">
+ <constant>myGroup</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMPolicyArn">
+ <constant>arn:aws:iam::123456789012:policy/myPolicy</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=detachGroupPolicy"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:detachGroupPolicy
+ steps:
+ - setHeader:
+ name: CamelAwsIAMGroupName
+ constant: myGroup
+ - setHeader:
+ name: CamelAwsIAMPolicyArn
+ constant: "arn:aws:iam::123456789012:policy/myPolicy"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: detachGroupPolicy
+----
+====
- attachRolePolicy: this operation will attach a policy to a role
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:attachRolePolicy")
.setHeader(IAM2Constants.ROLE_NAME, constant("myRole"))
.setHeader(IAM2Constants.POLICY_ARN, constant("arn:aws:iam::123456789012:policy/myPolicy"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=attachRolePolicy")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=attachRolePolicy");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:attachRolePolicy"/>
+ <setHeader name="CamelAwsIAMRoleName">
+ <constant>myRole</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMPolicyArn">
+ <constant>arn:aws:iam::123456789012:policy/myPolicy</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=attachRolePolicy"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:attachRolePolicy
+ steps:
+ - setHeader:
+ name: CamelAwsIAMRoleName
+ constant: myRole
+ - setHeader:
+ name: CamelAwsIAMPolicyArn
+ constant: "arn:aws:iam::123456789012:policy/myPolicy"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: attachRolePolicy
+----
+====
- detachRolePolicy: this operation will detach a policy from a role
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:detachRolePolicy")
.setHeader(IAM2Constants.ROLE_NAME, constant("myRole"))
.setHeader(IAM2Constants.POLICY_ARN, constant("arn:aws:iam::123456789012:policy/myPolicy"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=detachRolePolicy")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=detachRolePolicy");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:detachRolePolicy"/>
+ <setHeader name="CamelAwsIAMRoleName">
+ <constant>myRole</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMPolicyArn">
+ <constant>arn:aws:iam::123456789012:policy/myPolicy</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=detachRolePolicy"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:detachRolePolicy
+ steps:
+ - setHeader:
+ name: CamelAwsIAMRoleName
+ constant: myRole
+ - setHeader:
+ name: CamelAwsIAMPolicyArn
+ constant: "arn:aws:iam::123456789012:policy/myPolicy"
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: detachRolePolicy
+----
+====
==== Instance Profile Operations
- createInstanceProfile: this operation will create an instance profile in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createInstanceProfile")
.setHeader(IAM2Constants.INSTANCE_PROFILE_NAME, constant("myInstanceProfile"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createInstanceProfile")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createInstanceProfile");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createInstanceProfile"/>
+ <setHeader name="CamelAwsIAMInstanceProfileName">
+ <constant>myInstanceProfile</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=createInstanceProfile"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createInstanceProfile
+ steps:
+ - setHeader:
+ name: CamelAwsIAMInstanceProfileName
+ constant: myInstanceProfile
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: createInstanceProfile
+----
+====
- deleteInstanceProfile: this operation will delete an instance profile in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:deleteInstanceProfile")
.setHeader(IAM2Constants.INSTANCE_PROFILE_NAME, constant("myInstanceProfile"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteInstanceProfile")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteInstanceProfile");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteInstanceProfile"/>
+ <setHeader name="CamelAwsIAMInstanceProfileName">
+ <constant>myInstanceProfile</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=deleteInstanceProfile"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteInstanceProfile
+ steps:
+ - setHeader:
+ name: CamelAwsIAMInstanceProfileName
+ constant: myInstanceProfile
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: deleteInstanceProfile
+----
+====
- getInstanceProfile: this operation will get an instance profile in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getInstanceProfile")
.setHeader(IAM2Constants.INSTANCE_PROFILE_NAME, constant("myInstanceProfile"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=getInstanceProfile")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=getInstanceProfile");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getInstanceProfile"/>
+ <setHeader name="CamelAwsIAMInstanceProfileName">
+ <constant>myInstanceProfile</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=getInstanceProfile"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getInstanceProfile
+ steps:
+ - setHeader:
+ name: CamelAwsIAMInstanceProfileName
+ constant: myInstanceProfile
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: getInstanceProfile
+----
+====
- listInstanceProfiles: this operation will list the instance profiles in IAM
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listInstanceProfiles")
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listInstanceProfiles")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=listInstanceProfiles");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listInstanceProfiles"/>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=listInstanceProfiles"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listInstanceProfiles
+ steps:
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: listInstanceProfiles
+----
+====
- addRoleToInstanceProfile: this operation will add a role to an instance profile
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:addRoleToInstanceProfile")
.setHeader(IAM2Constants.INSTANCE_PROFILE_NAME, constant("myInstanceProfile"))
.setHeader(IAM2Constants.ROLE_NAME, constant("myRole"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=addRoleToInstanceProfile")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=addRoleToInstanceProfile");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:addRoleToInstanceProfile"/>
+ <setHeader name="CamelAwsIAMInstanceProfileName">
+ <constant>myInstanceProfile</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMRoleName">
+ <constant>myRole</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=addRoleToInstanceProfile"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:addRoleToInstanceProfile
+ steps:
+ - setHeader:
+ name: CamelAwsIAMInstanceProfileName
+ constant: myInstanceProfile
+ - setHeader:
+ name: CamelAwsIAMRoleName
+ constant: myRole
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: addRoleToInstanceProfile
+----
+====
- removeRoleFromInstanceProfile: this operation will remove a role from an instance profile
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:removeRoleFromInstanceProfile")
.setHeader(IAM2Constants.INSTANCE_PROFILE_NAME, constant("myInstanceProfile"))
.setHeader(IAM2Constants.ROLE_NAME, constant("myRole"))
- .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=removeRoleFromInstanceProfile")
---------------------------------------------------------------------------------
+ .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=removeRoleFromInstanceProfile");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:removeRoleFromInstanceProfile"/>
+ <setHeader name="CamelAwsIAMInstanceProfileName">
+ <constant>myInstanceProfile</constant>
+ </setHeader>
+ <setHeader name="CamelAwsIAMRoleName">
+ <constant>myRole</constant>
+ </setHeader>
+ <to uri="aws2-iam://test?iamClient=#amazonIAMClient&operation=removeRoleFromInstanceProfile"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:removeRoleFromInstanceProfile
+ steps:
+ - setHeader:
+ name: CamelAwsIAMInstanceProfileName
+ constant: myInstanceProfile
+ - setHeader:
+ name: CamelAwsIAMRoleName
+ constant: myRole
+ - to:
+ uri: aws2-iam://test
+ parameters:
+ iamClient: "#amazonIAMClient"
+ operation: removeRoleFromInstanceProfile
+----
+====
=== Using a POJO as body
@@ -370,11 +1336,11 @@ Sometimes building an AWS Request can be complex because of multiple options. We
In AWS IAM, there are multiple operations you can submit, as an example for Create User request, you can do something like:
[source,java]
-------------------------------------------------------------------------------------------------------
+--------------------------
from("direct:createUser")
.setBody(CreateUserRequest.builder().userName("camel").build())
.to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createUser&pojoRequest=true")
-------------------------------------------------------------------------------------------------------
+--------------------------
In this way, you'll pass the request directly without the need of passing headers and options specifically related to this operation.
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc b/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc
index f999e084a6a9..607eb7714f24 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-component.adoc
@@ -101,11 +101,42 @@ For more information about this you can look at https://docs.aws.amazon.com/sdk-
You then have to reference the KinesisClient in the `amazonKinesisClient` URI option.
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------------------------------------------
+----
from("aws2-kinesis://mykinesisstream?amazonKinesisClient=#kinesisClient")
- .to("log:out?showAll=true");
---------------------------------------------------------------------------------------------------------------------
+ .to("log:out?showAll=true");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-kinesis://mykinesisstream?amazonKinesisClient=#kinesisClient"/>
+ <to uri="log:out?showAll=true"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-kinesis://mykinesisstream
+ parameters:
+ amazonKinesisClient: "#kinesisClient"
+ steps:
+ - to:
+ uri: log:out
+ parameters:
+ showAll: true
+----
+====
=== Providing AWS Credentials
@@ -122,11 +153,45 @@ The component supports also the KCL (Kinesis Client Library) for consuming from
To enable this feature you'll need to set three different parameter in your endpoint and set the region:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------------------------------------------
+----
from("aws2-kinesis://mykinesisstream?asyncClient=true&useDefaultCredentialsProvider=true&useKclConsumers=true®ion=myregion")
- .to("log:out?showAll=true");
---------------------------------------------------------------------------------------------------------------------
+ .to("log:out?showAll=true");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-kinesis://mykinesisstream?asyncClient=true&useDefaultCredentialsProvider=true&useKclConsumers=true&region=myregion"/>
+ <to uri="log:out?showAll=true"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-kinesis://mykinesisstream
+ parameters:
+ asyncClient: true
+ useDefaultCredentialsProvider: true
+ useKclConsumers: true
+ region: myregion
+ steps:
+ - to:
+ uri: log:out
+ parameters:
+ showAll: true
+----
+====
This feature will make possible to automatically checkpointing the Shard Iterations by combining the usage of KCL, DynamoDB Table and CloudWatch alarms.
diff --git a/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc b/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc
index faad900469de..3e10f5da78fa 100644
--- a/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc
+++ b/components/camel-aws/camel-aws2-kinesis/src/main/docs/aws2-kinesis-firehose-component.adoc
@@ -90,11 +90,42 @@ For more information about this you can look at https://docs.aws.amazon.com/sdk-
You then have to reference the FirehoseClient in the `amazonKinesisFirehoseClient` URI option.
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------------------------------------------
+----
from("aws2-kinesis-firehose://mykinesisdeliverystream?amazonKinesisFirehoseClient=#kinesisClient")
- .to("log:out?showAll=true");
---------------------------------------------------------------------------------------------------------------------
+ .to("log:out?showAll=true");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-kinesis-firehose://mykinesisdeliverystream?amazonKinesisFirehoseClient=#kinesisClient"/>
+ <to uri="log:out?showAll=true"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-kinesis-firehose://mykinesisdeliverystream
+ parameters:
+ amazonKinesisFirehoseClient: "#kinesisClient"
+ steps:
+ - to:
+ uri: log:out
+ parameters:
+ showAll: true
+----
+====
=== Providing AWS Credentials
diff --git a/components/camel-aws/camel-aws2-kms/src/main/docs/aws2-kms-component.adoc b/components/camel-aws/camel-aws2-kms/src/main/docs/aws2-kms-component.adoc
index d5cc851039fb..650fbd2d3528 100644
--- a/components/camel-aws/camel-aws2-kms/src/main/docs/aws2-kms-component.adoc
+++ b/components/camel-aws/camel-aws2-kms/src/main/docs/aws2-kms-component.adoc
@@ -84,37 +84,169 @@ Camel-AWS KMS component provides the following operation on the producer side:
- listKeys: this operation will list the available keys in KMS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listKeys")
- .to("aws2-kms://test?kmsClient=#amazonKmsClient&operation=listKeys")
---------------------------------------------------------------------------------
+ .to("aws2-kms://test?kmsClient=#amazonKmsClient&operation=listKeys");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listKeys"/>
+ <to uri="aws2-kms://test?kmsClient=#amazonKmsClient&operation=listKeys"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listKeys
+ steps:
+ - to:
+ uri: aws2-kms://test
+ parameters:
+ kmsClient: "#amazonKmsClient"
+ operation: listKeys
+----
+====
- createKey: this operation will create a key in KMS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createKey")
- .to("aws2-kms://test?kmsClient=#amazonKmsClient&operation=createKey")
---------------------------------------------------------------------------------
+ .to("aws2-kms://test?kmsClient=#amazonKmsClient&operation=createKey");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createKey"/>
+ <to uri="aws2-kms://test?kmsClient=#amazonKmsClient&operation=createKey"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createKey
+ steps:
+ - to:
+ uri: aws2-kms://test
+ parameters:
+ kmsClient: "#amazonKmsClient"
+ operation: createKey
+----
+====
- disableKey: this operation will disable a key in KMS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:disableKey")
- .setHeader(KMS2Constants.KEY_ID, constant("123")
- .to("aws2-kms://test?kmsClient=#amazonKmsClient&operation=disableKey")
---------------------------------------------------------------------------------
+ .setHeader(KMS2Constants.KEY_ID, constant("123"))
+ .to("aws2-kms://test?kmsClient=#amazonKmsClient&operation=disableKey");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:disableKey"/>
+ <setHeader name="CamelAwsKMSKeyId">
+ <constant>123</constant>
+ </setHeader>
+ <to uri="aws2-kms://test?kmsClient=#amazonKmsClient&operation=disableKey"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:disableKey
+ steps:
+ - setHeader:
+ name: CamelAwsKMSKeyId
+ constant: "123"
+ - to:
+ uri: aws2-kms://test
+ parameters:
+ kmsClient: "#amazonKmsClient"
+ operation: disableKey
+----
+====
- enableKey: this operation will enable a key in KMS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:enableKey")
- .setHeader(KMS2Constants.KEY_ID, constant("123")
- .to("aws2-kms://test?kmsClient=#amazonKmsClient&operation=enableKey")
---------------------------------------------------------------------------------
+ .setHeader(KMS2Constants.KEY_ID, constant("123"))
+ .to("aws2-kms://test?kmsClient=#amazonKmsClient&operation=enableKey");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:enableKey"/>
+ <setHeader name="CamelAwsKMSKeyId">
+ <constant>123</constant>
+ </setHeader>
+ <to uri="aws2-kms://test?kmsClient=#amazonKmsClient&operation=enableKey"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:enableKey
+ steps:
+ - setHeader:
+ name: CamelAwsKMSKeyId
+ constant: "123"
+ - to:
+ uri: aws2-kms://test
+ parameters:
+ kmsClient: "#amazonKmsClient"
+ operation: enableKey
+----
+====
=== Using a POJO as body
diff --git a/components/camel-aws/camel-aws2-lambda/src/main/docs/aws2-lambda-component.adoc b/components/camel-aws/camel-aws2-lambda/src/main/docs/aws2-lambda-component.adoc
index 21f759402b81..05c651aef9c7 100644
--- a/components/camel-aws/camel-aws2-lambda/src/main/docs/aws2-lambda-component.adoc
+++ b/components/camel-aws/camel-aws2-lambda/src/main/docs/aws2-lambda-component.adoc
@@ -114,15 +114,49 @@ To have a full understanding of how the component works, you may have a look at
- CreateFunction: this operation will create a function for you in AWS Lambda
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
- from("direct:createFunction").to("aws2-lambda://GetHelloWithName?operation=createFunction").to("mock:result");
---------------------------------------------------------------------------------
+----
+from("direct:createFunction")
+ .to("aws2-lambda://GetHelloWithName?operation=createFunction")
+ .to("mock:result");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createFunction"/>
+ <to uri="aws2-lambda://GetHelloWithName?operation=createFunction"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createFunction
+ steps:
+ - to:
+ uri: aws2-lambda://GetHelloWithName
+ parameters:
+ operation: createFunction
+ - to:
+ uri: mock:result
+----
+====
and by sending
[source,java]
---------------------------------------------------------------------------------
+----
template.send("direct:createFunction", ExchangePattern.InOut, new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
@@ -141,7 +175,7 @@ and by sending
exchange.getIn().setBody(inputStream);
}
});
---------------------------------------------------------------------------------
+----
=== Function URL Operations
@@ -149,52 +183,224 @@ Function URLs provide a dedicated HTTP(S) endpoint for your Lambda function, ena
- createFunctionUrlConfig: this operation will create a function URL for your Lambda function
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createFunctionUrl")
.setHeader(Lambda2Constants.FUNCTION_URL_AUTH_TYPE, constant("NONE"))
.to("aws2-lambda://myFunction?operation=createFunctionUrlConfig")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createFunctionUrl"/>
+ <setHeader name="CamelAwsLambdaFunctionUrlAuthType">
+ <constant>NONE</constant>
+ </setHeader>
+ <to uri="aws2-lambda://myFunction?operation=createFunctionUrlConfig"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createFunctionUrl
+ steps:
+ - setHeader:
+ name: CamelAwsLambdaFunctionUrlAuthType
+ constant: NONE
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: createFunctionUrlConfig
+ - to:
+ uri: mock:result
+----
+====
The `FUNCTION_URL_AUTH_TYPE` can be either `NONE` (public access) or `AWS_IAM` (authenticated access).
- getFunctionUrlConfig: this operation will retrieve the function URL configuration
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getFunctionUrl")
.to("aws2-lambda://myFunction?operation=getFunctionUrlConfig")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getFunctionUrl"/>
+ <to uri="aws2-lambda://myFunction?operation=getFunctionUrlConfig"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getFunctionUrl
+ steps:
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: getFunctionUrlConfig
+ - to:
+ uri: mock:result
+----
+====
- updateFunctionUrlConfig: this operation will update the function URL configuration
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:updateFunctionUrl")
.setHeader(Lambda2Constants.FUNCTION_URL_AUTH_TYPE, constant("AWS_IAM"))
.to("aws2-lambda://myFunction?operation=updateFunctionUrlConfig")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:updateFunctionUrl"/>
+ <setHeader name="CamelAwsLambdaFunctionUrlAuthType">
+ <constant>AWS_IAM</constant>
+ </setHeader>
+ <to uri="aws2-lambda://myFunction?operation=updateFunctionUrlConfig"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:updateFunctionUrl
+ steps:
+ - setHeader:
+ name: CamelAwsLambdaFunctionUrlAuthType
+ constant: AWS_IAM
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: updateFunctionUrlConfig
+ - to:
+ uri: mock:result
+----
+====
- deleteFunctionUrlConfig: this operation will delete the function URL
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:deleteFunctionUrl")
.to("aws2-lambda://myFunction?operation=deleteFunctionUrlConfig")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteFunctionUrl"/>
+ <to uri="aws2-lambda://myFunction?operation=deleteFunctionUrlConfig"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteFunctionUrl
+ steps:
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: deleteFunctionUrlConfig
+ - to:
+ uri: mock:result
+----
+====
- listFunctionUrlConfigs: this operation will list all function URLs for a function
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listFunctionUrls")
.to("aws2-lambda://myFunction?operation=listFunctionUrlConfigs")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listFunctionUrls"/>
+ <to uri="aws2-lambda://myFunction?operation=listFunctionUrlConfigs"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listFunctionUrls
+ steps:
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: listFunctionUrlConfigs
+ - to:
+ uri: mock:result
+----
+====
=== Function Configuration Operations
@@ -202,17 +408,49 @@ Function Configuration operations allow you to view and modify your Lambda funct
- getFunctionConfiguration: this operation will retrieve the configuration details of a function
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getFunctionConfiguration")
.to("aws2-lambda://myFunction?operation=getFunctionConfiguration")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getFunctionConfiguration"/>
+ <to uri="aws2-lambda://myFunction?operation=getFunctionConfiguration"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getFunctionConfiguration
+ steps:
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: getFunctionConfiguration
+ - to:
+ uri: mock:result
+----
+====
- updateFunctionConfiguration: this operation will update the configuration of a function
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:updateFunctionConfiguration")
.process(exchange -> {
exchange.getIn().setHeader(Lambda2Constants.FUNCTION_MEMORY_SIZE, 512);
@@ -221,7 +459,7 @@ from("direct:updateFunctionConfiguration")
})
.to("aws2-lambda://myFunction?operation=updateFunctionConfiguration")
.to("mock:result");
---------------------------------------------------------------------------------
+----
=== Concurrency Operations
@@ -229,31 +467,133 @@ Concurrency operations allow you to manage reserved concurrency for your Lambda
- putFunctionConcurrency: this operation will set the reserved concurrency for a function
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:putFunctionConcurrency")
.setHeader(Lambda2Constants.RESERVED_CONCURRENT_EXECUTIONS, constant(100))
.to("aws2-lambda://myFunction?operation=putFunctionConcurrency")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:putFunctionConcurrency"/>
+ <setHeader name="CamelAwsLambdaReservedConcurrentExecutions">
+ <constant>100</constant>
+ </setHeader>
+ <to uri="aws2-lambda://myFunction?operation=putFunctionConcurrency"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:putFunctionConcurrency
+ steps:
+ - setHeader:
+ name: CamelAwsLambdaReservedConcurrentExecutions
+ constant: "100"
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: putFunctionConcurrency
+ - to:
+ uri: mock:result
+----
+====
- deleteFunctionConcurrency: this operation will remove reserved concurrency from a function
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:deleteFunctionConcurrency")
.to("aws2-lambda://myFunction?operation=deleteFunctionConcurrency")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteFunctionConcurrency"/>
+ <to uri="aws2-lambda://myFunction?operation=deleteFunctionConcurrency"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteFunctionConcurrency
+ steps:
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: deleteFunctionConcurrency
+ - to:
+ uri: mock:result
+----
+====
- getFunctionConcurrency: this operation will retrieve the reserved concurrency for a function
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getFunctionConcurrency")
.to("aws2-lambda://myFunction?operation=getFunctionConcurrency")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getFunctionConcurrency"/>
+ <to uri="aws2-lambda://myFunction?operation=getFunctionConcurrency"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getFunctionConcurrency
+ steps:
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: getFunctionConcurrency
+ - to:
+ uri: mock:result
+----
+====
=== Permission Operations
@@ -262,7 +602,7 @@ Permission operations allow you to manage the resource-based policy for your Lam
- addPermission: this operation will add a permission to the function's resource-based policy
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:addPermission")
.process(exchange -> {
exchange.getIn().setHeader(Lambda2Constants.STATEMENT_ID, "s3-invoke");
@@ -272,31 +612,101 @@ from("direct:addPermission")
})
.to("aws2-lambda://myFunction?operation=addPermission")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- removePermission: this operation will remove a permission from the function's resource-based policy
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:removePermission")
.setHeader(Lambda2Constants.STATEMENT_ID, constant("s3-invoke"))
.to("aws2-lambda://myFunction?operation=removePermission")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:removePermission"/>
+ <setHeader name="CamelAwsLambdaStatementId">
+ <constant>s3-invoke</constant>
+ </setHeader>
+ <to uri="aws2-lambda://myFunction?operation=removePermission"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:removePermission
+ steps:
+ - setHeader:
+ name: CamelAwsLambdaStatementId
+ constant: s3-invoke
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: removePermission
+ - to:
+ uri: mock:result
+----
+====
- getPolicy: this operation will retrieve the resource-based policy for a function
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getPolicy")
.to("aws2-lambda://myFunction?operation=getPolicy")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getPolicy"/>
+ <to uri="aws2-lambda://myFunction?operation=getPolicy"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getPolicy
+ steps:
+ - to:
+ uri: aws2-lambda://myFunction
+ parameters:
+ operation: getPolicy
+ - to:
+ uri: mock:result
+----
+====
You can also configure CORS settings for function URLs:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createFunctionUrlWithCors")
.process(exchange -> {
exchange.getIn().setHeader(Lambda2Constants.FUNCTION_URL_AUTH_TYPE, "NONE");
@@ -310,7 +720,7 @@ from("direct:createFunctionUrlWithCors")
})
.to("aws2-lambda://myFunction?operation=createFunctionUrlConfig")
.to("mock:result");
---------------------------------------------------------------------------------
+----
== Using a POJO as body
@@ -318,11 +728,11 @@ Sometimes building an AWS Request can be complex because of multiple options. We
In AWS Lambda there are multiple operations you can submit, as an example for Get Function request, you can do something like:
[source,java]
-------------------------------------------------------------------------------------------------------
+--------------------------
from("direct:getFunction")
.setBody(GetFunctionRequest.builder().functionName("test").build())
.to("aws2-lambda://GetHelloWithName?awsLambdaClient=#awsLambdaClient&operation=getFunction&pojoRequest=true")
-------------------------------------------------------------------------------------------------------
+--------------------------
In this way, you'll pass the request directly without the need of passing headers and options specifically related to this operation.
diff --git a/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc b/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
index 022424397c2c..d2f333618416 100644
--- a/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
+++ b/components/camel-aws/camel-aws2-mq/src/main/docs/aws2-mq-component.adoc
@@ -85,11 +85,41 @@ Camel-AWS MQ component provides the following operation on the producer side:
- listBrokers: this operation will list the available MQ Brokers in AWS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listBrokers")
- .to("aws2-mq://test?amazonMqClient=#amazonMqClient&operation=listBrokers")
---------------------------------------------------------------------------------
+ .to("aws2-mq://test?amazonMqClient=#amazonMqClient&operation=listBrokers");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listBrokers"/>
+ <to uri="aws2-mq://test?amazonMqClient=#amazonMqClient&operation=listBrokers"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listBrokers
+ steps:
+ - to:
+ uri: aws2-mq://test
+ parameters:
+ amazonMqClient: "#amazonMqClient"
+ operation: listBrokers
+----
+====
- createBroker: this operation will create an MQ Broker in AWS
@@ -119,21 +149,93 @@ from("direct:createBroker")
- deleteBroker: this operation will delete an MQ Broker in AWS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("direct:listBrokers")
- .setHeader(MQ2Constants.BROKER_ID, constant("123")
- .to("aws2-mq://test?amazonMqClient=#amazonMqClient&operation=deleteBroker")
---------------------------------------------------------------------------------
-
-- rebootBroker: this operation will delete an MQ Broker in AWS
-
+----
+from("direct:deleteBroker")
+ .setHeader(MQ2Constants.BROKER_ID, constant("123"))
+ .to("aws2-mq://test?amazonMqClient=#amazonMqClient&operation=deleteBroker");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteBroker"/>
+ <setHeader name="CamelAwsMQBrokerID">
+ <constant>123</constant>
+ </setHeader>
+ <to uri="aws2-mq://test?amazonMqClient=#amazonMqClient&operation=deleteBroker"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteBroker
+ steps:
+ - setHeader:
+ name: CamelAwsMQBrokerID
+ constant: "123"
+ - to:
+ uri: aws2-mq://test
+ parameters:
+ amazonMqClient: "#amazonMqClient"
+ operation: deleteBroker
+----
+====
+
+- rebootBroker: this operation will reboot an MQ Broker in AWS
+
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("direct:listBrokers")
- .setHeader(MQ2Constants.BROKER_ID, constant("123")
- .to("aws2-mq://test?amazonMqClient=#amazonMqClient&operation=rebootBroker")
---------------------------------------------------------------------------------
+----
+from("direct:rebootBroker")
+ .setHeader(MQ2Constants.BROKER_ID, constant("123"))
+ .to("aws2-mq://test?amazonMqClient=#amazonMqClient&operation=rebootBroker");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:rebootBroker"/>
+ <setHeader name="CamelAwsMQBrokerID">
+ <constant>123</constant>
+ </setHeader>
+ <to uri="aws2-mq://test?amazonMqClient=#amazonMqClient&operation=rebootBroker"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:rebootBroker
+ steps:
+ - setHeader:
+ name: CamelAwsMQBrokerID
+ constant: "123"
+ - to:
+ uri: aws2-mq://test
+ parameters:
+ amazonMqClient: "#amazonMqClient"
+ operation: rebootBroker
+----
+====
=== Using a POJO as body
diff --git a/components/camel-aws/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc b/components/camel-aws/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc
index 11fa3f5546ce..660f9373ec7e 100644
--- a/components/camel-aws/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc
+++ b/components/camel-aws/camel-aws2-msk/src/main/docs/aws2-msk-component.adoc
@@ -77,11 +77,41 @@ Camel-AWS MSK component provides the following operation on the producer side:
- listClusters: this operation will list the available MSK Brokers in AWS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listClusters")
- .to("aws2-msk://test?mskClient=#amazonMskClient&operation=listClusters")
---------------------------------------------------------------------------------
+ .to("aws2-msk://test?mskClient=#amazonMskClient&operation=listClusters");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listClusters"/>
+ <to uri="aws2-msk://test?mskClient=#amazonMskClient&operation=listClusters"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listClusters
+ steps:
+ - to:
+ uri: aws2-msk://test
+ parameters:
+ mskClient: "#amazonMskClient"
+ operation: listClusters
+----
+====
- createCluster: this operation will create an MSK Cluster in AWS
@@ -103,12 +133,48 @@ from("direct:createCluster")
- deleteCluster: this operation will delete an MSK Cluster in AWS
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:deleteCluster")
- .setHeader(MSK2Constants.CLUSTER_ARN, constant("test-kafka"));
- .to("aws2-msk://test?mskClient=#amazonMskClient&operation=deleteCluster")
---------------------------------------------------------------------------------
+ .setHeader(MSK2Constants.CLUSTER_ARN, constant("test-kafka"))
+ .to("aws2-msk://test?mskClient=#amazonMskClient&operation=deleteCluster");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:deleteCluster"/>
+ <setHeader name="CamelAwsMSKClusterArn">
+ <constant>test-kafka</constant>
+ </setHeader>
+ <to uri="aws2-msk://test?mskClient=#amazonMskClient&operation=deleteCluster"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:deleteCluster
+ steps:
+ - setHeader:
+ name: CamelAwsMSKClusterArn
+ constant: test-kafka
+ - to:
+ uri: aws2-msk://test
+ parameters:
+ mskClient: "#amazonMskClient"
+ operation: deleteCluster
+----
+====
[source,java]
--------------------------------------------------------------------------------
diff --git a/components/camel-aws/camel-aws2-polly/src/main/docs/aws2-polly-component.adoc b/components/camel-aws/camel-aws2-polly/src/main/docs/aws2-polly-component.adoc
index 18c2cd279aaf..c080604edbdf 100644
--- a/components/camel-aws/camel-aws2-polly/src/main/docs/aws2-polly-component.adoc
+++ b/components/camel-aws/camel-aws2-polly/src/main/docs/aws2-polly-component.adoc
@@ -111,12 +111,44 @@ from("direct:start")
=== Describe Voices example
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-polly://test?operation=describeVoices")
.log("Available voices: ${body}");
-------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-polly://test?operation=describeVoices"/>
+ <log message="Available voices: ${body}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-polly://test
+ parameters:
+ operation: describeVoices
+ - log:
+ message: "Available voices: ${body}"
+----
+====
=== Asynchronous Speech Synthesis with S3
diff --git a/components/camel-aws/camel-aws2-redshift/src/main/docs/aws2-redshift-data-component.adoc b/components/camel-aws/camel-aws2-redshift/src/main/docs/aws2-redshift-data-component.adoc
index b9638f7244a0..32854918cdd8 100644
--- a/components/camel-aws/camel-aws2-redshift/src/main/docs/aws2-redshift-data-component.adoc
+++ b/components/camel-aws/camel-aws2-redshift/src/main/docs/aws2-redshift-data-component.adoc
@@ -93,11 +93,41 @@ Camel-AWS Redshift Data component provides the following operation on the produc
- listDatabases: this operation will list redshift databases
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:listDatabases")
- .to("aws2-redshift-data://test?awsRedshiftDataClient=#awsRedshiftDataClient&operation=listDatabases")
---------------------------------------------------------------------------------
+ .to("aws2-redshift-data://test?awsRedshiftDataClient=#awsRedshiftDataClient&operation=listDatabases");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:listDatabases"/>
+ <to uri="aws2-redshift-data://test?awsRedshiftDataClient=#awsRedshiftDataClient&operation=listDatabases"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:listDatabases
+ steps:
+ - to:
+ uri: aws2-redshift-data://test
+ parameters:
+ awsRedshiftDataClient: "#awsRedshiftDataClient"
+ operation: listDatabases
+----
+====
=== Using a POJO as body
diff --git a/components/camel-aws/camel-aws2-rekognition/src/main/docs/aws2-rekognition-component.adoc b/components/camel-aws/camel-aws2-rekognition/src/main/docs/aws2-rekognition-component.adoc
index 21e6aefa145d..4afda31b0033 100644
--- a/components/camel-aws/camel-aws2-rekognition/src/main/docs/aws2-rekognition-component.adoc
+++ b/components/camel-aws/camel-aws2-rekognition/src/main/docs/aws2-rekognition-component.adoc
@@ -111,11 +111,41 @@ Camel-AWS Rekognition component provides the following operation on the producer
- createCollection: this operation will create a collection
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createCollection")
- .to("aws2-rekognition://test?awsRekognitionClient=#awsRekognitionClient&operation=createCollection")
---------------------------------------------------------------------------------
+ .to("aws2-rekognition://test?awsRekognitionClient=#awsRekognitionClient&operation=createCollection");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createCollection"/>
+ <to uri="aws2-rekognition://test?awsRekognitionClient=#awsRekognitionClient&operation=createCollection"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createCollection
+ steps:
+ - to:
+ uri: aws2-rekognition://test
+ parameters:
+ awsRekognitionClient: "#awsRekognitionClient"
+ operation: createCollection
+----
+====
=== Using a POJO as body
diff --git a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
index 193cc16b258a..0e02327ecb69 100644
--- a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
+++ b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-component.adoc
@@ -101,11 +101,42 @@ If you don't specify an operation, explicitly the producer will do:
For example, to read file `hello.txt` from bucket `helloBucket`, use the following snippet:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-s3://helloBucket?accessKey=yourAccessKey&secretKey=yourSecretKey&prefix=hello.txt")
- .to("file:/var/downloaded");
---------------------------------------------------------------------------------
+ .to("file:/var/downloaded");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-s3://helloBucket?accessKey=yourAccessKey&secretKey=yourSecretKey&prefix=hello.txt"/>
+ <to uri="file:/var/downloaded"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-s3://helloBucket
+ parameters:
+ accessKey: yourAccessKey
+ secretKey: yourSecretKey
+ prefix: hello.txt
+ steps:
+ - to:
+ uri: file:/var/downloaded
+----
+====
=== Advanced AmazonS3 configuration
@@ -113,22 +144,53 @@ If your Camel Application is running behind a firewall or if you need to
have more control over the `S3Client` instance configuration, you can
create your own instance and refer to it in your Camel aws2-s3 component configuration:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-s3://MyBucket?amazonS3Client=#client&delay=5000&maxMessagesPerPoll=5")
-.to("mock:result");
---------------------------------------------------------------------------------
+ .to("mock:result");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-s3://MyBucket?amazonS3Client=#client&delay=5000&maxMessagesPerPoll=5"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-s3://MyBucket
+ parameters:
+ amazonS3Client: "#client"
+ delay: 5000
+ maxMessagesPerPoll: 5
+ steps:
+ - to:
+ uri: mock:result
+----
+====
=== Use KMS with the S3 component
To use AWS KMS to encrypt/decrypt data by using AWS infrastructure, you can use the options introduced in 2.21.x like in the following example
[source,java]
---------------------------------------------------------------------------------
+----
from("file:tmp/test?fileName=test.txt")
.setHeader(AWS2S3Constants.KEY, constant("testFile"))
.to("aws2-s3://mybucket?amazonS3Client=#client&useAwsKMS=true&awsKMSKeyId=3f0637ad-296a-3dfe-a796-e60654fb128c");
---------------------------------------------------------------------------------
+----
In this way, you'll ask S3 to use the KMS key 3f0637ad-296a-3dfe-a796-e60654fb128c, to encrypt the file test.txt.
When you ask to download this file, the decryption will be done directly before the download.
@@ -157,7 +219,7 @@ For more information about this you can look at https://docs.aws.amazon.com/sdk-
- Single Upload: This operation will upload a file to S3 based on the body content
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -168,14 +230,14 @@ For more information about this you can look at https://docs.aws.amazon.com/sdk-
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
This operation will upload the file camel.txt with the content "Camel rocks!" in the _mycamelbucket_ bucket
- Multipart Upload: This operation will perform a multipart upload of a file to S3 based on the body content
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -186,14 +248,14 @@ This operation will upload the file camel.txt with the content "Camel rocks!" in
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&multiPartUpload=true&autoCreateBucket=true&partSize=1048576")
.to("mock:result");
---------------------------------------------------------------------------------
+----
This operation will perform a multipart upload of the file empty.txt with based on the content the file src/empty.txt in the _mycamelbucket_ bucket
- CopyObject: this operation copies an object from one bucket to a different one
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -205,14 +267,14 @@ This operation will perform a multipart upload of the file empty.txt with based
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=copyObject")
.to("mock:result");
---------------------------------------------------------------------------------
+----
This operation will copy the object with the name expressed in the header camelDestinationKey to the camelDestinationBucket bucket, from the bucket _mycamelbucket_.
- DeleteObject: this operation deletes an object from a bucket
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -222,47 +284,146 @@ This operation will copy the object with the name expressed in the header camelD
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=deleteObject")
.to("mock:result");
---------------------------------------------------------------------------------
+----
This operation will delete the object camelKey from the bucket _mycamelbucket_.
- ListBuckets: this operation lists the buckets for this account in this region
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=listBuckets")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=listBuckets"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-s3://mycamelbucket
+ parameters:
+ amazonS3Client: "#amazonS3Client"
+ operation: listBuckets
+ - to:
+ uri: mock:result
+----
+====
This operation will list the buckets for this account
- DeleteBucket: this operation deletes the bucket specified as URI parameter or header
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=deleteBucket")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=deleteBucket"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-s3://mycamelbucket
+ parameters:
+ amazonS3Client: "#amazonS3Client"
+ operation: deleteBucket
+ - to:
+ uri: mock:result
+----
+====
This operation will delete the bucket _mycamelbucket_
- ListObjects: this operation list object in a specific bucket
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=listObjects")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=listObjects"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-s3://mycamelbucket
+ parameters:
+ amazonS3Client: "#amazonS3Client"
+ operation: listObjects
+ - to:
+ uri: mock:result
+----
+====
This operation will list the objects in the _mycamelbucket_ bucket
- GetObject: this operation gets a single object in a specific bucket
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -272,14 +433,14 @@ This operation will list the objects in the _mycamelbucket_ bucket
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getObject")
.to("mock:result");
---------------------------------------------------------------------------------
+----
This operation will return an S3Object instance related to the camelKey object in _mycamelbucket_ bucket.
- GetObjectRange: this operation gets a single object range in a specific bucket
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -291,14 +452,14 @@ This operation will return an S3Object instance related to the camelKey object i
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getObjectRange")
.to("mock:result");
---------------------------------------------------------------------------------
+----
This operation will return an S3Object instance related to the camelKey object in _mycamelbucket_ bucket, containing the bytes from 0 to 9.
- CreateDownloadLink: this operation will return a download link through S3 Presigner
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -308,7 +469,7 @@ This operation will return an S3Object instance related to the camelKey object i
})
.to("aws2-s3://mycamelbucket?accessKey=xxx&secretKey=yyy®ion=region&operation=createDownloadLink")
.to("mock:result");
---------------------------------------------------------------------------------
+----
This operation will return a download link url for the file camel-key in the bucket _mycamelbucket_ and region _region_.
Parameters (`accessKey`, `secretKey` and `region`) are mandatory for this operation, if S3 client is autowired from the registry.
@@ -317,19 +478,52 @@ NOTE: If checksum validations are enabled, the url will no longer be browser com
- HeadBucket: this operation checks if a bucket exists and you have permission to access it
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=headBucket")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=headBucket"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-s3://mycamelbucket
+ parameters:
+ amazonS3Client: "#amazonS3Client"
+ operation: headBucket
+ - to:
+ uri: mock:result
+----
+====
This operation will check if the bucket _mycamelbucket_ exists and is accessible.
- HeadObject: this operation retrieves metadata from an object without returning the object itself
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -339,14 +533,14 @@ This operation will check if the bucket _mycamelbucket_ exists and is accessible
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=headObject")
.to("mock:result");
---------------------------------------------------------------------------------
+----
This operation will return metadata about the object camelKey in the bucket _mycamelbucket_.
- DeleteObjects: this operation deletes multiple objects from a bucket in a single request
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -357,10 +551,10 @@ This operation will return metadata about the object camelKey in the bucket _myc
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=deleteObjects")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -371,14 +565,14 @@ This operation will return metadata about the object camelKey in the bucket _myc
parameters:
amazonS3Client: "#amazonS3Client"
operation: deleteObjects
---------------------------------------------------------------------------------
+----
This operation will delete the objects with keys key1, key2, and key3 from the bucket _mycamelbucket_.
- CreateUploadLink: this operation will return an upload link through S3 Presigner
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -388,10 +582,10 @@ This operation will delete the objects with keys key1, key2, and key3 from the b
})
.to("aws2-s3://mycamelbucket?accessKey=xxx&secretKey=yyy®ion=region&operation=createUploadLink")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -405,14 +599,14 @@ This operation will delete the objects with keys key1, key2, and key3 from the b
secretKey: yyy
region: region
operation: createUploadLink
---------------------------------------------------------------------------------
+----
This operation will return an upload link url for uploading to the bucket _mycamelbucket_.
- RestoreObject: this operation restores an archived object from Glacier storage
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -424,10 +618,10 @@ This operation will return an upload link url for uploading to the bucket _mycam
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=restoreObject")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -445,14 +639,14 @@ This operation will return an upload link url for uploading to the bucket _mycam
parameters:
amazonS3Client: "#amazonS3Client"
operation: restoreObject
---------------------------------------------------------------------------------
+----
This operation will restore the archived object camelKey from Glacier for 1 day using expedited retrieval.
- GetObjectTagging: this operation retrieves the tags associated with an object
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -462,10 +656,10 @@ This operation will restore the archived object camelKey from Glacier for 1 day
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getObjectTagging")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -477,14 +671,14 @@ This operation will restore the archived object camelKey from Glacier for 1 day
parameters:
amazonS3Client: "#amazonS3Client"
operation: getObjectTagging
---------------------------------------------------------------------------------
+----
This operation will return the tags for object camelKey in the bucket _mycamelbucket_.
- PutObjectTagging: this operation sets tags on an object
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -498,10 +692,10 @@ This operation will return the tags for object camelKey in the bucket _mycamelbu
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=putObjectTagging")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -512,14 +706,14 @@ This operation will return the tags for object camelKey in the bucket _mycamelbu
parameters:
amazonS3Client: "#amazonS3Client"
operation: putObjectTagging
---------------------------------------------------------------------------------
+----
This operation will set tags on the object camelKey in the bucket _mycamelbucket_.
- DeleteObjectTagging: this operation deletes all tags from an object
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -529,10 +723,10 @@ This operation will set tags on the object camelKey in the bucket _mycamelbucket
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=deleteObjectTagging")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -544,14 +738,14 @@ This operation will set tags on the object camelKey in the bucket _mycamelbucket
parameters:
amazonS3Client: "#amazonS3Client"
operation: deleteObjectTagging
---------------------------------------------------------------------------------
+----
This operation will delete all tags from the object camelKey in the bucket _mycamelbucket_.
- GetObjectAcl: this operation retrieves the access control list (ACL) for an object
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -561,10 +755,10 @@ This operation will delete all tags from the object camelKey in the bucket _myca
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getObjectAcl")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -576,14 +770,14 @@ This operation will delete all tags from the object camelKey in the bucket _myca
parameters:
amazonS3Client: "#amazonS3Client"
operation: getObjectAcl
---------------------------------------------------------------------------------
+----
This operation will return the ACL for object camelKey in the bucket _mycamelbucket_.
- PutObjectAcl: this operation sets the access control list (ACL) for an object
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -594,10 +788,10 @@ This operation will return the ACL for object camelKey in the bucket _mycamelbuc
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=putObjectAcl")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -612,60 +806,102 @@ This operation will return the ACL for object camelKey in the bucket _mycamelbuc
parameters:
amazonS3Client: "#amazonS3Client"
operation: putObjectAcl
---------------------------------------------------------------------------------
+----
This operation will set the ACL to public-read for object camelKey in the bucket _mycamelbucket_.
- CreateBucket: this operation creates a new S3 bucket
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mynewbucket?amazonS3Client=#amazonS3Client&operation=createBucket")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mynewbucket?amazonS3Client=#amazonS3Client&operation=createBucket"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
[source,yaml]
---------------------------------------------------------------------------------
-- from:
- uri: direct:start
+----
+- route:
+ from:
+ uri: direct:start
steps:
- to:
uri: aws2-s3://mynewbucket
parameters:
amazonS3Client: "#amazonS3Client"
operation: createBucket
---------------------------------------------------------------------------------
+ - to:
+ uri: mock:result
+----
+====
This operation will create a new bucket named _mynewbucket_ in the configured region.
- GetBucketTagging: this operation retrieves the tags associated with a bucket
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getBucketTagging")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getBucketTagging"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
[source,yaml]
---------------------------------------------------------------------------------
-- from:
- uri: direct:start
+----
+- route:
+ from:
+ uri: direct:start
steps:
- to:
uri: aws2-s3://mycamelbucket
parameters:
amazonS3Client: "#amazonS3Client"
operation: getBucketTagging
---------------------------------------------------------------------------------
+ - to:
+ uri: mock:result
+----
+====
This operation will return the tags for the bucket _mycamelbucket_.
- PutBucketTagging: this operation sets tags on a bucket
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -678,10 +914,10 @@ This operation will return the tags for the bucket _mycamelbucket_.
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=putBucketTagging")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -692,60 +928,102 @@ This operation will return the tags for the bucket _mycamelbucket_.
parameters:
amazonS3Client: "#amazonS3Client"
operation: putBucketTagging
---------------------------------------------------------------------------------
+----
This operation will set tags on the bucket _mycamelbucket_.
- DeleteBucketTagging: this operation deletes all tags from a bucket
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=deleteBucketTagging")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=deleteBucketTagging"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
[source,yaml]
---------------------------------------------------------------------------------
-- from:
- uri: direct:start
+----
+- route:
+ from:
+ uri: direct:start
steps:
- to:
uri: aws2-s3://mycamelbucket
parameters:
amazonS3Client: "#amazonS3Client"
operation: deleteBucketTagging
---------------------------------------------------------------------------------
+ - to:
+ uri: mock:result
+----
+====
This operation will delete all tags from the bucket _mycamelbucket_.
- GetBucketVersioning: this operation retrieves the versioning configuration of a bucket
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getBucketVersioning")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getBucketVersioning"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
[source,yaml]
---------------------------------------------------------------------------------
-- from:
- uri: direct:start
+----
+- route:
+ from:
+ uri: direct:start
steps:
- to:
uri: aws2-s3://mycamelbucket
parameters:
amazonS3Client: "#amazonS3Client"
operation: getBucketVersioning
---------------------------------------------------------------------------------
+ - to:
+ uri: mock:result
+----
+====
This operation will return the versioning configuration for the bucket _mycamelbucket_.
- PutBucketVersioning: this operation sets the versioning configuration of a bucket
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -755,10 +1033,10 @@ This operation will return the versioning configuration for the bucket _mycamelb
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=putBucketVersioning")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -770,37 +1048,58 @@ This operation will return the versioning configuration for the bucket _mycamelb
parameters:
amazonS3Client: "#amazonS3Client"
operation: putBucketVersioning
---------------------------------------------------------------------------------
+----
This operation will enable versioning on the bucket _mycamelbucket_.
- GetBucketPolicy: this operation retrieves the policy of a bucket
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getBucketPolicy")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=getBucketPolicy"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
[source,yaml]
---------------------------------------------------------------------------------
-- from:
- uri: direct:start
+----
+- route:
+ from:
+ uri: direct:start
steps:
- to:
uri: aws2-s3://mycamelbucket
parameters:
amazonS3Client: "#amazonS3Client"
operation: getBucketPolicy
---------------------------------------------------------------------------------
+ - to:
+ uri: mock:result
+----
+====
This operation will return the bucket policy for _mycamelbucket_ as a JSON string.
- PutBucketPolicy: this operation sets the policy on a bucket
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start").process(new Processor() {
@Override
@@ -818,10 +1117,10 @@ This operation will return the bucket policy for _mycamelbucket_ as a JSON strin
})
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=putBucketPolicy")
.to("mock:result");
---------------------------------------------------------------------------------
+----
[source,yaml]
---------------------------------------------------------------------------------
+----
- from:
uri: direct:start
steps:
@@ -832,30 +1131,51 @@ This operation will return the bucket policy for _mycamelbucket_ as a JSON strin
parameters:
amazonS3Client: "#amazonS3Client"
operation: putBucketPolicy
---------------------------------------------------------------------------------
+----
This operation will set a bucket policy on _mycamelbucket_.
- DeleteBucketPolicy: this operation deletes the policy from a bucket
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=deleteBucketPolicy")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&operation=deleteBucketPolicy"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
[source,yaml]
---------------------------------------------------------------------------------
-- from:
- uri: direct:start
+----
+- route:
+ from:
+ uri: direct:start
steps:
- to:
uri: aws2-s3://mycamelbucket
parameters:
amazonS3Client: "#amazonS3Client"
operation: deleteBucketPolicy
---------------------------------------------------------------------------------
+ - to:
+ uri: mock:result
+----
+====
This operation will delete the bucket policy from _mycamelbucket_.
@@ -864,7 +1184,7 @@ This operation will delete the bucket policy from _mycamelbucket_.
For making the producer work, you'll need at least PutObject and ListBuckets permissions. The following policy will be enough:
[source,json]
---------------------------------------------------------------------------------
+----
{
"Version": "2012-10-17",
"Statement": [
@@ -880,12 +1200,12 @@ For making the producer work, you'll need at least PutObject and ListBuckets per
}
]
}
---------------------------------------------------------------------------------
+----
A variation to the minimum permissions is related to the usage of Bucket autocreation. In that case the permissions will need to be increased with CreateBucket permission
[source,json]
---------------------------------------------------------------------------------
+----
{
"Version": "2012-10-17",
"Statement": [
@@ -906,14 +1226,14 @@ A variation to the minimum permissions is related to the usage of Bucket autocre
}
]
}
---------------------------------------------------------------------------------
+----
=== AWS S3 Consumer minimum permissions
For making the producer work, you'll need at least GetObject, ListBuckets and DeleteObject permissions. The following policy will be enough:
[source,json]
---------------------------------------------------------------------------------
+----
{
"Version": "2012-10-17",
"Statement": [
@@ -934,7 +1254,7 @@ For making the producer work, you'll need at least GetObject, ListBuckets and De
}
]
}
---------------------------------------------------------------------------------
+----
By Default the consumer will use the deleteAfterRead option, this means the object will be deleted once consumed, this is why the DeleteObject permission is required.
@@ -950,7 +1270,7 @@ Additionally, streaming upload mode supports timestamp-based file grouping, whic
As an example:
[source,java]
---------------------------------------------------------------------------------
+----
from(kafka("topic1").brokers("localhost:9092"))
.log("Kafka Message is: ${body}")
.to(aws2S3("camel-bucket").streamingUploadMode(true).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic1}}/{{kafkaTopic1}}.txt"));
@@ -958,7 +1278,7 @@ from(kafka("topic1").brokers("localhost:9092"))
from(kafka("topic2").brokers("localhost:9092"))
.log("Kafka Message is: ${body}")
.to(aws2S3("camel-bucket").streamingUploadMode(true).batchMessageNumber(25).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.random).keyName("{{kafkaTopic2}}/{{kafkaTopic2}}.txt"));
---------------------------------------------------------------------------------
+----
The default size for a batch is 1 Mb, but you can adjust it according to your requirements.
@@ -996,11 +1316,11 @@ In this way, the upload completion will be passed on three tiers: the timeout, t
As an example:
[source,java]
---------------------------------------------------------------------------------
+----
from(kafka("topic1").brokers("localhost:9092"))
.log("Kafka Message is: ${body}")
.to(aws2S3("camel-bucket").streamingUploadMode(true).batchMessageNumber(25).streamingUploadTimeout(10000).namingStrategy(AWS2S3EndpointBuilderFactory.AWSS3NamingStrategyEnum.progressive).keyName("{{kafkaTopic1}}/{{kafkaTopic1}}.txt"));
---------------------------------------------------------------------------------
+----
In this case, the upload will be completed after 10 seconds.
@@ -1027,7 +1347,7 @@ Files are automatically named using a timestamp-based pattern that includes the
Basic timestamp grouping with 5-minute windows:
[source,java]
---------------------------------------------------------------------------------
+----
from("timer:messages?period=10000")
.setHeader(Exchange.MESSAGE_TIMESTAMP, simple("${date:now:timestamp}"))
.setBody(constant("Message with timestamp"))
@@ -1035,12 +1355,12 @@ from("timer:messages?period=10000")
+ "×tampGroupingEnabled=true"
+ "×tampWindowSizeMillis=300000"
+ "&keyName=grouped-messages.txt");
---------------------------------------------------------------------------------
+----
Custom window size (1 minute) with custom header name:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:timestamped")
.setHeader("MyTimestamp", simple("${date:now:timestamp}"))
.setBody("Custom timestamped message")
@@ -1049,12 +1369,12 @@ from("direct:timestamped")
+ "×tampWindowSizeMillis=60000"
+ "×tampHeaderName=MyTimestamp"
+ "&keyName=custom-grouped.txt");
---------------------------------------------------------------------------------
+----
Large files with multipart and timestamp grouping:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:large-timestamped")
.setHeader(Exchange.MESSAGE_TIMESTAMP, simple("${date:now:timestamp}"))
.setBody("Large message content...")
@@ -1064,7 +1384,7 @@ from("direct:large-timestamped")
+ "&multiPartUpload=true"
+ "&partSize=5242880" // 5MB parts
+ "&keyName=large-grouped.txt");
---------------------------------------------------------------------------------
+----
===== File Naming
@@ -1120,11 +1440,42 @@ original bucket.
In addition to deleteAfterRead, it has been added another option, moveAfterRead. With this option enabled, the consumed object will be moved to a target destinationBucket instead of being only deleted.
This will require specifying the destinationBucket option. As example:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&moveAfterRead=true&destinationBucket=myothercamelbucket")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&moveAfterRead=true&destinationBucket=myothercamelbucket"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-s3://mycamelbucket
+ parameters:
+ amazonS3Client: "#amazonS3Client"
+ moveAfterRead: true
+ destinationBucket: myothercamelbucket
+ steps:
+ - to:
+ uri: mock:result
+----
+====
In this case, the objects consumed will be moved to _myothercamelbucket_ bucket and deleted from the original one (because of deleteAfterRead set to true as default).
@@ -1135,12 +1486,12 @@ Both options support the xref:languages:simple-language.adoc[Simple] expression
Wrap an expression in `RAW()` to prevent the Camel URI parser from interpreting special characters:
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&moveAfterRead=true"
+ "&destinationBucket=myothercamelbucket"
+ "&destinationBucketPrefix=RAW(pre-)&destinationBucketSuffix=RAW(-suff)")
.to("mock:result");
---------------------------------------------------------------------------------
+----
In this case, an object named `test` is moved to `myothercamelbucket` with the key `pre-test-suff`.
@@ -1148,12 +1499,12 @@ Using a Simple expression, you can build dynamic paths at runtime.
The following example organises moved objects by date:
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&moveAfterRead=true"
+ "&destinationBucket=myothercamelbucket"
+ "&destinationBucketPrefix=RAW(${date:now:yyyy/MM/dd}/)")
.to("mock:result");
---------------------------------------------------------------------------------
+----
An object named `report.csv` consumed on 2026-05-19 is moved with the key `2026/05/19/report.csv`.
Expressions are evaluated once per exchange, so each message can produce a different destination key.
@@ -1164,11 +1515,42 @@ Expressions are evaluated once per exchange, so each message can produce a diffe
You can configure the consumer to only process objects with a specific prefix:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&prefix=processed/&delay=30000")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&prefix=processed/&delay=30000"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-s3://mycamelbucket
+ parameters:
+ amazonS3Client: "#amazonS3Client"
+ prefix: processed/
+ delay: 30000
+ steps:
+ - to:
+ uri: mock:result
+----
+====
This will only consume objects that start with "processed/" prefix from the _mycamelbucket_ bucket, with a 30-second polling delay.
@@ -1176,11 +1558,43 @@ This will only consume objects that start with "processed/" prefix from the _myc
Configure custom polling intervals and batch sizes:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&delay=60000&maxMessagesPerPoll=5&includeBody=false")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&delay=60000&maxMessagesPerPoll=5&includeBody=false"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-s3://mycamelbucket
+ parameters:
+ amazonS3Client: "#amazonS3Client"
+ delay: 60000
+ maxMessagesPerPoll: 5
+ includeBody: false
+ steps:
+ - to:
+ uri: mock:result
+----
+====
This consumer polls every 60 seconds, processes up to 5 objects per poll, and doesn't include the object body in the message (only metadata).
@@ -1188,11 +1602,42 @@ This consumer polls every 60 seconds, processes up to 5 objects per poll, and do
Configure the consumer to not delete files after reading and include specific file patterns:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&deleteAfterRead=false&fileName=*.pdf")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&deleteAfterRead=false&fileName=*.pdf"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-s3://mycamelbucket
+ parameters:
+ amazonS3Client: "#amazonS3Client"
+ deleteAfterRead: false
+ fileName: "*.pdf"
+ steps:
+ - to:
+ uri: mock:result
+----
+====
This consumer will read PDF files but won't delete them after processing.
@@ -1200,11 +1645,41 @@ This consumer will read PDF files but won't delete them after processing.
Use a done file pattern to ensure files are completely uploaded before processing:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&doneFileName=*.done")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="aws2-s3://mycamelbucket?amazonS3Client=#amazonS3Client&doneFileName=*.done"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: aws2-s3://mycamelbucket
+ parameters:
+ amazonS3Client: "#amazonS3Client"
+ doneFileName: "*.done"
+ steps:
+ - to:
+ uri: mock:result
+----
+====
This consumer will only process files when a corresponding .done file exists in the bucket.
@@ -1213,7 +1688,7 @@ This consumer will only process files when a corresponding .done file exists in
We introduced also the customer key support (an alternative of using KMS). The following code shows an example.
[source,java]
---------------------------------------------------------------------------------
+----
String key = UUID.randomUUID().toString();
byte[] secretKey = generateSecretKey();
String b64Key = Base64.getEncoder().encodeToString(secretKey);
@@ -1225,7 +1700,7 @@ from("direct:putObject")
.setHeader(AWS2S3Constants.KEY, constant("test.txt"))
.setBody(constant("Test"))
.to(awsEndpoint);
---------------------------------------------------------------------------------
+----
=== Using a POJO as body
@@ -1233,11 +1708,11 @@ Sometimes building an AWS Request can be complex because of multiple options. We
In AWS S3 there are multiple operations you can submit, as an example for List brokers request, you can do something like:
[source,java]
-------------------------------------------------------------------------------------------------------
+--------------------------
from("direct:aws2-s3")
.setBody(ListObjectsV2Request.builder().bucket(bucketName).build())
.to("aws2-s3://test?amazonS3Client=#amazonS3Client&operation=listObjects&pojoRequest=true")
-------------------------------------------------------------------------------------------------------
+--------------------------
In this way, you'll pass the request directly without the need of passing headers and options specifically related to this operation.
@@ -1247,7 +1722,7 @@ Sometimes you would want to perform some advanced configuration using AWS2S3Conf
You can create and set the S3 client in the component configuration as shown in the following example
[source,java]
---------------------------------------------------------------------------------
+----
String awsBucketAccessKey = "your_access_key";
String awsBucketSecretKey = "your_secret_key";
@@ -1259,18 +1734,18 @@ configuration.setAmazonS3Client(s3Client);
configuration.setAutoDiscoverClient(true);
configuration.setBucketName("s3bucket2020");
configuration.setRegion("us-east-1");
---------------------------------------------------------------------------------
+----
Now you can configure the S3 component (using the configuration object created above) and add it to the registry in the
configure method before initialization of routes.
[source,java]
---------------------------------------------------------------------------------
+----
AWS2S3Component s3Component = new AWS2S3Component(getContext());
s3Component.setConfiguration(configuration);
s3Component.setLazyStartProducer(true);
camelContext.addComponent("aws2-s3", s3Component);
---------------------------------------------------------------------------------
+----
Now your component will be used for all the operations implemented in camel routes.
@@ -1279,7 +1754,7 @@ Now your component will be used for all the operations implemented in camel rout
For storing and retrieving objects from/to Dell ECS, both of the `forcePathStyle` and `overrideEndpoint` options need to be set to `true` and using the `uriEndpointOverride` you need to provide your own ECS endpoint.
[source,java]
---------------------------------------------------------------------------------
+----
String awsBucketAccessKey = "your_access_key";
String awsBucketSecretKey = "your_secret_key";
@@ -1290,7 +1765,7 @@ AWS2S3Configuration configuration = new AWS2S3Configuration();
configuration.setForcePathStyle(true);
configuration.setOverrideEndpoint(true);
configuration.setUriEndpointOverride("http://ecs1.emc.com:9020");
---------------------------------------------------------------------------------
+----
For more details see https://www.dell.com/support/manuals/en-us/ecs-appliance-/ecs_pub_data_access_guide_3_3_to_3_6/using-the-java-amazon-sdk?guid=guid-149be134-6938-4cd7-9503-cf3ca9d23261&lang=en-us[their documentation].
diff --git a/components/camel-aws/camel-aws2-ses/src/main/docs/aws2-ses-component.adoc b/components/camel-aws/camel-aws2-ses/src/main/docs/aws2-ses-component.adoc
index 690e7634c343..c9662ec1d1e2 100644
--- a/components/camel-aws/camel-aws2-ses/src/main/docs/aws2-ses-component.adoc
+++ b/components/camel-aws/camel-aws2-ses/src/main/docs/aws2-ses-component.adoc
@@ -73,11 +73,40 @@ If you need more control over the `SesClient` instance
configuration you can create your own instance and refer to it from the
URI:
+[tabs]
+====
+Java::
++
[source,java]
--------------------------------------------------------------
+----
from("direct:start")
-.to("aws2-ses://example@example.com?amazonSESClient=#client");
--------------------------------------------------------------
+ .to("aws2-ses://example@example.com?amazonSESClient=#client");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-ses://example@example.com?amazonSESClient=#client"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-ses://example@example.com
+ parameters:
+ amazonSESClient: "#client"
+----
+====
The `#client` refers to a `SesClient` in the Registry.
diff --git a/components/camel-aws/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc b/components/camel-aws/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc
index 2f55b027b82c..50afc122106e 100644
--- a/components/camel-aws/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc
+++ b/components/camel-aws/camel-aws2-sns/src/main/docs/aws2-sns-component.adoc
@@ -79,11 +79,40 @@ For more information about this you can look at https://docs.aws.amazon.com/sdk-
If you need more control over the `SnsClient` instance configuration you
can create your own instance and refer to it from the URI:
+[tabs]
+====
+Java::
++
[source,java]
--------------------------------------------------
+----
from("direct:start")
-.to("aws2-sns://MyTopic?amazonSNSClient=#client");
--------------------------------------------------
+ .to("aws2-sns://MyTopic?amazonSNSClient=#client");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-sns://MyTopic?amazonSNSClient=#client"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-sns://MyTopic
+ parameters:
+ amazonSNSClient: "#client"
+----
+====
The `#client` refers to a `AmazonSNS` in the
Registry.
@@ -92,11 +121,42 @@ Registry.
You can create a subscription of an SQS Queue to an SNS Topic in this way:
+[tabs]
+====
+Java::
++
[source,java]
--------------------------------------------------
+----
from("direct:start")
-.to("aws2-sns://test-camel-sns1?amazonSNSClient=#amazonSNSClient&subscribeSNStoSQS=true&queueArn=arn:aws:sqs:eu-central-1:123456789012:test_camel");
--------------------------------------------------
+ .to("aws2-sns://test-camel-sns1?amazonSNSClient=#amazonSNSClient&subscribeSNStoSQS=true&queueArn=arn:aws:sqs:eu-central-1:123456789012:test_camel");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-sns://test-camel-sns1?amazonSNSClient=#amazonSNSClient&subscribeSNStoSQS=true&queueArn=arn:aws:sqs:eu-central-1:123456789012:test_camel"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-sns://test-camel-sns1
+ parameters:
+ amazonSNSClient: "#amazonSNSClient"
+ subscribeSNStoSQS: true
+ queueArn: "arn:aws:sqs:eu-central-1:123456789012:test_camel"
+----
+====
The `#amazonSNSClient` refers to a `SnsClient` in the Registry.
By specifying `subscribeSNStoSQS` to true and a `queueArn` of an existing SQS Queue,
@@ -177,11 +237,41 @@ This behavior ensures compatibility with AWS SNS constraints while allowing seam
Sending to a topic
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
- .to("aws2-sns://camel-topic?subject=The+subject+message&autoCreateTopic=true");
---------------------------------------------------------------------------------
+ .to("aws2-sns://camel-topic?subject=The+subject+message&autoCreateTopic=true");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="aws2-sns://camel-topic?subject=The+subject+message&autoCreateTopic=true"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: aws2-sns://camel-topic
+ parameters:
+ subject: "The+subject+message"
+ autoCreateTopic: true
+----
+====
Sending batch to a topic
diff --git a/components/camel-aws/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc b/components/camel-aws/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc
index f210541f96c1..231962e8676c 100644
--- a/components/camel-aws/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc
+++ b/components/camel-aws/camel-aws2-sqs/src/main/docs/aws2-sqs-component.adoc
@@ -156,12 +156,48 @@ instruct Camel to send the DeleteMessage, if being filtered.
=== Send Message
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:start")
- .setBody(constant("Camel rocks!"))
- .to("aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)®ion=eu-west-1");
-------------------------------------------------------------------------------------------------------
+ .setBody(constant("Camel rocks!"))
+ .to("aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)®ion=eu-west-1");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <setBody>
+ <constant>Camel rocks!</constant>
+ </setBody>
+ <to uri="aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)&region=eu-west-1"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - setBody:
+ constant: "Camel rocks!"
+ - to:
+ uri: aws2-sqs://camel-1
+ parameters:
+ accessKey: RAW(xxx)
+ secretKey: RAW(xxx)
+ region: eu-west-1
+----
+====
=== Send Batch Message
@@ -192,13 +228,56 @@ The id set on each message of the batch will be a Random UUID.
Use deleteMessage operation to delete a single message. You'll need to set a receipt handle header for the message you want to delete.
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:start")
- .setHeader(SqsConstants.SQS_OPERATION, constant("deleteMessage"))
- .setHeader(SqsConstants.RECEIPT_HANDLE, constant("123456"))
- .to("aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)®ion=eu-west-1");
-------------------------------------------------------------------------------------------------------
+ .setHeader(SqsConstants.SQS_OPERATION, constant("deleteMessage"))
+ .setHeader(SqsConstants.RECEIPT_HANDLE, constant("123456"))
+ .to("aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)®ion=eu-west-1");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <setHeader name="CamelAwsSqsOperation">
+ <constant>deleteMessage</constant>
+ </setHeader>
+ <setHeader name="CamelAwsSqsReceiptHandle">
+ <constant>123456</constant>
+ </setHeader>
+ <to uri="aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)&region=eu-west-1"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - setHeader:
+ name: CamelAwsSqsOperation
+ constant: deleteMessage
+ - setHeader:
+ name: CamelAwsSqsReceiptHandle
+ constant: "123456"
+ - to:
+ uri: aws2-sqs://camel-1
+ parameters:
+ accessKey: RAW(xxx)
+ secretKey: RAW(xxx)
+ region: eu-west-1
+----
+====
As result, you'll get an exchange containing a `DeleteMessageResponse` instance, that you can use to check if the message was deleted or not.
@@ -206,12 +285,49 @@ As result, you'll get an exchange containing a `DeleteMessageResponse` instance,
Use listQueues operation to list queues.
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:start")
- .setHeader(SqsConstants.SQS_OPERATION, constant("listQueues"))
- .to("aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)®ion=eu-west-1");
-------------------------------------------------------------------------------------------------------
+ .setHeader(SqsConstants.SQS_OPERATION, constant("listQueues"))
+ .to("aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)®ion=eu-west-1");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <setHeader name="CamelAwsSqsOperation">
+ <constant>listQueues</constant>
+ </setHeader>
+ <to uri="aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)&region=eu-west-1"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - setHeader:
+ name: CamelAwsSqsOperation
+ constant: listQueues
+ - to:
+ uri: aws2-sqs://camel-1
+ parameters:
+ accessKey: RAW(xxx)
+ secretKey: RAW(xxx)
+ region: eu-west-1
+----
+====
As result, you'll get an exchange containing a `ListQueuesResponse` instance, that you can examine to check the actual queues.
@@ -219,12 +335,49 @@ As result, you'll get an exchange containing a `ListQueuesResponse` instance, th
Use purgeQueue operation to purge queue.
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------------------------------------------
+----
from("direct:start")
- .setHeader(SqsConstants.SQS_OPERATION, constant("purgeQueue"))
- .to("aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)®ion=eu-west-1");
-------------------------------------------------------------------------------------------------------
+ .setHeader(SqsConstants.SQS_OPERATION, constant("purgeQueue"))
+ .to("aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)®ion=eu-west-1");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <setHeader name="CamelAwsSqsOperation">
+ <constant>purgeQueue</constant>
+ </setHeader>
+ <to uri="aws2-sqs://camel-1?accessKey=RAW(xxx)&secretKey=RAW(xxx)&region=eu-west-1"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - setHeader:
+ name: CamelAwsSqsOperation
+ constant: purgeQueue
+ - to:
+ uri: aws2-sqs://camel-1
+ parameters:
+ accessKey: RAW(xxx)
+ secretKey: RAW(xxx)
+ region: eu-west-1
+----
+====
As result you'll get an exchange containing a `PurgeQueueResponse` instance.
diff --git a/components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc b/components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc
index d5f94d8b30d8..8c0d52b9088f 100644
--- a/components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc
+++ b/components/camel-aws/camel-aws2-step-functions/src/main/docs/aws2-step-functions-component.adoc
@@ -103,11 +103,41 @@ Camel-AWS Step Functions component provides the following operation on the produ
- createStateMachine: this operation will create a state machine
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createStateMachine")
- .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=createMachine")
---------------------------------------------------------------------------------
+ .to("aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=createMachine");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createStateMachine"/>
+ <to uri="aws2-step-functions://test?awsSfnClient=#awsSfnClient&operation=createMachine"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createStateMachine
+ steps:
+ - to:
+ uri: aws2-step-functions://test
+ parameters:
+ awsSfnClient: "#awsSfnClient"
+ operation: createMachine
+----
+====
=== Using a POJO as body
diff --git a/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc b/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
index 037b481838ec..81f66349c4ee 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
+++ b/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
@@ -88,30 +88,138 @@ Camel-AWS STS component provides the following operation on the producer side:
- assumeRole: this operation will make an AWS user assume a different role temporary
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:assumeRole")
.setHeader(STS2Constants.ROLE_ARN, constant("arn:123"))
.setHeader(STS2Constants.ROLE_SESSION_NAME, constant("groot"))
- .to("aws2-sts://test?stsClient=#amazonSTSClient&operation=assumeRole")
---------------------------------------------------------------------------------
+ .to("aws2-sts://test?stsClient=#amazonSTSClient&operation=assumeRole");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:assumeRole"/>
+ <setHeader name="CamelAwsStsRoleArn">
+ <constant>arn:123</constant>
+ </setHeader>
+ <setHeader name="CamelAwsStsRoleSessionName">
+ <constant>groot</constant>
+ </setHeader>
+ <to uri="aws2-sts://test?stsClient=#amazonSTSClient&operation=assumeRole"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:assumeRole
+ steps:
+ - setHeader:
+ name: CamelAwsStsRoleArn
+ constant: "arn:123"
+ - setHeader:
+ name: CamelAwsStsRoleSessionName
+ constant: groot
+ - to:
+ uri: aws2-sts://test
+ parameters:
+ stsClient: "#amazonSTSClient"
+ operation: assumeRole
+----
+====
- getSessionToken: this operation will return a temporary session token
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getSessionToken")
- .to("aws2-sts://test?stsClient=#amazonSTSClient&operation=getSessionToken")
---------------------------------------------------------------------------------
+ .to("aws2-sts://test?stsClient=#amazonSTSClient&operation=getSessionToken");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getSessionToken"/>
+ <to uri="aws2-sts://test?stsClient=#amazonSTSClient&operation=getSessionToken"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getSessionToken
+ steps:
+ - to:
+ uri: aws2-sts://test
+ parameters:
+ stsClient: "#amazonSTSClient"
+ operation: getSessionToken
+----
+====
- getFederationToken: this operation will return a temporary federation token
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getFederationToken")
.setHeader(STS2Constants.FEDERATED_NAME, constant("federation-account"))
- .to("aws2-sts://test?stsClient=#amazonSTSClient&operation=getSessionToken")
---------------------------------------------------------------------------------
+ .to("aws2-sts://test?stsClient=#amazonSTSClient&operation=getFederationToken");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:getFederationToken"/>
+ <setHeader name="CamelAwsStsFederatedName">
+ <constant>federation-account</constant>
+ </setHeader>
+ <to uri="aws2-sts://test?stsClient=#amazonSTSClient&operation=getFederationToken"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:getFederationToken
+ steps:
+ - setHeader:
+ name: CamelAwsStsFederatedName
+ constant: federation-account
+ - to:
+ uri: aws2-sts://test
+ parameters:
+ stsClient: "#amazonSTSClient"
+ operation: getFederationToken
+----
+====
=== Using a POJO as body
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/docs/aws2-timestream-component.adoc b/components/camel-aws/camel-aws2-timestream/src/main/docs/aws2-timestream-component.adoc
index c16df9668a48..28d07a4e5224 100644
--- a/components/camel-aws/camel-aws2-timestream/src/main/docs/aws2-timestream-component.adoc
+++ b/components/camel-aws/camel-aws2-timestream/src/main/docs/aws2-timestream-component.adoc
@@ -128,23 +128,101 @@ Camel-AWS Timestream component provides the following operation on the producer
* Write Operation
** createDatabase: this operation will create a timestream database
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createDatabase")
.setHeader(Timestream2Constants.DATABASE_NAME, constant("testDb"))
.setHeader(Timestream2Constants.KMS_KEY_ID, constant("testKmsKey"))
- .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createDatabase")
---------------------------------------------------------------------------------
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createDatabase");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:createDatabase"/>
+ <setHeader name="CamelAwsTimestreamDatabaseName">
+ <constant>testDb</constant>
+ </setHeader>
+ <setHeader name="CamelAwsTimestreamKmsKeyId">
+ <constant>testKmsKey</constant>
+ </setHeader>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createDatabase"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createDatabase
+ steps:
+ - setHeader:
+ name: CamelAwsTimestreamDatabaseName
+ constant: testDb
+ - setHeader:
+ name: CamelAwsTimestreamKmsKeyId
+ constant: testKmsKey
+ - to:
+ uri: aws2-timestream://write:test
+ parameters:
+ awsTimestreamWriteClient: "#awsTimestreamWriteClient"
+ operation: createDatabase
+----
+====
* Query Operation
** query: this operation will execute a timestream query
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:query")
.setHeader(Timestream2Constants.QUERY_STRING, constant("SELECT * FROM testDb.testTable ORDER BY time DESC LIMIT 10"))
- .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=query")
---------------------------------------------------------------------------------
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=query");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:query"/>
+ <setHeader name="CamelAwsTimestreamQueryString">
+ <constant>SELECT * FROM testDb.testTable ORDER BY time DESC LIMIT 10</constant>
+ </setHeader>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=query"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:query
+ steps:
+ - setHeader:
+ name: CamelAwsTimestreamQueryString
+ constant: "SELECT * FROM testDb.testTable ORDER BY time DESC LIMIT 10"
+ - to:
+ uri: aws2-timestream://query:test
+ parameters:
+ awsTimestreamQueryClient: "#awsTimestreamQueryClient"
+ operation: query
+----
+====
=== Using a POJO as body
diff --git a/components/camel-azure/camel-azure-cosmosdb/src/main/docs/azure-cosmosdb-component.adoc b/components/camel-azure/camel-azure-cosmosdb/src/main/docs/azure-cosmosdb-component.adoc
index dc55cb92a2b8..2b9a4f86e7fa 100644
--- a/components/camel-azure/camel-azure-cosmosdb/src/main/docs/azure-cosmosdb-component.adoc
+++ b/components/camel-azure/camel-azure-cosmosdb/src/main/docs/azure-cosmosdb-component.adoc
@@ -168,22 +168,87 @@ Refer to the example section in this page to learn how to use these operations i
For example, to consume records from a specific container in a specific database to a file, use the following snippet:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("azure-cosmosdb://camelDb/myContainer?accountKey=MyaccountKey&databaseEndpoint=https//myazure.com:443&leaseDatabaseName=myLeaseDB&createLeaseDatabaseIfNotExists=true&createLeaseContainerIfNotExists=true").
-to("file://directory");
---------------------------------------------------------------------------------
+----
+from("azure-cosmosdb://camelDb/myContainer?accountKey=MyaccountKey&databaseEndpoint=https//myazure.com:443&leaseDatabaseName=myLeaseDB&createLeaseDatabaseIfNotExists=true&createLeaseContainerIfNotExists=true")
+ .to("file://directory");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-cosmosdb://camelDb/myContainer?accountKey=MyaccountKey&databaseEndpoint=https//myazure.com:443&leaseDatabaseName=myLeaseDB&createLeaseDatabaseIfNotExists=true&createLeaseContainerIfNotExists=true"/>
+ <to uri="file://directory"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-cosmosdb://camelDb/myContainer
+ parameters:
+ accountKey: MyaccountKey
+ databaseEndpoint: "https//myazure.com:443"
+ leaseDatabaseName: myLeaseDB
+ createLeaseDatabaseIfNotExists: true
+ createLeaseContainerIfNotExists: true
+ steps:
+ - to:
+ uri: file://directory
+----
+====
=== Operations
- `listDatabases`:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
- .to("azure-cosmosdb://?operation=listDatabases")
- .to("mock:result");
---------------------------------------------------------------------------------
+ .to("azure-cosmosdb://?operation=listDatabases")
+ .to("mock:result");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="azure-cosmosdb://?operation=listDatabases"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: azure-cosmosdb://
+ parameters:
+ operation: listDatabases
+ - to:
+ uri: mock:result
+----
+====
- `createDatabase`:
@@ -360,11 +425,42 @@ The consumer will set `List<Map<String,>>` in exchange message body which reflec
For example, to listen to the events in `myContainer` container in `myDb`:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("azure-cosmosdb://myDb/myContainer?leaseDatabaseName=myLeaseDb&createLeaseDatabaseIfNotExists=true&createLeaseContainerIfNotExists=true")
- .to("mock:result");
---------------------------------------------------------------------------------
+ .to("mock:result");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-cosmosdb://myDb/myContainer?leaseDatabaseName=myLeaseDb&createLeaseDatabaseIfNotExists=true&createLeaseContainerIfNotExists=true"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-cosmosdb://myDb/myContainer
+ parameters:
+ leaseDatabaseName: myLeaseDb
+ createLeaseDatabaseIfNotExists: true
+ createLeaseContainerIfNotExists: true
+ steps:
+ - to:
+ uri: mock:result
+----
+====
== Important Development Notes
diff --git a/components/camel-azure/camel-azure-eventhubs/src/main/docs/azure-eventhubs-component.adoc b/components/camel-azure/camel-azure-eventhubs/src/main/docs/azure-eventhubs-component.adoc
index ef333d640827..9f38d4e18e10 100644
--- a/components/camel-azure/camel-azure-eventhubs/src/main/docs/azure-eventhubs-component.adoc
+++ b/components/camel-azure/camel-azure-eventhubs/src/main/docs/azure-eventhubs-component.adoc
@@ -114,11 +114,44 @@ This may be really useful for smarter configuration of the endpoint.
To consume events:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("azure-eventhubs:/camel/camelHub?sharedAccessName=SASaccountName&sharedAccessKey=SASaccessKey&blobAccountName=accountName&blobAccessKey=accessKey&blobContainerName=containerName")
.to("file://queuedirectory");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-eventhubs:/camel/camelHub?sharedAccessName=SASaccountName&sharedAccessKey=SASaccessKey&blobAccountName=accountName&blobAccessKey=accessKey&blobContainerName=containerName"/>
+ <to uri="file://queuedirectory"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-eventhubs:/camel/camelHub
+ parameters:
+ sharedAccessName: SASaccountName
+ sharedAccessKey: SASaccessKey
+ blobAccountName: accountName
+ blobAccessKey: accessKey
+ blobContainerName: containerName
+ steps:
+ - to:
+ uri: file://queuedirectory
+----
+====
=== Producer Example
diff --git a/components/camel-azure/camel-azure-servicebus/src/main/docs/azure-servicebus-component.adoc b/components/camel-azure/camel-azure-servicebus/src/main/docs/azure-servicebus-component.adoc
index ba6c8d1074e0..4ff85e6589f0 100644
--- a/components/camel-azure/camel-azure-servicebus/src/main/docs/azure-servicebus-component.adoc
+++ b/components/camel-azure/camel-azure-servicebus/src/main/docs/azure-servicebus-component.adoc
@@ -143,18 +143,83 @@ from("direct:start")
- `receiveMessages`
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("azure-servicebus:test//?connectionString=test")
.log("${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-servicebus:test//?connectionString=test"/>
+ <log message="${body}"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-servicebus:test//
+ parameters:
+ connectionString: test
+ steps:
+ - log:
+ message: "${body}"
+ - to:
+ uri: mock:result
+----
+====
+
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("azure-servicebus:test//?connectionString=test&sessionEnabled=true")
.log("${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-servicebus:test//?connectionString=test&sessionEnabled=true"/>
+ <log message="${body}"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-servicebus:test//
+ parameters:
+ connectionString: test
+ sessionEnabled: true
+ steps:
+ - log:
+ message: "${body}"
+ - to:
+ uri: mock:result
+----
+====
include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc b/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
index fcdc6e93dda8..3024456ed44f 100644
--- a/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
+++ b/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
@@ -74,11 +74,42 @@ can be used to retrieve lower level clients.
For example, to download a blob content from the block blob `hello.txt`
located on the `container1` in the `camelazure` storage account, use the following snippet:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("azure-storage-blob://camelazure/container1?blobName=hello.txt&credentialType=SHARED_ACCOUNT_KEY&accessKey=RAW(yourAccessKey)").
-to("file://blobdirectory");
---------------------------------------------------------------------------------
+----
+from("azure-storage-blob://camelazure/container1?blobName=hello.txt&credentialType=SHARED_ACCOUNT_KEY&accessKey=RAW(yourAccessKey)")
+ .to("file://blobdirectory");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-storage-blob://camelazure/container1?blobName=hello.txt&credentialType=SHARED_ACCOUNT_KEY&accessKey=RAW(yourAccessKey)"/>
+ <to uri="file://blobdirectory"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-storage-blob://camelazure/container1
+ parameters:
+ blobName: hello.txt
+ credentialType: SHARED_ACCOUNT_KEY
+ accessKey: RAW(yourAccessKey)
+ steps:
+ - to:
+ uri: file://blobdirectory
+----
+====
=== Advanced Azure Storage Blob configuration
@@ -101,11 +132,41 @@ context.getRegistry().bind("client", client);
Then refer to this instance in your Camel `azure-storage-blob` component configuration:
+[tabs]
+====
+Java::
++
[source,java]
-----------------------------------------------------------------------
from("azure-storage-blob://cameldev/container1?blobName=myblob&serviceClient=#client")
-.to("mock:result");
+ .to("mock:result");
+-----------------------------------------------------------------------
+
+XML::
++
+[source,xml]
+-----------------------------------------------------------------------
+<route>
+ <from uri="azure-storage-blob://cameldev/container1?blobName=myblob&serviceClient=#client"/>
+ <to uri="mock:result"/>
+</route>
+-----------------------------------------------------------------------
+
+YAML::
++
+[source,yaml]
-----------------------------------------------------------------------
+- route:
+ from:
+ uri: azure-storage-blob://cameldev/container1
+ parameters:
+ blobName: myblob
+ serviceClient: "#client"
+ steps:
+ - to:
+ uri: mock:result
+-----------------------------------------------------------------------
+====
=== Automatic detection of BlobServiceClient client in registry
@@ -182,28 +243,122 @@ Refer to the example section in this page to learn how to use these operations i
=== Consumer Examples
To consume a blob into a file using the file component, this can be done like this:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("azure-storage-blob://camelazure/container1?blobName=hello.txt&accountName=yourAccountName&accessKey=yourAccessKey").
-to("file://blobdirectory");
---------------------------------------------------------------------------------
+----
+from("azure-storage-blob://camelazure/container1?blobName=hello.txt&accountName=yourAccountName&accessKey=yourAccessKey")
+ .to("file://blobdirectory");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-storage-blob://camelazure/container1?blobName=hello.txt&accountName=yourAccountName&accessKey=yourAccessKey"/>
+ <to uri="file://blobdirectory"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-storage-blob://camelazure/container1
+ parameters:
+ blobName: hello.txt
+ accountName: yourAccountName
+ accessKey: yourAccessKey
+ steps:
+ - to:
+ uri: file://blobdirectory
+----
+====
However, you can also write to file directly without using the file component, you will need to specify `fileDir` folder path to save your blob in your machine.
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("azure-storage-blob://camelazure/container1?blobName=hello.txt&accountName=yourAccountName&accessKey=yourAccessKey&fileDir=/var/to/awesome/dir").
-to("mock:results");
---------------------------------------------------------------------------------
+----
+from("azure-storage-blob://camelazure/container1?blobName=hello.txt&accountName=yourAccountName&accessKey=yourAccessKey&fileDir=/var/to/awesome/dir")
+ .to("mock:results");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-storage-blob://camelazure/container1?blobName=hello.txt&accountName=yourAccountName&accessKey=yourAccessKey&fileDir=/var/to/awesome/dir"/>
+ <to uri="mock:results"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-storage-blob://camelazure/container1
+ parameters:
+ blobName: hello.txt
+ accountName: yourAccountName
+ accessKey: yourAccessKey
+ fileDir: /var/to/awesome/dir
+ steps:
+ - to:
+ uri: mock:results
+----
+====
Also, the component supports batch consumer, hence you can consume multiple blobs with only specifying the container name, the consumer will
return multiple exchanges depending on the number of the blobs in the container. Example:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("azure-storage-blob://camelazure/container1?accountName=yourAccountName&accessKey=yourAccessKey&fileDir=/var/to/awesome/dir").
-to("mock:results");
---------------------------------------------------------------------------------
+----
+from("azure-storage-blob://camelazure/container1?accountName=yourAccountName&accessKey=yourAccessKey&fileDir=/var/to/awesome/dir")
+ .to("mock:results");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-storage-blob://camelazure/container1?accountName=yourAccountName&accessKey=yourAccessKey&fileDir=/var/to/awesome/dir"/>
+ <to uri="mock:results"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-storage-blob://camelazure/container1
+ parameters:
+ accountName: yourAccountName
+ accessKey: yourAccessKey
+ fileDir: /var/to/awesome/dir
+ steps:
+ - to:
+ uri: mock:results
+----
+====
==== Delete After Read
@@ -351,7 +506,7 @@ The following options control the move behavior:
- `listBlobContainers`:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
// set the header you want the producer to evaluate, refer to the previous
@@ -361,12 +516,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure?operation=listBlobContainers&client&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `createBlobContainer`:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
// set the header you want the producer to evaluate, refer to the previous
@@ -376,12 +531,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?operation=createBlobContainer&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `deleteBlobContainer`:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
// set the header you want the producer to evaluate, refer to the previous
@@ -391,12 +546,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?operation=deleteBlobContainer&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `listBlobs`:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
// set the header you want the producer to evaluate, refer to the previous
@@ -406,7 +561,7 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?operation=listBlobs&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `listBlobVersions`:
@@ -416,7 +571,7 @@ account. Each `BlobItem` in the result carries its own `versionId` and `isCurren
The `prefix` and `regex` options can be used to narrow the result down to a single blob name.
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.setHeader(BlobConstants.PREFIX, constant("invoice.pdf"))
.to("azure-storage-blob://camelazure/container1?operation=listBlobVersions&serviceClient=#client")
@@ -429,14 +584,14 @@ from("direct:start")
}
})
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `getBlob`:
We can either set an `outputStream` in the exchange body and write the data to it. E.g.:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -450,12 +605,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=getBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
If we don't set a body, then this operation will give us an `InputStream` instance which can proceeded further downstream:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=getBlob&serviceClient=#client")
@@ -466,12 +621,12 @@ from("direct:start")
System.out.println(IOUtils.toString(inputStream, StandardCharsets.UTF_8.name()));
})
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `deleteBlob`:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -482,12 +637,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=deleteBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `downloadBlobToFile`:
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -498,12 +653,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=downloadBlobToFile&fileDir=/var/mydir&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `downloadLink`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=downloadLink&serviceClient=#client")
@@ -512,12 +667,12 @@ from("direct:start")
System.out.println("My link " + link);
})
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `uploadBlockBlob`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -529,7 +684,7 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=uploadBlockBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `uploadBlockBlobChunked`
@@ -589,7 +744,7 @@ The `blockSize` and `maxConcurrency` options control memory usage and upload spe
- `stageBlockBlobList`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -602,12 +757,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=stageBlockBlobList&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `commitBlockBlobList`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -621,34 +776,34 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=commitBlockBlobList&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `getBlobBlockList`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=getBlobBlockList&serviceClient=#client")
.log("${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `createAppendBlob`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=createAppendBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `commitAppendBlob`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -661,22 +816,22 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=commitAppendBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `createPageBlob`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=createPageBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `uploadPageBlob`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -690,12 +845,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=uploadPageBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `resizePageBlob`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -705,12 +860,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=resizePageBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `clearPageBlob`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -720,12 +875,12 @@ from("direct:start")
})
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=clearPageBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `getPageBlobRanges`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.process(exchange -> {
@@ -736,12 +891,12 @@ from("direct:start")
.to("azure-storage-blob://camelazure/container1?blobName=blob&operation=getPageBlobRanges&serviceClient=#client")
.log("${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `copyBlob`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:copyBlob")
.process(exchange -> {
@@ -751,20 +906,20 @@ from("direct:copyBlob")
})
.to("azure-storage-blob://account/containerblob2?operation=copyBlob&sourceBlobAccessKey=RAW(accessKey)")
.to("mock:result");
---------------------------------------------------------------------------------
+----
In this way the `file.txt` in the container `containerblob1` of the account `account`, will be copied to the container `containerblob2` of the same account.
- `createBlobSnapshot`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:createBlobSnapshot")
.to("azure-storage-blob://camelazure/container1?blobName=hello.txt&operation=createBlobSnapshot&serviceClient=#client")
.log("Snapshot ID: ${header.CamelAzureStorageBlobSnapshotId}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
=== Reading a specific blob snapshot
@@ -773,13 +928,13 @@ The `getBlob`, `downloadBlobToFile` and `downloadLink` operations can target a s
to the snapshot version of the blob instead of the live one. The header takes precedence over the URI parameter.
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:readSnapshot")
.process(exchange -> exchange.getIn().setHeader(BlobConstants.BLOB_SNAPSHOT_ID, "2026-04-15T10:00:00.0000000Z"))
.to("azure-storage-blob://camelazure/container1?blobName=hello.txt&operation=getBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
=== Reading a specific blob version
@@ -789,52 +944,52 @@ operations can target a specific version by setting the `versionId` URI paramete
of the live one. The header takes precedence over the URI parameter.
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:readVersion")
.setHeader(BlobConstants.BLOB_VERSION_ID, constant("2026-04-15T10:00:00.0000000Z"))
.to("azure-storage-blob://camelazure/container1?blobName=hello.txt&operation=getBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `setBlobTags`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:setBlobTags")
.setHeader(BlobConstants.BLOB_TAGS, constant(Map.of("status", "quarantine", "category", "document")))
.to("azure-storage-blob://camelazure/container1?blobName=hello.txt&operation=setBlobTags&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `getBlobTags`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:getBlobTags")
.to("azure-storage-blob://camelazure/container1?blobName=hello.txt&operation=getBlobTags&serviceClient=#client")
.log("Tags: ${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `findBlobsByTags`
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:findBlobsByTags")
.setHeader(BlobConstants.BLOB_TAG_FILTER, constant("\"Environment\" = 'Production' AND \"Status\" = 'Active'"))
.to("azure-storage-blob://camelazure?operation=findBlobsByTags&serviceClient=#client")
.log("Matching blobs: ${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `setBlobLegalHold`
[source,java]
---------------------------------------------------------------------------------
+----
// place a legal hold on the blob (e.g. for compliance / quarantine workflows)
from("direct:setLegalHold")
@@ -847,12 +1002,12 @@ from("direct:clearLegalHold")
.setHeader(BlobConstants.BLOB_LEGAL_HOLD, constant(false))
.to("azure-storage-blob://camelazure/container1?blobName=hello.txt&operation=setBlobLegalHold&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `setBlobImmutabilityPolicy`
[source,java]
---------------------------------------------------------------------------------
+----
// apply a 7-day unlocked time-based retention policy (can be modified or deleted)
from("direct:setImmutabilityPolicy")
@@ -860,23 +1015,23 @@ from("direct:setImmutabilityPolicy")
.setHeader(BlobConstants.BLOB_IMMUTABILITY_POLICY_MODE, constant(BlobImmutabilityPolicyMode.UNLOCKED))
.to("azure-storage-blob://camelazure/container1?blobName=hello.txt&operation=setBlobImmutabilityPolicy&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `undeleteBlob`
[source,java]
---------------------------------------------------------------------------------
+----
// restore a soft-deleted blob (requires soft delete to be enabled on the storage account)
from("direct:undeleteBlob")
.to("azure-storage-blob://camelazure/container1?blobName=hello.txt&operation=undeleteBlob&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
- `setBlobTier`
[source,java]
---------------------------------------------------------------------------------
+----
// move a blob to the COOL tier for less frequent access
from("direct:moveToCool")
@@ -890,7 +1045,7 @@ from("direct:rehydrate")
.setHeader(BlobConstants.REHYDRATE_PRIORITY, constant(RehydratePriority.HIGH))
.to("azure-storage-blob://camelazure/container1?blobName=archived.txt&operation=setBlobTier&serviceClient=#client")
.to("mock:result");
---------------------------------------------------------------------------------
+----
=== Blob modification during download (ConditionNotMet)
@@ -913,7 +1068,7 @@ Workarounds:
SAS Blob Container tokens can be generated programmatically or via Azure UI. To generate the token with java code, the following can be done:
[source,java]
---------------------------------------------------------------------------------
+----
BlobContainerClient blobClient = new BlobContainerClientBuilder()
.endpoint(String.format("https://%s.blob.core.windows.net/%s", accountName, accessKey))
@@ -936,22 +1091,22 @@ BlobContainerClient blobClient = new BlobContainerClientBuilder()
BlobServiceSasSignatureValues sasSignatureValues = new BlobServiceSasSignatureValues(expiryTime, blobContainerSasPermission);
return blobClient.generateSas(sasSignatureValues);
---------------------------------------------------------------------------------
+----
The generated SAS token can be then stored to an application.properties file so that it can be loaded by the camel route, for example:
[source,properties]
---------------------------------------------------------------------------------
+----
camel.component.azure-storage-blob.sas-token=MY_TOKEN_HERE
---------------------------------------------------------------------------------
+----
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:copyBlob")
.to("azure-storage-blob://account/containerblob2?operation=uploadBlockBlob&credentialType=AZURE_SAS")
---------------------------------------------------------------------------------
+----
== Important Development Notes
diff --git a/components/camel-azure/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc b/components/camel-azure/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
index 1e619a7e814a..a5b47ef07de6 100644
--- a/components/camel-azure/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
+++ b/components/camel-azure/camel-azure-storage-datalake/src/main/docs/azure-storage-datalake-component.adoc
@@ -69,12 +69,42 @@ The default is `CLIENT_SECRET`.
For example, to download content from file `test.txt` located on the `filesystem` in `camelTesting` storage account, use the following snippet:
+[tabs]
+====
+Java::
++
[source,java]
----
-from("azure-storage-datalake:camelTesting/filesystem?fileName=test.txt&accountKey=key").
-to("file://fileDirectory");
+from("azure-storage-datalake:camelTesting/filesystem?fileName=test.txt&accountKey=key")
+ .to("file://fileDirectory");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-storage-datalake:camelTesting/filesystem?fileName=test.txt&accountKey=key"/>
+ <to uri="file://fileDirectory"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-storage-datalake:camelTesting/filesystem
+ parameters:
+ fileName: test.txt
+ accountKey: key
+ steps:
+ - to:
+ uri: file://fileDirectory
+----
+====
+
=== Automatic detection of a service client
The component is capable of automatically detecting the presence of a DataLakeServiceClient bean in the registry.
@@ -245,6 +275,10 @@ from("direct:start")
- `deleteFile`
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:start")
@@ -252,8 +286,42 @@ from("direct:start")
.to("mock:results");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="azure-storage-datalake:cameltesting/filesystem?operation=deleteFile&fileName=test.txt&serviceClient=#serviceClient"/>
+ <to uri="mock:results"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: azure-storage-datalake:cameltesting/filesystem
+ parameters:
+ operation: deleteFile
+ fileName: test.txt
+ serviceClient: "#serviceClient"
+ - to:
+ uri: mock:results
+----
+====
+
- `downloadToFile`
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct:start")
@@ -261,6 +329,37 @@ from("direct:start")
.to("mock:results");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="azure-storage-datalake:cameltesting/filesystem?operation=downloadToFile&fileName=test.txt&fileDir=/test/mydir&serviceClient=#serviceClient"/>
+ <to uri="mock:results"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: azure-storage-datalake:cameltesting/filesystem
+ parameters:
+ operation: downloadToFile
+ fileName: test.txt
+ fileDir: /test/mydir
+ serviceClient: "#serviceClient"
+ - to:
+ uri: mock:results
+----
+====
+
- `downloadLink`
[source,java]
diff --git a/components/camel-azure/camel-azure-storage-queue/src/main/docs/azure-storage-queue-component.adoc b/components/camel-azure/camel-azure-storage-queue/src/main/docs/azure-storage-queue-component.adoc
index 1a7bd1a80061..a3e437ea0f38 100644
--- a/components/camel-azure/camel-azure-storage-queue/src/main/docs/azure-storage-queue-component.adoc
+++ b/components/camel-azure/camel-azure-storage-queue/src/main/docs/azure-storage-queue-component.adoc
@@ -76,11 +76,40 @@ To use this component, you have multiple options to provide the required Azure a
For example, to get a message content from the queue `messageQueue`
in the `storageAccount` storage account and, use the following snippet:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
-from("azure-storage-queue://storageAccount/messageQueue?accessKey=yourAccessKey").
-to("file://queuedirectory");
---------------------------------------------------------------------------------
+----
+from("azure-storage-queue://storageAccount/messageQueue?accessKey=yourAccessKey")
+ .to("file://queuedirectory");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-storage-queue://storageAccount/messageQueue?accessKey=yourAccessKey"/>
+ <to uri="file://queuedirectory"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-storage-queue://storageAccount/messageQueue
+ parameters:
+ accessKey: yourAccessKey
+ steps:
+ - to:
+ uri: file://queuedirectory
+----
+====
=== Advanced Azure Storage Queue configuration
If your Camel Application is running behind a firewall or if you need to
@@ -102,11 +131,43 @@ context.getRegistry().bind("client", client);
Then refer to this instance in your Camel `azure-storage-queue` component configuration:
+[tabs]
+====
+Java::
++
[source,java]
------------------------------------------------------------------------
+----
from("azure-storage-queue://cameldev/queue1?serviceClient=#client")
-.to("file://outputFolder?fileName=output.txt&fileExist=Append");
------------------------------------------------------------------------
+ .to("file://outputFolder?fileName=output.txt&fileExist=Append");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-storage-queue://cameldev/queue1?serviceClient=#client"/>
+ <to uri="file://outputFolder?fileName=output.txt&fileExist=Append"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-storage-queue://cameldev/queue1
+ parameters:
+ serviceClient: "#client"
+ steps:
+ - to:
+ uri: file://outputFolder
+ parameters:
+ fileName: output.txt
+ fileExist: Append
+----
+====
=== Automatic detection of QueueServiceClient client in registry
@@ -152,11 +213,44 @@ Refer to the example section in this page to learn how to use these operations i
=== Consumer Examples
To consume a queue into a file component with maximum five messages in one batch, this can be done like this:
+[tabs]
+====
+Java::
++
[source,java]
------------------------------------------------------------------------
+----
from("azure-storage-queue://cameldev/queue1?serviceClient=#client&maxMessages=5")
-.to("file://outputFolder?fileName=output.txt&fileExist=Append");
------------------------------------------------------------------------
+ .to("file://outputFolder?fileName=output.txt&fileExist=Append");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="azure-storage-queue://cameldev/queue1?serviceClient=#client&maxMessages=5"/>
+ <to uri="file://outputFolder?fileName=output.txt&fileExist=Append"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: azure-storage-queue://cameldev/queue1
+ parameters:
+ serviceClient: "#client"
+ maxMessages: 5
+ steps:
+ - to:
+ uri: file://outputFolder
+ parameters:
+ fileName: output.txt
+ fileExist: Append
+----
+====
=== Producer Operations Examples
- `listQueues`:
diff --git a/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc b/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc
index 375e902ce7b3..0fbb166ab8a8 100644
--- a/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc
+++ b/components/camel-bean-validator/src/main/docs/bean-validator-component.adoc
@@ -105,22 +105,84 @@ with the following Camel route, only the *@NotNull* constraints on the
attributes `manufacturer` and `licensePlate` will be validated (Camel uses
the default group `jakarta.validation.groups.Default`).
+[tabs]
+====
+Java::
++
[source,java]
--------------------------
+----
from("direct:start")
-.to("bean-validator://x")
-.to("mock:end")
--------------------------
+ .to("bean-validator://x")
+ .to("mock:end");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="bean-validator://x"/>
+ <to uri="mock:end"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: bean-validator://x
+ - to:
+ uri: mock:end
+----
+====
If you want to check the constraints from the group `OptionalChecks`,
you have to define the route like this
+[tabs]
+====
+Java::
++
[source,java]
-----------------------------------------------
+----
from("direct:start")
-.to("bean-validator://x?group=OptionalChecks")
-.to("mock:end")
-----------------------------------------------
+ .to("bean-validator://x?group=OptionalChecks")
+ .to("mock:end");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="bean-validator://x?group=OptionalChecks"/>
+ <to uri="mock:end"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: bean-validator://x
+ parameters:
+ group: OptionalChecks
+ - to:
+ uri: mock:end
+----
+====
If you want to check the constraints from both groups, you have to
define a new interface first:
@@ -136,12 +198,44 @@ public interface AllChecks {
And then your route definition should look like this:
+[tabs]
+====
+Java::
++
[source,java]
------------------------------------------
+----
from("direct:start")
-.to("bean-validator://x?group=AllChecks")
-.to("mock:end")
------------------------------------------
+ .to("bean-validator://x?group=AllChecks")
+ .to("mock:end");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="bean-validator://x?group=AllChecks"/>
+ <to uri="mock:end"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: bean-validator://x
+ parameters:
+ group: AllChecks
+ - to:
+ uri: mock:end
+----
+====
And if you have to provide your own message interpolator, traversable
resolver and constraint validator factory, you have to write a route
diff --git a/components/camel-bean/src/main/docs/class-component.adoc b/components/camel-bean/src/main/docs/class-component.adoc
index af6265667ae8..e88fb59b3d3f 100644
--- a/components/camel-bean/src/main/docs/class-component.adoc
+++ b/components/camel-bean/src/main/docs/class-component.adoc
@@ -41,22 +41,84 @@ You simply use the *class* component just as the xref:bean-component.adoc[Bean]
component but by specifying the fully qualified class name instead.
For example to use the `MyFooBean` you have to do as follows:
+[tabs]
+====
+Java::
++
[source,java]
--------------------------------------------------------------------------------------------------
+----
from("direct:start")
.to("class:org.apache.camel.component.bean.MyFooBean")
.to("mock:result");
--------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="class:org.apache.camel.component.bean.MyFooBean"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: class:org.apache.camel.component.bean.MyFooBean
+ - to:
+ uri: mock:result
+----
+====
You can also specify which method to invoke on the `MyFooBean`, for
example `hello`:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------------------------------------
+----
from("direct:start")
.to("class:org.apache.camel.component.bean.MyFooBean?method=hello")
.to("mock:result");
---------------------------------------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="class:org.apache.camel.component.bean.MyFooBean?method=hello"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: class:org.apache.camel.component.bean.MyFooBean
+ parameters:
+ method: hello
+ - to:
+ uri: mock:result
+----
+====
== Examples
@@ -65,22 +127,86 @@ from("direct:start")
In the endpoint uri you can specify properties to set on the created
instance, for example, if it has a `setPrefix` method:
+[tabs]
+====
+Java::
++
[source,java]
----------------------------------------------------------------------------------
+----
from("direct:start")
.to("class:org.apache.camel.component.bean.MyPrefixBean?bean.prefix=Bye")
.to("mock:result");
----------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="class:org.apache.camel.component.bean.MyPrefixBean?bean.prefix=Bye"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: class:org.apache.camel.component.bean.MyPrefixBean
+ parameters:
+ bean.prefix: Bye
+ - to:
+ uri: mock:result
+----
+====
And you can also use the `#` syntax to refer to properties to be looked
up in the Registry.
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("class:org.apache.camel.component.bean.MyPrefixBean?bean.cool=#foo")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="class:org.apache.camel.component.bean.MyPrefixBean?bean.cool=#foo"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: class:org.apache.camel.component.bean.MyPrefixBean
+ parameters:
+ bean.cool: "#foo"
+ - to:
+ uri: mock:result
+----
+====
Which will look up a bean from the Registry with the
id `foo` and invoke the `setCool` method on the created instance of the
diff --git a/components/camel-bonita/src/main/docs/bonita-component.adoc b/components/camel-bonita/src/main/docs/bonita-component.adoc
index 09fc2745b594..d272e6e65ab1 100644
--- a/components/camel-bonita/src/main/docs/bonita-component.adoc
+++ b/components/camel-bonita/src/main/docs/bonita-component.adoc
@@ -42,10 +42,43 @@ This one has to contain a `Map<String,Serializable>`.
The following example starts a new case in Bonita:
+[tabs]
+====
+Java::
++
[source,java]
-----------------------------------------------------------------------
-from("direct:start").to("bonita:startCase?hostname=localhost&port=8080&processName=TestProcess&username=install&password=install");
-----------------------------------------------------------------------
+----
+from("direct:start").to("bonita:startCase?hostname=localhost&port=8080&processName=TestProcess&username=install&password=install");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="bonita:startCase?hostname=localhost&port=8080&processName=TestProcess&username=install&password=install"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: bonita:startCase
+ parameters:
+ hostname: localhost
+ port: 8080
+ processName: TestProcess
+ username: install
+ password: install
+----
+====
== Dependencies
diff --git a/components/camel-braintree/src/main/docs/braintree-component.adoc b/components/camel-braintree/src/main/docs/braintree-component.adoc
index a95dbeb1df69..83253dd55ca3 100644
--- a/components/camel-braintree/src/main/docs/braintree-component.adoc
+++ b/components/camel-braintree/src/main/docs/braintree-component.adoc
@@ -52,12 +52,39 @@ override the API call. See xref:manual::security-model.adoc[the Camel security m
== Examples
+[tabs]
+====
+Java::
++
[source,java]
----
from("direct://GENERATE")
- .to("braintree://sclientToken/generate");
+ .to("braintree://clientToken/generate");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct://GENERATE"/>
+ <to uri="braintree://clientToken/generate"/>
+</route>
----
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:GENERATE
+ steps:
+ - to:
+ uri: braintree:clientToken/generate
+----
+====
+
== More Information
For more information on the endpoints and options see Braintree
diff --git a/components/camel-browse/src/main/docs/browse-component.adoc b/components/camel-browse/src/main/docs/browse-component.adoc
index 3165f7939eb0..c18d78449d2f 100644
--- a/components/camel-browse/src/main/docs/browse-component.adoc
+++ b/components/camel-browse/src/main/docs/browse-component.adoc
@@ -39,11 +39,41 @@ include::partial$component-endpoint-headers.adoc[]
In the route below, we insert a `browse:` component to be able to browse
the Exchanges that are passing through:
+[tabs]
+====
+Java::
++
[source,java]
----
from("activemq:order.in").to("browse:orderReceived").to("bean:processOrder");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="activemq:order.in"/>
+ <to uri="browse:orderReceived"/>
+ <to uri="bean:processOrder"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: activemq:order.in
+ steps:
+ - to:
+ uri: browse:orderReceived
+ - to:
+ uri: bean:processOrder
+----
+====
+
We can now inspect the received exchanges from within the Java code:
[source,java]
diff --git a/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc b/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc
index 7706d7c1133d..b225ae2bc8b8 100644
--- a/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc
+++ b/components/camel-caffeine/src/main/docs/caffeine-cache-component.adoc
@@ -55,25 +55,56 @@ Each time you'll use an operation on the cache, you'll have two different header
You can use your cache with the following code:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------
-
-@BindToRegistry("cache")
-Cache cache = Caffeine.newBuilder().recordStats().build();
-
-@Override
-protected RouteBuilder createRouteBuilder() throws Exception {
- return new RouteBuilder() {
- public void configure() {
- from("direct://start")
- .to("caffeine-cache://cache?action=PUT&key=1")
- .to("caffeine-cache://cache?key=1&action=GET")
- .log("Test! ${body}")
- .to("mock:result");
- }
- };
-}
-------------------------------------------------------------
+----
+from("direct://start")
+ .to("caffeine-cache://cache?action=PUT&key=1")
+ .to("caffeine-cache://cache?key=1&action=GET")
+ .log("Test! ${body}")
+ .to("mock:result");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct://start"/>
+ <to uri="caffeine-cache://cache?action=PUT&key=1"/>
+ <to uri="caffeine-cache://cache?key=1&action=GET"/>
+ <log message="Test! ${body}"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct://start
+ steps:
+ - to:
+ uri: caffeine-cache://cache
+ parameters:
+ action: PUT
+ key: 1
+ - to:
+ uri: caffeine-cache://cache
+ parameters:
+ key: 1
+ action: GET
+ - log:
+ message: "Test! ${body}"
+ - to:
+ uri: mock:result
+----
+====
In this way, you'll work always on the same cache in the registry.
diff --git a/components/camel-cbor/src/main/docs/cbor-dataformat.adoc b/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
index 49725fcbf577..4f8b935fd242 100644
--- a/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
+++ b/components/camel-cbor/src/main/docs/cbor-dataformat.adoc
@@ -17,12 +17,42 @@ https://github.com/FasterXML/jackson-dataformats-binary/tree/master/cbor[CBOR ex
to unmarshal a CBOR payload into Java objects or to marshal Java objects
into a CBOR payload.
+[tabs]
+====
+Java::
++
[source,java]
--------------------------------
+----
from("activemq:My.Queue")
.unmarshal().cbor()
.to("mqseries:Another.Queue");
--------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="activemq:My.Queue"/>
+ <unmarshal><cbor/></unmarshal>
+ <to uri="mqseries:Another.Queue"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: activemq:My.Queue
+ steps:
+ - unmarshal:
+ cbor: {}
+ - to:
+ uri: mqseries:Another.Queue
+----
+====
== Usage
diff --git a/components/camel-chunk/src/main/docs/chunk-component.adoc b/components/camel-chunk/src/main/docs/chunk-component.adoc
index 3b6f44051a6b..36533da99172 100644
--- a/components/camel-chunk/src/main/docs/chunk-component.adoc
+++ b/components/camel-chunk/src/main/docs/chunk-component.adoc
@@ -84,11 +84,38 @@ resource. This allows you to provide a dynamic template at runtime.
For example, you could use something like:
+[tabs]
+====
+Java::
++
[source,java]
---------------------------
-from("activemq:My.Queue").
-to("chunk:template");
---------------------------
+----
+from("activemq:My.Queue")
+ .to("chunk:template");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="activemq:My.Queue"/>
+ <to uri="chunk:template"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: activemq:My.Queue
+ steps:
+ - to:
+ uri: chunk:template
+----
+====
To use a Chunk template to formulate a response for a message for InOut
message exchanges (where there is a `JMSReplyTo` header).
@@ -96,30 +123,128 @@ message exchanges (where there is a `JMSReplyTo` header).
If you want to use InOnly and consume the message and send it to another
destination, you could use:
+[tabs]
+====
+Java::
++
[source,java]
------------------------------
-from("activemq:My.Queue").
-to("chunk:template").
-to("activemq:Another.Queue");
------------------------------
+----
+from("activemq:My.Queue")
+ .to("chunk:template")
+ .to("activemq:Another.Queue");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="activemq:My.Queue"/>
+ <to uri="chunk:template"/>
+ <to uri="activemq:Another.Queue"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: activemq:My.Queue
+ steps:
+ - to:
+ uri: chunk:template
+ - to:
+ uri: activemq:Another.Queue
+----
+====
It's possible to specify what template the component should use
dynamically via a header, so for example:
+[tabs]
+====
+Java::
++
[source,java]
-------------------------------------------------------------------
-from("direct:in").
-setHeader(ChunkConstants.CHUNK_RESOURCE_URI).constant("template").
-to("chunk:dummy?allowTemplateFromHeader=true");
-------------------------------------------------------------------
+----
+from("direct:in")
+ .setHeader("ChunkResourceUri").constant("template")
+ .to("chunk:dummy?allowTemplateFromHeader=true");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:in"/>
+ <setHeader name="ChunkResourceUri">
+ <constant>template</constant>
+ </setHeader>
+ <to uri="chunk:dummy?allowTemplateFromHeader=true"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:in
+ steps:
+ - setHeader:
+ name: ChunkResourceUri
+ expression:
+ constant:
+ expression: template
+ - to:
+ uri: chunk:dummy
+ parameters:
+ allowTemplateFromHeader: true
+----
+====
An example of Chunk component options use:
+[tabs]
+====
+Java::
++
[source,java]
----------------------------------------------------------------------------------------
-from("direct:in").
-to("chunk:file_example?themeFolder=template&themeSubfolder=subfolder&extension=chunk");
----------------------------------------------------------------------------------------
+----
+from("direct:in")
+ .to("chunk:file_example?themeFolder=template&themeSubfolder=subfolder&extension=chunk");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:in"/>
+ <to uri="chunk:file_example?themeFolder=template&themeSubfolder=subfolder&extension=chunk"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:in
+ steps:
+ - to:
+ uri: chunk:file_example
+ parameters:
+ themeFolder: template
+ themeSubfolder: subfolder
+ extension: chunk
+----
+====
In this example, the Chunk component will look for the file
`file_example.chunk` in the folder `template/subfolder`.
diff --git a/components/camel-couchbase/src/main/docs/couchbase-component.adoc b/components/camel-couchbase/src/main/docs/couchbase-component.adoc
index 5551f7bf43a1..4fba1980dcce 100644
--- a/components/camel-couchbase/src/main/docs/couchbase-component.adoc
+++ b/components/camel-couchbase/src/main/docs/couchbase-component.adoc
@@ -63,13 +63,45 @@ The simplest way to consume documents is to just use the existing endpoint optio
auto-generates a SQL++ query from `bucket`, `collection`, `limit`, `skip`, `descending`,
`rangeStartKey`, and `rangeEndKey`:
+[tabs]
+====
+Java::
++
[source,java]
----
-// Consumes up to 10 documents in descending order
from("couchbase:http://localhost?bucket=myBucket&username=user&password=pass&limit=10&descending=true")
.to("direct:result");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="couchbase:http://localhost?bucket=myBucket&username=user&password=pass&limit=10&descending=true"/>
+ <to uri="direct:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: couchbase:http://localhost
+ parameters:
+ bucket: myBucket
+ username: user
+ password: pass
+ limit: 10
+ descending: true
+ steps:
+ - to:
+ uri: direct:result
+----
+====
+
This generates: `SELECT META().id AS \__id, * FROM \`myBucket\` ORDER BY META().id DESC LIMIT 10`
==== Explicit SQL++ statements
diff --git a/components/camel-csv/src/main/docs/csv-dataformat.adoc b/components/camel-csv/src/main/docs/csv-dataformat.adoc
index 68d6b99c5f63..12c337a57480 100644
--- a/components/camel-csv/src/main/docs/csv-dataformat.adoc
+++ b/components/camel-csv/src/main/docs/csv-dataformat.adoc
@@ -121,12 +121,47 @@ Lucky Luke, 120, capturing the Daltons
We can now use the CSV component to unmarshal this file:
+[tabs]
+====
+Java::
++
[source,java]
----------------------------------------------------------------
+----
from("file:src/test/resources/?fileName=daltons.csv&noop=true")
.unmarshal().csv()
.to("mock:daltons");
----------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="file:src/test/resources/?fileName=daltons.csv&noop=true"/>
+ <unmarshal>
+ <csv/>
+ </unmarshal>
+ <to uri="mock:daltons"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: file:src/test/resources/
+ parameters:
+ fileName: daltons.csv
+ noop: true
+ steps:
+ - unmarshal:
+ csv: {}
+ - to:
+ uri: mock:daltons
+----
+====
The resulting message will contain a `List<List<String>>` like...
diff --git a/components/camel-dapr/src/main/docs/dapr-component.adoc b/components/camel-dapr/src/main/docs/dapr-component.adoc
index 83158da17ed9..911d7b436395 100644
--- a/components/camel-dapr/src/main/docs/dapr-component.adoc
+++ b/components/camel-dapr/src/main/docs/dapr-component.adoc
@@ -248,24 +248,93 @@ from("direct:start")
- `secret` -
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
.to("dapr:secret?secretStore=myStore&key=mySecret")
.log("Received secret from Dapr: ${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="dapr:secret?secretStore=myStore&key=mySecret"/>
+ <log message="Received secret from Dapr: ${body}"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: dapr:secret
+ parameters:
+ secretStore: myStore
+ key: mySecret
+ - log: "Received secret from Dapr: ${body}"
+ - to:
+ uri: mock:result
+----
+====
- `secret: bulk` -
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("direct:start")
// when no secret key is passed, bulk retrieval is performed on secret store
.to("dapr:secret?secretStore=myStore")
.log("Received bulk secrets from Dapr: ${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="direct:start"/>
+ <to uri="dapr:secret?secretStore=myStore"/>
+ <log message="Received bulk secrets from Dapr: ${body}"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:start
+ steps:
+ - to:
+ uri: dapr:secret
+ parameters:
+ secretStore: myStore
+ - log: "Received bulk secrets from Dapr: ${body}"
+ - to:
+ uri: mock:result
+----
+====
- `configuration` -
@@ -461,19 +530,83 @@ from("direct:start")
- `pubSub` -
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("dapr:pubSub?pubSubName=myPubSub&topic=myTopic")
.log("Received message from Dapr pubsub: ${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="dapr:pubSub?pubSubName=myPubSub&topic=myTopic"/>
+ <log message="Received message from Dapr pubsub: ${body}"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: dapr:pubSub
+ parameters:
+ pubSubName: myPubSub
+ topic: myTopic
+ steps:
+ - log: "Received message from Dapr pubsub: ${body}"
+ - to:
+ uri: mock:result
+----
+====
- `configuration` -
+[tabs]
+====
+Java::
++
[source,java]
---------------------------------------------------------------------------------
+----
from("dapr:configuration?configStore=myStore&configKeys=k1,k2")
.log("Received config updates from Dapr: ${body}")
.to("mock:result");
---------------------------------------------------------------------------------
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="dapr:configuration?configStore=myStore&configKeys=k1,k2"/>
+ <log message="Received config updates from Dapr: ${body}"/>
+ <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: dapr:configuration
+ parameters:
+ configStore: myStore
+ configKeys: "k1,k2"
+ steps:
+ - log: "Received config updates from Dapr: ${body}"
+ - to:
+ uri: mock:result
+----
+====
include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-dataset/src/main/docs/dataset-component.adoc b/components/camel-dataset/src/main/docs/dataset-component.adoc
index bb2974b64c79..80257d0fedbc 100644
--- a/components/camel-dataset/src/main/docs/dataset-component.adoc
+++ b/components/camel-dataset/src/main/docs/dataset-component.adoc
@@ -159,6 +159,10 @@ the file into multiple payloads.
For example, to test that a set of messages are sent to a queue and then
consumed from the queue without losing any messages:
+[tabs]
+====
+Java::
++
[source,java]
----
// send the dataset to a queue
@@ -168,6 +172,43 @@ from("dataset:foo").to("activemq:SomeQueue");
from("activemq:SomeQueue").to("dataset:foo");
----
+XML::
++
+[source,xml]
+----
+<!-- send the dataset to a queue -->
+<route>
+ <from uri="dataset:foo"/>
+ <to uri="activemq:SomeQueue"/>
+</route>
+<!-- now lets test that the messages are consumed correctly -->
+<route>
+ <from uri="activemq:SomeQueue"/>
+ <to uri="dataset:foo"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+# send the dataset to a queue
+- route:
+ from:
+ uri: dataset:foo
+ steps:
+ - to:
+ uri: activemq:SomeQueue
+# now lets test that the messages are consumed correctly
+- route:
+ from:
+ uri: activemq:SomeQueue
+ steps:
+ - to:
+ uri: dataset:foo
+----
+====
+
The above would look in the Registry to find the
`foo` `DataSet` instance which is used to create the messages.
diff --git a/components/camel-dataset/src/main/docs/dataset-test-component.adoc b/components/camel-dataset/src/main/docs/dataset-test-component.adoc
index 8d9d2967ef9e..a2c8df40058e 100644
--- a/components/camel-dataset/src/main/docs/dataset-test-component.adoc
+++ b/components/camel-dataset/src/main/docs/dataset-test-component.adoc
@@ -60,12 +60,41 @@ include::partial$component-endpoint-headers.adoc[]
For example, you could write a test case as follows:
+[tabs]
+====
+Java::
++
[source,java]
----
-from("seda:someEndpoint").
- to("dataset-test:file://data/expectedOutput?noop=true");
+from("seda:someEndpoint")
+ .to("dataset-test:file://data/expectedOutput?noop=true");
----
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="seda:someEndpoint"/>
+ <to uri="dataset-test:file://data/expectedOutput?noop=true"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: seda:someEndpoint
+ steps:
+ - to:
+ uri: dataset-test:file://data/expectedOutput
+ parameters:
+ noop: true
+----
+====
+
If your test then invokes the
https://www.javadoc.io/doc/org.apache.camel/camel-mock/current/org/apache/camel/component/mock/MockEndpoint.html#assertIsSatisfied-org.apache.camel.CamelContext-[MockEndpoint.assertIsSatisfied(camelContext)
method], your test case will perform the necessary assertions.
diff --git a/components/camel-debezium/camel-debezium-db2/src/main/docs/debezium-db2-component.adoc b/components/camel-debezium/camel-debezium-db2/src/main/docs/debezium-db2-component.adoc
index 58807fba3fcc..d20536546c09 100644
--- a/components/camel-debezium/camel-debezium-db2/src/main/docs/debezium-db2-component.adoc
+++ b/components/camel-debezium/camel-debezium-db2/src/main/docs/debezium-db2-component.adoc
@@ -81,6 +81,10 @@ See below for more details.
Here is a basic route that you can use to listen to Debezium events from the db2 connector:
+[tabs]
+====
+Java::
++
[source,java]
----
from("debezium-db2:dbz-test-1?offsetStorageFileName=/usr/offset-file-1.dat&databaseHostname=localhost&databaseUser=debezium&databasePassword=dbz&databaseServerName=my-app-connector&databaseHistoryFileFilename=/usr/history-file-1.dat")
@@ -90,9 +94,57 @@ from("debezium-db2:dbz-test-1?offsetStorageFileName=/usr/offset-file-1.dat&datab
.log(" the event occurred upon this operation '${headers.CamelDebeziumSourceOperation}'")
.log(" on this database '${headers.CamelDebeziumSourceMetadata[db]}' and this table '${headers.CamelDebeziumSourceMetadata[table]}'")
.log(" with the key ${headers.CamelDebeziumKey}")
- .log(" the previous value is ${headers.CamelDebeziumBefore}")
+ .log(" the previous value is ${headers.CamelDebeziumBefore}");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+ <from uri="debezium-db2:dbz-test-1?offsetStorageFileName=/usr/offset-file-1.dat&databaseHostname=localhost&databaseUser=debezium&databasePassword=dbz&databaseServerName=my-app-connector&databaseHistoryFileFilename=/usr/history-file-1.dat"/>
+ <log message="Event received from Debezium : ${body}"/>
+ <log message=" with this identifier ${headers.CamelDebeziumIdentifier}"/>
+ <log message=" with these source metadata ${headers.CamelDebeziumSourceMetadata}"/>
+ <log message=" the event occurred upon this operation '${headers.CamelDebeziumSourceOperation}'"/>
+ <log message=" on this database '${headers.CamelDebeziumSourceMetadata[db]}' and this table '${headers.CamelDebeziumSourceMetadata[table]}'"/>
+ <log message=" with the key ${headers.CamelDebeziumKey}"/>
+ <log message=" the previous value is ${headers.CamelDebeziumBefore}"/>
+</route>
----
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: debezium-db2:dbz-test-1
+ parameters:
+ offsetStorageFileName: /usr/offset-file-1.dat
+ databaseHostname: localhost
+ databaseUser: debezium
+ databasePassword: dbz
+ databaseServerName: my-app-connector
+ databaseHistoryFileFilename: /usr/history-file-1.dat
+ steps:
+ - log:
+ message: "Event received from Debezium : ${body}"
+ - log:
+ message: " with this identifier ${headers.CamelDebeziumIdentifier}"
+ - log:
+ message: " with these source metadata ${headers.CamelDebeziumSourceMetadata}"
+ - log:
+ message: " the event occurred upon this operation '${headers.CamelDebeziumSourceOperation}'"
+ - log:
+ message: " on this database '${headers.CamelDebeziumSourceMetadata[db]}' and this table '${headers.CamelDebeziumSourceMetadata[table]}'"
+ - log:
+ message: " with the key ${headers.CamelDebeziumKey}"
+ - log:
+ message: " the previous value is ${headers.CamelDebeziumBefore}"
+----
+====
+
By default, the component will emit the events in the body and `CamelDebeziumBefore` header as https://kafka.apache.org/22/javadoc/org/apache/kafka/connect/data/Struct.html[`Struct`] data type, the reasoning behind this, is to perceive the schema information in case is needed.
However, the component as well contains a xref:manual::type-converter.adoc[Type Converter] that converts
from default output type of https://kafka.apache.org/22/javadoc/org/apache/kafka/connect/data/Struct.html[`Struct`] to `Map` in order to leverage Camel's rich xref:manual::data-format.adoc[Data Format] types which many of them work out of box with `Map` data type.
diff --git a/components/camel-debezium/camel-debezium-mysql/src/main/docs/debezium-mysql-component.adoc b/components/camel-debezium/camel-debezium-mysql/src/main/docs/debezium-mysql-component.adoc
index c261338be3d5..7dcf6e77bf45 100644
--- a/components/camel-debezium/camel-debezium-mysql/src/main/docs/debezium-mysql-component.adoc
+++ b/components/camel-debezium/camel-debezium-mysql/src/main/docs/debezium-mysql-component.adoc
@@ -92,6 +92,10 @@ See below for more details.
Here is a basic route that you can use to listen to Debezium events from MySQL connector.
+[tabs]
+====
+Java::
++
[source,java]
... 18518 lines suppressed ...