Transfer / Client / start_file_transfer
start_file_transfer#
- Transfer.Client.start_file_transfer(**kwargs)#
Begins a file transfer between local Amazon Web Services storage and a remote AS2 or SFTP server.
For an AS2 connector, you specify the
ConnectorId
and one or moreSendFilePaths
to identify the files you want to transfer.For an SFTP connector, the file transfer can be either outbound or inbound. In both cases, you specify the
ConnectorId
. Depending on the direction of the transfer, you also specify the following items:If you are transferring file from a partner’s SFTP server to Amazon Web Services storage, you specify one or more
RetrieveFilePaths
to identify the files you want to transfer, and aLocalDirectoryPath
to specify the destination folder.If you are transferring file to a partner’s SFTP server from Amazon Web Services storage, you specify one or more
SendFilePaths
to identify the files you want to transfer, and aRemoteDirectoryPath
to specify the destination folder.
See also: AWS API Documentation
Request Syntax
response = client.start_file_transfer( ConnectorId='string', SendFilePaths=[ 'string', ], RetrieveFilePaths=[ 'string', ], LocalDirectoryPath='string', RemoteDirectoryPath='string' )
- Parameters:
ConnectorId (string) –
[REQUIRED]
The unique identifier for the connector.
SendFilePaths (list) –
One or more source paths for the Amazon S3 storage. Each string represents a source file path for one outbound file transfer. For example, ``DOC-EXAMPLE-BUCKET/myfile.txt ``.
Note
Replace
DOC-EXAMPLE-BUCKET
with one of your actual buckets.(string) –
RetrieveFilePaths (list) –
One or more source paths for the partner’s SFTP server. Each string represents a source file path for one inbound file transfer.
(string) –
LocalDirectoryPath (string) – For an inbound transfer, the
LocaDirectoryPath
specifies the destination for one or more files that are transferred from the partner’s SFTP server.RemoteDirectoryPath (string) – For an outbound transfer, the
RemoteDirectoryPath
specifies the destination for one or more files that are transferred to the partner’s SFTP server. If you don’t specify aRemoteDirectoryPath
, the destination for transferred files is the SFTP user’s home directory.
- Return type:
dict
- Returns:
Response Syntax
{ 'TransferId': 'string' }
Response Structure
(dict) –
TransferId (string) –
Returns the unique identifier for the file transfer.
Exceptions
Transfer.Client.exceptions.ResourceNotFoundException
Transfer.Client.exceptions.InvalidRequestException
Transfer.Client.exceptions.ThrottlingException
Transfer.Client.exceptions.InternalServiceError
Transfer.Client.exceptions.ServiceUnavailableException