Desired status message
The Desired Status message is sent to a unit as a response to a Unit Status message or if updates for the unit are available in AosCloud.
General structure
{
"unitConfig": "json with unitconfiguration",
"services": [
{
"id": "72d9bb12-9b44-4201-a6a3-e5b707294d60",
"providerId": "servise_provider_1",
"aosVersion": 22,
"vendorVersion": "v22",
"description": "service v22",
"urls": [
"https://url-1.domain.com/containers/72d9bb12-9b44-4201-a6a3-e5b707294d60/895.enc"
],
"sha256": "7Z03oqBRNBUhgqDyEV5WUWwPpqmAO7MrQ0ECvrcRLW8=",
"sha512": "fUbFXnBRmqe2FR8SAuShu3wA8zcwrm2A32diO3bqrgGHfCFuhr4swT62JwGKpXvx0aB4G1uICj/I\nWAwHNVp4Xg==",
"size": 2000,
"decryptionInfo": {
"blockAlg": "AES256/CBC/pkcs7",
"blockIv": "IvD1QAtQuq3C5ivSKpbSmw==",
"blockKey": "qXdLuk1QXb6HVHwrjRzCjP7ZC5bQtfHEOHZneTnImIb31...T8unUX2rFn/78jQ==",
"asymAlg": "RSA/PKCS1v1_5",
"receiverInfo": {
"serial": "5D6E3F5E0003EDE0",
"issuer": "MHAxJTAjBgNVBAMMHE...aXYxCzAJBgNVBAYTAlVB"
}
},
"signs": {
"chainName": "8D28D60220B8D08826E283B531A0B1D75359C5EE",
"alg": "RSA/SHA256",
"value": "l5Vf2l2gW1BMpVvbTSYlA...5HJTXfSFP0oRA==",
"trustedTimestamp": "2019-09-18T11:20:05Z",
"ocspValues": []
}
}
],
"layers": [
{
"id": "python-3.8",
"digest": "sha256:cc730d9ea462e223df4e20ca40ff44f28486647ef3aeadaf1d8b49a53ce80d20",
// common fields: aosVersion,vendorVersion,description,urls,sha256,sha512,size,decryptionInfo,signs
}
],
"components": [
{
"id": "componentID_xyz",
"annotations": {
"type": "full"
},
// common fields: aosVersion,vendorVersion,description,urls,sha256,sha512,size,decryptionInfo,signs
}
],
"instances": [
{
"serviceId": "72d9bb12-9b44-4201-a6a3-e5b707294d60",
"subjectId": "subject-uuid",
"priority": 100,
"numInstances": 1,
"labels": [
"node0Label"
]
}
],
"fotaSchedule": {
"ttl": 864000,
"type": "timetable",
"timetable": [
{
"dayOfWeek": 1, // https://datatracker.ietf.org/doc/html/rfc3339 1-7 ; 1 is Monday, 7 is Sunday
"timeSlots": [
{
"start": "12:00", // ISO 8601 time of day
"finish": "15:59"
}
]
}
]
},
"sotaSchedule": {
"ttl": 864000,
"type": "timetable",
"timetable": [
{
"dayOfWeek": 1, // https://datatracker.ietf.org/doc/html/rfc3339 1-7 ; 1 is Monday, 7 is Sunday
"timeSlots": [
{
"start": "12:00", // ISO 8601 time of day
"finish": "15:59"
}
]
}
]
},
"certificateChains": [
{
"name": "35051DA274B547428CE4940D5DCBACF0280D6EA5",
"fingerprints": [
"08A280BD0E103F72B2F9429E470D429DD3F75A9A",
"C844C60B88A6F4A4BD8628AB22D358FF1957C98E"
]
}
],
"certificates": [
{
"fingerprint": "08A280BD0E103F72B2F9429E470D429DD3F75A9A",
"certificate": "MIIDnzCCAoeg...BEMSUw"
},
{
"fingerprint": "C844C60B88A6F4A4BD8628AB22D358FF1957C98E",
"certificate": "MIIDvDCCAqSg...ljZSBQ"
}
]
}
Field | Required | Description |
---|---|---|
unitConfig | No | Present if new board config is available |
services | Yes | List of desired services |
layers | Yes | List of desired services layers |
components | No | List of the components to be updated |
instances | Yes | List of run instances |
boardConfig, services, layers, instances and components are encrypted using the offline unit key as a base64 string.
See more on the decrypted boardConfig structure under Board configuration file.
Common part for service layer components
Field | Required | Description |
---|---|---|
aosVersion | Yes | A version managed by AosEdge |
vendorVersion | Yes | A vendor-specific version |
description | No | A human-readable component description |
urls | Yes | An array of URLs from where packages can be downloaded |
sha256 | Yes | The SHA256 package checksum |
sha512 | Yes | The SHA512 package checksum |
decryptionInfo | Yes | Information with instructions on how to decrypt the package |
signs | Yes | A package signature with rules on how to validate the signature |
Service-specific fields
Field | Required | Description |
---|---|---|
id | Yes | Service UUID |
providerId | Yes | Service provider identifier |
Layer-specific fields
Field | Required | Description |
---|---|---|
id | Yes | The layer ID |
digest | Yes | The layer digest |
Instances fields
Field | Required | Description |
---|---|---|
serviceId | Yes | The service UUID |
subjectId | Yes | The subject UUID |
numInstances | Yes | Count of run instances |
priority | No | Service instance priority |
layers | No | Required labels for instance |
Component-specific fields
Field | Required | Description |
---|---|---|
id | Yes | The component ID |
annotations | Yes | Instructions for specific update components in JSON row format |
SOTA/FOTA schedule fields
Field | Required | Description |
---|---|---|
ttl | No | Time in seconds for the update to be valid |
type | Yes | The SOTA/FOTA update type (force, trigger, timetable) |
timetable | Yes (for the timetable type) | A list of time slots when the update can be triggered |