Skip to main content

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"
}
]
}
FieldRequiredDescription
unitConfigNoPresent if new board config is available
servicesYesList of desired services
layersYesList of desired services layers
componentsNoList of the components to be updated
instancesYesList 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

FieldRequiredDescription
aosVersionYesA version managed by AosEdge
vendorVersionYesA vendor-specific version
descriptionNoA human-readable component description
urlsYesAn array of URLs from where packages can be downloaded
sha256YesThe SHA256 package checksum
sha512YesThe SHA512 package checksum
decryptionInfoYesInformation with instructions on how to decrypt the package
signsYesA package signature with rules on how to validate the signature

Service-specific fields

FieldRequiredDescription
idYesService UUID
providerIdYesService provider identifier

Layer-specific fields

FieldRequiredDescription
idYesThe layer ID
digestYesThe layer digest

Instances fields

FieldRequiredDescription
serviceIdYesThe service UUID
subjectIdYesThe subject UUID
numInstancesYesCount of run instances
priorityNoService instance priority
layersNoRequired labels for instance

Component-specific fields

FieldRequiredDescription
idYesThe component ID
annotationsYesInstructions for specific update components in JSON row format

SOTA/FOTA schedule fields

FieldRequiredDescription
ttlNoTime in seconds for the update to be valid
typeYesThe SOTA/FOTA update type (force, trigger, timetable)
timetableYes (for the timetable type)A list of time slots when the update can be triggered