diff --git a/docs/modules/ROOT/assets/images/kamelets/dropbox-source.svg b/docs/modules/ROOT/assets/images/kamelets/dropbox-source.svg new file mode 100644 index 000000000..84ac86026 --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/dropbox-source.svg @@ -0,0 +1,4 @@ + + + + diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index af62f69d6..409915d0b 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -5,6 +5,7 @@ * xref:ROOT:aws-sqs-sink.adoc[image:kamelets/aws-sqs-sink.svg[] AWS SQS Sink] * xref:ROOT:aws-sqs-source.adoc[image:kamelets/aws-sqs-source.svg[] AWS SQS Source] * xref:ROOT:bitcoin-source.adoc[image:kamelets/bitcoin-source.svg[] Bitcoin Source] +* xref:ROOT:dropbox-source.adoc[image:kamelets/dropbox-source.svg[] Dropbox Source] * xref:ROOT:earthquake-source.adoc[image:kamelets/earthquake-source.svg[] Earthquake Source] * xref:ROOT:file-watch-source.adoc[image:kamelets/file-watch-source.svg[] File Watch Source] * xref:ROOT:ftp-source.adoc[image:kamelets/ftp-source.svg[] FTP Source] diff --git a/docs/modules/ROOT/pages/aws-sqs-fifo-sink.adoc b/docs/modules/ROOT/pages/aws-sqs-fifo-sink.adoc index 44eeece92..d83e2d049 100644 --- a/docs/modules/ROOT/pages/aws-sqs-fifo-sink.adoc +++ b/docs/modules/ROOT/pages/aws-sqs-fifo-sink.adoc @@ -12,11 +12,10 @@ The following table summarizes the configuration options available for the `aws- |=== | Property| Name| Description| Type| Default| Example | *accessKey {empty}* *| Access Key| The access key obtained from AWS| string| | -| *messageDeduplicationIdStrategy {empty}* *| Message Deduplication ID Strategy| Strategy for setting the messageDeduplicationId on the message. Can be one of the following options useExchangeId, useContentBasedDeduplication| string| `"useExchangeId"`| -| *messageGroupIdStrategy {empty}* *| Message Group ID Strategy| Strategy for setting the messageGroupId on the message. Can be one of the following options useConstant, useExchangeId, usePropertyValue.| string| `"useExchangeId"`| | *queueNameOrArn {empty}* *| Queue Name| The SQS Queue name or ARN| string| | | *region {empty}* *| AWS Region| The AWS region to connect to| string| | `"eu-west-1"` | *secretKey {empty}* *| Secret Key| The secret key obtained from AWS| string| | +| contentBasedDeduplication| Content-Based Deduplication| Use content-based deduplication (should be enabled in the SQS FIFO queue first)| boolean| `false`| |=== NOTE: Fields marked with ({empty}*) are mandatory. diff --git a/docs/modules/ROOT/pages/dropbox-source.adoc b/docs/modules/ROOT/pages/dropbox-source.adoc new file mode 100644 index 000000000..3b1d1c5e6 --- /dev/null +++ b/docs/modules/ROOT/pages/dropbox-source.adoc @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/dropbox-source.svg[] Dropbox Source + +*Provided by: "Apache Software Foundation"* + +Consume Files from Dropbox. + +== Configuration Options + +The following table summarizes the configuration options available for the `dropbox-source` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *accessToken {empty}* *| Dropbox Access Token| The access Token to use to access Dropbox| string| | +| *clientIdentifier {empty}* *| The client identifier| Dropbox App client Identifier| string| | +| *period {empty}* *| Period between polls| The interval between fetches to the earthquake API in milliseconds| integer| `10000`| +| *remotePath {empty}* *| Remote path| Original file or folder to work with| string| | +| query| Querys| A space-separated list of sub-strings to search for. A file matches only if it contains all the sub-strings. If this option is not set, all files will be matched.| string| | +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `dropbox-source` can be used in various contexts. + +=== Knative Source + +The `dropbox-source` Kamelet can be used as Knative source by binding it to a Knative object. + +.dropbox-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: dropbox-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: dropbox-source + properties: + accessToken: "The Dropbox Access Token" + clientIdentifier: "The The client identifier" + remotePath: "The Remote path" + sink: + ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel + +---- + +Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to. + +Save the `dropbox-source-binding.yaml` file into your hard drive, then configure it according to your needs. + +You can run the source using the following command: + +[source,shell] +---- +kubectl apply -f dropbox-source-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/dropbox-source.kamelet.yaml b/dropbox-source.kamelet.yaml new file mode 100644 index 000000000..7f819dc41 --- /dev/null +++ b/dropbox-source.kamelet.yaml @@ -0,0 +1,66 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: dropbox-source + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjQzcHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDQzIDQwIiB2ZXJzaW9uPSIxLjEiIGhlaWdodD0iNDBweCI+CiA8cGF0aCBkPSJtMTIuNSAwbC0xMi41IDguMSA4LjcgNyAxMi41LTcuOC04LjctNy4zem0tMTIuNSAyMS45bDEyLjUgOC4yIDguNy03LjMtMTIuNS03LjctOC43IDYuOHptMjEuMiAwLjlsOC44IDcuMyAxMi40LTguMS04LjYtNi45LTEyLjYgNy43em0yMS4yLTE0LjdsLTEyLjQtOC4xLTguOCA3LjMgMTIuNiA3LjggOC42LTd6bS0yMS4xIDE2LjNsLTguOCA3LjMtMy43LTIuNXYyLjhsMTIuNSA3LjUgMTIuNS03LjV2LTIuOGwtMy44IDIuNS04LjctNy4zeiIgZmlsbD0iIzAwN0VFNSIvPgo8L3N2Zz4K" + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: "source" +spec: + definition: + title: "Dropbox Source" + description: |- + Consume Files from Dropbox. + required: + - period + - accessToken + - clientIdentifier + - remotePath + properties: + period: + title: Period between polls + description: The interval between fetches to the earthquake API in milliseconds + type: integer + default: 10000 + accessToken: + title: Dropbox Access Token + description: The access Token to use to access Dropbox + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + clientIdentifier: + title: The client identifier + description: Dropbox App client Identifier + type: string + remotePath: + title: Remote path + description: Original file or folder to work with + type: string + query: + title: Querys + description: A space-separated list of sub-strings to search for. A file matches only if it contains all the sub-strings. If this option is not set, all files will be matched. + type: string + flow: + from: + uri: "timer:dropbox-stream" + parameters: + period: "{{period}}" + steps: + - to: + uri: "dropbox:search" + parameters: + accessToken: "{{accessToken}}" + remotePath: "{{remotePath}}" + clientIdentifier: "{{clientIdentifier}}" + query: "{{query}}" + - split: + jsonpath: "$.*" + steps: + - set-property: + name: dropboxFileName + simple: ${body.metadata.pathDisplay} + - tod: "dropbox:get?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath=${exchangeProperty.dropboxFileName}" + - to: "kamelet:sink" + - tod: "dropbox:del?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath=${exchangeProperty.dropboxFileName}" +