activatePipeline method

Future<void> activatePipeline({
  1. required String pipelineId,
  2. List<ParameterValue>? parameterValues,
  3. DateTime? startTimestamp,
})

Validates the specified pipeline and starts processing pipeline tasks. If the pipeline does not pass validation, activation fails.

If you need to pause the pipeline to investigate an issue with a component, such as a data source or script, call DeactivatePipeline.

To activate a finished pipeline, modify the end date for the pipeline and then activate it.

May throw PipelineNotFoundException. May throw PipelineDeletedException. May throw InternalServiceError. May throw InvalidRequestException.

Parameter pipelineId : The ID of the pipeline.

Parameter parameterValues : A list of parameter values to pass to the pipeline at activation.

Parameter startTimestamp : The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.

Implementation

Future<void> activatePipeline({
  required String pipelineId,
  List<ParameterValue>? parameterValues,
  DateTime? startTimestamp,
}) 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.ActivatePipeline'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'pipelineId': pipelineId,
      if (parameterValues != null) 'parameterValues': parameterValues,
      if (startTimestamp != null)
        'startTimestamp': unixTimestampToJson(startTimestamp),
    },
  );
}