updateBatchPrediction method

Future<UpdateBatchPredictionOutput> updateBatchPrediction({
  1. required String batchPredictionId,
  2. required String batchPredictionName,
})

Updates the BatchPredictionName of a BatchPrediction.

You can use the GetBatchPrediction operation to view the contents of the updated data element.

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

Parameter batchPredictionId : The ID assigned to the BatchPrediction during creation.

Parameter batchPredictionName : A new user-supplied name or description of the BatchPrediction.

Implementation

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

  return UpdateBatchPredictionOutput.fromJson(jsonResponse.body);
}