startRemoteDelete method
Deletes a file or directory on the remote SFTP server.
May throw InternalServiceError.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter connectorId :
The unique identifier for the connector.
Parameter deletePath :
The absolute path of the file or directory to delete. You can only specify
one path per call to this operation.
Implementation
Future<StartRemoteDeleteResponse> startRemoteDelete({
required String connectorId,
required String deletePath,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'TransferService.StartRemoteDelete'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ConnectorId': connectorId,
'DeletePath': deletePath,
},
);
return StartRemoteDeleteResponse.fromJson(jsonResponse.body);
}