deletePipeline method
Deletes a pipeline if there are no in-progress executions.
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 {
ArgumentError.checkNotNull(pipelineName, 'pipelineName');
_s.validateStringLength(
'pipelineName',
pipelineName,
1,
256,
isRequired: true,
);
_s.validateStringLength(
'clientRequestToken',
clientRequestToken,
32,
128,
);
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);
}