aws / Jobs-for-AWS-IoT-embedded-sdk

Client library for using AWS IoT Jobs service on embedded devices
MIT License
12 stars 35 forks source link

Allow constructing Update messages with key-value pairs in `StatusDetails` #102

Open priyamourya25 opened 3 weeks ago

priyamourya25 commented 3 weeks ago

statusDetails is an optional field that can be used to update the Job status with additional details that can be used during verification step.

Please refer the usage of statusDetails field in the documentation: https://docs.aws.amazon.com/iot/latest/apireference/API_iot-jobs-data_UpdateJobExecution.html#iot-iot-jobs-data_UpdateJobExecution-request-statusDetails

Can you add the support to append key-value pairs in status details and statusDetails field when a job update message is sent? Few example of such message: {"status":"FAILED","statusDetails":{"self_test":"ready","updatedBy":"0x1e240"}} -> to notify that download is complete and device will go in self-test mode {"status":"FAILED","statusDetails":{"self_test":"accepted","reason":"v1.0.0"}} ->to notify that new image was committed.

The APIs should provide an interface to construct such messages because these were provided by older ota agent to notify the ota progress and were very helpful

rawalexe commented 3 weeks ago

Hello Priya, Thank you for requesting the feature. I'll forward this to the team. If you would like to get this sooner, we do accept PR request and may merger it, accelerating the feature release time.

Thank you,

Best Regards, AR

kstribrnAmzn commented 2 weeks ago

There are a few ways to go about it, but ultimately I think taking in a pre-formatted StatusDetails string to the function. See https://github.com/aws/Jobs-for-AWS-IoT-embedded-sdk/issues/101 for more.