startPipelineReprocessing method

Future<StartPipelineReprocessingResponse> startPipelineReprocessing({
  1. required String pipelineName,
  2. ChannelMessages? channelMessages,
  3. DateTime? endTime,
  4. DateTime? startTime,
})

Starts the reprocessing of raw message data through the pipeline.

May throw ResourceNotFoundException. May throw ResourceAlreadyExistsException. May throw InvalidRequestException. May throw InternalFailureException. May throw ServiceUnavailableException. May throw ThrottlingException.

Parameter pipelineName : The name of the pipeline on which to start reprocessing.

Parameter channelMessages : Specifies one or more sets of channel messages that you want to reprocess.

If you use the channelMessages object, you must not specify a value for startTime and endTime.

Parameter endTime : The end time (exclusive) of raw message data that is reprocessed.

If you specify a value for the endTime parameter, you must not use the channelMessages object.

Parameter startTime : The start time (inclusive) of raw message data that is reprocessed.

If you specify a value for the startTime parameter, you must not use the channelMessages object.

Implementation

Future<StartPipelineReprocessingResponse> startPipelineReprocessing({
  required String pipelineName,
  ChannelMessages? channelMessages,
  DateTime? endTime,
  DateTime? startTime,
}) async {
  ArgumentError.checkNotNull(pipelineName, 'pipelineName');
  _s.validateStringLength(
    'pipelineName',
    pipelineName,
    1,
    128,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    if (channelMessages != null) 'channelMessages': channelMessages,
    if (endTime != null) 'endTime': unixTimestampToJson(endTime),
    if (startTime != null) 'startTime': unixTimestampToJson(startTime),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/pipelines/${Uri.encodeComponent(pipelineName)}/reprocessing',
    exceptionFnMap: _exceptionFns,
  );
  return StartPipelineReprocessingResponse.fromJson(response);
}