deleteBatchPrediction method

Future<DeleteBatchPredictionOutput> deleteBatchPrediction({
  1. required String batchPredictionId,
})

Assigns the DELETED status to a BatchPrediction, rendering it unusable.

After using the DeleteBatchPrediction operation, you can use the GetBatchPrediction operation to verify that the status of the BatchPrediction changed to DELETED.

Caution: The result of the DeleteBatchPrediction operation is irreversible.

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

Parameter batchPredictionId : A user-supplied ID that uniquely identifies the BatchPrediction.

Implementation

Future<DeleteBatchPredictionOutput> deleteBatchPrediction({
  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.DeleteBatchPrediction'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'BatchPredictionId': batchPredictionId,
    },
  );

  return DeleteBatchPredictionOutput.fromJson(jsonResponse.body);
}