--- apiVersion: v1 kind: List items: - apiVersion: v1 kind: ConfigMap metadata: labels: funktion.fabric8.io/kind: Connector provider: fabric8 project: connector-scp version: 1.1.23 group: io.fabric8.funktion.connector name: scp data: deployment.yml: | --- apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: funktion.fabric8.io/kind: Subscription connector: scp spec: replicas: 1 template: metadata: labels: funktion.fabric8.io/kind: Subscription connector: scp spec: containers: - image: fabric8/connector-scp:1.1.23 name: connector schema.yml: | --- component: kind: component scheme: scp extendsScheme: ftp syntax: scp:host:port/directoryName title: SCP description: To copy files using the secure copy protocol (SCP). label: file deprecated: false async: false producerOnly: true javaType: org.apache.camel.component.scp.ScpComponent groupId: org.apache.camel artifactId: camel-jsch version: 2.18.1 componentProperties: verboseLogging: kind: property type: boolean javaType: boolean deprecated: false secret: false description: JSCH is verbose logging out of the box. Therefore we turn the logging down to DEBUG logging by default. But setting this option to true turns on the verbose logging again. properties: host: kind: path group: producer required: true type: string javaType: java.lang.String deprecated: false secret: false description: Hostname of the FTP server port: kind: path group: producer type: integer javaType: int deprecated: false secret: false description: Port of the FTP server directoryName: kind: path group: producer type: string javaType: java.lang.String deprecated: false secret: false description: The starting directory disconnect: kind: parameter group: common label: common type: boolean javaType: boolean deprecated: false secret: false defaultValue: false description: Whether or not to disconnect from remote FTP server right after use. Disconnect will only disconnect the current connection to the FTP server. If you have a consumer which you want to stop then you need to stop the consumer/route instead. chmod: kind: parameter group: producer type: string javaType: java.lang.String deprecated: false secret: false defaultValue: "664" description: Allows you to set chmod on the stored file. For example chmod=664. fileName: kind: parameter group: producer type: string javaType: java.lang.String deprecated: false secret: false description: 'Use Expression such as File Language to dynamically set the filename. For consumers it''s used as a filename filter. For producers it''s used to evaluate the filename to write. If an expression is set it take precedence over the CamelFileName header. (Note: The header itself can also be an Expression). The expression options support both String and Expression types. If the expression is a String type it is always evaluated using the File Language. If the expression is an Expression type the specified Expression type is used - this allows you for instance to use OGNL expressions. For the consumer you can use it to filter filenames so you can for instance consume today''s file using the File Language syntax: mydata-$date:now:yyyyMMdd.txt. The producers support the CamelOverruleFileName header which takes precedence over any existing CamelFileName header; the CamelOverruleFileName is a header that is used only once and makes it easier as this avoids to temporary store CamelFileName and have to restore it afterwards.' flatten: kind: parameter group: producer label: producer type: boolean javaType: boolean deprecated: false secret: false defaultValue: false description: Flatten is used to flatten the file name path to strip any leading paths so it's just the file name. This allows you to consume recursively into sub-directories but when you eg write the files to another directory they will be written in a single directory. Setting this to true on the producer enforces that any file name in CamelFileName header will be stripped for any leading paths. strictHostKeyChecking: kind: parameter group: producer type: string javaType: java.lang.String enum: - no - yes deprecated: false secret: false defaultValue: no description: 'Sets whether to use strict host key checking. Possible values are: no yes' allowNullBody: kind: parameter group: producer (advanced) label: producer,advanced type: boolean javaType: boolean deprecated: false secret: false defaultValue: false description: Used to specify if a null body is allowed during file writing. If set to true then an empty file will be created when set to false and attempting to send a null body to the file component a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist option is set to 'Override' then the file will be truncated and if set to append the file will remain unchanged. disconnectOnBatchComplete: kind: parameter group: producer (advanced) label: producer,advanced type: boolean javaType: boolean deprecated: false secret: false defaultValue: false description: Whether or not to disconnect from remote FTP server right after a Batch upload is complete. disconnectOnBatchComplete will only disconnect the current connection to the FTP server. connectTimeout: kind: parameter group: advanced label: advanced type: integer javaType: int deprecated: false secret: false defaultValue: "10000" description: Sets the connect timeout for waiting for a connection to be established Used by both FTPClient and JSCH soTimeout: kind: parameter group: advanced label: advanced type: integer javaType: int deprecated: false secret: false defaultValue: "300000" description: Sets the so timeout Used only by FTPClient synchronous: kind: parameter group: advanced label: advanced type: boolean javaType: boolean deprecated: false secret: false defaultValue: false description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). timeout: kind: parameter group: advanced label: advanced type: integer javaType: int deprecated: false secret: false defaultValue: "30000" description: Sets the data timeout for waiting for reply Used only by FTPClient knownHostsFile: kind: parameter group: security label: security type: string javaType: java.lang.String deprecated: false secret: true description: Sets the known_hosts file so that the jsch endpoint can do host key verification. password: kind: parameter group: security label: security type: string javaType: java.lang.String deprecated: false secret: true description: Password to use for login privateKeyFile: kind: parameter group: security label: security type: string javaType: java.lang.String deprecated: false secret: true description: Set the private key file to that the SFTP endpoint can do private key verification. privateKeyFilePassphrase: kind: parameter group: security label: security type: string javaType: java.lang.String deprecated: false secret: true description: Set the private key file passphrase to that the SFTP endpoint can do private key verification. username: kind: parameter group: security label: security type: string javaType: java.lang.String deprecated: false secret: true description: Username to use for login useUserKnownHostsFile: kind: parameter group: security label: security type: boolean javaType: boolean deprecated: false secret: false defaultValue: true description: If knownHostFile has not been explicit configured then use the host file from System.getProperty(user.home) /.ssh/known_hosts ciphers: kind: parameter group: security (advanced) label: security,advanced type: string javaType: java.lang.String deprecated: false secret: false description: 'Set a comma separated list of ciphers that will be used in order of preference. Possible cipher names are defined by JCraft JSCH. Some examples include: aes128-ctraes128-cbc3des-ctr3des-cbcblowfish-cbcaes192-cbcaes256-cbc. If not specified the default list from JSCH will be used.' documentation.adoc: |+ [[Jsch-Jsch]] Jsch ~~~~ The *camel-jsch* component supports the http://en.wikipedia.org/wiki/Secure_copy[SCP protocol] using the Client API of the http://www.jcraft.com/jsch/[Jsch] project. Jsch is already used in camel by the link:ftp.html[FTP] component for the *sftp:* protocol. Maven users will need to add the following dependency to their `pom.xml` for this component: [source,xml] ------------------------------------------------------------ org.apache.camel camel-jsch x.x.x ------------------------------------------------------------ [[Jsch-URIformat]] URI format ^^^^^^^^^^ [source,java] --------------------------------------- scp://host[:port]/destination[?options] --------------------------------------- You can append query options to the URI in the following format, `?option=value&option=value&...` The file name can be specified either in the part of the URI or as a "CamelFileName" header on the message (`Exchange.FILE_NAME` if used in code). [[Jsch-Options]] Options ^^^^^^^ // component options: START The SCP component supports 1 options which are listed below. {% raw %} [width="100%",cols="2,1m,7",options="header"] |======================================================================= | Name | Java Type | Description | verboseLogging | boolean | JSCH is verbose logging out of the box. Therefore we turn the logging down to DEBUG logging by default. But setting this option to true turns on the verbose logging again. |======================================================================= {% endraw %} // component options: END // endpoint options: START The SCP component supports 21 endpoint options which are listed below: {% raw %} [width="100%",cols="2,1,1m,1m,5",options="header"] |======================================================================= | Name | Group | Default | Java Type | Description | host | producer | | String | *Required* Hostname of the FTP server | port | producer | | int | Port of the FTP server | directoryName | producer | | String | The starting directory | disconnect | common | false | boolean | Whether or not to disconnect from remote FTP server right after use. Disconnect will only disconnect the current connection to the FTP server. If you have a consumer which you want to stop then you need to stop the consumer/route instead. | chmod | producer | 664 | String | Allows you to set chmod on the stored file. For example chmod=664. | fileName | producer | | String | Use Expression such as File Language to dynamically set the filename. For consumers it's used as a filename filter. For producers it's used to evaluate the filename to write. If an expression is set it take precedence over the CamelFileName header. (Note: The header itself can also be an Expression). The expression options support both String and Expression types. If the expression is a String type it is always evaluated using the File Language. If the expression is an Expression type the specified Expression type is used - this allows you for instance to use OGNL expressions. For the consumer you can use it to filter filenames so you can for instance consume today's file using the File Language syntax: mydata-$date:now:yyyyMMdd.txt. The producers support the CamelOverruleFileName header which takes precedence over any existing CamelFileName header; the CamelOverruleFileName is a header that is used only once and makes it easier as this avoids to temporary store CamelFileName and have to restore it afterwards. | flatten | producer | false | boolean | Flatten is used to flatten the file name path to strip any leading paths so it's just the file name. This allows you to consume recursively into sub-directories but when you eg write the files to another directory they will be written in a single directory. Setting this to true on the producer enforces that any file name in CamelFileName header will be stripped for any leading paths. | strictHostKeyChecking | producer | no | String | Sets whether to use strict host key checking. Possible values are: no yes | allowNullBody | producer (advanced) | false | boolean | Used to specify if a null body is allowed during file writing. If set to true then an empty file will be created when set to false and attempting to send a null body to the file component a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist option is set to 'Override' then the file will be truncated and if set to append the file will remain unchanged. | disconnectOnBatchComplete | producer (advanced) | false | boolean | Whether or not to disconnect from remote FTP server right after a Batch upload is complete. disconnectOnBatchComplete will only disconnect the current connection to the FTP server. | connectTimeout | advanced | 10000 | int | Sets the connect timeout for waiting for a connection to be established Used by both FTPClient and JSCH | soTimeout | advanced | 300000 | int | Sets the so timeout Used only by FTPClient | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | timeout | advanced | 30000 | int | Sets the data timeout for waiting for reply Used only by FTPClient | knownHostsFile | security | | String | Sets the known_hosts file so that the jsch endpoint can do host key verification. | password | security | | String | Password to use for login | privateKeyFile | security | | String | Set the private key file to that the SFTP endpoint can do private key verification. | privateKeyFilePassphrase | security | | String | Set the private key file passphrase to that the SFTP endpoint can do private key verification. | username | security | | String | Username to use for login | useUserKnownHostsFile | security | true | boolean | If knownHostFile has not been explicit configured then use the host file from System.getProperty(user.home) /.ssh/known_hosts | ciphers | security (advanced) | | String | Set a comma separated list of ciphers that will be used in order of preference. Possible cipher names are defined by JCraft JSCH. Some examples include: aes128-ctraes128-cbc3des-ctr3des-cbcblowfish-cbcaes192-cbcaes256-cbc. If not specified the default list from JSCH will be used. |======================================================================= {% endraw %} // endpoint options: END [[Jsch-Limitations]] Limitations ^^^^^^^^^^^ Currently camel-jsch only supports a http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Producer.html[Producer] (i.e. copy files to another host).?? [[Jsch-SeeAlso]] See Also ^^^^^^^^ * link:configuring-camel.html[Configuring Camel] * link:component.html[Component] * link:endpoint.html[Endpoint] * link:getting-started.html[Getting Started]