deletePipeline method

Future<DeletePipelineResponse> deletePipeline({
  1. required String pipelineName,
  2. String? clientRequestToken,
})

Deletes a pipeline if there are no running instances of the pipeline. To delete a pipeline, you must stop all running instances of the pipeline using the StopPipelineExecution API. When you delete a pipeline, all instances of the pipeline are deleted.

May throw ConflictException. May throw ResourceNotFound.

Parameter pipelineName : The name of the pipeline to delete.

Parameter clientRequestToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time.

Implementation

Future<DeletePipelineResponse> deletePipeline({
  required String pipelineName,
  String? clientRequestToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DeletePipeline'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'PipelineName': pipelineName,
      'ClientRequestToken':
          clientRequestToken ?? _s.generateIdempotencyToken(),
    },
  );

  return DeletePipelineResponse.fromJson(jsonResponse.body);
}