title | description | author | ms.author | ms.date | ms.topic | ms.service |
---|---|---|---|---|---|---|
Importing updates into Device Update for IoT Hub - schema and other information | Microsoft Docs |
Schema and other related information (including objects) that is used when importing updates into Device Update for IoT Hub. |
andrewbrownmsft |
andbrown |
2/25/2021 |
conceptual |
iot-hub-device-update |
If you want to import an update into Device Update for IoT Hub, be sure you've reviewed the concepts and How-To guide first. If you're interested in the details of import manifest schema, or information about API permissions, see below.
Import manifest JSON schema is hosted at SchemaStore.org.
Properties
Name | Type | Description | Required |
---|---|---|---|
$schema | string |
JSON schema reference. | No |
updateId | updateId |
Unique update identifier. | Yes |
description | string |
Optional update description. | No |
compatibility | compatibility |
List of device property sets this update is compatible with. | Yes |
instructions | instructions |
Update installation instructions. | Yes |
files | file [0-10] |
List of update payload files. Sum of all file sizes may not exceed 2 GB. May be empty or null if all instruction steps are reference steps. | No |
manifestVersion | string |
Import manifest schema version. Must be 4.0. | Yes |
createdDateTime | string |
Date & time import manifest was created in ISO 8601 format. | Yes |
Additional properties are not allowed.
JSON schema reference.
- Type:
string
- Required: No
Unique update identifier.
- Type:
updateId
- Required: Yes
Optional update description.
- Type:
string
- Required: No
- Minimum Length:
>= 1
- Maximum Length:
<= 512
List of device property sets this update is compatible with.
- Type:
compatibility
- Required: Yes
Update installation instructions.
- Type:
instructions
- Required: Yes
List of update payload files. Sum of all file sizes may not exceed 2 GB. May be empty or null if all instruction steps are reference steps.
- Type:
file
[0-10]
- Required: No
Import manifest schema version. Must be 4.0
.
- Type:
string
- Required: Yes
Date & time import manifest was created in ISO 8601 format.
- Type:
string
- Required: Yes
- Examples:
"2020-10-02T22:18:04.9446744Z"
Unique update identifier.
Update identity
Properties
Name | Type | Description | Required |
---|---|---|---|
provider | string |
Entity who is creating or directly responsible for the update. It can be a company name. | Yes |
name | string |
Identifier for a class of update. It can be a device class or model name. | Yes |
version | string |
Two to four part dot separated numerical version numbers. Each part must be a number between 0 and 2147483647 and leading zeroes will be dropped. | Yes |
Additional properties are not allowed.
Entity who is creating or directly responsible for the update. It can be a company name.
- Type:
string
- Required: Yes
- Pattern:
^[a-zA-Z0-9.-]+$
- Minimum Length:
>= 1
- Maximum Length:
<= 64
Identifier for a class of update. It can be a device class or model name.
- Type:
string
- Required: Yes
- Pattern:
^[a-zA-Z0-9.-]+$
- Minimum Length:
>= 1
- Maximum Length:
<= 64
Two to four part dot separated numerical version numbers. Each part must be a number between 0 and 2147483647 and leading zeroes will be dropped.
- Type:
string
- Required: Yes
- Pattern:
^\d+(?:\.\d+)+$
- Examples:
"1.0"
"2021.11.8"
Properties of a device this update is compatible with.
- Type:
object
- Minimum Properties:
1
- Maximum Properties:
5
Each property is a name-value pair of type string.
- Minimum Property Name Length:
1
- Maximum Property Name Length:
32
- Minimum Property Value Length:
1
- Maximum Property Value Length:
64
Note that the same exact set of compatibility properties cannot be used with more than one Update Provider and Name combination.
Update installation instructions.
Properties
Name | Type | Description | Required |
---|---|---|---|
steps | array[1-10] |
Yes |
Additional properties are not allowed.
- Type:
array[1-10]
- Each element in the array must be one of the following values:
inlineStep
objectreferenceStep
object
- Each element in the array must be one of the following values:
- Required: Yes
Installation instruction step that performs code execution.
Properties
Name | Type | Description | Required |
---|---|---|---|
type | string |
Instruction step type that performs code execution. | No |
description | string |
Optional instruction step description. | No |
handler | string |
Identity of handler on device that can execute this step. | Yes |
files | string [1-10] |
Names of update files that agent will pass to handler. | Yes |
handlerProperties | inlineStepHandlerProperties |
JSON object that agent will pass to handler as arguments. | No |
Additional properties are not allowed.
Instruction step type that performs code execution. Must be inline
.
- Type:
string
- Required: No
Optional instruction step description.
- Type:
string
- Required: No
- Minimum Length:
>= 1
- Maximum Length:
<= 64
Identity of handler on device that can execute this step.
- Type:
string
- Required: Yes
- Pattern:
^\S+/\S+:\d{1,5}$
- Minimum Length:
>= 5
- Maximum Length:
<= 32
- Examples:
microsoft/script:1
microsoft/swupdate:1
microsoft/apt:1
Names of update files that agent will pass to handler.
- Type:
string
[1-10]
- Each element in the array must have length between
1
and255
.
- Each element in the array must have length between
- Required: Yes
JSON object that agent will pass to handler as arguments.
- Type:
object
- Required: No
Installation instruction step that installs another update.
Properties
Name | Type | Description | Required |
---|---|---|---|
type | referenceStepType |
Instruction step type that installs another update. | Yes |
description | stepDescription |
Optional instruction step description. | No |
updateId | updateId |
Unique update identifier. | Yes |
Additional properties are not allowed.
Instruction step type that installs another update. Must be reference
.
- Type:
string
- Required: Yes
Optional instruction step description.
- Type:
string
- Required: No
- Minimum Length:
>= 1
- Maximum Length:
<= 64
Unique update identifier.
- Type:
updateId
- Required: Yes
Update payload file, e.g. binary, firmware, script, etc. Must be unique within update.
Properties
Name | Type | Description | Required |
---|---|---|---|
filename | string |
Update payload file name. | Yes |
sizeInBytes | number |
File size in number of bytes. | Yes |
hashes | fileHashes |
Base64-encoded file hashes with algorithm name as key. At least SHA-256 algorithm must be specified, and additional algorithm may be specified if supported by agent. See below for details on how to calculate the hash. | Yes |
Additional properties are not allowed.
Update payload file name.
- Type:
string
- Required: Yes
- Minimum Length:
>= 1
- Maximum Length:
<= 255
File size in number of bytes.
- Type:
number
- Required: Yes
- Minimum:
>= 1
- Maximum:
<= 2147483648
File hashes.
- Type:
fileHashes
- Required: Yes
- Type of each property:
string
Base64-encoded file hashes with algorithm name as key. At least SHA-256 algorithm must be specified, and additional algorithm may be specified if supported by agent. For an example of how to calculate the hash correctly, see the Get-AduFileHashes function in AduUpdate.psm1 script.
Properties
Name | Type | Description | Required |
---|---|---|---|
sha256 | string |
Base64-encoded file hash value using SHA-256 algorithm. | Yes |
Additional properties are allowed.
Base64-encoded file hash value using SHA-256 algorithm.
- Type:
string
- Required: Yes
Learn more about import concepts.
If you're ready, try out the Import How-To guide, which will walk you through the import process step by step.