Azure IoT Hub入门 - 接口介绍

Azure IoT Hub作为多租户服务,对不同的用户暴露了不同的接口(如下图所示)。

Azure IoT Hub入门 - 接口介绍

 下面对各类接口进行详细解释:

  • 设备接口:
    • Send device-to-cloud messages: 通过该接口发送都d2c消息。
    • Receive cloud-device messages: 接受c2d消息。
    • Initiate file uploads: 设备通过该接口接受来自IoT Hub提供的azure storage的SAS 链接,并上传文件到该链接。
    • Retrieve and update device twin properties: 获取并更新device twin的属性。
    • Receive direct methods requests. 设备通过该端口监听来自云端的服务请求。
  • 服务接口:
    • Receive device-to-cloud messages:接受d2c消息。
    • Send cloud-to-device messages: 发送c2d消息。
    • Receive file notifications: 接受文件是否上传成功通知。
    • Direct method invocation: 该接口可以让后端服务对前段设备触发指令。
  • 设备管理接口:IoT Hub 暴露了RESTFUL 的设备管理接口(包括设备的创建、获取、更新与删除)
  • 资源管理接口:该接口可以用来对IoT Hub进行管理,包括创建、删除以及更新相关属性。