updatePipelineStatus method

Future<UpdatePipelineStatusResponse> updatePipelineStatus({
  1. required String id,
  2. required String status,
})

The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of jobs.

Changing the pipeline status is useful if you want to cancel one or more jobs. You can't cancel jobs after Elastic Transcoder has started processing them; if you pause the pipeline to which you submitted the jobs, you have more time to get the job IDs for the jobs that you want to cancel, and to send a CancelJob request.

May throw ValidationException. May throw IncompatibleVersionException. May throw ResourceNotFoundException. May throw ResourceInUseException. May throw AccessDeniedException. May throw InternalServiceException.

Parameter id : The identifier of the pipeline to update.

Parameter status : The desired status of the pipeline:

  • Active: The pipeline is processing jobs.
  • Paused: The pipeline is not currently processing jobs.

Implementation

Future<UpdatePipelineStatusResponse> updatePipelineStatus({
  required String id,
  required String status,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  ArgumentError.checkNotNull(status, 'status');
  final $payload = <String, dynamic>{
    'Status': status,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2012-09-25/pipelines/${Uri.encodeComponent(id)}/status',
    exceptionFnMap: _exceptionFns,
  );
  return UpdatePipelineStatusResponse.fromJson(response);
}