Transfer / Client / test_connection

test_connection#

Transfer.Client.test_connection(**kwargs)#

Tests whether your SFTP connector is set up successfully. We highly recommend that you call this operation to test your ability to transfer files between a Transfer Family server and a trading partner’s SFTP server.

See also: AWS API Documentation

Request Syntax

response = client.test_connection(
    ConnectorId='string'
)
Parameters:

ConnectorId (string) –

[REQUIRED]

The unique identifier for the connector.

Return type:

dict

Returns:

Response Syntax

{
    'ConnectorId': 'string',
    'Status': 'string',
    'StatusMessage': 'string'
}

Response Structure

  • (dict) –

    • ConnectorId (string) –

      Returns the identifier of the connector object that you are testing.

    • Status (string) –

      Returns OK for successful test, or ERROR if the test fails.

    • StatusMessage (string) –

      Returns Connection succeeded if the test is successful. Or, returns a descriptive error message if the test fails. The following list provides the details for some error messages and troubleshooting steps for each.

      • Unable to access secrets manager: Verify that your secret name aligns with the one in Transfer Role permissions.

      • Unknown Host/Connection failed: Verify the server URL in the connector configuration , and verify that the login credentials work successfully outside of the connector.

      • Private key not found: Verify that the secret exists and is formatted correctly.

      • Invalid trusted host keys: Verify that the trusted host key in the connector configuration matches the ssh-keyscan output.

Exceptions

  • Transfer.Client.exceptions.ServiceUnavailableException

  • Transfer.Client.exceptions.InternalServiceError

  • Transfer.Client.exceptions.InvalidRequestException

  • Transfer.Client.exceptions.ResourceNotFoundException