:doc:`IoTEventsData <../../iotevents-data>` / Client / batch_delete_detector

*********************
batch_delete_detector
*********************



.. py:method:: IoTEventsData.Client.batch_delete_detector(**kwargs)

  

  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 <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_ListDetectors.html>`__ API call.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotevents-data-2018-10-23/BatchDeleteDetector>`_  


  **Request Syntax**
  ::

    response = client.batch_delete_detector(
        detectors=[
            {
                'messageId': 'string',
                'detectorModelName': 'string',
                'keyValue': 'string'
            },
        ]
    )
    
  :type detectors: list
  :param detectors: **[REQUIRED]** 

    The list of one or more detectors to be deleted.

    

  
    - *(dict) --* 

      Information used to delete the detector model.

      

    
      - **messageId** *(string) --* **[REQUIRED]** 

        The ID to assign to the ``DeleteDetectorRequest``. Each ``"messageId"`` must be unique within each batch sent.

        

      
      - **detectorModelName** *(string) --* **[REQUIRED]** 

        The name of the detector model that was used to create the detector instance.

        

      
      - **keyValue** *(string) --* 

        The value of the `key <https://docs.aws.amazon.com/iotevents/latest/apireference/API_CreateDetectorModel.html#iotevents-CreateDetectorModel-request-key>`__ used to identify the detector.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'batchDeleteDetectorErrorEntries': [
              {
                  'messageId': 'string',
                  'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
                  'errorMessage': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **batchDeleteDetectorErrorEntries** *(list) --* 

        A list of errors associated with the request, or an empty array ( ``[]``) if there are no errors. Each error entry contains a ``messageId`` that helps you identify the entry that failed.

        
        

        - *(dict) --* 

          Contains error messages associated with the deletion request.

          
          

          - **messageId** *(string) --* 

            The ID of the message that caused the error. (See the value of the ``"messageId"`` in the `detectors <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchDeleteDetector.html#iotevents-iotevents-data_BatchDeleteDetector-request-detectors>`__ object of the ``DeleteDetectorRequest``.)

            
          

          - **errorCode** *(string) --* 

            The error code.

            
          

          - **errorMessage** *(string) --* 

            A message that describes the error.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`IoTEventsData.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTEventsData.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoTEventsData.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`IoTEventsData.Client.exceptions.ThrottlingException`

  