title | description | author | ms.author | ms.date | ms.topic | ms.service |
---|---|---|---|---|---|---|
Device Update for IoT Hub update manifest | Microsoft Docs |
Learn how properties are sent from the Device Update service to the device during an update |
andrewbrownmsft |
andbrown |
2/17/2021 |
conceptual |
iot-hub-device-update |
Device Update for IoT Hub uses IoT Plug and Play to send data to devices during deployment. One of them is update manifest, a serialized JSON object string containing metadata of the update to install. It is also cryptographically signed to allow the Device Update Agent to verify its authenticity. Refer to Device Update security for more information on how the update manifest is used to securely install content.
It is important to understand the differences between the import manifest and the update manifest concepts in Device Update for IoT Hub:
- The import manifest is created by whoever creates the corresponding update. It describes the contents of the update that will be imported into Device Update for IoT Hub.
- The update manifest is automatically generated by the Device Update for IoT Hub service, using some of the properties that were defined in the import manifest. It is used to communicate relevant information to the Device Update Agent during the update process.
Each manifest type has its own schema and schema version.
Important
Update manifest JSON schema version 4 is hosted at SchemaStore.org.
{
"manifestVersion": "4",
"updateId": {
"provider": "Contoso",
"name": "Toaster",
"version": "1.0"
},
"compatibility": [
{
"deviceManufacturer": "Contoso",
"deviceModel": "Toaster"
}
],
"instructions": {
"steps": [
{
"handler": "microsoft/swupdate:1",
"handlerProperties": {
"installedCriteria": "1.0"
},
"files": [
"fileId0"
]
}
]
},
"files": {
"fileId0": {
"filename": "contoso.toaster.1.0.swu",
"sizeInBytes": 718,
"hashes": {
"sha256": "mcB5SexMU4JOOzqmlJqKbue9qMskWY3EI/iVjJxCtAs="
}
}
},
"createdDateTime": "2021-09-28T18:32:01.8404544Z"
}
When an update manifest exceeds a certain size that prevents it from being communicated efficiently, Device Update for IoT Hub will send it to device in detached format, also known as mini update manifest. A mini manifest is technically metadata for update manifest and contains information needed for Device Update Agent to download the full update manifest and verify its authenticity.
Example mini update manifest:
{
"manifestVersion": "4",
"updateId": {
"provider": "Contoso",
"name": "Toaster",
"version": "1.0"
},
"detachedManifestFileId": "fileId1",
"files": {
"fileId1": {
"filename": "contoso.toaster.1.0.updatemanifest.json",
"sizeInBytes": 2048,
"hashes": {
"sha256": "789s9PDfX4uA9wFUubyC30BWkLFbgmpkpmz1fEdqo2U="
}
}
}
}