Queries information about a specified driver version.

Limits

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 GetEdgeDriverVersion

The operation that you want to perform. Set the value to GetEdgeDriverVersion.

DriverId String Yes fec565038d7544978d9aed5c1a******

The ID of the driver whose version information is to be queried.

DriverVersion String Yes 1.2.0

The driver version to query.

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.

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.

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.

Data Struct

The data returned if the call was successful.

ConfigCheckRule String {\"deviceConfig\":{\"required\":false},\"driverConfig\":{\"required\":false}}

The rule for verifying configurations. The value is 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.
ContainerConfig String {\"devMappings\":[],\"hostNetworkMode\":0,\"portMappings\":[],\"privileged\":1,\"volumeMappings\":[]}

The configuration of the container where the driver runs. The value is a JSON string. For more information about parameters in the JSON string, see the below parameter description of ContainerConfig.

Description String LED driver

The description of the driver.

DriverConfig String [{\"content\":\"{\\\"defaultConfig\\\":\\\"this is default driver config demo\\\"}\",\"format\":\"JSON\"}]

The configuration of the driver. The value is 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 the format parameter is set to KV or JSON, the value of this parameter is the configuration content. If the format parameter is set to FILE, the value of this parameter is the URL of the configuration file stored in Object Storage Service (OSS).
DriverId String fec565038d7544978d9aed5c1a******

The ID of the driver.

DriverVersion String 1.2.0

The version number of the driver.

EdgeVersion String 2.0.0

The earliest edge version supported by the driver.

GmtCreateTimestamp Long 1581912859713

The time when the driver was created. The time is displayed in UTC.

GmtModifiedTimestamp Long 1581912859713

The time when the driver was last modified. The time is displayed in UTC.

SourceConfig String {\"ossAddress\":\"http://nova-scene-daily.oss-cn-shanghai.aliyuncs.com/driver/a8d6e4acc6941ecea8f0cfb30******/ck3n3koe200003h6zfg******.zip\",\"temporaryOssAddress\":\"http://nova-scene-daily.oss-cn-shanghai.aliyuncs.com/driver/a8d6e4acc6941ecea8f0cfb30******/ck3n3koe200003h6zf******.zip?Expires\u003d1575******\u0026OSSAccessKeyId\u003daS4MT0IYrP******\u0026Signature\u003dm6cpmcaB8rm3YfbkhTYgb0******\"}

The configuration of the source of the driver code. The value is a JSON string in the following format:

{"ossAddress":"http://***/driver_code.zip","temporaryOssAddress":"http://***/driver_code.zip?Expires***"}

In the format, ossAddress indicates the URL of the driver code stored in OSS and temporaryOssAddress indicates the temporary link for downloading the driver code. The validity period of the temporary link is 5 minutes.

VersionState String 0

The status of the driver version. Valid values:

  • 0: The driver version was not published.
  • 1: The driver version was published.
ErrorMessage String request parameter error

The error message returned if the call failed.

RequestId String 6ECE664B-E670-47BA-A6AD-62B9F35E3A7B

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.

Parameter description of ContainerConfig

Parameter

Type

Description

privileged

Integer

Indicates whether the privilege mode was enabled for the container. Valid values: 0: no. 1: yes.

hostNetworkMode

Integer

Indicates whether the host mode was enabled for the container. Valid values: 0: no. 1: yes.

portMappings

List

The network port mappings. For more information about the specific parameters, see the below parameter description of portMappings.

devMappings

List

The device mappings. For more information about the specific parameters, see the below parameter description of devMappings.

volumeMappings

List

The volume mappings. For more information about the specific parameters, see the below parameter description of volumeMappings.

Parameter description of portMappings

Parameter

Type

Description

hostPort

Integer

The port number of the host where the container resides.

containerPort

Integer

The port number of the container.

protocol

Integer

The type of the protocol used for communication between the mapping ports. Valid values: tcp and udp

Parameter description of devMappings

Parameter

Type

Description

hostPath

String

The name of the device that the driver needs to access.

permission

String

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

The remarks for the mapping.

Parameter description of volumeMappings

Parameter

Type

Description

hostPath

String

The host path of the volume that the driver needs to access.

containerPath

String

The path for accessing the volume in the container.

permission

String

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.

Examples

Sample requests

http(s)://iot.cn-shanghai.aliyuncs.com/? Action=GetEdgeDriverVersion
&DriverId=fec565038d7544978d9aed5c1a******
&DriverVersion=1.2.0
&<Common request parameters>

Sample success responses

XML format

<GetEdgeDriverVersionResponse>
      <RequestId>6ECE664B-E670-47BA-A6AD-62B9F35E3A7B</RequestId>
      <Data>
            <ContainerConfig>{"devMappings":[],"hostNetworkMode":0,"portMappings":[],"privileged":1,"volumeMappings":[]}</ContainerConfig>
            <GmtCreate>2019-12-01 22:28:01</GmtCreate>
            <DriverId>fec565038d7544978d9aed5c1a******</DriverId>
            <Description>LED driver</Description>
            <DriverVersion>1.2.0</DriverVersion>
            <SourceConfig>{"ossAddress":"http://nova-scene-daily.oss-cn-shanghai.aliyuncs.com/driver/a8d6e4acc6941ecea8f0cfb30******/ck3n3koe200003h6zf******.zip","temporaryOssAddress":"http://nova-scene-daily.oss-cn-shanghai.aliyuncs.com/driver/a8d6e4acc6941ecea8f0cfb30******/ck3n3koe200003h6zf******.zip?Expires=1575******&amp;OSSAccessKeyId=aS4MT0IYrPSPj6******;Signature=m6cpmcaB8rm3YfbkhTYgb0W******"}</SourceConfig>
            <GmtModified>2019-12-01 22:28:01</GmtModified>
            <DriverConfig>[{"content":"{\"defaultConfig\":\"this is default driver config demo\"}","format":"JSON"}]</DriverConfig>
            <EdgeVersion>2.0.0</EdgeVersion>
            <ConfigCheckRule>{"deviceConfig":{"required":false},"driverConfig":{"required":false}}</ConfigCheckRule>
            <VersionState>0</VersionState>
      </Data>
      <Code>Success</Code>
      <Success>true</Success>
</GetEdgeDriverVersionResponse>

JSON format

{
  "RequestId": "6ECE664B-E670-47BA-A6AD-62B9F35E3A7B",
  "Data": {
    "ContainerConfig": "{\"devMappings\":[],\"hostNetworkMode\":0,\"portMappings\":[],\"privileged\":1,\"volumeMappings\":[]}",
    "GmtCreate": "2019-12-01 22:28:01",
    "DriverId": "fec565038d7544978d9aed5c1a******",
    "Description": "LED driver",
    "DriverVersion": "1.2.0",
    "SourceConfig": "{\"ossAddress\":\"http://nova-scene-daily.oss-cn-shanghai.aliyuncs.com/driver/a8d6e4acc6941ecea8f0cfb30******/ck3n3koe200003h6zfg******.zip\",\"temporaryOssAddress\":\"http://nova-scene-daily.oss-cn-shanghai.aliyuncs.com/driver/a8d6e4acc6941ecea8f0cfb30******/ck3n3koe200003h6zf******.zip?Expires\u003d1575******\u0026OSSAccessKeyId\u003daS4MT0IYrP******\u0026Signature\u003dm6cpmcaB8rm3YfbkhTYgb0******\"}",
    "GmtModified": "2019-12-01 22:28:01",
    "DriverConfig": "[{\"content\":\"{\\\"defaultConfig\\\":\\\"this is default driver config demo\\\"}\",\"format\":\"JSON\"}]",
    "EdgeVersion": "2.0.0",
    "ConfigCheckRule": "{\"deviceConfig\":{\"required\":false},\"driverConfig\":{\"required\":false}}",
    "VersionState": 0
  },
  "Code": "Success",
  "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.