describeJob method

Future<DescribeJobResponse> describeJob({
  1. required JobCategory jobCategory,
  2. required String jobName,
})

Returns detailed information about a job, including its current status, secondary status, configuration, and timestamps. Use SecondaryStatus for granular progress tracking and SecondaryStatusTransitions to see the full history of status changes with timestamps.

The following operations are related to DescribeJob:

  • CreateJob
  • ListJobs
  • StopJob
  • DeleteJob

May throw ResourceNotFound.

Parameter jobCategory : The category of the job.

Parameter jobName : The name of the job to describe.

Implementation

Future<DescribeJobResponse> describeJob({
  required JobCategory jobCategory,
  required String jobName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DescribeJob'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'JobCategory': jobCategory.value,
      'JobName': jobName,
    },
  );

  return DescribeJobResponse.fromJson(jsonResponse.body);
}