Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure functions kamelet #973

Merged
merged 5 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* xref:azure-cosmosdb-source.adoc[]
* xref:azure-eventhubs-sink.adoc[]
* xref:azure-eventhubs-source.adoc[]
* xref:azure-functions-sink.adoc[]
* xref:azure-servicebus-sink.adoc[]
* xref:azure-servicebus-source.adoc[]
* xref:azure-storage-blob-changefeed-source.adoc[]
Expand Down
69 changes: 69 additions & 0 deletions kamelets/azure-functions-sink.kamelet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ---------------------------------------------------------------------------
# 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: azure-functions-sink
annotations:
camel.apache.org/kamelet.support.level: "Stable"
camel.apache.org/catalog.version: "main-SNAPSHOT"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmci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kamelet.group: "Azure Functions"
labels:
camel.apache.org/kamelet.type: sink
spec:
definition:
title: Azure Function Sink
description: Forward data to an Azure Function.
required:
- url
type: object
properties:
url:
title: URL
description: The Azure Functions URL you want to send the data to.
type: string
example: "https://azure-function-demo-12234.azurewebsites.net/api/httpexample"
pattern: "^(https)://.*"
method:
title: Method
description: The HTTP method to use.
type: string
default: POST
key:
title: Key
description: A function-specific API key is required, if the authLevel of the function is FUNCTION or master key if the authLevel is ADMIN.
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
dependencies:
- "camel:http"
- "camel:kamelet"
- "camel:core"
template:
from:
uri: kamelet:source
steps:
- remove-header:
name: CamelHttpUri
- set-header:
name: CamelHttpMethod
constant: "{{method}}"
- to: "{{url}}?code={{?key}}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ---------------------------------------------------------------------------
# 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: azure-functions-sink
annotations:
camel.apache.org/kamelet.support.level: "Stable"
camel.apache.org/catalog.version: "main-SNAPSHOT"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjE4LjI0IDIxLjQ2IDY0IDY0IiB3aWR0aD0iNjQiIGhlaWdodD0iNjQiPjxwYXRoIGQ9Ik04MS44MzcgNTMuODVjLjU4NS0uNTg1LjQ4Ny0xLjcgMC0yLjMwN2wtMy4wODctMy4wODctMTMuOC0xMy4zODZjLS41ODUtLjU4NS0xLjQ5NS0uNTg1LTIuMiAwLS41ODUuNTg1LS44MTIgMS43IDAgMi4zMDdsMTQuNSAxNC4xOThjLjU4NS41ODUuNTg1IDEuNyAwIDIuMzA3TDYyLjQ0IDY4LjU2OGMtLjU4NS41ODUtLjU4NSAxLjcgMCAyLjMwNy41ODUuNTg1IDEuNy40ODcgMi4yIDBsMTMuOC0xMy42OHptLTYzLjE5NCAwYy0uNTg1LS41ODUtLjQ4Ny0xLjcgMC0yLjMwN2wzLjA4Ny0zLjA4NyAxMy44LTEzLjM4NmMuNTg1LS41ODUgMS40OTUtLjU4NSAyLjIgMCAuNTg1LjU4NS44MTIgMS43IDAgMi4zMDdsLTE0LjIgMTQuMmMtLjU4NS41ODUtLjU4NSAxLjcgMCAyLjMwN2wxNC41IDE0LjY4NmMuNTg1LjU4NS41ODUgMS43IDAgMi4zMDctLjU4NS41ODUtMS43LjQ4Ny0yLjIgMEwyMS43MyA1Ny40eiIgZmlsbD0iIzM5OTljNiIvPjxwYXRoIGQ9Ik01Mi44MjMgNDMuODc1TDY1LjgyIDIzLjk2SDQ2LjMyNUwzNS44MyA1My41NmwxMi44LjA5Ny0xMC4wMDcgMjkuMzA3TDY2LjI0IDQzLjg3OHoiIGZpbGw9IiNmY2QxMTYiLz48cGF0aCBkPSJNNjYuMjQyIDQzLjg3NWgtMTMuNDJMNjUuODIgMjMuOTZINTUuNjE3TDQ0LjgzIDQ4LjU1NGwxMi44LjA5Ny0xOS4wMDcgMzQuM3oiIG9wYWNpdHk9Ii4zIiBmaWxsPSIjZmY4YzAwIi8+PC9zdmc+"
camel.apache.org/provider: "Apache Software Foundation"
camel.apache.org/kamelet.group: "Azure Functions"
labels:
camel.apache.org/kamelet.type: sink
spec:
definition:
title: Azure Function Sink
description: Forward data to an Azure Function.
required:
- url
type: object
properties:
url:
title: URL
description: The Azure Functions URL you want to send the data to.
type: string
example: "https://azure-function-demo-12234.azurewebsites.net/api/httpexample"
pattern: "^(https)://.*"
method:
title: Method
description: The HTTP method to use.
type: string
default: POST
key:
title: Key
description: A function-specific API key is required, if the authLevel of the function is FUNCTION or master key if the authLevel is ADMIN.
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
dependencies:
- "camel:http"
- "camel:kamelet"
- "camel:core"
template:
from:
uri: kamelet:source
steps:
- remove-header:
name: CamelHttpUri
- set-header:
name: CamelHttpMethod
constant: "{{method}}"
- to: "{{url}}?code={{?key}}"