Updates a driver version.
Limits
- If a request parameter is not specified, the original value of the parameter will be cleared for the driver version.
- You are not allowed to update a published driver version.
-
Each Alibaba Cloud account can run a maximum of 10 queries per second (QPS).Note RAM users of an Alibaba Cloud account share the quota of the account.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdateEdgeDriverVersion |
The operation that you want to perform. Set the value to UpdateEdgeDriverVersion. |
DriverId | String | Yes | fec565038d7544978d9aed5c1a****** |
The ID of the driver. To obtain the driver ID, perform the following steps: Log on to the Link IoT Edge console. On the Drivers page, move the pointer over the name of the driver for which you want to update a driver version and obtain the driver ID. You can also call the QueryEdgeDriver operation to query the driver ID. |
DriverVersion | String | Yes | 1.2.0 |
The version number of the driver. |
EdgeVersion | String | Yes | 2.0.0 |
The earliest version of Link IoT Edge that is supported by the driver. The driver can run on gateways of only this version and later. For example, if you set this parameter to 2.4.0, the driver can run on gateways of only version 2.4.0 and later. |
IotInstanceId | String | No | iot_instc_pu****_c*-v64******** |
The ID of the Internet of Things (IoT) service instance. This parameter is not required for the public instance but required for Enterprise Edition instances. |
Description | String | No | LED driver (new) |
The description of the driver. The description can be a maximum of 256 bytes in length. |
SourceConfig | String | No | {"ossAddress":"http://nova-scene-daily.oss-cn-shanghai.aliyuncs.com/driver/a8d6e4acc6941ecea8f0cfb30c******/ck3n3koe200003h6zf******.zip"} |
The source of the driver code. Set this parameter to a JSON string in the following format: {"ossAddress":"http://***/driver_code.zip"}
In the JSON string, |
DriverConfig | String | No | [{"format":"JSON","content":"{\"defaultConfig\":\"this is default driver config demo\"}"}] |
The configuration of the driver. Set this parameter to a JSON string in the following format: {"format":"JSON","content":"{}"}
The JSON string contains the following parameters:
|
ContainerConfig | String | No | {"privileged":1,"devMappings":[],"volumeMappings":[],"hostNetworkMode":0,"portMappings":[]} |
The configuration of the container where the driver runs. Set this parameter to a JSON string. For more information about parameters in the JSON string, see the following parameter description of ContainerConfig. |
ConfigCheckRule | String | No | {"deviceConfig":{"required":false},"driverConfig":{"required":false}} |
The rule for verifying configurations. Set this parameter to a JSON string in the following format: {"deviceConfig":{"required":false},"driverConfig":{"required":false}
The JSON string contains the following parameters:
|
Argument | String | No | -XX:+PrintGCDetails |
The Java Virtual Machine (JVM) startup parameter. |
In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information about common request parameters, see Common parameters.
Parameter description of ContainerConfig
Parameter |
Type |
Required |
Description |
---|---|---|---|
privileged |
Integer |
No |
Specifies whether to enable the privilege mode for the container. Valid values: 0: disables the mode. 1: enables the mode. |
hostNetworkMode |
Integer |
No |
Specifies whether to enable the host mode for the container. Valid values: 0: disables the mode. 1: enables the mode. |
portMappings |
List |
No |
The mapping of network ports. This parameter is not required if the hostNetworkMode parameter is set to 1. You can specify a maximum of 10 mapping records in this parameter. For more information about specific parameters, see the following parameter description of portMappings. |
devMappings |
List |
No |
The mapping of devices. This parameter is not required if the privileged parameter is set to 1. You can specify a maximum of 10 mapping records in this parameter. For more information about specific parameters, see the following parameter description of devMappings. |
volumeMappings |
List |
No |
The mapping of volumes. You can specify a maximum of 10 mapping records in this parameter. For more information about specific parameters, see the following parameter description of volumeMappings. |
Parameter |
Type |
Required |
Description |
---|---|---|---|
hostPort |
Integer |
Yes |
The port number of the host where the container resides. Valid values: 1 to 65535. |
containerPort |
Integer |
Yes |
The port number of the container. Valid values: 1 to 65535. |
protocol |
Integer |
Yes |
The type of the protocol that is used for communication between the mapping ports. Valid values: tcp and udp. |
Parameter |
Type |
Required |
Description |
---|---|---|---|
hostPath |
String |
Yes |
The name of the device that the driver needs to access. The name must be 1 to 128 characters in length and start with /dev/. |
permission |
String |
Yes |
The permissions that the driver has for the device. Valid values: ro: The driver has only the read permissions for the device. rw: The driver has both the read and write permissions for the device. |
comment |
String |
No |
The remarks for the mapping. The remarks must be 1 to 128 characters in length. |
Parameter |
Type |
Required |
Description |
---|---|---|---|
hostPath |
String |
Yes |
The host path of the volume that the driver needs to access. The path must be 1 to 128 characters in length and cannot contain spaces. |
containerPath |
String |
Yes |
The path for accessing the volume in the container. The path must be an absolute path that starts with a forward slash (/). The path must be 2 to 128 characters in length and cannot contain spaces. Do not set this parameter to the root directory. |
permission |
String |
Yes |
The permissions that the driver has for the volume. Valid values: ro: The driver has only the read permissions for the volume. rw: The driver has both the read and write permissions for the volume. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | Success |
The return code of the operation. A value of Success indicates that the call was successful. Other values indicate that specific errors occurred. For more information, see Error codes. |
ErrorMessage | String | request parameter error |
The error message that is returned if the call failed. |
RequestId | String | 7757A782-6C24-4325-A663-C62857F32E87 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful. A value of true indicates that the call was successful. A value of false indicates that the call failed. |
Examples
Sample requests
http(s)://iot.cn-shanghai.aliyuncs.com/? Action=UpdateEdgeDriverVersion
&DriverId=fec565038d7544978d9aed5c1a******
&Description=LED driver (new)
&DriverVersion=1.2.0
&<Common request parameters>
Sample success responses
XML
format
<UpdateEdgeDriverVersionResponse>
<RequestId>7757A782-6C24-4325-A663-C62857F32E87</RequestId>
<Code>Success</Code>
<Success>true</Success>
</UpdateEdgeDriverVersionResponse>
JSON
format
{
"RequestId": "7757A782-6C24-4325-A663-C62857F32E87",
"Code": "Success",
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.