Skip to content

batch_delete_detector async

batch_delete_detector(
    detectors: DeleteDetectorRequests,
    *,
    config_overrides: Optional[AsyncIoTEventsDataClientConfig] = None,
) -> BatchDeleteDetectorResponse

Deletes one or more detectors that were created. When a detector is deleted, its state will be cleared and the detector will be removed from the list of detectors. The deleted detector will no longer appear if referenced in the ListDetectors API call.

Parameters:

Raises:

Source code in docs_src/capo_iot_events_data/_services/async_io_t_events_data.py
async def batch_delete_detector(
    self,
    detectors: "capo_iot_events_data.types.delete_detector_requests.DeleteDetectorRequests",
    *,
    config_overrides: Optional[AsyncIoTEventsDataClientConfig] = None,
) -> "capo_iot_events_data.types.batch_delete_detector_response.BatchDeleteDetectorResponse":
    """<p>Deletes one or more detectors that were created. When a detector is deleted, its state will be cleared and the detector will be removed from the list of detectors. The deleted detector will no longer appear if referenced in the <a href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_ListDetectors.html">ListDetectors</a> API call.</p>

    Args:
        detectors: <p>The list of one or more detectors to be deleted.</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_delete_detector_request.BatchDeleteDetectorRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot_events_data.types.batch_delete_detector_response.BatchDeleteDetectorResponse"
    ]:
        import capo_iot_events_data._operations.iot_columbo_data_service.batch_delete_detector

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDeleteDetector")
    )
    input_: capo_iot_events_data.types.batch_delete_detector_request.BatchDeleteDetectorRequest = {
        "detectors": detectors
    }

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