getTask method

Future<GetTaskResponse> getTask({
  1. required String farmId,
  2. required String jobId,
  3. required String queueId,
  4. required String stepId,
  5. required String taskId,
})

Gets a task.

May throw AccessDeniedException. May throw InternalServerErrorException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter farmId : The farm ID of the farm connected to the task.

Parameter jobId : The job ID of the job connected to the task.

Parameter queueId : The queue ID for the queue connected to the task.

Parameter stepId : The step ID for the step connected to the task.

Parameter taskId : The task ID.

Implementation

Future<GetTaskResponse> getTask({
  required String farmId,
  required String jobId,
  required String queueId,
  required String stepId,
  required String taskId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/2023-10-12/farms/${Uri.encodeComponent(farmId)}/queues/${Uri.encodeComponent(queueId)}/jobs/${Uri.encodeComponent(jobId)}/steps/${Uri.encodeComponent(stepId)}/tasks/${Uri.encodeComponent(taskId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetTaskResponse.fromJson(response);
}