Creates a driver.

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 CreateEdgeDriver

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

DriverName String Yes MyLedDriver

The name of the driver to create. The name cannot exceed 20 characters in length and can contain only uppercase letters, lowercase letters, digits, and underscores (_). It must start with a letter.

DriverProtocol String Yes customize

The communications protocol that the driver uses. Valid values:

  • modbus: Modbus protocol
  • opc-ua: OPC UA protocol
  • customize: custom protocol
Runtime String Yes c

The language in which the driver is programmed. Valid values:

  • nodejs8: Node.js v8
  • python3: Python v3.5
  • c: C
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.

CpuArch String No x86-64

The CPU architecture that the driver supports. Valid values:

  • ARMv7
  • ARMv7-HF
  • AArch64
  • x86-64
  • x86
IsBuiltIn Boolean No false

Specifies whether the driver is a built-in driver.

  • true: indicates that the driver is a built-in driver, that is, the driver code is pre-configured on the gateway device.
  • false: indicates that the driver is not a built-in driver and you must upload the driver code. Default value: false.
    Note If the driver is not a built-in driver, you must upload the driver code.

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.

DriverId String fec565038d7544978d9aed5c1a******

The ID of the driver created.

ErrorMessage String request parameter error

The error message returned if the call failed.

RequestId String BB179FE4-94AB-41B0-AE8A-66DDB7B8B13A

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=CreateEdgeDriver
&DriverProtocol=customize
&Runtime=c
&DriverName=MyLedDriver
&CpuArch=x86-64
&IsBuiltIn=false
&<Common request parameters>

Sample success responses

XML format

<CreateEdgeDriverResponse>
      <DriverId>fec565038d7544978d9aed5c1a******</DriverId>
      <RequestId>BB179FE4-94AB-41B0-AE8A-66DDB7B8B13A</RequestId>
      <Code>Success</Code>
      <Success>true</Success>
</CreateEdgeDriverResponse>

JSON format

{
  "DriverId": "fec565038d7544978d9aed5c1a******",
  "RequestId": "BB179FE4-94AB-41B0-AE8A-66DDB7B8B13A",
  "Code": "Success",
  "Success": true
}

Error codes

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