start_file_transfer
async
¶
start_file_transfer(
connector_id: ConnectorId,
*,
config_overrides: Optional[AsyncTransferClientConfig] = None,
send_file_paths: Optional[FilePaths] = None,
retrieve_file_paths: Optional[FilePaths] = None,
local_directory_path: Optional[FilePath] = None,
remote_directory_path: Optional[FilePath] = None,
custom_http_headers: Optional[CustomHttpHeaders] = None,
) -> StartFileTransferResponse
Begins a file transfer between local Amazon Web Services storage and a remote AS2 or SFTP server.
-
For an AS2 connector, you specify the
ConnectorIdand one or moreSendFilePathsto 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
RetrieveFilePathsto identify the files you want to transfer, and aLocalDirectoryPathto 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
SendFilePathsto identify the files you want to transfer, and aRemoteDirectoryPathto specify the destination folder.
-
Parameters:
-
connector_id(ConnectorId) –The unique identifier for the connector.
-
send_file_paths(Optional[FilePaths], default:None) –One or more source paths for the Amazon S3 storage. Each string represents a source file path for one outbound file transfer. For example,
amzn-s3-demo-bucket/myfile.txt.Replace
amzn-s3-demo-bucketwith one of your actual buckets. -
retrieve_file_paths(Optional[FilePaths], default:None) –One or more source paths for the partner's SFTP server. Each string represents a source file path for one inbound file transfer.
-
local_directory_path(Optional[FilePath], default:None) –For an inbound transfer, the
LocaDirectoryPathspecifies the destination for one or more files that are transferred from the partner's SFTP server. -
remote_directory_path(Optional[FilePath], default:None) –For an outbound transfer, the
RemoteDirectoryPathspecifies 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. -
custom_http_headers(Optional[CustomHttpHeaders], default:None) –An array of key-value pairs that represent custom HTTP headers to include in AS2 messages. These headers are added to the AS2 message when sending files to your trading partner.
Raises:
-
InternalServiceError–This exception is thrown when an error occurs in the Transfer Family service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
ResourceNotFoundException–This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
-
ServiceUnavailableException–The request has failed because the Amazon Web ServicesTransfer Family service is not available.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_transfer/_services/async_transfer.py
1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 | |