Skip to content

update_stream_processor

update_stream_processor(
    name: StreamProcessorName,
    *,
    config_overrides: Optional[RekognitionClientConfig] = None,
    settings_for_update: Optional[StreamProcessorSettingsForUpdate] = None,
    regions_of_interest_for_update: Optional[RegionsOfInterest] = None,
    data_sharing_preference_for_update: Optional[
        StreamProcessorDataSharingPreference
    ] = None,
    parameters_to_delete: Optional[StreamProcessorParametersToDelete] = None,
) -> UpdateStreamProcessorResponse

Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers. For more information, see Rekognition feature availability changes.

This change does not impact the availability of other Amazon Rekognition features.

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

Parameters:

  • name (StreamProcessorName) –

    Name of the stream processor that you want to update.

  • settings_for_update (Optional[StreamProcessorSettingsForUpdate], default: None ) –

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

  • regions_of_interest_for_update (Optional[RegionsOfInterest], default: None ) –

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

  • data_sharing_preference_for_update (Optional[StreamProcessorDataSharingPreference], default: None ) –

    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.

  • parameters_to_delete (Optional[StreamProcessorParametersToDelete], default: None ) –

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

Raises:

Source code in docs_src/capo_rekognition/_services/rekognition.py
def update_stream_processor(
    self,
    name: "capo_rekognition.types.stream_processor_name.StreamProcessorName",
    *,
    config_overrides: Optional[RekognitionClientConfig] = None,
    settings_for_update: Optional[
        "capo_rekognition.types.stream_processor_settings_for_update.StreamProcessorSettingsForUpdate"
    ] = None,
    regions_of_interest_for_update: Optional[
        "capo_rekognition.types.regions_of_interest.RegionsOfInterest"
    ] = None,
    data_sharing_preference_for_update: Optional[
        "capo_rekognition.types.stream_processor_data_sharing_preference.StreamProcessorDataSharingPreference"
    ] = None,
    parameters_to_delete: Optional[
        "capo_rekognition.types.stream_processor_parameters_to_delete.StreamProcessorParametersToDelete"
    ] = None,
) -> "capo_rekognition.types.update_stream_processor_response.UpdateStreamProcessorResponse":
    """<important> <p>Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers. For more information, see <a href="https://docs.aws.amazon.com/rekognition/latest/dg/rekognition-availability-changes.html">Rekognition feature availability changes</a>.</p> <p> <b>This change does not impact the availability of other Amazon Rekognition features.</b> </p> </important> <p> Allows you to update a stream processor. You can change some settings and regions of interest and delete certain parameters. </p>

    Args:
        name: <p> Name of the stream processor that you want to update. </p>
        settings_for_update: <p> The stream processor settings that you want to update. Label detection settings can be updated to detect different labels with a different minimum confidence. </p>
        regions_of_interest_for_update: <p> Specifies locations in the frames where Amazon Rekognition checks for objects or people. This is an optional parameter for label detection stream processors. </p>
        data_sharing_preference_for_update: <p> 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. </p>
        parameters_to_delete: <p> A list of parameters you want to delete from the stream processor. </p>

    Raises:
        capo_rekognition.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to perform the action.</p>
        capo_rekognition.errors.internal_server_error.InternalServerError: <p>Amazon Rekognition experienced a service issue. Try your call again.</p>
        capo_rekognition.errors.invalid_parameter_exception.InvalidParameterException: <p>Input parameter violated a constraint. Validate your parameter before calling the API operation again.</p>
        capo_rekognition.errors.provisioned_throughput_exceeded_exception.ProvisionedThroughputExceededException: <p>The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.</p>
        capo_rekognition.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is already being used.</p>
        capo_rekognition.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request cannot be found.</p>
        capo_rekognition.errors.throttling_exception.ThrottlingException: <p>Amazon Rekognition is temporarily unable to process the request. Try your call again.</p>
        capo_rekognition.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_rekognition.types.update_stream_processor_request.UpdateStreamProcessorRequest]",
    ) -> OperationResponse[
        "capo_rekognition.types.update_stream_processor_response.UpdateStreamProcessorResponse"
    ]:
        import capo_rekognition._operations.rekognition_service.update_stream_processor

        output, http_response = (
            capo_rekognition._operations.rekognition_service.update_stream_processor.update_stream_processor(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateStreamProcessor")
    )
    input_: capo_rekognition.types.update_stream_processor_request.UpdateStreamProcessorRequest = {
        "name": name
    }
    if settings_for_update is not None:
        input_["settings_for_update"] = settings_for_update
    if regions_of_interest_for_update is not None:
        input_["regions_of_interest_for_update"] = regions_of_interest_for_update
    if data_sharing_preference_for_update is not None:
        input_["data_sharing_preference_for_update"] = (
            data_sharing_preference_for_update
        )
    if parameters_to_delete is not None:
        input_["parameters_to_delete"] = parameters_to_delete

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output