You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/01/04 07:53:09 UTC
[camel-kamelets] 03/06: Added AWS SES Sink Kamelet
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch aws-ses-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 07c8b8b694ffa9ef62db04833cd1230578307738
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jan 4 08:49:02 2022 +0100
Added AWS SES Sink Kamelet
---
.../resources/kamelets/aws-ses-sink.kamelet.yaml | 137 +++++++++++++++++++++
1 file changed, 137 insertions(+)
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
new file mode 100644
index 0000000..63c24ad
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-ses-sink.kamelet.yaml
@@ -0,0 +1,137 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: aws-ses-sink
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjI1NnB4IiBoZWlnaHQ9IjI5OXB4IiB2aWV3Qm94PSIwIDAgMjU2IDI5OSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+Cgk8Zz4KCQk8cGF0aCBkPSJNNjAuNTU2LDQ3LjYwMiBMMCwxNDQuMDEgTDYwLjU1NiwyNDAuNDM0IEw2MS42MTIsMjM5LjY4MSBMNjAuODM3LDQ3LjggTD [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "AWS SES"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "AWS SES Sink"
+ description: |-
+ Send Email through AWS SES Service.
+
+ The Kamelet expects the following headers to be set:
+
+ - `subject` / `ce-subject`: The email subject
+
+ If the header won't be set the exchange ID will be used as email subject.
+
+ - `to` / `ce-to`: a comma separated list of email addresses
+
+ - `reply-to-addresses` / `ce-reply-to-addresses`: a comma separated list of reply-to email addresses
+
+ required:
+ - from
+ - accessKey
+ - secretKey
+ - region
+ type: object
+ properties:
+ from:
+ title: From
+ description: From address
+ type: string
+ example: user@example.com
+ to:
+ title: To
+ description: To address
+ type: string
+ example: user@example.com
+ accessKey:
+ title: Access Key
+ description: The access key obtained from AWS.
+ type: string
+ format: password
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ - urn:camel:group:credentials
+ secretKey:
+ title: Secret Key
+ description: The secret key obtained from AWS.
+ type: string
+ format: password
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ - urn:camel:group:credentials
+ region:
+ title: AWS Region
+ description: The AWS region to connect to.
+ type: string
+ example: eu-west-1
+ dependencies:
+ - "camel:aws2-ses"
+ - "camel:kamelet"
+ flow:
+ from:
+ uri: "kamelet:source"
+ steps:
+ - choice:
+ when:
+ - simple: "${header[subject]}"
+ steps:
+ - set-header:
+ name: CamelAwsSesSubject
+ simple: "${header[subject]}"
+ - simple: "${header[ce-subject]}"
+ steps:
+ - set-header:
+ name: CamelAwsSesSubject
+ simple: "${header[ce-subject]}"
+ otherwise:
+ steps:
+ - set-header:
+ name: CamelAwsSesSubject
+ simple: "${exchangeId}"
+ - choice:
+ when:
+ - simple: "${header[to]}"
+ steps:
+ - set-header:
+ name: CamelAwsSesTo
+ simple: "${header[to]}"
+ - simple: "${header[ce-to]}"
+ steps:
+ - set-header:
+ name: CamelAwsSesTo
+ simple: "${header[ce-to]}"
+ - choice:
+ when:
+ - simple: "${header[reply-to-addresses]}"
+ steps:
+ - set-header:
+ name: CamelAwsSesReplyToAddresses
+ simple: "${header[reply-to-addresses]}"
+ - simple: "${header[ce-reply-to-addresses]}"
+ steps:
+ - set-header:
+ name: CamelAwsSesReplyToAddresses
+ simple: "${header[ce-reply-to-addresses]}"
+ - to:
+ uri: "aws2-ses://{{from}}"
+ parameters:
+ secretKey: "{{secretKey}}"
+ accessKey: "{{accessKey}}"
+ region: "{{region}}"