getBatchPrediction method

Future<GetBatchPredictionOutput> getBatchPrediction({
  1. required String batchPredictionId,
})

Returns a BatchPrediction that includes detailed metadata, status, and data file information for a Batch Prediction request.

May throw InternalServerException. May throw InvalidInputException. May throw ResourceNotFoundException.

Parameter batchPredictionId : An ID assigned to the BatchPrediction at creation.

Implementation

Future<GetBatchPredictionOutput> getBatchPrediction({
  required String batchPredictionId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonML_20141212.GetBatchPrediction'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'BatchPredictionId': batchPredictionId,
    },
  );

  return GetBatchPredictionOutput.fromJson(jsonResponse.body);
}