how to delete a detector?

0

I have a detector model set to 'detector for each unique key value'. After some testing, I have a number of detectors that I'd like to delete, or at least reset to their 'start' state.

Re-publishing a model warns that my detectors may be deleted, but that doesn't seem to happen.

Are there any options to delete a detector?

McMike
gefragt vor 4 Jahren345 Aufrufe
5 Antworten
0

Hey,
After updating a detector model, an existing detector will remain in its current state until it receives a new message. Upon receiving a new message, the detector will be reset to the initial state, including the resetting of variables and timers. Completion of a timer will also cause the state of the detector to be reset if the detector has not yet received a new message.

If you want to reset the state of a specific detector without updating the detector model, you can use the batch-update-detector API (https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchUpdateDetector.html)

Edited by: AndrewA-AWS on Nov 20, 2019 3:47 PM

Edited by: AndrewA-AWS on Nov 20, 2019 3:48 PM

AWS
beantwortet vor 4 Jahren
0

From what I'm seeing, re-publishing my model doesn't reset the detectors.

But the badge-update-detector command seems to do what I need:
aws iotevents-data batch-update-detector --cli-input-json file://reset_detector3.json

This will be a decent work-around, but in the future it would be really nice to have a 'Remove Detectors' button on my detector model's page in the console, and maybe a 'Delete' button from an individual detector's page.

Thanks for the help!

McMike
beantwortet vor 4 Jahren
0

After you republish the model, are you then sending new messages to each of the detectors you want to reset via batch-put-message?

Also, glad to hear you were able to use batch-update-detector.

AWS
beantwortet vor 4 Jahren
0

After I re-publish a model, I'm posting messages to MQTT, which an IoT rule forwards to the Events input feeding the detector. I'm not sure if that ends up using batch-put, internally to Events.

At some point in the future, it would be great to have a simple API to delete or reset a single detector, or all detectors attached to a model.

Thanks!

McMike
beantwortet vor 4 Jahren
0

AWS IoT Events has released a new API for deleting the detectors in batches.

AWS
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen