updateStreamProcessor method

Future<void> updateStreamProcessor({
  1. required String name,
  2. StreamProcessorDataSharingPreference? dataSharingPreferenceForUpdate,
  3. List<StreamProcessorParameterToDelete>? parametersToDelete,
  4. List<RegionOfInterest>? regionsOfInterestForUpdate,
  5. StreamProcessorSettingsForUpdate? settingsForUpdate,
})

Allows you to update a stream processor. You can change some settings and regions of interest and delete certain parameters.

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

Parameter name : Name of the stream processor that you want to update.

Parameter dataSharingPreferenceForUpdate : Shows whether you are sharing data with Rekognition to improve model performance. You can choose this option at the account level or on a per-stream basis. Note that if you opt out at the account level this setting is ignored on individual streams.

Parameter parametersToDelete : A list of parameters you want to delete from the stream processor.

Parameter regionsOfInterestForUpdate : Specifies locations in the frames where Amazon Rekognition checks for objects or people. This is an optional parameter for label detection stream processors.

Parameter settingsForUpdate : The stream processor settings that you want to update. Label detection settings can be updated to detect different labels with a different minimum confidence.

Implementation

Future<void> updateStreamProcessor({
  required String name,
  StreamProcessorDataSharingPreference? dataSharingPreferenceForUpdate,
  List<StreamProcessorParameterToDelete>? parametersToDelete,
  List<RegionOfInterest>? regionsOfInterestForUpdate,
  StreamProcessorSettingsForUpdate? settingsForUpdate,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RekognitionService.UpdateStreamProcessor'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      if (dataSharingPreferenceForUpdate != null)
        'DataSharingPreferenceForUpdate': dataSharingPreferenceForUpdate,
      if (parametersToDelete != null)
        'ParametersToDelete': parametersToDelete.map((e) => e.value).toList(),
      if (regionsOfInterestForUpdate != null)
        'RegionsOfInterestForUpdate': regionsOfInterestForUpdate,
      if (settingsForUpdate != null) 'SettingsForUpdate': settingsForUpdate,
    },
  );
}