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 more SendFilePaths 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 RetreiveFilePaths to identify the files you want to transfer, and a LocalDirectoryPath 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 a RemoteDirectoryPath 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 a RemoteDirectoryPath, 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