startStreamProcessor method

Future<StartStreamProcessorResponse> startStreamProcessor({
  1. required String name,
  2. StreamProcessingStartSelector? startSelector,
  3. StreamProcessingStopSelector? stopSelector,
})

Starts processing a stream processor. You create a stream processor by calling CreateStreamProcessor. To tell StartStreamProcessor which stream processor to start, use the value of the Name field specified in the call to CreateStreamProcessor.

If you are using a label detection stream processor to detect labels, you need to provide a Start selector and a Stop selector to determine the length of the stream processing time.

May throw AccessDeniedException. May throw InternalServerError. May throw InvalidParameterException. May throw ProvisionedThroughputExceededException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter name : The name of the stream processor to start processing.

Parameter startSelector : Specifies the starting point in the Kinesis stream to start processing. You can use the producer timestamp or the fragment number. If you use the producer timestamp, you must put the time in milliseconds. For more information about fragment numbers, see Fragment.

This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.

Parameter stopSelector : Specifies when to stop processing the stream. You can specify a maximum amount of time to process the video.

This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.

Implementation

Future<StartStreamProcessorResponse> startStreamProcessor({
  required String name,
  StreamProcessingStartSelector? startSelector,
  StreamProcessingStopSelector? stopSelector,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RekognitionService.StartStreamProcessor'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      if (startSelector != null) 'StartSelector': startSelector,
      if (stopSelector != null) 'StopSelector': stopSelector,
    },
  );

  return StartStreamProcessorResponse.fromJson(jsonResponse.body);
}