generated from camel.apache.org/kamelet
141 lines
12 KiB
YAML
141 lines
12 KiB
YAML
|
|
apiVersion: camel.apache.org/v1
|
||
|
|
kind: Kamelet
|
||
|
|
metadata:
|
||
|
|
name: sftp-source
|
||
|
|
annotations:
|
||
|
|
camel.apache.org/kamelet.support.level: "Stable"
|
||
|
|
camel.apache.org/catalog.version: "4.10.2"
|
||
|
|
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyMjEuMSAzMDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIyMS4xIDMwMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6IzgzMkVBQjt9DQoJLnN0MXtmaWxsOiNCQUJBQkE7fQ0KCS5zdDJ7ZmlsbDpub25lO30NCgkuc3Qze2ZpbGw6IzhEQzYzRjt9DQoJLnN0NHtmaWxsOiMwRjlCRDc7fQ0KCS5zdDV7ZmlsbDojRkZGRkZGO30NCgkuc3Q2e2ZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO2ZpbGw6I0ZGRkZGRjt9DQoJLnN0N3tmaWxsOiMxREExRjI7fQ0KCS5zdDh7ZmlsbDojM0Q1QTk4O30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jcsMTMuNS00NS42LDE3LjVjLTEuMS0xLjgtMy4xL
|
||
|
|
camel.apache.org/provider: "Apache Software Foundation"
|
||
|
|
camel.apache.org/kamelet.group: "FTP"
|
||
|
|
camel.apache.org/kamelet.namespace: "File"
|
||
|
|
labels:
|
||
|
|
camel.apache.org/kamelet.type: "source"
|
||
|
|
spec:
|
||
|
|
definition:
|
||
|
|
title: "SFTP Source"
|
||
|
|
description: |-
|
||
|
|
Receive data from an SFTP server.
|
||
|
|
required:
|
||
|
|
- connectionHost
|
||
|
|
- connectionPort
|
||
|
|
- directoryName
|
||
|
|
type: object
|
||
|
|
properties:
|
||
|
|
connectionHost:
|
||
|
|
title: Connection Host
|
||
|
|
description: The hostname of the SFTP server.
|
||
|
|
type: string
|
||
|
|
connectionPort:
|
||
|
|
title: Connection Port
|
||
|
|
description: The port of the FTP server.
|
||
|
|
type: string
|
||
|
|
default: 22
|
||
|
|
username:
|
||
|
|
title: Username
|
||
|
|
description: The username to access the SFTP server.
|
||
|
|
type: string
|
||
|
|
x-descriptors:
|
||
|
|
- urn:camel:group:credentials
|
||
|
|
password:
|
||
|
|
title: Password
|
||
|
|
description: The password to access the SFTP server.
|
||
|
|
type: string
|
||
|
|
format: password
|
||
|
|
x-descriptors:
|
||
|
|
- urn:camel:group:credentials
|
||
|
|
directoryName:
|
||
|
|
title: Directory Name
|
||
|
|
description: The starting directory.
|
||
|
|
type: string
|
||
|
|
passiveMode:
|
||
|
|
title: Passive Mode
|
||
|
|
description: Sets the passive mode connection.
|
||
|
|
type: boolean
|
||
|
|
default: false
|
||
|
|
recursive:
|
||
|
|
title: Recursive
|
||
|
|
description: If a directory, look for files in all sub-directories as well.
|
||
|
|
type: boolean
|
||
|
|
default: false
|
||
|
|
idempotent:
|
||
|
|
title: Idempotency
|
||
|
|
description: Skip already-processed files.
|
||
|
|
type: boolean
|
||
|
|
default: true
|
||
|
|
ignoreFileNotFoundOrPermissionError:
|
||
|
|
title: Ignore File Not Found Or Permission Error
|
||
|
|
description: Whether to ignore when (trying to list files in directories or when downloading a file), which does not exist or due to permission error. By default when a directory or file does not exists or insufficient permission, then an exception is thrown. Setting this option to true allows to ignore that instead.
|
||
|
|
type: boolean
|
||
|
|
default: false
|
||
|
|
binary:
|
||
|
|
title: Binary
|
||
|
|
description: Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false).
|
||
|
|
type: boolean
|
||
|
|
default: false
|
||
|
|
privateKeyFile:
|
||
|
|
title: Private Key File
|
||
|
|
description: Set the private key file so that the SFTP endpoint can do private key verification.
|
||
|
|
type: string
|
||
|
|
privateKeyPassphrase:
|
||
|
|
title: Private Key Passphrase
|
||
|
|
description: Set the private key file passphrase so that the SFTP endpoint can do private key verification.
|
||
|
|
type: string
|
||
|
|
privateKeyUri:
|
||
|
|
title: Private Key URI
|
||
|
|
description: Set the private key file (loaded from classpath by default) so that the SFTP endpoint can do private key verification.
|
||
|
|
type: string
|
||
|
|
pattern: "^(http|https|file|classpath)://.*"
|
||
|
|
strictHostKeyChecking:
|
||
|
|
title: Strict Host Checking
|
||
|
|
description: Sets whether to use strict host key checking.
|
||
|
|
type: string
|
||
|
|
default: no
|
||
|
|
useUserKnownHostsFile:
|
||
|
|
title: Use User Known Hosts File
|
||
|
|
description: If knownHostFile has not been explicit configured then use the host file from System.getProperty(user.home)/.ssh/known_hosts.
|
||
|
|
type: boolean
|
||
|
|
default: true
|
||
|
|
autoCreate:
|
||
|
|
title: Autocreate Missing Directories
|
||
|
|
description: Automatically create starting directory.
|
||
|
|
type: boolean
|
||
|
|
default: true
|
||
|
|
delete:
|
||
|
|
title: Delete
|
||
|
|
description: If true, the file will be deleted after it is processed successfully.
|
||
|
|
type: boolean
|
||
|
|
default: false
|
||
|
|
dependencies:
|
||
|
|
- "camel:ftp"
|
||
|
|
- "camel:core"
|
||
|
|
- "camel:kamelet"
|
||
|
|
template:
|
||
|
|
from:
|
||
|
|
uri: "sftp:{{connectionHost}}:{{connectionPort}}/{{directoryName}}"
|
||
|
|
parameters:
|
||
|
|
username: "{{?username}}"
|
||
|
|
password: "{{?password}}"
|
||
|
|
privateKeyFile: "{{?privateKeyFile}}"
|
||
|
|
privateKeyPassphrase: "{{?privateKeyPassphrase}}"
|
||
|
|
privateKeyUri: "{{?privateKeyUri}}"
|
||
|
|
strictHostKeyChecking: "{{?strictHostKeyChecking}}"
|
||
|
|
useUserKnownHostsFile: "{{?useUserKnownHostsFile}}"
|
||
|
|
passiveMode: "{{passiveMode}}"
|
||
|
|
recursive: "{{recursive}}"
|
||
|
|
idempotent: "{{idempotent}}"
|
||
|
|
ignoreFileNotFoundOrPermissionError: "{{ignoreFileNotFoundOrPermissionError}}"
|
||
|
|
binary: "{{binary}}"
|
||
|
|
autoCreate: "{{autoCreate}}"
|
||
|
|
delete: "{{delete}}"
|
||
|
|
steps:
|
||
|
|
- setBody:
|
||
|
|
simple: "${body.getBody()}"
|
||
|
|
- setHeader:
|
||
|
|
name: file
|
||
|
|
simple: "${header[CamelFileName]}"
|
||
|
|
- setHeader:
|
||
|
|
name: ce-file
|
||
|
|
simple: "${header[CamelFileName]}"
|
||
|
|
- to: "kamelet:sink"
|