describeTask method

Future<DescribeTaskResponse> describeTask({
  1. required String taskArn,
})

Provides information about a task, which defines where and how DataSync transfers your data.

May throw InternalException. May throw InvalidRequestException.

Parameter taskArn : Specifies the Amazon Resource Name (ARN) of the transfer task that you want information about.

Implementation

Future<DescribeTaskResponse> describeTask({
  required String taskArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'FmrsService.DescribeTask'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'TaskArn': taskArn,
    },
  );

  return DescribeTaskResponse.fromJson(jsonResponse.body);
}