Skip to content

batch_update_detector async

batch_update_detector(
    detectors: UpdateDetectorRequests,
    *,
    config_overrides: Optional[AsyncIoTEventsDataClientConfig] = None,
) -> BatchUpdateDetectorResponse

Updates the state, variable values, and timer settings of one or more detectors (instances) of a specified detector model.

Parameters:

  • detectors (UpdateDetectorRequests) –

    The list of detectors (instances) to update, along with the values to update.

Raises:

Source code in docs_src/capo_iot_events_data/_services/async_io_t_events_data.py
async def batch_update_detector(
    self,
    detectors: "capo_iot_events_data.types.update_detector_requests.UpdateDetectorRequests",
    *,
    config_overrides: Optional[AsyncIoTEventsDataClientConfig] = None,
) -> "capo_iot_events_data.types.batch_update_detector_response.BatchUpdateDetectorResponse":
    """<p>Updates the state, variable values, and timer settings of one or more detectors (instances) of a specified detector model.</p>

    Args:
        detectors: <p>The list of detectors (instances) to update, along with the values to update.</p>

    Raises:
        capo_iot_events_data.errors.internal_failure_exception.InternalFailureException: <p>An internal failure occurred.</p>
        capo_iot_events_data.errors.invalid_request_exception.InvalidRequestException: <p>The request was invalid.</p>
        capo_iot_events_data.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
        capo_iot_events_data.errors.throttling_exception.ThrottlingException: <p>The request could not be completed due to throttling.</p>
        capo_iot_events_data.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot_events_data.types.batch_update_detector_request.BatchUpdateDetectorRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot_events_data.types.batch_update_detector_response.BatchUpdateDetectorResponse"
    ]:
        import capo_iot_events_data._operations.iot_columbo_data_service.batch_update_detector

        (
            output,
            http_response,
        ) = await capo_iot_events_data._operations.iot_columbo_data_service.batch_update_detector.async_batch_update_detector(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchUpdateDetector")
    )
    input_: capo_iot_events_data.types.batch_update_detector_request.BatchUpdateDetectorRequest = {
        "detectors": detectors
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output