ListFileTransferResultsCommand

Returns real-time updates and detailed information on the status of each individual file being transferred in a specific file transfer operation. You specify the file transfer by providing its ConnectorId and its TransferId.

File transfer results are available up to 7 days after an operation has been requested.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { TransferClient, ListFileTransferResultsCommand } from "@aws-sdk/client-transfer"; // ES Modules import
// const { TransferClient, ListFileTransferResultsCommand } = require("@aws-sdk/client-transfer"); // CommonJS import
const client = new TransferClient(config);
const input = { // ListFileTransferResultsRequest
  ConnectorId: "STRING_VALUE", // required
  TransferId: "STRING_VALUE", // required
  NextToken: "STRING_VALUE",
  MaxResults: Number("int"),
};
const command = new ListFileTransferResultsCommand(input);
const response = await client.send(command);
// { // ListFileTransferResultsResponse
//   FileTransferResults: [ // ConnectorFileTransferResults // required
//     { // ConnectorFileTransferResult
//       FilePath: "STRING_VALUE", // required
//       StatusCode: "QUEUED" || "IN_PROGRESS" || "COMPLETED" || "FAILED", // required
//       FailureCode: "STRING_VALUE",
//       FailureMessage: "STRING_VALUE",
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListFileTransferResultsCommand Input

Parameter
Type
Description
ConnectorId
Required
string | undefined

A unique identifier for a connector. This value should match the value supplied to the corresponding StartFileTransfer call.

TransferId
Required
string | undefined

A unique identifier for a file transfer. This value should match the value supplied to the corresponding StartFileTransfer call.

MaxResults
number | undefined

The maximum number of files to return in a single page. Note that currently you can specify a maximum of 10 file paths in a single StartFileTransfer  operation. Thus, the maximum number of file transfer results that can be returned in a single page is 10.

NextToken
string | undefined

If there are more file details than returned in this call, use this value for a subsequent call to ListFileTransferResults to retrieve them.

ListFileTransferResultsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
FileTransferResults
Required
ConnectorFileTransferResult[] | undefined

Returns the details for the files transferred in the transfer identified by the TransferId and ConnectorId specified.

  • FilePath: the filename and path to where the file was sent to or retrieved from.

  • StatusCode: current status for the transfer. The status returned is one of the following values:QUEUED, IN_PROGRESS, COMPLETED, or FAILED

  • FailureCode: for transfers that fail, this parameter contains a code indicating the reason. For example, RETRIEVE_FILE_NOT_FOUND

  • FailureMessage: for transfers that fail, this parameter describes the reason for the failure.

NextToken
string | undefined

Returns a token that you can use to call ListFileTransferResults again and receive additional results, if there are any (against the same TransferId.

Throws

Name
Fault
Details
InternalServiceError
server

This exception is thrown when an error occurs in the Transfer Family service.

InvalidRequestException
client

This exception is thrown when the client submits a malformed request.

ResourceNotFoundException
client

This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.

ServiceUnavailableException
server

The request has failed because the Amazon Web ServicesTransfer Family service is not available.

TransferServiceException
Base exception class for all service exceptions from Transfer service.