Skip to main content
Version: 6 - Palatschinke

ConnectorTypeSMB

class connector_types.connector_type_smb.ConnectorTypeSMB

Copy a file from a SMB (CIFS, Samba) remote host to cloudomation or vice-versa.

This connector type uses the SMB protocol to copy a single file from a remote host to cloudomation or to copy a sigle file from cloudomation to a remote host.

Inputs

NameTypeDefaultDescription
actionStringcopyThe action to perform. Supported actions: copy and list.
connect_timeoutNumber60How long to wait for the SSH connection to be established
copy_timeoutint60How long to wait for the copy to finish
domainString``The domain name to use
dstStringNoneThe path of the destination file. Use the format "cloudomation:[path]" to copy a file to cloudomation. Must be set for action copy.
hostnameStringThe remote host name to connect to
is_direct_tcpboolTrueFalse: use legacy NetBIOS communication or True: use SMB communication
my_nameStringCloudomationThe own NetBIOS name to use
passwordStringThe password to use to authenticate
pathstrNoneThe path for which to list the content. Must be set for action list.
patternstr*A pattern to limit the files returned by the action list.
portNumber445The port number to connect to
remote_nameStringThe remote NetBIOS name to use
srcStringNoneThe path of the source file to copy. Use the format "cloudomation:[path]" to copy a file from cloudomation. Must be set for action copy.
use_ntlm_v2boolTrueFalse use NTLMv1 or True use NTLMv2 for authentication
usernameStringThe user name to use

Outputs

NameTypeDefaultDescription
execution_idintThe ID of the connection execution
listinglist[]The contents of the directory. Only set when using the list action.
loglist[]
messagestrThe ended message for the connection. If the connection ended with an error, the message will contain information about what went wrong
statusstrThe ended status for the connection. Either "success" or "error".

Constants

input_list = ['action', 'connect_timeout', 'copy_timeout', 'domain', 'dst', 'hostname', 'is_direct_tcp', 'my_name', 'password', 'path', 'pattern', 'port', 'remote_name', 'src', 'use_ntlm_v2', 'username'] output_list = ['listing', 'log'] ssl_context_inputs = ['check_hostname', 'client_cert', 'client_key', 'server_ca'] version = 1

Methods

Example

import flow_api

def handler(system: flow_api.System, this: flow_api.Execution):
this.connect(
connector_type='SMB',
hostname='my-smb-host',
username='myself',
password='***',
src='share-name\\path\\to\\file.txt',
dst='cloudomation:file.txt',
)
return this.success('all done')