Before invoking this API, ensure that the service account has been authorized the policy that includes the following service(s) and action permission(s). For how to authorize the service account, see Managing Service Accounts.
The upgrade policy. Available options are as per the below.
snapshot
incremental
enableUpgradeRequest
Mandatory
Boolean
true: Device can request for upgrade.
false: Device cannot request for upgrade.
upgradeTimeout
Optional
Long
The timeout for the upgrade, which starts when the OTA task enters the “upgrading” state. The available range is between 300 to 172,800 seconds, with the default as 7,200. You can use the Search OTA Task API to search for the status of the OTA task.
retryPolicy
Optional
RetryPolicy Struct
The policy for retrying failed OTA tasks. Default is no retry. For more details, see RetryPolicy Struct.
schedulePolicy
Optional
SchedulePolicy Struct
The schedule policy for the OTA task. By default, the task starts immediately and repeats daily from 00:00:00 to 23:59:59. For more details, see SchedulePolicy Struct.
maximumConcurrency
Optional
Integer
The maximum number of concurrent upgrade tasks. The default value is 300.
The scope of the upgrade. For more details, see UpgradeScope Struct. For firmware verification tasks, the value of the type parameter in this struct must be partial.
upgradeTimeout
Optional
Long
The timeout for the verification, which starts when the OTA task enters the “upgrading” state. The available range is between 300 to 172,800 seconds, with the default as 7,200. You can use the Search OTA Task API to search for the status of the OTA task.
The scope of the devices to be upgraded. Available options are as per the below.
total: Upgrade all devices whose firmware version number matches what is specified in versionNumbers.
partial: Out of all the devices whose firmware version number matches what is specified in versionNumbers, only upgrade/verify some of them. Specify which devices for firmware upgrade by using the deviceKeys, attributes, tags, or assetTrees parameters in this struct. For firmware verification, only deviceKeys can be used.
versionNumbers
Mandatory
String Array
The list of firmware version numbers.
deviceKeys
Optional
String Array
Specify the devices for firmware upgrade or verification via device keys. Only one of the parameters deviceKeys, attributes, tags, or assetTrees can be used to specify the device for firmware upgrade. For firmware verification, only deviceKeys can be used.
attributes
Optional
Map (Key is of String type, and Value is of Object Array)
Specify the devices for firmware upgrade or verification via the attributes and their corresponding values. Only one of the parameters deviceKeys, attributes, tags, or assetTrees can be used to specify the device for firmware upgrade. For firmware verification, only deviceKeys can be used.
tags
Optional
Map (Key is of String type, and Value is of String Array)
Specify the devices for firmware upgrade or verification via the device tags and their corresponding values. Only one of the parameters deviceKeys, attributes, tags, or assetTrees can be used to specify the device for firmware upgrade. For firmware verification, only deviceKeys can be used.
assetTrees
Optional
AssetTreeScope Struct
Specify the devices for firmware upgrade or verification via asset trees (max 5 asset trees). Only one of the parameters deviceKeys, attributes, tags, or assetTrees can be used to specify the device for firmware upgrade. For firmware verification, only deviceKeys can be used. For more details, see AssetTreeScope Struct.
The nodes in the asset tree, identified by the asset’s asset ID. Specifying one node means all sub-nodes are included as well. Leave this blank to select the entire tree.