deactivatePipeline method
Deactivates the specified running pipeline. The pipeline is set to the
DEACTIVATING
state until the deactivation process completes.
To resume a deactivated pipeline, use ActivatePipeline. By default, the pipeline resumes from the last completed execution. Optionally, you can specify the date and time to resume the pipeline.
May throw PipelineNotFoundException. May throw PipelineDeletedException. May throw InternalServiceError. May throw InvalidRequestException.
Parameter pipelineId
:
The ID of the pipeline.
Parameter cancelActive
:
Indicates whether to cancel any running objects. The default is true,
which sets the state of any running objects to CANCELED
. If
this value is false, the pipeline is deactivated after all running objects
finish.
Implementation
Future<void> deactivatePipeline({
required String pipelineId,
bool? cancelActive,
}) async {
ArgumentError.checkNotNull(pipelineId, 'pipelineId');
_s.validateStringLength(
'pipelineId',
pipelineId,
1,
1024,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DataPipeline.DeactivatePipeline'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'pipelineId': pipelineId,
if (cancelActive != null) 'cancelActive': cancelActive,
},
);
}