listFileTransferResults method

Future<ListFileTransferResultsResponse> listFileTransferResults({
  1. required String connectorId,
  2. required String transferId,
  3. int? maxResults,
  4. String? nextToken,
})

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.

May throw InternalServiceError. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.

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

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

Parameter maxResults : 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.

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

Implementation

Future<ListFileTransferResultsResponse> listFileTransferResults({
  required String connectorId,
  required String transferId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'TransferService.ListFileTransferResults'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConnectorId': connectorId,
      'TransferId': transferId,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListFileTransferResultsResponse.fromJson(jsonResponse.body);
}