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.
  • A single Alibaba Cloud account can run a maximum of 10 queries per second (QPS).
    Note RAM users share the quota of the Alibaba Cloud account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 whose version is to be updated.

DriverVersion String Yes 1.2.0

The driver version to update.

EdgeVersion String Yes 2.0.0

The earliest edge version supported by the driver. For example, if you set this parameter to 2.4.0, the driver can only run on gateways of the 2.4.0 and later edge versions.

IotInstanceId String No iot_instc_pu****_c*-v64********

The ID of the Internet of Things (IoT) service instance. This parameter is not required for public instances. However, this parameter is required for the instances that you have purchased.

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 configuration of the source of the driver code. Set this parameter to a JSON string in the following format:

{"ossAddress":"http://***/driver_code.zip"}

In the format, ossAddress specifies the URL of the driver code stored in Object Storage Service (OSS). If you want to upload the driver code and obtain the URL of the driver code stored in OSS through API operations, call the CreateOssPreSignedAddress operation first.

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 parameters in the format are descried as follows:

  • format: the format of the driver configuration. Valid values: KV (key-value pair), JSON (JSON string), and FILE (configuration file)
  • content: the content of the driver configuration. If you set the format parameter to KV or JSON, set this parameter to the configuration content of the driver. If you set the format parameter to FILE, set this parameter to the URL of the driver configuration file stored in OSS.
    Note To obtain the URL of the driver configuration file stored in OSS, call the CreateOssPreSignedAddress operation.
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 below 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 parameters in the format are descried as follows:

  • driverConfig: the rule for verifying the configuration of the driver when the driver is to be deployed in an edge instance.
  • deviceConfig: the rule for verifying configurations of devices that use the driver when the driver is to be deployed in an edge instance.

Value true of required specifies that the corresponding parameter is required. Value false specifies that the corresponding parameter is not required.

In addition to the preceding exclusive request parameters, you must specify common request parameters when calling this API 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: no. 1: yes.

hostNetworkMode

Integer

No

Specifies whether to enable the host mode for the container. Valid values: 0: no. 1: yes.

portMappings

List

No

The network port mappings. 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 the specific parameters, see the below parameter description of portMappings.

devMappings

List

No

The device mappings. 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 the specific parameters, see the below parameter description of devMappings.

volumeMappings

List

No

The volume mappings. You can specify a maximum of 10 mapping records in this parameter. For more information about the specific parameters, see the below parameter description of volumeMappings.

Parameter description of portMappings

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 used for communication between the mapping ports. Valid values: tcp and udp

Parameter description of devMappings

Parameter

Type

Required

Description

hostPath

String

Yes

The name of the device that the driver needs to access. The name must start with /dev/, and must be 1 to 128 characters in length.

permission

String

Yes

The permissions that the driver has for the device. Valid values: ro: The driver only has the read permission 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 description of volumeMappings

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 starting with /.

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 only has the read permission 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 error code. 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 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. true indicates that the call was successful. 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.