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

acosentino pushed a commit to branch azure-storage-blob-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 7d35f7a455641864518a9d1e275f94edb92231c8
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Apr 12 11:15:36 2021 +0200

    Added Azure Storage Blob Sink Kamelet
---
 azure-storage-blob-sink.kamelet.yaml | 70 ++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/azure-storage-blob-sink.kamelet.yaml 
b/azure-storage-blob-sink.kamelet.yaml
new file mode 100644
index 0000000..9effece
--- /dev/null
+++ b/azure-storage-blob-sink.kamelet.yaml
@@ -0,0 +1,70 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: azure-storage-blob-sink
+  annotations:
+    camel.apache.org/kamelet.icon: 
"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjAiIHk9IjAiIHZpZXdCb3g9IjAgMCAyNDguMiAzMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxzdHlsZT4uc3QyOHtmaWxsOiM4YzMxMjN9LnN0Mjl7ZmlsbDojZTA1MjQzfTwvc3R5bGU+PHBhdGggY2xhc3M9InN0MjgiIGQ9Ik0yMCA1Mi4xTDAgNjJ2MTc1LjVsMjAgOS45LjEtLjFWNTIuMmwtLjEtLjEiLz48cGF0aCBjbGFzcz0ic3QyOSIgZD0iTTEyNyAyMjJMMjAgMjQ3LjVWNTIuMUwxMjcgNzd2MTQ1Ii8+PHBhdGggY2xhc3M9InN0MjgiIG
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "Azure Storage Blob Sink"
+    description: |-
+      Upload data to Azure Storage Blob.
+
+      The Kamelet expects the following headers to be set:
+
+      - `file` / `ce-file`: as the file name to upload
+
+      If the header won't be set the exchange ID will be used as file name.
+    required:
+      - accountName
+      - containerName
+      - accessKey
+    properties:
+      accountName:
+        title: Account Name
+        description: The Azure Storage Blob account name.
+        type: string
+      containerName:
+        title: Container Name
+        description: The Azure Storage Blob container name.
+        type: string
+      accessKey:
+        title: Access Key
+        description: The Azure Storage Blob access Key.
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      operation:
+        title: Operation name
+        description: The operation to perform.
+        type: string
+        default: uploadBlockBlob
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          when:
+          - simple: "${header[file]}"
+            steps:
+            - set-header:
+                name: CamelAzureStorageBlobBlobName
+                simple: "${header[file]}"
+          - simple: "${header[ce-file]}"
+            steps:
+            - set-header:
+                name: CamelAzureStorageBlobBlobName
+                simple: "${header[ce-file]}"
+          otherwise:
+            steps:
+            - set-header:
+                name: CamelAzureStorageBlobBlobName
+                simple: "${exchangeId}"
+      - to:
+          uri: "azure-storage-blob://{{accountName}}/{{containerName}}"
+          parameters:
+            accessKey: "{{accessKey}}"
+            operation: "{{operation}}"

Reply via email to