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-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new 67281c846 chore: default data types on the AWS Kamelets (#3117) (#3297)
67281c846 is described below
commit 67281c84673ffdfb33319d6123f4d243b4fc6a3e
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Nov 20 21:33:40 2026 +0100
chore: default data types on the AWS Kamelets (#3117) (#3297)
Camel runs the transformer of a default data type on every message, so
each default below changes the body class or the Content-Type:
- aws-cloudtrail-source: out text -> json (camel:jackson3 added). The
record stays JSON bytes, with Content-Type application/json.
- aws-kinesis-source: out binary. byte[] as before, with Content-Type
application/octet-stream; with useKclConsumers a ByteBuffer becomes
byte[].
- aws-kinesis-sink, aws-kinesis-firehose-sink, aws-s3-streaming-upload-sink:
in binary. Text becomes byte[], a stream cache is kept, Content-Type is
application/octet-stream; a Map, a List or a number now fails.
- aws-lambda-sink, aws-eventbridge-sink, aws-bedrock-text-sink: in json
(camel:jackson3 added). JSON text becomes JSON bytes, a Map or a List is
written as JSON, other text becomes a JSON string, a number fails;
Content-Type application/json stays after the call.
- aws-bedrock-agent-runtime-sink, aws-comprehend-sink, aws-polly-sink,
aws-secrets-manager-sink, aws-ses-sink: in text. Bytes and streams
become String; Content-Type text/plain stays after the call.
- aws-translate-action: in text, out text. The translated text is a
String with Content-Type text/plain instead of the incoming one.
Not done: aws-ddb-sink. The default runs before the template sets the
operation, so a body with an operation field fails even when it names the
configured operation (checked with camel run against Floci). The YAML
comment now says so.
Citrus: the expected X-Body-Type/X-Content-Type of the AWS tests are
updated; the kinesis, eventbridge and ddb sink routes now log the body
class and Content-Type, and the tests verify them. The firehose and
streaming upload routes send the body as text, as Citrus reads an
application/octet-stream body as a byte array. The aws-cloudtrail-source
and aws-kinesis-source tests need CAMEL-27258 (the source output type is
applied before the consuming route).
Claude-Session: https://claude.ai/code/session_016Y4dDmBDsSWV117kccuNf9
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../camel-kamelets-catalog-sbom.json | 8 +++----
.../aws-bedrock-agent-runtime-sink.kamelet.yaml | 8 ++++++-
kamelets/aws-bedrock-text-sink.kamelet.yaml | 13 ++++++++--
kamelets/aws-cloudtrail-source.kamelet.yaml | 9 +++++--
kamelets/aws-comprehend-sink.kamelet.yaml | 9 ++++++-
kamelets/aws-ddb-sink.kamelet.yaml | 12 +++++-----
kamelets/aws-eventbridge-sink.kamelet.yaml | 11 +++++++--
kamelets/aws-kinesis-firehose-sink.kamelet.yaml | 12 ++++++++--
kamelets/aws-kinesis-sink.kamelet.yaml | 10 ++++++--
kamelets/aws-kinesis-source.kamelet.yaml | 10 ++++++--
kamelets/aws-lambda-sink.kamelet.yaml | 12 ++++++++--
kamelets/aws-polly-sink.kamelet.yaml | 8 ++++++-
kamelets/aws-s3-streaming-upload-sink.kamelet.yaml | 12 ++++++++--
kamelets/aws-secrets-manager-sink.kamelet.yaml | 8 ++++++-
kamelets/aws-ses-sink.kamelet.yaml | 8 ++++++-
kamelets/aws-translate-action.kamelet.yaml | 17 ++++++++++++-
.../main/resources/META-INF/kamelets-index.json | 28 +++++++++++-----------
.../aws-bedrock-agent-runtime-sink.kamelet.yaml | 8 ++++++-
.../kamelets/aws-bedrock-text-sink.kamelet.yaml | 13 ++++++++--
.../kamelets/aws-cloudtrail-source.kamelet.yaml | 9 +++++--
.../kamelets/aws-comprehend-sink.kamelet.yaml | 9 ++++++-
.../resources/kamelets/aws-ddb-sink.kamelet.yaml | 12 +++++-----
.../kamelets/aws-eventbridge-sink.kamelet.yaml | 11 +++++++--
.../aws-kinesis-firehose-sink.kamelet.yaml | 12 ++++++++--
.../kamelets/aws-kinesis-sink.kamelet.yaml | 10 ++++++--
.../kamelets/aws-kinesis-source.kamelet.yaml | 10 ++++++--
.../kamelets/aws-lambda-sink.kamelet.yaml | 12 ++++++++--
.../resources/kamelets/aws-polly-sink.kamelet.yaml | 8 ++++++-
.../aws-s3-streaming-upload-sink.kamelet.yaml | 12 ++++++++--
.../kamelets/aws-secrets-manager-sink.kamelet.yaml | 8 ++++++-
.../resources/kamelets/aws-ses-sink.kamelet.yaml | 8 ++++++-
.../kamelets/aws-translate-action.kamelet.yaml | 17 ++++++++++++-
...bedrock-agent-runtime-sink-route.citrus.it.yaml | 2 +-
.../aws-bedrock-text-sink-route.citrus.it.yaml | 2 +-
.../aws-cloudtrail-source-route.citrus.it.yaml | 4 ++--
.../aws-comprehend-sink-route.citrus.it.yaml | 2 +-
.../ddb/aws-ddb-sink-delete-item.citrus.it.yaml | 6 +++++
.../aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml | 6 +++++
.../test/resources/aws/ddb/aws-ddb-sink-route.yaml | 2 ++
.../ddb/aws-ddb-sink-update-item.citrus.it.yaml | 6 +++++
.../eventbridge/aws-eventbridge-sink-route.yaml | 2 ++
.../aws-eventbridge-sink.citrus.it.yaml | 6 +++++
.../aws-kinesis-firehose-sink-route.citrus.it.yaml | 4 ++--
.../firehose/aws-kinesis-firehose-sink-route.yaml | 5 ++++
.../aws/kinesis/aws-kinesis-sink-route.yaml | 2 ++
.../aws/kinesis/aws-kinesis-sink.citrus.it.yaml | 6 +++++
.../aws/kinesis/aws-kinesis-source-route.yaml | 2 ++
.../aws/kinesis/aws-kinesis-source.citrus.it.yaml | 6 +++++
.../lambda/aws-lambda-sink-route.citrus.it.yaml | 4 ++--
.../aws/polly/aws-polly-sink-route.citrus.it.yaml | 2 +-
...s-s3-streaming-upload-sink-route.citrus.it.yaml | 8 +++----
.../aws/s3/aws-s3-streaming-upload-sink-route.yaml | 5 ++++
.../aws-secrets-manager-sink-route.citrus.it.yaml | 2 +-
.../aws/ses/aws-ses-sink-route.citrus.it.yaml | 2 +-
.../aws-translate-action-route.citrus.it.yaml | 4 +++-
.../aws/translate/aws-translate-action-route.yaml | 3 +++
56 files changed, 356 insertions(+), 91 deletions(-)
diff --git a/camel-kamelets-sbom/camel-kamelets-catalog-sbom.json
b/camel-kamelets-sbom/camel-kamelets-catalog-sbom.json
index e0e0b5884..6467dec9a 100644
--- a/camel-kamelets-sbom/camel-kamelets-catalog-sbom.json
+++ b/camel-kamelets-sbom/camel-kamelets-catalog-sbom.json
@@ -2312,10 +2312,10 @@
"dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:aws-bedrock-text-sink",
- "dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
+ "dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:aws-cloudtrail-source",
- "dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
+ "dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:aws-cloudwatch-sink",
"dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
@@ -2333,7 +2333,7 @@
"dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:aws-eventbridge-sink",
- "dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
+ "dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:aws-kinesis-firehose-sink",
"dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
@@ -2345,7 +2345,7 @@
"dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:aws-lambda-sink",
- "dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
+ "dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
}, {
"ref" : "kamelet:aws-polly-sink",
"dependsOn" : [
"pkg:maven/org.apache.camel/[email protected]",
"pkg:maven/org.apache.camel/[email protected]" ]
diff --git a/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
b/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
index 8631e5270..56add6f80 100644
--- a/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
+++ b/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the question, as text. The optional
`CamelAwsBedrockAgentRuntimeSessionId` header continues an earlier
conversation, with `retrieveAndGenerate` and `invokeAgent`: set it to the
session ID of an earlier answer.
- Output: when it is used inside a route, the body afterwards depends on
`operation`. With `retrieveAndGenerate`, the default, and with `invokeAgent`,
it is the answer, as text. The `CamelAwsBedrockAgentRuntimeSessionId` header
holds the ID of the session, and the `CamelAwsBedrockAgentRuntimeCitations`
header the passages of the documents the answer is based on, as objects of the
AWS SDK for Java. With `retrieve`, the body is a List of the passages found,
each an object of the AWS SD [...]
+ Output: when it is used inside a route, the body afterwards depends on
`operation`. With `retrieveAndGenerate`, the default, and with `invokeAgent`,
it is the answer, as text, and the `Content-Type` header is `text/plain`. The
`CamelAwsBedrockAgentRuntimeSessionId` header holds the ID of the session, and
the `CamelAwsBedrockAgentRuntimeCitations` header the passages of the documents
the answer is based on, as objects of the AWS SDK for Java. With `retrieve`,
the body is a List of t [...]
Good to know: `retrieveAndGenerate` needs `modelId` and
`knowledgeBaseId`, `retrieve` needs `knowledgeBaseId`, and `invokeAgent` needs
`agentId` and `agentAliasId`; without them, `retrieve` and `invokeAgent` fail
before they call Bedrock. The passages from `retrieve` are not JSON, and turned
into JSON as they are, each is an empty object: take the parts you need in the
next step, such as `$\{body[0].content.text}` in a Simple expression. With
`invokeAgent` and no session ID, each m [...]
required:
@@ -159,6 +159,12 @@ spec:
example: HTTP
dataTypes:
in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The question, as text."
+ mediaType: text/plain
headers:
CamelAwsBedrockAgentRuntimeSessionId:
title: Session ID
diff --git a/kamelets/aws-bedrock-text-sink.kamelet.yaml
b/kamelets/aws-bedrock-text-sink.kamelet.yaml
index 0d627dc05..09aa27dae 100644
--- a/kamelets/aws-bedrock-text-sink.kamelet.yaml
+++ b/kamelets/aws-bedrock-text-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to summarize, classify, translate or write text with a large
language model, for example to summarize support tickets or draft replies. To
answer questions from your own documents in a Bedrock knowledge base, use
`aws-bedrock-agent-runtime-sink`.
- Input: the body is the request of the model, as JSON text in the format
of the chosen model, not the bare prompt. For Amazon Titan, for example
`{"inputText":"Summarize: ...","textGenerationConfig":{"maxTokenCount":500}}`.
For Claude 3, the Messages format, for example
`{"anthropic_version":"bedrock-2023-05-31","max_tokens":500,"messages":[{"role":"user","content":"Summarize:
..."}]}`.
+ Input: the body is the request of the model, as JSON text in the format
of the chosen model, not the bare prompt, or as a Map, which is written as
JSON. For Amazon Titan, for example `{"inputText":"Summarize:
...","textGenerationConfig":{"maxTokenCount":500}}`. For Claude 3, the Messages
format, for example
`{"anthropic_version":"bedrock-2023-05-31","max_tokens":500,"messages":[{"role":"user","content":"Summarize:
..."}]}`.
- Output: when it is used inside a route, the body afterwards is the
answer, in a form that depends on the model: for Titan the response as JSON
text, with the generated text in `results`; for Claude 3 the response as parsed
JSON, with the generated text in `content`; for the older Claude models only
the generated text, as text.
+ Output: when it is used inside a route, the body afterwards is the
answer, in a form that depends on the model: for Titan the response as JSON
text, with the generated text in `results`; for Claude 3 the response as parsed
JSON, with the generated text in `content`; for the older Claude models only
the generated text, as text. The `Content-Type` header stays
`application/json`, from the request.
Good to know: the request and response formats are those of the model
provider, described for each model in the Amazon Bedrock documentation; a body
in another format fails. Each message is one call of the model. To reach AWS
through an HTTP proxy, set `proxyHost` and `proxyPort`, and set `proxyProtocol`
to `HTTP` for a proxy that takes plain HTTP, such as Squid. Headers that start
with `CamelAwsBedrock` are removed from the message first, so they cannot
change what the Kamelet does.
required:
@@ -125,7 +125,16 @@ spec:
type: string
enum: ["HTTP", "HTTPS"]
example: HTTP
+ dataTypes:
+ in:
+ default: json
+ types:
+ json:
+ format: "application-json"
+ description: "The request of the model, as JSON text in bytes."
+ mediaType: application/json
dependencies:
+ - "camel:jackson3"
- "camel:aws-bedrock"
- "camel:kamelet"
template:
diff --git a/kamelets/aws-cloudtrail-source.kamelet.yaml
b/kamelets/aws-cloudtrail-source.kamelet.yaml
index 1af11b562..c9730e54b 100644
--- a/kamelets/aws-cloudtrail-source.kamelet.yaml
+++ b/kamelets/aws-cloudtrail-source.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
Use it to react to activity in an AWS account, for example to raise an
alert when a secret is read, a security group is changed or someone signs in to
the console. Set `eventSource` to read the events of one AWS service only.
- Output: the body is the CloudTrail record of the event, as JSON text.
The headers give the ID, the name (such as `GetSecretValue`), the source (such
as `secretsmanager.amazonaws.com`) and the user name of the event.
+ Output: the body is the CloudTrail record of the event, as JSON text in
bytes, and the `Content-Type` header is `application/json`. The headers give
the ID, the name (such as `GetSecretValue`), the source (such as
`secretsmanager.amazonaws.com`) and the user name of the event.
Good to know: it looks up the management events that CloudTrail keeps
for the region, and reads the events that happen after it starts. It remembers
where it is only while it runs: the events that happen while it is stopped are
not read. Nothing is removed from CloudTrail. An event can be looked up only
some minutes after it happened, and sometimes after a newer event: every
`lookBackInterval` it looks up the last `lookBackWindow` again, and reads the
events it missed. To reach AWS [...]
required:
@@ -140,7 +140,7 @@ spec:
example: HTTP
dataTypes:
out:
- default: text
+ default: json
headers:
CamelAwsCloudTrailEventId:
title: CloudTrail Event ID
@@ -159,6 +159,10 @@ spec:
description: The name of the user or role that made the call, when
CloudTrail knows it.
type: string
types:
+ json:
+ format: "application-json"
+ description: "The CloudTrail record of the event, as JSON text in
bytes."
+ mediaType: application/json
text:
format: "text-plain"
description: Default text representation of the Cloudtrail Event
@@ -189,6 +193,7 @@ spec:
description: The exchange creation timestamp as event time.
type: string
dependencies:
+ - "camel:jackson3"
- "camel:aws-cloudtrail"
- "camel:kamelet"
template:
diff --git a/kamelets/aws-comprehend-sink.kamelet.yaml
b/kamelets/aws-comprehend-sink.kamelet.yaml
index 2aff8797f..655b91e96 100644
--- a/kamelets/aws-comprehend-sink.kamelet.yaml
+++ b/kamelets/aws-comprehend-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the text to analyze.
- Output: when it is used inside a route, the body afterwards is what was
found, as objects of the AWS SDK for Java (not JSON text): a List for most
operations, such as the languages with their scores for
`detectDominantLanguage` or the entities for `detectEntities`, and the
sentiment with its scores for `detectSentiment`. Headers give the main result:
`CamelAwsComprehendDetectedLanguage` with its score, or
`CamelAwsComprehendDetectedSentiment` with its scores.
+ Output: when it is used inside a route, the body afterwards is what was
found, as objects of the AWS SDK for Java (not JSON text): a List for most
operations, such as the languages with their scores for
`detectDominantLanguage` or the entities for `detectEntities`, and the
sentiment with its scores for `detectSentiment`. The `Content-Type` header
stays `text/plain`, from the text. Headers give the main result:
`CamelAwsComprehendDetectedLanguage` with its score, or `CamelAwsCompreh [...]
Good to know: every operation except `detectDominantLanguage` needs
`languageCode`, and a message fails without it. `classifyDocument` needs
`endpointArn`. To reach AWS through an HTTP proxy, set `proxyHost` and
`proxyPort`, and set `proxyProtocol` to `HTTP` for a proxy that takes plain
HTTP, such as Squid. Headers that start with `CamelAwsComprehend` are removed
from the message first, so they cannot change what the Kamelet does.
required:
@@ -136,6 +136,13 @@ spec:
enum: ["HTTP", "HTTPS"]
example: HTTP
dataTypes:
+ in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The text to analyze."
+ mediaType: text/plain
out:
headers:
CamelAwsComprehendDetectedLanguage:
diff --git a/kamelets/aws-ddb-sink.kamelet.yaml
b/kamelets/aws-ddb-sink.kamelet.yaml
index e4d9261f2..bc74478f8 100644
--- a/kamelets/aws-ddb-sink.kamelet.yaml
+++ b/kamelets/aws-ddb-sink.kamelet.yaml
@@ -133,12 +133,12 @@ spec:
enum: ["HTTP", "HTTPS"]
example: HTTP
dataTypes:
- # No 'default:' here on purpose. Declaring a default input type makes Camel
- # apply the aws2-ddb:application-json transformation at the kamelet:source
- # boundary, before any step below runs -- so the operation set by this
- # template was never visible to it and every message was transformed as
- # PutItem. The transformDataType step below applies the same type after the
- # operation is set. See #2941.
+ # No 'default:' here on purpose. Camel runs a default input type at the
+ # kamelet:source boundary, before any step below, when the operation of
+ # the template is not known yet: a body with an `operation` field then
+ # fails, even one that names the configured operation. The
+ # transformDataType step below applies the type after the operation is
+ # set. See #2941 and #3117.
in:
headers:
CamelAwsDdbOperation:
diff --git a/kamelets/aws-eventbridge-sink.kamelet.yaml
b/kamelets/aws-eventbridge-sink.kamelet.yaml
index c7018c37d..d1f12366b 100644
--- a/kamelets/aws-eventbridge-sink.kamelet.yaml
+++ b/kamelets/aws-eventbridge-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to publish business events, such as `Order Shipped`, for other
applications and AWS services to react to through EventBridge rules.
- Input: the body is the detail of the event, as JSON text that holds a
JSON object, such as `{"orderId": "A-1"}`. The `detail-type` header (or
`ce-detail-type`) is the detail type, such as `Order Shipped`; the
`event-source` header (or `ce-event-source`, or `ce-source`) is the source,
such as `com.example.shop`; and the `resources-arn` header (or
`ce-resources-arn`) is the ARN (Amazon Resource Name) of the resource the event
is about, or several separated by commas. Each header fall [...]
+ Input: the body is the detail of the event, as JSON text that holds a
JSON object, such as `{"orderId": "A-1"}`, or as a Map, which is written as
JSON. The `detail-type` header (or `ce-detail-type`) is the detail type, such
as `Order Shipped`; the `event-source` header (or `ce-event-source`, or
`ce-source`) is the source, such as `com.example.shop`; and the `resources-arn`
header (or `ce-resources-arn`) is the ARN (Amazon Resource Name) of the
resource the event is about, or severa [...]
- Output: when it is used inside a route, the body afterwards is the
response of EventBridge, and the `CamelAwsEventbridgeFailedEntryCount` header
is 1 when EventBridge rejected the event, 0 otherwise.
+ Output: when it is used inside a route, the body afterwards is the
response of EventBridge, and the `CamelAwsEventbridgeFailedEntryCount` header
is 1 when EventBridge rejected the event, 0 otherwise. The `Content-Type`
header is `application/json`.
Good to know: a message fails when it has no detail type, no source or
no resource ARN, from a header or an option. `eventSourcePrefix` is put before
every source. An event that EventBridge rejects, such as one whose body is not
a JSON object, is not delivered; depending on the Camel version the message
then fails, or it only sets `CamelAwsEventbridgeFailedEntryCount` to 1. To
reach AWS through an HTTP proxy, set `proxyHost` and `proxyPort`, and set
`proxyProtocol` to `HTTP` for a [...]
required:
@@ -149,6 +149,12 @@ spec:
example: HTTP
dataTypes:
in:
+ default: json
+ types:
+ json:
+ format: "application-json"
+ description: "The detail of the event, a JSON object, as JSON text
in bytes."
+ mediaType: application/json
headers:
detail-type:
title: Detail Type
@@ -163,6 +169,7 @@ spec:
description: The ARNs of the resources the event is about, separated
by commas. `ce-resources-arn` works too. Without it, the `resourcesArn` option
is used; one of them is required.
type: string
dependencies:
+ - "camel:jackson3"
- "camel:aws2-eventbridge"
- "camel:kamelet"
template:
diff --git a/kamelets/aws-kinesis-firehose-sink.kamelet.yaml
b/kamelets/aws-kinesis-firehose-sink.kamelet.yaml
index b9cf3c513..e32e84d53 100644
--- a/kamelets/aws-kinesis-firehose-sink.kamelet.yaml
+++ b/kamelets/aws-kinesis-firehose-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to load events or logs into S3 or a data warehouse without
writing code that reads them, with Firehose doing the batching. To feed a
Kinesis data stream that your own applications read, use `aws-kinesis-sink`.
- Input: the body becomes the data of the record, as text, bytes or a
stream. Turn structured data such as a Map into JSON text first, for example
with `json-serialize-action`. Firehose writes the records one after the other,
without anything between them: end each record with a line break if the files
must have one record per line. Headers are not used.
+ Input: the body becomes the data of the record, as text, bytes or a
stream. Turn structured data such as a Map into JSON text first, for example
with `json-serialize-action`: a Map, a List or a number fails. Firehose writes
the records one after the other, without anything between them: end each record
with a line break if the files must have one record per line. Headers are not
used.
- Output: the message is unchanged. The `CamelAwsKinesisFirehoseRecordId`
header gives the ID of the record.
+ Output: the body afterwards is the data of the record, as bytes (a
stream stays a stream), and the `Content-Type` header is
`application/octet-stream`. The `CamelAwsKinesisFirehoseRecordId` header gives
the ID of the record.
Good to know: the delivery stream must exist and take Direct PUT as its
source; a message for a delivery stream that does not exist fails. To reach AWS
through an HTTP proxy, set `proxyHost` and `proxyPort`, and set `proxyProtocol`
to `HTTP` for a proxy that takes plain HTTP, such as Squid. Headers that start
with `CamelAwsKinesisFirehose` are removed from the message first, so they
cannot change what the Kamelet does.
required:
@@ -126,6 +126,14 @@ spec:
type: string
enum: ["HTTP", "HTTPS"]
example: HTTP
+ dataTypes:
+ in:
+ default: binary
+ types:
+ binary:
+ format: "application-octet-stream"
+ description: "The data of the record, as bytes. Text is turned into
bytes; a stream is kept as it is."
+ mediaType: application/octet-stream
dependencies:
- "camel:aws2-kinesis"
- "camel:kamelet"
diff --git a/kamelets/aws-kinesis-sink.kamelet.yaml
b/kamelets/aws-kinesis-sink.kamelet.yaml
index b9c3c63b0..6ca93a872 100644
--- a/kamelets/aws-kinesis-sink.kamelet.yaml
+++ b/kamelets/aws-kinesis-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to feed a stream of events, such as clicks, logs or sensor
readings, to the applications that read the stream, for example with
`aws-kinesis-source`. To deliver data to S3 or a data warehouse without writing
a reader, use `aws-kinesis-firehose-sink`.
- Input: the body becomes the data of the record, as text, bytes or a
stream. The optional `partition` header (or `ce-partition`) is the partition
key: the records with the same key go to the same shard, in order. Without it,
the key is a unique ID, so the records spread over the shards. The optional
`sequence-number` header (or `ce-sequencenumber`) is the sequence number of the
record that must come before this one, for a strict order within a partition
key.
+ Input: the body becomes the data of the record, as text, bytes or a
stream. A Map, a List or a number fails: turn structured data into JSON text
first, for example with `json-serialize-action`. The optional `partition`
header (or `ce-partition`) is the partition key: the records with the same key
go to the same shard, in order. Without it, the key is a unique ID, so the
records spread over the shards. The optional `sequence-number` header (or
`ce-sequencenumber`) is the sequence nu [...]
- Output: the message is unchanged. The `CamelAwsKinesisSequenceNumber`
and `CamelAwsKinesisShardId` headers give the sequence number and the shard of
the record.
+ Output: the body afterwards is the data of the record, as bytes (a
stream stays a stream), and the `Content-Type` header is
`application/octet-stream`. The `CamelAwsKinesisSequenceNumber` and
`CamelAwsKinesisShardId` headers give the sequence number and the shard of the
record.
Good to know: the stream must exist. The other headers are not sent: a
Kinesis record has only data and a partition key. To reach AWS through an HTTP
proxy, set `proxyHost` and `proxyPort`, and set `proxyProtocol` to `HTTP` for a
proxy that takes plain HTTP, such as Squid. Headers that start with
`CamelAwsKinesis` are removed from the message first, so they cannot change
what the Kamelet does.
required:
@@ -131,6 +131,12 @@ spec:
mediaType: application/octet-stream
dataTypes:
in:
+ default: binary
+ types:
+ binary:
+ format: "application-octet-stream"
+ description: "The data of the record, as bytes. Text is turned into
bytes; a stream is kept as it is."
+ mediaType: application/octet-stream
headers:
partition:
title: Partition Key
diff --git a/kamelets/aws-kinesis-source.kamelet.yaml
b/kamelets/aws-kinesis-source.kamelet.yaml
index e48136fca..3590e424b 100644
--- a/kamelets/aws-kinesis-source.kamelet.yaml
+++ b/kamelets/aws-kinesis-source.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to process a stream of events that other applications write to
Kinesis, such as clicks, logs or readings from devices, for example with
`aws-kinesis-sink`.
- Output: the body is the data of the record, as bytes. The headers give
the partition key, the sequence number, the shard ID and the arrival time of
the record.
+ Output: the body is the data of the record, as bytes, and the
`Content-Type` header is `application/octet-stream`. The headers give the
partition key, the sequence number, the shard ID and the arrival time of the
record.
- Good to know: by default it reads the stream from its oldest record, and
again from the oldest record each time the integration starts: it does not
remember where it stopped, so records are read again after a restart. Set
`iteratorType` to `LATEST` to read only the records written after it started;
the records written while it was stopped are then not read. `iteratorType` can
also start at a sequence number or at a time, again on each start. Records are
not removed: Kinesis keeps t [...]
+ Good to know: by default it reads the stream from its oldest record, and
again from the oldest record each time the integration starts: it does not
remember where it stopped, so records are read again after a restart. Set
`iteratorType` to `LATEST` to read only the records written after it started;
the records written while it was stopped are then not read. `iteratorType` can
also start at a sequence number or at a time, again on each start. Records are
not removed: Kinesis keeps t [...]
required:
- stream
- region
@@ -188,6 +188,12 @@ spec:
mediaType: application/octet-stream
dataTypes:
out:
+ default: binary
+ types:
+ binary:
+ format: "application-octet-stream"
+ description: "The data of the record, as bytes."
+ mediaType: application/octet-stream
headers:
CamelAwsKinesisPartitionKey:
title: Partition Key
diff --git a/kamelets/aws-lambda-sink.kamelet.yaml
b/kamelets/aws-lambda-sink.kamelet.yaml
index d41591b54..9033d5016 100644
--- a/kamelets/aws-lambda-sink.kamelet.yaml
+++ b/kamelets/aws-lambda-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to run your own serverless code on each message, such as
enriching an order, checking a document or calling another API, without running
a server for it.
- Input: the body is the event given to the function, as JSON text, such
as `{"orderId":"A-1"}`. Turn structured data such as a Map into JSON text
first, for example with `json-serialize-action`.
+ Input: the body is the event given to the function, as JSON text, such
as `{"orderId":"A-1"}`, or as a Map or a List, which is written as JSON. Other
text is sent as a JSON string: `hello` becomes `"hello"`. A number fails: send
it as text.
- Output: when it is used inside a route, the body afterwards is what the
function returned, as text (JSON text for most functions). The
`CamelAwsLambdaStatusCode` header holds the status code of the call.
+ Output: when it is used inside a route, the body afterwards is what the
function returned, as text (JSON text for most functions). The
`CamelAwsLambdaStatusCode` header holds the status code of the call, and the
`Content-Type` header is `application/json`.
Good to know: an error raised inside the function does not fail the
message: the body is then the error that the function reported, and the
`CamelAwsLambdaFunctionError` header is set, for example to `Unhandled`. A
function that does not exist fails the message. Each call waits until the
function ends; the function cannot be called asynchronously (invocation type
`Event`). Set `operation` to read the settings, versions or aliases of the
function instead of calling it, or to publish [...]
required:
@@ -132,6 +132,13 @@ spec:
example: getFunctionConfiguration
enum: ["invokeFunction", "getFunction", "getFunctionConfiguration",
"listVersions", "listAliases", "publishVersion", "listFunctions"]
dataTypes:
+ in:
+ default: json
+ types:
+ json:
+ format: "application-json"
+ description: "The event given to the function, as JSON text in
bytes."
+ mediaType: application/json
out:
headers:
CamelAwsLambdaStatusCode:
@@ -143,6 +150,7 @@ spec:
description: Set when the function raised an error, for example to
`Unhandled`; then the body is the error.
type: string
dependencies:
+ - "camel:jackson3"
- "camel:aws2-lambda"
- "camel:kamelet"
template:
diff --git a/kamelets/aws-polly-sink.kamelet.yaml
b/kamelets/aws-polly-sink.kamelet.yaml
index 5f5d96553..20ba2b165 100644
--- a/kamelets/aws-polly-sink.kamelet.yaml
+++ b/kamelets/aws-polly-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the text to speak, as plain text, or as SSML when
`textType` is `SSML`. The voice comes from `voiceId`, or when that is not set
from the `CamelAwsPollyVoiceId` header; one of them is required.
- Output: when it is used inside a route, the body afterwards is the
audio, as a stream in the format of `outputFormat`, and the
`CamelAwsPollyContentType` header holds its content type, such as `audio/mpeg`.
+ Output: when it is used inside a route, the body afterwards is the
audio, as a stream in the format of `outputFormat`, and the
`CamelAwsPollyContentType` header holds its content type, such as `audio/mpeg`.
The `Content-Type` header stays `text/plain`, from the text: it is not the type
of the audio.
Good to know: the stream can be read only once, so write it to a file or
a bucket right away. A voice that is not available with the chosen `engine`
fails the message. To change how words are pronounced, such as an abbreviation
or a product name, store a pronunciation lexicon in Polly and name it in
`lexiconNames`. To reach AWS through an HTTP proxy, set `proxyHost` and
`proxyPort`, and set `proxyProtocol` to `HTTP` for a proxy that takes plain
HTTP, such as Squid. Headers that sta [...]
required:
@@ -159,6 +159,12 @@ spec:
example: w3c
dataTypes:
in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The text to speak, as plain text or SSML."
+ mediaType: text/plain
headers:
CamelAwsPollyVoiceId:
title: Voice ID
diff --git a/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml
b/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml
index 60c8e2e4d..bec4a27b3 100644
--- a/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml
+++ b/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to store a stream of small records, such as log lines, events or
sensor readings, as a few large files instead of one file per message. To
upload one file per message, use `aws-s3-sink`.
- Input: the body is added to the end of the current file as it is, as
text, bytes or a stream. Nothing is put between two messages: end each message
with a line break if the file must have one record per line. The names of the
files come from `keyName`, not from headers.
+ Input: the body is added to the end of the current file as it is, as
text, bytes or a stream. A Map, a List or a number fails: turn structured data
into JSON text first, for example with `json-serialize-action`. Nothing is put
between two messages: end each message with a line break if the file must have
one record per line. The names of the files come from `keyName`, not from
headers.
- Output: the message is unchanged. The message that completes a file gets
the `CamelAwsS3ETag` header of that file, and the `CamelHttpResponseCode`
header with the HTTP status code of the upload, such as 200.
+ Output: the body afterwards is what was added to the file, as bytes (a
stream stays a stream), and the `Content-Type` header is
`application/octet-stream`. The message that completes a file gets the
`CamelAwsS3ETag` header of that file, and the `CamelHttpResponseCode` header
with the HTTP status code of the upload, such as 200.
Good to know: a file is uploaded when it has `batchMessageNumber`
messages or `batchSize` bytes, or when `streamingUploadTimeout` has passed;
until then it is not in the bucket. With the default `namingStrategy` of
`progressive`, the first file is named `keyName`, such as `logs/app.log`, and
the next ones `logs/app-1.log`, `logs/app-2.log` and so on. With
`restartingPolicy` set to `override`, a new run starts again from `keyName` and
replaces the files of the earlier run. To encryp [...]
required:
@@ -187,6 +187,14 @@ spec:
type: string
enum: ["HTTP", "HTTPS"]
example: HTTP
+ dataTypes:
+ in:
+ default: binary
+ types:
+ binary:
+ format: "application-octet-stream"
+ description: "The content to add to the current file, as bytes. Text
is turned into bytes; a stream is kept as it is."
+ mediaType: application/octet-stream
dependencies:
- "camel:aws2-s3"
- "camel:kamelet"
diff --git a/kamelets/aws-secrets-manager-sink.kamelet.yaml
b/kamelets/aws-secrets-manager-sink.kamelet.yaml
index 5bdbde3e7..d7be04ffb 100644
--- a/kamelets/aws-secrets-manager-sink.kamelet.yaml
+++ b/kamelets/aws-secrets-manager-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the value of the secret, as text, for example a
password, or several values as a JSON object in JSON text. With `operation` set
to `getSecret`, the body is not used. For `createSecret`, the name of the new
secret comes from the `secret-name` header, else from the `ce-secret-name`
header; without either, the ID of the message is used as the name.
`updateSecret` and `getSecret` work on the secret in `secretId`.
- Output: when it is used inside a route, the body afterwards is the
answer of AWS, a `CreateSecretResponse` object of the AWS SDK for Java with the
ARN, the name and the version ID of the new secret; for `updateSecret`, an
`UpdateSecretResponse` with the ARN, the name and the new version ID. For
`getSecret`, the body is the value of the secret, as text, or as bytes for a
binary secret, and the `CamelAwsSecretsManagerSecretVersionId` header holds the
ID of its version.
+ Output: when it is used inside a route, the body afterwards is the
answer of AWS, a `CreateSecretResponse` object of the AWS SDK for Java with the
ARN, the name and the version ID of the new secret; for `updateSecret`, an
`UpdateSecretResponse` with the ARN, the name and the new version ID. For
`getSecret`, the body is the value of the secret, as text, or as bytes for a
binary secret, and the `CamelAwsSecretsManagerSecretVersionId` header holds the
ID of its version. The `Content-T [...]
Good to know: by default it only creates secrets, and a message for a
name that already exists fails. Set `operation` to `updateSecret` to change the
value of the existing secret in `secretId`, or to `getSecret` to read it; both
fail when `secretId` is not set or the secret does not exist. A message without
a name header creates a secret with a generated name, such as
`4D678616B8AFAA1-0000000000000002`. With `binaryPayload`, the body is stored as
the binary value of the secret inst [...]
required:
@@ -139,6 +139,12 @@ spec:
example: true
dataTypes:
in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The value of the secret, as text."
+ mediaType: text/plain
headers:
secret-name:
title: Secret Name
diff --git a/kamelets/aws-ses-sink.kamelet.yaml
b/kamelets/aws-ses-sink.kamelet.yaml
index 5ae3d3cae..9f6a04bf1 100644
--- a/kamelets/aws-ses-sink.kamelet.yaml
+++ b/kamelets/aws-ses-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the text of the email, as plain text. The `to` header
(or `ce-to`) gives one or more recipient addresses, separated by commas; it is
required unless the `to` option is set. The optional `subject` header (or
`ce-subject`) is the subject; without it and without the `subject` option, the
subject is a generated ID. The optional `reply-to-addresses` header (or
`ce-reply-to-addresses`) is a comma-separated list of addresses that replies go
to. Each of these headers tak [...]
- Output: the message is unchanged. The `CamelAwsSesMessageId` header
gives the ID that SES gave the email.
+ Output: the body afterwards is the text of the email, as text, and the
`Content-Type` header is `text/plain`. The `CamelAwsSesMessageId` header gives
the ID that SES gave the email.
Good to know: a message without a `to` header fails, unless the `to`
option is set. The `cc`, `bcc`, `returnPath` and `configurationSet` options
apply to every email. The `from` address, and `returnPath` when it is set, must
be verified in SES, and while the SES account is in the sandbox, the recipients
must be verified too. A `configurationSet` that does not exist in SES makes
every email fail. To reach a local stand-in of AWS, use `overrideEndpoint` and
`uriEndpointOverride`. To [...]
required:
@@ -168,6 +168,12 @@ spec:
type: string
dataTypes:
in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The text of the email."
+ mediaType: text/plain
headers:
to:
title: To
diff --git a/kamelets/aws-translate-action.kamelet.yaml
b/kamelets/aws-translate-action.kamelet.yaml
index feef00222..fde7475d2 100644
--- a/kamelets/aws-translate-action.kamelet.yaml
+++ b/kamelets/aws-translate-action.kamelet.yaml
@@ -38,7 +38,7 @@ spec:
Input: the body is the text to translate.
- Output: the body is the translated text.
+ Output: the body is the translated text, and the `Content-Type` header
is `text/plain`.
Good to know: the target language is fixed by `targetLanguage`. The
source language is fixed by `sourceLanguage`, or, with
`autodetectSourceLanguage`, Amazon Translate detects it in each message. Only
the listed language codes can be chosen, although Amazon Translate knows more
languages. With `terminologyNames`, your own translations of terms, such as
product and brand names, are applied. To reach AWS through an HTTP proxy, set
`proxyHost` and `proxyPort`, and set `proxyProtocol` [...]
required:
@@ -142,6 +142,21 @@ spec:
type: string
pattern: "^([A-Za-z0-9-]_?)+(,([A-Za-z0-9-]_?)+)*$"
example: product-names
+ dataTypes:
+ in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The text to translate."
+ mediaType: text/plain
+ out:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The translated text."
+ mediaType: text/plain
dependencies:
- "camel:kamelet"
- "camel:aws2-translate"
diff --git
a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
index fcd011b1d..f87894b0e 100644
--- a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
+++ b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
@@ -25,7 +25,7 @@
"supportLevel" : "Stable",
"title" : "AWS Bedrock Agent Runtime Sink",
"summary" : "Answers the question in each message from the documents of an
Amazon Bedrock knowledge base, or finds the passages of the documents that
match it, or passes it to a Bedrock agent.",
- "description" : "Answers the question in each message from the documents
of an Amazon Bedrock knowledge base, or finds the passages of the documents
that match it, or passes it to a Bedrock agent.\n\nUse it to build a
question-and-answer service or a chatbot over your own documents, such as
manuals, policies or FAQs, loaded into a Bedrock knowledge base. Set
`operation` to `retrieve` to get only the passages that match the question, for
example to show them as search results or to gi [...]
+ "description" : "Answers the question in each message from the documents
of an Amazon Bedrock knowledge base, or finds the passages of the documents
that match it, or passes it to a Bedrock agent.\n\nUse it to build a
question-and-answer service or a chatbot over your own documents, such as
manuals, policies or FAQs, loaded into a Bedrock knowledge base. Set
`operation` to `retrieve` to get only the passages that match the question, for
example to show them as search results or to gi [...]
"group" : "AWS Bedrock",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -45,7 +45,7 @@
"supportLevel" : "Stable",
"title" : "AWS Bedrock Text Sink",
"summary" : "Sends a prompt to a text model in Amazon Bedrock, such as
Amazon Titan or Anthropic Claude, for each message, and gives the answer of the
model.",
- "description" : "Sends a prompt to a text model in Amazon Bedrock, such as
Amazon Titan or Anthropic Claude, for each message, and gives the answer of the
model.\n\nUse it to summarize, classify, translate or write text with a large
language model, for example to summarize support tickets or draft replies. To
answer questions from your own documents in a Bedrock knowledge base, use
`aws-bedrock-agent-runtime-sink`.\n\nInput: the body is the request of the
model, as JSON text in the f [...]
+ "description" : "Sends a prompt to a text model in Amazon Bedrock, such as
Amazon Titan or Anthropic Claude, for each message, and gives the answer of the
model.\n\nUse it to summarize, classify, translate or write text with a large
language model, for example to summarize support tickets or draft replies. To
answer questions from your own documents in a Bedrock knowledge base, use
`aws-bedrock-agent-runtime-sink`.\n\nInput: the body is the request of the
model, as JSON text in the f [...]
"group" : "AWS Bedrock",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -55,7 +55,7 @@
"supportLevel" : "Stable",
"title" : "AWS Cloudtrail Source",
"summary" : "Reads the events that AWS CloudTrail records in an AWS
account, such as API calls and console sign-ins, one message per event.",
- "description" : "Reads the events that AWS CloudTrail records in an AWS
account, such as API calls and console sign-ins, one message per event.\n\nUse
it to react to activity in an AWS account, for example to raise an alert when a
secret is read, a security group is changed or someone signs in to the console.
Set `eventSource` to read the events of one AWS service only.\n\nOutput: the
body is the CloudTrail record of the event, as JSON text. The headers give the
ID, the name (such as [...]
+ "description" : "Reads the events that AWS CloudTrail records in an AWS
account, such as API calls and console sign-ins, one message per event.\n\nUse
it to react to activity in an AWS account, for example to raise an alert when a
secret is read, a security group is changed or someone signs in to the console.
Set `eventSource` to read the events of one AWS service only.\n\nOutput: the
body is the CloudTrail record of the event, as JSON text in bytes, and the
`Content-Type` header is [...]
"group" : "AWS Cloudtrail",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -75,7 +75,7 @@
"supportLevel" : "Preview",
"title" : "AWS Comprehend Sink",
"summary" : "Analyzes the text of each message with Amazon Comprehend, for
example to detect its language, its sentiment, or the people, places and
personal data it mentions.",
- "description" : "Analyzes the text of each message with Amazon Comprehend,
for example to detect its language, its sentiment, or the people, places and
personal data it mentions.\n\nUse it to sort customer feedback by sentiment,
route support tickets by language, or find personal data in text before it is
stored.\n\nInput: the body is the text to analyze.\n\nOutput: when it is used
inside a route, the body afterwards is what was found, as objects of the AWS
SDK for Java (not JSON tex [...]
+ "description" : "Analyzes the text of each message with Amazon Comprehend,
for example to detect its language, its sentiment, or the people, places and
personal data it mentions.\n\nUse it to sort customer feedback by sentiment,
route support tickets by language, or find personal data in text before it is
stored.\n\nInput: the body is the text to analyze.\n\nOutput: when it is used
inside a route, the body afterwards is what was found, as objects of the AWS
SDK for Java (not JSON tex [...]
"group" : "AWS Comprehend",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -115,7 +115,7 @@
"supportLevel" : "Stable",
"title" : "AWS Eventbridge Sink",
"summary" : "Sends each message as an event to an Amazon EventBridge event
bus, where rules route it to targets such as Lambda functions, SQS queues or
Step Functions.",
- "description" : "Sends each message as an event to an Amazon EventBridge
event bus, where rules route it to targets such as Lambda functions, SQS queues
or Step Functions.\n\nUse it to publish business events, such as `Order
Shipped`, for other applications and AWS services to react to through
EventBridge rules.\n\nInput: the body is the detail of the event, as JSON text
that holds a JSON object, such as `{\"orderId\": \"A-1\"}`. The `detail-type`
header (or `ce-detail-type`) is the [...]
+ "description" : "Sends each message as an event to an Amazon EventBridge
event bus, where rules route it to targets such as Lambda functions, SQS queues
or Step Functions.\n\nUse it to publish business events, such as `Order
Shipped`, for other applications and AWS services to react to through
EventBridge rules.\n\nInput: the body is the detail of the event, as JSON text
that holds a JSON object, such as `{\"orderId\": \"A-1\"}`, or as a Map, which
is written as JSON. The `detail-typ [...]
"group" : "AWS Eventbridge",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -125,7 +125,7 @@
"supportLevel" : "Stable",
"title" : "AWS Kinesis Firehose Sink",
"summary" : "Sends each message as a record to an Amazon Data Firehose
(Kinesis Data Firehose) delivery stream, which delivers the records in batches
to S3, Redshift, OpenSearch or another service.",
- "description" : "Sends each message as a record to an Amazon Data Firehose
(Kinesis Data Firehose) delivery stream, which delivers the records in batches
to S3, Redshift, OpenSearch or another service.\n\nUse it to load events or
logs into S3 or a data warehouse without writing code that reads them, with
Firehose doing the batching. To feed a Kinesis data stream that your own
applications read, use `aws-kinesis-sink`.\n\nInput: the body becomes the data
of the record, as text, bytes [...]
+ "description" : "Sends each message as a record to an Amazon Data Firehose
(Kinesis Data Firehose) delivery stream, which delivers the records in batches
to S3, Redshift, OpenSearch or another service.\n\nUse it to load events or
logs into S3 or a data warehouse without writing code that reads them, with
Firehose doing the batching. To feed a Kinesis data stream that your own
applications read, use `aws-kinesis-sink`.\n\nInput: the body becomes the data
of the record, as text, bytes [...]
"group" : "AWS Kinesis Firehose",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -135,7 +135,7 @@
"supportLevel" : "Stable",
"title" : "AWS Kinesis Sink",
"summary" : "Writes each message as a record to an Amazon Kinesis data
stream.",
- "description" : "Writes each message as a record to an Amazon Kinesis data
stream.\n\nUse it to feed a stream of events, such as clicks, logs or sensor
readings, to the applications that read the stream, for example with
`aws-kinesis-source`. To deliver data to S3 or a data warehouse without writing
a reader, use `aws-kinesis-firehose-sink`.\n\nInput: the body becomes the data
of the record, as text, bytes or a stream. The optional `partition` header (or
`ce-partition`) is the partit [...]
+ "description" : "Writes each message as a record to an Amazon Kinesis data
stream.\n\nUse it to feed a stream of events, such as clicks, logs or sensor
readings, to the applications that read the stream, for example with
`aws-kinesis-source`. To deliver data to S3 or a data warehouse without writing
a reader, use `aws-kinesis-firehose-sink`.\n\nInput: the body becomes the data
of the record, as text, bytes or a stream. A Map, a List or a number fails:
turn structured data into JSON t [...]
"group" : "AWS Kinesis",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -145,7 +145,7 @@
"supportLevel" : "Stable",
"title" : "AWS Kinesis Source",
"summary" : "Reads the records of an Amazon Kinesis data stream, one
message per record.",
- "description" : "Reads the records of an Amazon Kinesis data stream, one
message per record.\n\nUse it to process a stream of events that other
applications write to Kinesis, such as clicks, logs or readings from devices,
for example with `aws-kinesis-sink`.\n\nOutput: the body is the data of the
record, as bytes. The headers give the partition key, the sequence number, the
shard ID and the arrival time of the record.\n\nGood to know: by default it
reads the stream from its oldest re [...]
+ "description" : "Reads the records of an Amazon Kinesis data stream, one
message per record.\n\nUse it to process a stream of events that other
applications write to Kinesis, such as clicks, logs or readings from devices,
for example with `aws-kinesis-sink`.\n\nOutput: the body is the data of the
record, as bytes, and the `Content-Type` header is `application/octet-stream`.
The headers give the partition key, the sequence number, the shard ID and the
arrival time of the record.\n\nGo [...]
"group" : "AWS Kinesis",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -155,7 +155,7 @@
"supportLevel" : "Stable",
"title" : "AWS Lambda Sink",
"summary" : "Calls an AWS Lambda function for each message, with the body
as the event of the function, and waits for its result.",
- "description" : "Calls an AWS Lambda function for each message, with the
body as the event of the function, and waits for its result.\n\nUse it to run
your own serverless code on each message, such as enriching an order, checking
a document or calling another API, without running a server for it.\n\nInput:
the body is the event given to the function, as JSON text, such as
`{\"orderId\":\"A-1\"}`. Turn structured data such as a Map into JSON text
first, for example with `json-serializ [...]
+ "description" : "Calls an AWS Lambda function for each message, with the
body as the event of the function, and waits for its result.\n\nUse it to run
your own serverless code on each message, such as enriching an order, checking
a document or calling another API, without running a server for it.\n\nInput:
the body is the event given to the function, as JSON text, such as
`{\"orderId\":\"A-1\"}`, or as a Map or a List, which is written as JSON. Other
text is sent as a JSON string: `h [...]
"group" : "AWS Lambda",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -165,7 +165,7 @@
"supportLevel" : "Preview",
"title" : "AWS Polly Sink",
"summary" : "Turns the text of each message into speech with Amazon Polly,
and gives the audio, such as an MP3 file.",
- "description" : "Turns the text of each message into speech with Amazon
Polly, and gives the audio, such as an MP3 file.\n\nUse it to create voice
messages, audio versions of articles or spoken announcements from text. Write
the audio to a file or a bucket as the next step, for example with
`aws-s3-sink`.\n\nInput: the body is the text to speak, as plain text, or as
SSML when `textType` is `SSML`. The voice comes from `voiceId`, or when that is
not set from the `CamelAwsPollyVoiceId` [...]
+ "description" : "Turns the text of each message into speech with Amazon
Polly, and gives the audio, such as an MP3 file.\n\nUse it to create voice
messages, audio versions of articles or spoken announcements from text. Write
the audio to a file or a bucket as the next step, for example with
`aws-s3-sink`.\n\nInput: the body is the text to speak, as plain text, or as
SSML when `textType` is `SSML`. The voice comes from `voiceId`, or when that is
not set from the `CamelAwsPollyVoiceId` [...]
"group" : "AWS Polly",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -225,7 +225,7 @@
"supportLevel" : "Stable",
"title" : "AWS S3 Streaming upload Sink",
"summary" : "Writes many messages into a few large files in an Amazon S3
bucket, adding each message to the current file and starting a new file after a
number of messages or bytes.",
- "description" : "Writes many messages into a few large files in an Amazon
S3 bucket, adding each message to the current file and starting a new file
after a number of messages or bytes.\n\nUse it to store a stream of small
records, such as log lines, events or sensor readings, as a few large files
instead of one file per message. To upload one file per message, use
`aws-s3-sink`.\n\nInput: the body is added to the end of the current file as it
is, as text, bytes or a stream. Nothing [...]
+ "description" : "Writes many messages into a few large files in an Amazon
S3 bucket, adding each message to the current file and starting a new file
after a number of messages or bytes.\n\nUse it to store a stream of small
records, such as log lines, events or sensor readings, as a few large files
instead of one file per message. To upload one file per message, use
`aws-s3-sink`.\n\nInput: the body is added to the end of the current file as it
is, as text, bytes or a stream. A Map, a [...]
"group" : "AWS S3",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -235,7 +235,7 @@
"supportLevel" : "Stable",
"title" : "AWS Secrets Manager Sink",
"summary" : "Creates a secret in AWS Secrets Manager for each message,
with the body as its value, or changes or reads the value of an existing
secret.",
- "description" : "Creates a secret in AWS Secrets Manager for each message,
with the body as its value, or changes or reads the value of an existing
secret.\n\nUse it to store passwords, API keys or certificates that another
system generates, so that your applications can read them from Secrets Manager,
to rotate such a value, or to read one inside a route.\n\nInput: the body is
the value of the secret, as text, for example a password, or several values as
a JSON object in JSON text. [...]
+ "description" : "Creates a secret in AWS Secrets Manager for each message,
with the body as its value, or changes or reads the value of an existing
secret.\n\nUse it to store passwords, API keys or certificates that another
system generates, so that your applications can read them from Secrets Manager,
to rotate such a value, or to read one inside a route.\n\nInput: the body is
the value of the secret, as text, for example a password, or several values as
a JSON object in JSON text. [...]
"group" : "AWS Secrets Manager",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -245,7 +245,7 @@
"supportLevel" : "Stable",
"title" : "AWS SES Sink",
"summary" : "Sends each message as a plain-text email through Amazon SES
(Simple Email Service), to the addresses in the `to` header or the `to`
option.",
- "description" : "Sends each message as a plain-text email through Amazon
SES (Simple Email Service), to the addresses in the `to` header or the `to`
option.\n\nUse it to send notifications, alerts or confirmations by email from
an integration, such as an order confirmation or an alert when a job
fails.\n\nInput: the body is the text of the email, as plain text. The `to`
header (or `ce-to`) gives one or more recipient addresses, separated by commas;
it is required unless the `to` opti [...]
+ "description" : "Sends each message as a plain-text email through Amazon
SES (Simple Email Service), to the addresses in the `to` header or the `to`
option.\n\nUse it to send notifications, alerts or confirmations by email from
an integration, such as an order confirmation or an alert when a job
fails.\n\nInput: the body is the text of the email, as plain text. The `to`
header (or `ce-to`) gives one or more recipient addresses, separated by commas;
it is required unless the `to` opti [...]
"group" : "AWS SES",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
@@ -325,7 +325,7 @@
"supportLevel" : "Stable",
"title" : "AWS Translate Action",
"summary" : "Translates the text of each message from one language into
another with Amazon Translate.",
- "description" : "Translates the text of each message from one language
into another with Amazon Translate.\n\nUse it to translate customer messages,
support tickets or product descriptions, for example from Italian into English
before they are analyzed or stored, also when the messages come in several
languages.\n\nInput: the body is the text to translate.\n\nOutput: the body is
the translated text.\n\nGood to know: the target language is fixed by
`targetLanguage`. The source languag [...]
+ "description" : "Translates the text of each message from one language
into another with Amazon Translate.\n\nUse it to translate customer messages,
support tickets or product descriptions, for example from Italian into English
before they are analyzed or stored, also when the messages come in several
languages.\n\nInput: the body is the text to translate.\n\nOutput: the body is
the translated text, and the `Content-Type` header is `text/plain`.\n\nGood to
know: the target language i [...]
"group" : "AWS Translate",
"namespace" : "AWS",
"provider" : "Apache Software Foundation"
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
index 8631e5270..56add6f80 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-agent-runtime-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the question, as text. The optional
`CamelAwsBedrockAgentRuntimeSessionId` header continues an earlier
conversation, with `retrieveAndGenerate` and `invokeAgent`: set it to the
session ID of an earlier answer.
- Output: when it is used inside a route, the body afterwards depends on
`operation`. With `retrieveAndGenerate`, the default, and with `invokeAgent`,
it is the answer, as text. The `CamelAwsBedrockAgentRuntimeSessionId` header
holds the ID of the session, and the `CamelAwsBedrockAgentRuntimeCitations`
header the passages of the documents the answer is based on, as objects of the
AWS SDK for Java. With `retrieve`, the body is a List of the passages found,
each an object of the AWS SD [...]
+ Output: when it is used inside a route, the body afterwards depends on
`operation`. With `retrieveAndGenerate`, the default, and with `invokeAgent`,
it is the answer, as text, and the `Content-Type` header is `text/plain`. The
`CamelAwsBedrockAgentRuntimeSessionId` header holds the ID of the session, and
the `CamelAwsBedrockAgentRuntimeCitations` header the passages of the documents
the answer is based on, as objects of the AWS SDK for Java. With `retrieve`,
the body is a List of t [...]
Good to know: `retrieveAndGenerate` needs `modelId` and
`knowledgeBaseId`, `retrieve` needs `knowledgeBaseId`, and `invokeAgent` needs
`agentId` and `agentAliasId`; without them, `retrieve` and `invokeAgent` fail
before they call Bedrock. The passages from `retrieve` are not JSON, and turned
into JSON as they are, each is an empty object: take the parts you need in the
next step, such as `$\{body[0].content.text}` in a Simple expression. With
`invokeAgent` and no session ID, each m [...]
required:
@@ -159,6 +159,12 @@ spec:
example: HTTP
dataTypes:
in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The question, as text."
+ mediaType: text/plain
headers:
CamelAwsBedrockAgentRuntimeSessionId:
title: Session ID
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-text-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-text-sink.kamelet.yaml
index 0d627dc05..09aa27dae 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-text-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-bedrock-text-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to summarize, classify, translate or write text with a large
language model, for example to summarize support tickets or draft replies. To
answer questions from your own documents in a Bedrock knowledge base, use
`aws-bedrock-agent-runtime-sink`.
- Input: the body is the request of the model, as JSON text in the format
of the chosen model, not the bare prompt. For Amazon Titan, for example
`{"inputText":"Summarize: ...","textGenerationConfig":{"maxTokenCount":500}}`.
For Claude 3, the Messages format, for example
`{"anthropic_version":"bedrock-2023-05-31","max_tokens":500,"messages":[{"role":"user","content":"Summarize:
..."}]}`.
+ Input: the body is the request of the model, as JSON text in the format
of the chosen model, not the bare prompt, or as a Map, which is written as
JSON. For Amazon Titan, for example `{"inputText":"Summarize:
...","textGenerationConfig":{"maxTokenCount":500}}`. For Claude 3, the Messages
format, for example
`{"anthropic_version":"bedrock-2023-05-31","max_tokens":500,"messages":[{"role":"user","content":"Summarize:
..."}]}`.
- Output: when it is used inside a route, the body afterwards is the
answer, in a form that depends on the model: for Titan the response as JSON
text, with the generated text in `results`; for Claude 3 the response as parsed
JSON, with the generated text in `content`; for the older Claude models only
the generated text, as text.
+ Output: when it is used inside a route, the body afterwards is the
answer, in a form that depends on the model: for Titan the response as JSON
text, with the generated text in `results`; for Claude 3 the response as parsed
JSON, with the generated text in `content`; for the older Claude models only
the generated text, as text. The `Content-Type` header stays
`application/json`, from the request.
Good to know: the request and response formats are those of the model
provider, described for each model in the Amazon Bedrock documentation; a body
in another format fails. Each message is one call of the model. To reach AWS
through an HTTP proxy, set `proxyHost` and `proxyPort`, and set `proxyProtocol`
to `HTTP` for a proxy that takes plain HTTP, such as Squid. Headers that start
with `CamelAwsBedrock` are removed from the message first, so they cannot
change what the Kamelet does.
required:
@@ -125,7 +125,16 @@ spec:
type: string
enum: ["HTTP", "HTTPS"]
example: HTTP
+ dataTypes:
+ in:
+ default: json
+ types:
+ json:
+ format: "application-json"
+ description: "The request of the model, as JSON text in bytes."
+ mediaType: application/json
dependencies:
+ - "camel:jackson3"
- "camel:aws-bedrock"
- "camel:kamelet"
template:
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-cloudtrail-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-cloudtrail-source.kamelet.yaml
index 1af11b562..c9730e54b 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-cloudtrail-source.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-cloudtrail-source.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
Use it to react to activity in an AWS account, for example to raise an
alert when a secret is read, a security group is changed or someone signs in to
the console. Set `eventSource` to read the events of one AWS service only.
- Output: the body is the CloudTrail record of the event, as JSON text.
The headers give the ID, the name (such as `GetSecretValue`), the source (such
as `secretsmanager.amazonaws.com`) and the user name of the event.
+ Output: the body is the CloudTrail record of the event, as JSON text in
bytes, and the `Content-Type` header is `application/json`. The headers give
the ID, the name (such as `GetSecretValue`), the source (such as
`secretsmanager.amazonaws.com`) and the user name of the event.
Good to know: it looks up the management events that CloudTrail keeps
for the region, and reads the events that happen after it starts. It remembers
where it is only while it runs: the events that happen while it is stopped are
not read. Nothing is removed from CloudTrail. An event can be looked up only
some minutes after it happened, and sometimes after a newer event: every
`lookBackInterval` it looks up the last `lookBackWindow` again, and reads the
events it missed. To reach AWS [...]
required:
@@ -140,7 +140,7 @@ spec:
example: HTTP
dataTypes:
out:
- default: text
+ default: json
headers:
CamelAwsCloudTrailEventId:
title: CloudTrail Event ID
@@ -159,6 +159,10 @@ spec:
description: The name of the user or role that made the call, when
CloudTrail knows it.
type: string
types:
+ json:
+ format: "application-json"
+ description: "The CloudTrail record of the event, as JSON text in
bytes."
+ mediaType: application/json
text:
format: "text-plain"
description: Default text representation of the Cloudtrail Event
@@ -189,6 +193,7 @@ spec:
description: The exchange creation timestamp as event time.
type: string
dependencies:
+ - "camel:jackson3"
- "camel:aws-cloudtrail"
- "camel:kamelet"
template:
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-comprehend-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-comprehend-sink.kamelet.yaml
index 2aff8797f..655b91e96 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-comprehend-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-comprehend-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the text to analyze.
- Output: when it is used inside a route, the body afterwards is what was
found, as objects of the AWS SDK for Java (not JSON text): a List for most
operations, such as the languages with their scores for
`detectDominantLanguage` or the entities for `detectEntities`, and the
sentiment with its scores for `detectSentiment`. Headers give the main result:
`CamelAwsComprehendDetectedLanguage` with its score, or
`CamelAwsComprehendDetectedSentiment` with its scores.
+ Output: when it is used inside a route, the body afterwards is what was
found, as objects of the AWS SDK for Java (not JSON text): a List for most
operations, such as the languages with their scores for
`detectDominantLanguage` or the entities for `detectEntities`, and the
sentiment with its scores for `detectSentiment`. The `Content-Type` header
stays `text/plain`, from the text. Headers give the main result:
`CamelAwsComprehendDetectedLanguage` with its score, or `CamelAwsCompreh [...]
Good to know: every operation except `detectDominantLanguage` needs
`languageCode`, and a message fails without it. `classifyDocument` needs
`endpointArn`. To reach AWS through an HTTP proxy, set `proxyHost` and
`proxyPort`, and set `proxyProtocol` to `HTTP` for a proxy that takes plain
HTTP, such as Squid. Headers that start with `CamelAwsComprehend` are removed
from the message first, so they cannot change what the Kamelet does.
required:
@@ -136,6 +136,13 @@ spec:
enum: ["HTTP", "HTTPS"]
example: HTTP
dataTypes:
+ in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The text to analyze."
+ mediaType: text/plain
out:
headers:
CamelAwsComprehendDetectedLanguage:
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-sink.kamelet.yaml
index e4d9261f2..bc74478f8 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-sink.kamelet.yaml
@@ -133,12 +133,12 @@ spec:
enum: ["HTTP", "HTTPS"]
example: HTTP
dataTypes:
- # No 'default:' here on purpose. Declaring a default input type makes Camel
- # apply the aws2-ddb:application-json transformation at the kamelet:source
- # boundary, before any step below runs -- so the operation set by this
- # template was never visible to it and every message was transformed as
- # PutItem. The transformDataType step below applies the same type after the
- # operation is set. See #2941.
+ # No 'default:' here on purpose. Camel runs a default input type at the
+ # kamelet:source boundary, before any step below, when the operation of
+ # the template is not known yet: a body with an `operation` field then
+ # fails, even one that names the configured operation. The
+ # transformDataType step below applies the type after the operation is
+ # set. See #2941 and #3117.
in:
headers:
CamelAwsDdbOperation:
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-eventbridge-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-eventbridge-sink.kamelet.yaml
index c7018c37d..d1f12366b 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-eventbridge-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-eventbridge-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to publish business events, such as `Order Shipped`, for other
applications and AWS services to react to through EventBridge rules.
- Input: the body is the detail of the event, as JSON text that holds a
JSON object, such as `{"orderId": "A-1"}`. The `detail-type` header (or
`ce-detail-type`) is the detail type, such as `Order Shipped`; the
`event-source` header (or `ce-event-source`, or `ce-source`) is the source,
such as `com.example.shop`; and the `resources-arn` header (or
`ce-resources-arn`) is the ARN (Amazon Resource Name) of the resource the event
is about, or several separated by commas. Each header fall [...]
+ Input: the body is the detail of the event, as JSON text that holds a
JSON object, such as `{"orderId": "A-1"}`, or as a Map, which is written as
JSON. The `detail-type` header (or `ce-detail-type`) is the detail type, such
as `Order Shipped`; the `event-source` header (or `ce-event-source`, or
`ce-source`) is the source, such as `com.example.shop`; and the `resources-arn`
header (or `ce-resources-arn`) is the ARN (Amazon Resource Name) of the
resource the event is about, or severa [...]
- Output: when it is used inside a route, the body afterwards is the
response of EventBridge, and the `CamelAwsEventbridgeFailedEntryCount` header
is 1 when EventBridge rejected the event, 0 otherwise.
+ Output: when it is used inside a route, the body afterwards is the
response of EventBridge, and the `CamelAwsEventbridgeFailedEntryCount` header
is 1 when EventBridge rejected the event, 0 otherwise. The `Content-Type`
header is `application/json`.
Good to know: a message fails when it has no detail type, no source or
no resource ARN, from a header or an option. `eventSourcePrefix` is put before
every source. An event that EventBridge rejects, such as one whose body is not
a JSON object, is not delivered; depending on the Camel version the message
then fails, or it only sets `CamelAwsEventbridgeFailedEntryCount` to 1. To
reach AWS through an HTTP proxy, set `proxyHost` and `proxyPort`, and set
`proxyProtocol` to `HTTP` for a [...]
required:
@@ -149,6 +149,12 @@ spec:
example: HTTP
dataTypes:
in:
+ default: json
+ types:
+ json:
+ format: "application-json"
+ description: "The detail of the event, a JSON object, as JSON text
in bytes."
+ mediaType: application/json
headers:
detail-type:
title: Detail Type
@@ -163,6 +169,7 @@ spec:
description: The ARNs of the resources the event is about, separated
by commas. `ce-resources-arn` works too. Without it, the `resourcesArn` option
is used; one of them is required.
type: string
dependencies:
+ - "camel:jackson3"
- "camel:aws2-eventbridge"
- "camel:kamelet"
template:
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-firehose-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-firehose-sink.kamelet.yaml
index b9cf3c513..e32e84d53 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-firehose-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-firehose-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to load events or logs into S3 or a data warehouse without
writing code that reads them, with Firehose doing the batching. To feed a
Kinesis data stream that your own applications read, use `aws-kinesis-sink`.
- Input: the body becomes the data of the record, as text, bytes or a
stream. Turn structured data such as a Map into JSON text first, for example
with `json-serialize-action`. Firehose writes the records one after the other,
without anything between them: end each record with a line break if the files
must have one record per line. Headers are not used.
+ Input: the body becomes the data of the record, as text, bytes or a
stream. Turn structured data such as a Map into JSON text first, for example
with `json-serialize-action`: a Map, a List or a number fails. Firehose writes
the records one after the other, without anything between them: end each record
with a line break if the files must have one record per line. Headers are not
used.
- Output: the message is unchanged. The `CamelAwsKinesisFirehoseRecordId`
header gives the ID of the record.
+ Output: the body afterwards is the data of the record, as bytes (a
stream stays a stream), and the `Content-Type` header is
`application/octet-stream`. The `CamelAwsKinesisFirehoseRecordId` header gives
the ID of the record.
Good to know: the delivery stream must exist and take Direct PUT as its
source; a message for a delivery stream that does not exist fails. To reach AWS
through an HTTP proxy, set `proxyHost` and `proxyPort`, and set `proxyProtocol`
to `HTTP` for a proxy that takes plain HTTP, such as Squid. Headers that start
with `CamelAwsKinesisFirehose` are removed from the message first, so they
cannot change what the Kamelet does.
required:
@@ -126,6 +126,14 @@ spec:
type: string
enum: ["HTTP", "HTTPS"]
example: HTTP
+ dataTypes:
+ in:
+ default: binary
+ types:
+ binary:
+ format: "application-octet-stream"
+ description: "The data of the record, as bytes. Text is turned into
bytes; a stream is kept as it is."
+ mediaType: application/octet-stream
dependencies:
- "camel:aws2-kinesis"
- "camel:kamelet"
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-sink.kamelet.yaml
index b9c3c63b0..6ca93a872 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to feed a stream of events, such as clicks, logs or sensor
readings, to the applications that read the stream, for example with
`aws-kinesis-source`. To deliver data to S3 or a data warehouse without writing
a reader, use `aws-kinesis-firehose-sink`.
- Input: the body becomes the data of the record, as text, bytes or a
stream. The optional `partition` header (or `ce-partition`) is the partition
key: the records with the same key go to the same shard, in order. Without it,
the key is a unique ID, so the records spread over the shards. The optional
`sequence-number` header (or `ce-sequencenumber`) is the sequence number of the
record that must come before this one, for a strict order within a partition
key.
+ Input: the body becomes the data of the record, as text, bytes or a
stream. A Map, a List or a number fails: turn structured data into JSON text
first, for example with `json-serialize-action`. The optional `partition`
header (or `ce-partition`) is the partition key: the records with the same key
go to the same shard, in order. Without it, the key is a unique ID, so the
records spread over the shards. The optional `sequence-number` header (or
`ce-sequencenumber`) is the sequence nu [...]
- Output: the message is unchanged. The `CamelAwsKinesisSequenceNumber`
and `CamelAwsKinesisShardId` headers give the sequence number and the shard of
the record.
+ Output: the body afterwards is the data of the record, as bytes (a
stream stays a stream), and the `Content-Type` header is
`application/octet-stream`. The `CamelAwsKinesisSequenceNumber` and
`CamelAwsKinesisShardId` headers give the sequence number and the shard of the
record.
Good to know: the stream must exist. The other headers are not sent: a
Kinesis record has only data and a partition key. To reach AWS through an HTTP
proxy, set `proxyHost` and `proxyPort`, and set `proxyProtocol` to `HTTP` for a
proxy that takes plain HTTP, such as Squid. Headers that start with
`CamelAwsKinesis` are removed from the message first, so they cannot change
what the Kamelet does.
required:
@@ -131,6 +131,12 @@ spec:
mediaType: application/octet-stream
dataTypes:
in:
+ default: binary
+ types:
+ binary:
+ format: "application-octet-stream"
+ description: "The data of the record, as bytes. Text is turned into
bytes; a stream is kept as it is."
+ mediaType: application/octet-stream
headers:
partition:
title: Partition Key
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-source.kamelet.yaml
index e48136fca..3590e424b 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-source.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-kinesis-source.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to process a stream of events that other applications write to
Kinesis, such as clicks, logs or readings from devices, for example with
`aws-kinesis-sink`.
- Output: the body is the data of the record, as bytes. The headers give
the partition key, the sequence number, the shard ID and the arrival time of
the record.
+ Output: the body is the data of the record, as bytes, and the
`Content-Type` header is `application/octet-stream`. The headers give the
partition key, the sequence number, the shard ID and the arrival time of the
record.
- Good to know: by default it reads the stream from its oldest record, and
again from the oldest record each time the integration starts: it does not
remember where it stopped, so records are read again after a restart. Set
`iteratorType` to `LATEST` to read only the records written after it started;
the records written while it was stopped are then not read. `iteratorType` can
also start at a sequence number or at a time, again on each start. Records are
not removed: Kinesis keeps t [...]
+ Good to know: by default it reads the stream from its oldest record, and
again from the oldest record each time the integration starts: it does not
remember where it stopped, so records are read again after a restart. Set
`iteratorType` to `LATEST` to read only the records written after it started;
the records written while it was stopped are then not read. `iteratorType` can
also start at a sequence number or at a time, again on each start. Records are
not removed: Kinesis keeps t [...]
required:
- stream
- region
@@ -188,6 +188,12 @@ spec:
mediaType: application/octet-stream
dataTypes:
out:
+ default: binary
+ types:
+ binary:
+ format: "application-octet-stream"
+ description: "The data of the record, as bytes."
+ mediaType: application/octet-stream
headers:
CamelAwsKinesisPartitionKey:
title: Partition Key
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-lambda-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-lambda-sink.kamelet.yaml
index d41591b54..9033d5016 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-lambda-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-lambda-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to run your own serverless code on each message, such as
enriching an order, checking a document or calling another API, without running
a server for it.
- Input: the body is the event given to the function, as JSON text, such
as `{"orderId":"A-1"}`. Turn structured data such as a Map into JSON text
first, for example with `json-serialize-action`.
+ Input: the body is the event given to the function, as JSON text, such
as `{"orderId":"A-1"}`, or as a Map or a List, which is written as JSON. Other
text is sent as a JSON string: `hello` becomes `"hello"`. A number fails: send
it as text.
- Output: when it is used inside a route, the body afterwards is what the
function returned, as text (JSON text for most functions). The
`CamelAwsLambdaStatusCode` header holds the status code of the call.
+ Output: when it is used inside a route, the body afterwards is what the
function returned, as text (JSON text for most functions). The
`CamelAwsLambdaStatusCode` header holds the status code of the call, and the
`Content-Type` header is `application/json`.
Good to know: an error raised inside the function does not fail the
message: the body is then the error that the function reported, and the
`CamelAwsLambdaFunctionError` header is set, for example to `Unhandled`. A
function that does not exist fails the message. Each call waits until the
function ends; the function cannot be called asynchronously (invocation type
`Event`). Set `operation` to read the settings, versions or aliases of the
function instead of calling it, or to publish [...]
required:
@@ -132,6 +132,13 @@ spec:
example: getFunctionConfiguration
enum: ["invokeFunction", "getFunction", "getFunctionConfiguration",
"listVersions", "listAliases", "publishVersion", "listFunctions"]
dataTypes:
+ in:
+ default: json
+ types:
+ json:
+ format: "application-json"
+ description: "The event given to the function, as JSON text in
bytes."
+ mediaType: application/json
out:
headers:
CamelAwsLambdaStatusCode:
@@ -143,6 +150,7 @@ spec:
description: Set when the function raised an error, for example to
`Unhandled`; then the body is the error.
type: string
dependencies:
+ - "camel:jackson3"
- "camel:aws2-lambda"
- "camel:kamelet"
template:
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-polly-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-polly-sink.kamelet.yaml
index 5f5d96553..20ba2b165 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-polly-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-polly-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the text to speak, as plain text, or as SSML when
`textType` is `SSML`. The voice comes from `voiceId`, or when that is not set
from the `CamelAwsPollyVoiceId` header; one of them is required.
- Output: when it is used inside a route, the body afterwards is the
audio, as a stream in the format of `outputFormat`, and the
`CamelAwsPollyContentType` header holds its content type, such as `audio/mpeg`.
+ Output: when it is used inside a route, the body afterwards is the
audio, as a stream in the format of `outputFormat`, and the
`CamelAwsPollyContentType` header holds its content type, such as `audio/mpeg`.
The `Content-Type` header stays `text/plain`, from the text: it is not the type
of the audio.
Good to know: the stream can be read only once, so write it to a file or
a bucket right away. A voice that is not available with the chosen `engine`
fails the message. To change how words are pronounced, such as an abbreviation
or a product name, store a pronunciation lexicon in Polly and name it in
`lexiconNames`. To reach AWS through an HTTP proxy, set `proxyHost` and
`proxyPort`, and set `proxyProtocol` to `HTTP` for a proxy that takes plain
HTTP, such as Squid. Headers that sta [...]
required:
@@ -159,6 +159,12 @@ spec:
example: w3c
dataTypes:
in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The text to speak, as plain text or SSML."
+ mediaType: text/plain
headers:
CamelAwsPollyVoiceId:
title: Voice ID
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml
index 60c8e2e4d..bec4a27b3 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-streaming-upload-sink.kamelet.yaml
@@ -37,9 +37,9 @@ spec:
Use it to store a stream of small records, such as log lines, events or
sensor readings, as a few large files instead of one file per message. To
upload one file per message, use `aws-s3-sink`.
- Input: the body is added to the end of the current file as it is, as
text, bytes or a stream. Nothing is put between two messages: end each message
with a line break if the file must have one record per line. The names of the
files come from `keyName`, not from headers.
+ Input: the body is added to the end of the current file as it is, as
text, bytes or a stream. A Map, a List or a number fails: turn structured data
into JSON text first, for example with `json-serialize-action`. Nothing is put
between two messages: end each message with a line break if the file must have
one record per line. The names of the files come from `keyName`, not from
headers.
- Output: the message is unchanged. The message that completes a file gets
the `CamelAwsS3ETag` header of that file, and the `CamelHttpResponseCode`
header with the HTTP status code of the upload, such as 200.
+ Output: the body afterwards is what was added to the file, as bytes (a
stream stays a stream), and the `Content-Type` header is
`application/octet-stream`. The message that completes a file gets the
`CamelAwsS3ETag` header of that file, and the `CamelHttpResponseCode` header
with the HTTP status code of the upload, such as 200.
Good to know: a file is uploaded when it has `batchMessageNumber`
messages or `batchSize` bytes, or when `streamingUploadTimeout` has passed;
until then it is not in the bucket. With the default `namingStrategy` of
`progressive`, the first file is named `keyName`, such as `logs/app.log`, and
the next ones `logs/app-1.log`, `logs/app-2.log` and so on. With
`restartingPolicy` set to `override`, a new run starts again from `keyName` and
replaces the files of the earlier run. To encryp [...]
required:
@@ -187,6 +187,14 @@ spec:
type: string
enum: ["HTTP", "HTTPS"]
example: HTTP
+ dataTypes:
+ in:
+ default: binary
+ types:
+ binary:
+ format: "application-octet-stream"
+ description: "The content to add to the current file, as bytes. Text
is turned into bytes; a stream is kept as it is."
+ mediaType: application/octet-stream
dependencies:
- "camel:aws2-s3"
- "camel:kamelet"
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-secrets-manager-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-secrets-manager-sink.kamelet.yaml
index 5bdbde3e7..d7be04ffb 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-secrets-manager-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-secrets-manager-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the value of the secret, as text, for example a
password, or several values as a JSON object in JSON text. With `operation` set
to `getSecret`, the body is not used. For `createSecret`, the name of the new
secret comes from the `secret-name` header, else from the `ce-secret-name`
header; without either, the ID of the message is used as the name.
`updateSecret` and `getSecret` work on the secret in `secretId`.
- Output: when it is used inside a route, the body afterwards is the
answer of AWS, a `CreateSecretResponse` object of the AWS SDK for Java with the
ARN, the name and the version ID of the new secret; for `updateSecret`, an
`UpdateSecretResponse` with the ARN, the name and the new version ID. For
`getSecret`, the body is the value of the secret, as text, or as bytes for a
binary secret, and the `CamelAwsSecretsManagerSecretVersionId` header holds the
ID of its version.
+ Output: when it is used inside a route, the body afterwards is the
answer of AWS, a `CreateSecretResponse` object of the AWS SDK for Java with the
ARN, the name and the version ID of the new secret; for `updateSecret`, an
`UpdateSecretResponse` with the ARN, the name and the new version ID. For
`getSecret`, the body is the value of the secret, as text, or as bytes for a
binary secret, and the `CamelAwsSecretsManagerSecretVersionId` header holds the
ID of its version. The `Content-T [...]
Good to know: by default it only creates secrets, and a message for a
name that already exists fails. Set `operation` to `updateSecret` to change the
value of the existing secret in `secretId`, or to `getSecret` to read it; both
fail when `secretId` is not set or the secret does not exist. A message without
a name header creates a secret with a generated name, such as
`4D678616B8AFAA1-0000000000000002`. With `binaryPayload`, the body is stored as
the binary value of the secret inst [...]
required:
@@ -139,6 +139,12 @@ spec:
example: true
dataTypes:
in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The value of the secret, as text."
+ mediaType: text/plain
headers:
secret-name:
title: Secret Name
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-ses-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-ses-sink.kamelet.yaml
index 5ae3d3cae..9f6a04bf1 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-ses-sink.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-ses-sink.kamelet.yaml
@@ -39,7 +39,7 @@ spec:
Input: the body is the text of the email, as plain text. The `to` header
(or `ce-to`) gives one or more recipient addresses, separated by commas; it is
required unless the `to` option is set. The optional `subject` header (or
`ce-subject`) is the subject; without it and without the `subject` option, the
subject is a generated ID. The optional `reply-to-addresses` header (or
`ce-reply-to-addresses`) is a comma-separated list of addresses that replies go
to. Each of these headers tak [...]
- Output: the message is unchanged. The `CamelAwsSesMessageId` header
gives the ID that SES gave the email.
+ Output: the body afterwards is the text of the email, as text, and the
`Content-Type` header is `text/plain`. The `CamelAwsSesMessageId` header gives
the ID that SES gave the email.
Good to know: a message without a `to` header fails, unless the `to`
option is set. The `cc`, `bcc`, `returnPath` and `configurationSet` options
apply to every email. The `from` address, and `returnPath` when it is set, must
be verified in SES, and while the SES account is in the sandbox, the recipients
must be verified too. A `configurationSet` that does not exist in SES makes
every email fail. To reach a local stand-in of AWS, use `overrideEndpoint` and
`uriEndpointOverride`. To [...]
required:
@@ -168,6 +168,12 @@ spec:
type: string
dataTypes:
in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The text of the email."
+ mediaType: text/plain
headers:
to:
title: To
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-translate-action.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-translate-action.kamelet.yaml
index feef00222..fde7475d2 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-translate-action.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-translate-action.kamelet.yaml
@@ -38,7 +38,7 @@ spec:
Input: the body is the text to translate.
- Output: the body is the translated text.
+ Output: the body is the translated text, and the `Content-Type` header
is `text/plain`.
Good to know: the target language is fixed by `targetLanguage`. The
source language is fixed by `sourceLanguage`, or, with
`autodetectSourceLanguage`, Amazon Translate detects it in each message. Only
the listed language codes can be chosen, although Amazon Translate knows more
languages. With `terminologyNames`, your own translations of terms, such as
product and brand names, are applied. To reach AWS through an HTTP proxy, set
`proxyHost` and `proxyPort`, and set `proxyProtocol` [...]
required:
@@ -142,6 +142,21 @@ spec:
type: string
pattern: "^([A-Za-z0-9-]_?)+(,([A-Za-z0-9-]_?)+)*$"
example: product-names
+ dataTypes:
+ in:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The text to translate."
+ mediaType: text/plain
+ out:
+ default: text
+ types:
+ text:
+ format: "text-plain"
+ description: "The translated text."
+ mediaType: text/plain
dependencies:
- "camel:kamelet"
- "camel:aws2-translate"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/bedrock/aws-bedrock-agent-runtime-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/bedrock/aws-bedrock-agent-runtime-sink-route.citrus.it.yaml
index 2b5a5addd..dfcc30792 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/bedrock/aws-bedrock-agent-runtime-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/bedrock/aws-bedrock-agent-runtime-sink-route.citrus.it.yaml
@@ -68,7 +68,7 @@ actions:
- name: "X-Body-Type"
value: 'java.lang.String'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=text/plain'
- name: "X-Session-Id"
value: 'session-1'
- name: "X-Citation"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/bedrock/aws-bedrock-text-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/bedrock/aws-bedrock-text-sink-route.citrus.it.yaml
index d462385e2..bbbd98bdc 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/bedrock/aws-bedrock-text-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/bedrock/aws-bedrock-text-sink-route.citrus.it.yaml
@@ -64,7 +64,7 @@ actions:
- name: "X-Body-Type"
value: 'java.lang.String'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=application/json'
body:
data:
'{"inputTextTokenCount":9,"results":[{"tokenCount":5,"outputText":"Order ORD-1
shipped.","completionReason":"FINISH"}]}'
- http:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/cloudtrail/aws-cloudtrail-source-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/cloudtrail/aws-cloudtrail-source-route.citrus.it.yaml
index fb9063b52..30adba9b8 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/cloudtrail/aws-cloudtrail-source-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/cloudtrail/aws-cloudtrail-source-route.citrus.it.yaml
@@ -64,9 +64,9 @@ actions:
path: "/result"
headers:
- name: "X-Body-Type"
- value: 'java.lang.String'
+ value: '[B'
- name: "X-Content-Type"
- value: 'ct=text/plain'
+ value: 'ct=application/json'
- name: "X-Event-Id"
value: 'event-1'
- name: "X-Event-Name"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/comprehend/aws-comprehend-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/comprehend/aws-comprehend-sink-route.citrus.it.yaml
index 6a11ceea9..717a6a7ab 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/comprehend/aws-comprehend-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/comprehend/aws-comprehend-sink-route.citrus.it.yaml
@@ -47,7 +47,7 @@ actions:
- name: "X-Body-Type"
value: 'java.util.Collections$UnmodifiableRandomAccessList'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=text/plain'
- name: "X-Language"
value: 'en'
- name: "X-Score"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml
index df07e45d3..e60a889b3 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-delete-item.citrus.it.yaml
@@ -108,3 +108,9 @@ actions:
- groovy:
script:
file: "aws/ddb/verifyItems.groovy"
+ # What the Kamelet leaves on the message
+ - camel:
+ cli:
+ verify:
+ integration: "aws-ddb-sink-route"
+ logMessage: "Kamelet result: X-Body-Type=java.lang.String,
X-Content-Type=ct=;"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml
index cebf9abc4..0c48cb753 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-put-item.citrus.it.yaml
@@ -95,3 +95,9 @@ actions:
- groovy:
script:
file: "aws/ddb/getItem.groovy"
+ # What the Kamelet leaves on the message
+ - camel:
+ cli:
+ verify:
+ integration: "aws-ddb-sink-route"
+ logMessage: "Kamelet result: X-Body-Type=java.lang.String,
X-Content-Type=ct=;"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml
index 06ef96047..6470ed0e7 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml
@@ -35,3 +35,5 @@
accessKey: "{{aws.ddb.accessKey}}"
secretKey: "{{aws.ddb.secretKey}}"
region: "{{aws.ddb.region}}"
+ # What the Kamelet leaves on the message
+ - log: "Kamelet result: X-Body-Type=${body.getClass().getName()},
X-Content-Type=ct=${header.Content-Type};"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml
index e67199240..d9a42baa7 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-update-item.citrus.it.yaml
@@ -117,3 +117,9 @@ actions:
- groovy:
script:
file: "aws/ddb/getItem.groovy"
+ # What the Kamelet leaves on the message
+ - camel:
+ cli:
+ verify:
+ integration: "aws-ddb-sink-route"
+ logMessage: "Kamelet result: X-Body-Type=java.lang.String,
X-Content-Type=ct=;"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/eventbridge/aws-eventbridge-sink-route.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/eventbridge/aws-eventbridge-sink-route.yaml
index 76642738c..011cbba9d 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/eventbridge/aws-eventbridge-sink-route.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/eventbridge/aws-eventbridge-sink-route.yaml
@@ -38,3 +38,5 @@
eventSource: "{{aws.eventbridge.eventSource}}"
eventSourcePrefix: "{{aws.eventbridge.eventSourcePrefix}}"
detailType: "{{aws.eventbridge.detailType}}"
+ # What the Kamelet leaves on the message
+ - log: "Kamelet result: X-Body-Type=${body.getClass().getName()},
X-Content-Type=ct=${header.Content-Type};"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/eventbridge/aws-eventbridge-sink.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/eventbridge/aws-eventbridge-sink.citrus.it.yaml
index 6a6868ec7..848aa894f 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/eventbridge/aws-eventbridge-sink.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/eventbridge/aws-eventbridge-sink.citrus.it.yaml
@@ -87,3 +87,9 @@ actions:
integration: "aws-sqs-event-listener-route"
logMessage: |
"detail":{"message":"Hello AWS EventBridge!"}
+ # What the Kamelet leaves on the message
+ - camel:
+ cli:
+ verify:
+ integration: "aws-eventbridge-sink-route"
+ logMessage: "Kamelet result:
X-Body-Type=software.amazon.awssdk.services.eventbridge.model.PutEventsResponse,
X-Content-Type=ct=application/json;"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/firehose/aws-kinesis-firehose-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/firehose/aws-kinesis-firehose-sink-route.citrus.it.yaml
index c26b23549..87fd5ef44 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/firehose/aws-kinesis-firehose-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/firehose/aws-kinesis-firehose-sink-route.citrus.it.yaml
@@ -66,9 +66,9 @@ actions:
type: "plaintext"
headers:
- name: "X-Body-Type"
- value: 'java.lang.String'
+ value: '[B'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=application/octet-stream'
- name: "X-Record-Id"
value: '@notEmpty()@'
body:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/firehose/aws-kinesis-firehose-sink-route.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/firehose/aws-kinesis-firehose-sink-route.yaml
index 9290dc75d..0b45940cf 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/firehose/aws-kinesis-firehose-sink-route.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/firehose/aws-kinesis-firehose-sink-route.yaml
@@ -43,5 +43,10 @@
- setHeader:
name: X-Record-Id
simple: '${header.CamelAwsKinesisFirehoseRecordId}'
+ # Citrus reads an application/octet-stream body as a byte array: send
the body as text
+ - removeHeader:
+ name: Content-Type
+ - convertBodyTo:
+ type: String
- to:
uri: "{{http.sink.url}}/result"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink-route.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink-route.yaml
index 81a257282..a77458d6e 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink-route.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink-route.yaml
@@ -37,3 +37,5 @@
accessKey: "{{aws.kinesis.accessKey}}"
secretKey: "{{aws.kinesis.secretKey}}"
region: "{{aws.kinesis.region}}"
+ # What the Kamelet leaves on the message
+ - log: "Kamelet result: X-Body-Type=${body.getClass().getName()},
X-Content-Type=ct=${header.Content-Type};"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink.citrus.it.yaml
index a3824ca4e..547c08b41 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-sink.citrus.it.yaml
@@ -74,3 +74,9 @@ actions:
integration: "aws-kinesis-event-listener"
logMessage: |
{ "message": "${aws.kinesis.message}" }
+ # What the Kamelet leaves on the message
+ - camel:
+ cli:
+ verify:
+ integration: "aws-kinesis-sink-route"
+ logMessage: "Kamelet result: X-Body-Type=[B,
X-Content-Type=ct=application/octet-stream;"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source-route.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source-route.yaml
index 951b20efd..ffec94f15 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source-route.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source-route.yaml
@@ -26,6 +26,8 @@
secretKey: "{{aws.kinesis.secretKey}}"
region: "{{aws.kinesis.region}}"
steps:
+ # What the Kamelet gives
+ - log: "Kamelet result: X-Body-Type=${body.getClass().getName()},
X-Content-Type=ct=${header.Content-Type};"
- to:
uri: "kamelet:log-sink"
parameters:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source.citrus.it.yaml
index f0e95d3eb..15e3da725 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/kinesis/aws-kinesis-source.citrus.it.yaml
@@ -61,3 +61,9 @@ actions:
verify:
integration: "aws-kinesis-source-route"
logMessage: "${aws.kinesis.streamData}"
+ # What the Kamelet leaves on the message
+ - camel:
+ cli:
+ verify:
+ integration: "aws-kinesis-source-route"
+ logMessage: "Kamelet result: X-Body-Type=[B,
X-Content-Type=ct=application/octet-stream;"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/lambda/aws-lambda-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/lambda/aws-lambda-sink-route.citrus.it.yaml
index 33bf24917..12f9689fb 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/lambda/aws-lambda-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/lambda/aws-lambda-sink-route.citrus.it.yaml
@@ -62,7 +62,7 @@ actions:
- name: "X-Body-Type"
value: 'java.lang.String'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=application/json'
- name: "X-Status-Code"
value: '200'
- name: "X-Function-Error"
@@ -115,7 +115,7 @@ actions:
- name: "X-Body-Type"
value: 'java.lang.String'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=application/json'
- name: "X-Status-Code"
value: '200'
- name: "X-Function-Error"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/polly/aws-polly-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/polly/aws-polly-sink-route.citrus.it.yaml
index 0e1b999f5..d57db5661 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/polly/aws-polly-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/polly/aws-polly-sink-route.citrus.it.yaml
@@ -62,7 +62,7 @@ actions:
- name: "X-Body-Type"
value: 'org.apache.camel.converter.stream.InputStreamCache'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=text/plain'
- name: "X-Audio-Type"
value: 'audio/mpeg'
- name: "X-Request-Characters"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-streaming-upload-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-streaming-upload-sink-route.citrus.it.yaml
index d24081f9d..81099ae0c 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-streaming-upload-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-streaming-upload-sink-route.citrus.it.yaml
@@ -54,9 +54,9 @@ actions:
type: "plaintext"
headers:
- name: "X-Body-Type"
- value: 'java.lang.String'
+ value: '[B'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=application/octet-stream'
- name: "X-ETag"
value: 'etag='
- name: "X-Response-Code"
@@ -82,9 +82,9 @@ actions:
type: "plaintext"
headers:
- name: "X-Body-Type"
- value: 'java.lang.String'
+ value: '[B'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=application/octet-stream'
- name: "X-ETag"
value: '@matches(''etag=.+'')@'
- name: "X-Response-Code"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-streaming-upload-sink-route.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-streaming-upload-sink-route.yaml
index a089dfca7..e79467ad2 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-streaming-upload-sink-route.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-streaming-upload-sink-route.yaml
@@ -50,5 +50,10 @@
- setHeader:
name: X-Response-Code
simple: 'code=${header.CamelHttpResponseCode}'
+ # Citrus reads an application/octet-stream body as a byte array: send
the body as text
+ - removeHeader:
+ name: Content-Type
+ - convertBodyTo:
+ type: String
- to:
uri: "{{http.sink.url}}/result"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/secretsmanager/aws-secrets-manager-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/secretsmanager/aws-secrets-manager-sink-route.citrus.it.yaml
index 55c0f57fe..a729e8cad 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/secretsmanager/aws-secrets-manager-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/secretsmanager/aws-secrets-manager-sink-route.citrus.it.yaml
@@ -48,7 +48,7 @@ actions:
- name: "X-Body-Type"
value:
'software.amazon.awssdk.services.secretsmanager.model.CreateSecretResponse'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=text/plain'
- name: "X-Secret-Name"
value: 'db-password'
- name: "X-Secret-Arn"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/ses/aws-ses-sink-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/ses/aws-ses-sink-route.citrus.it.yaml
index 372150466..ffaf849b3 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/ses/aws-ses-sink-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/ses/aws-ses-sink-route.citrus.it.yaml
@@ -63,7 +63,7 @@ actions:
- name: "X-Body-Type"
value: 'java.lang.String'
- name: "X-Content-Type"
- value: 'ct='
+ value: 'ct=text/plain'
- name: "X-Message-Id"
value: '@notEmpty()@'
body:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/translate/aws-translate-action-route.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/translate/aws-translate-action-route.citrus.it.yaml
index c5f34c382..fae9a4cff 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/translate/aws-translate-action-route.citrus.it.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/translate/aws-translate-action-route.citrus.it.yaml
@@ -58,7 +58,7 @@ actions:
body:
data: "\xA3nTranslatedTextkHello
worldrSourceLanguageCodebitrTargetLanguageCodeben"
- # The body is the translated text
+ # The body is the translated text, as text/plain
- http:
server: "awsSinkServer"
receiveRequest:
@@ -68,6 +68,8 @@ actions:
headers:
- name: "X-Body-Type"
value: 'java.lang.String'
+ - name: "X-Content-Type"
+ value: 'ct=text/plain'
body:
data: 'Hello world'
- http:
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/translate/aws-translate-action-route.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/translate/aws-translate-action-route.yaml
index 55fe88b91..f40ba7796 100644
---
a/tests/camel-kamelets-itest/src/test/resources/aws/translate/aws-translate-action-route.yaml
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/translate/aws-translate-action-route.yaml
@@ -39,5 +39,8 @@
- setHeader:
name: X-Body-Type
simple: "${body.getClass().getName()}"
+ - setHeader:
+ name: X-Content-Type
+ simple: "ct=${header.Content-Type}"
- to:
uri: "{{http.sink.url}}/result"