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 InvalidInputException. May throw ResourceNotFoundException. May throw InternalServerException.

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

Implementation

Future<GetBatchPredictionOutput> getBatchPrediction({
  required String batchPredictionId,
}) async {
  ArgumentError.checkNotNull(batchPredictionId, 'batchPredictionId');
  _s.validateStringLength(
    'batchPredictionId',
    batchPredictionId,
    1,
    64,
    isRequired: true,
  );
  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);
}