stopPipelineExecution method
Stops a pipeline execution.
May throw ResourceNotFound.
Parameter pipelineExecutionArn
:
The Amazon Resource Name (ARN) of the pipeline execution.
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<StopPipelineExecutionResponse> stopPipelineExecution({
required String pipelineExecutionArn,
String? clientRequestToken,
}) async {
ArgumentError.checkNotNull(pipelineExecutionArn, 'pipelineExecutionArn');
_s.validateStringLength(
'pipelineExecutionArn',
pipelineExecutionArn,
0,
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.StopPipelineExecution'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PipelineExecutionArn': pipelineExecutionArn,
'ClientRequestToken':
clientRequestToken ?? _s.generateIdempotencyToken(),
},
);
return StopPipelineExecutionResponse.fromJson(jsonResponse.body);
}