# CreateSubscribeRelation

调用该接口创建AMQP服务端订阅。

# 请求参数

名称 类型 是否必选 示例值 描述
Action String CreateSubscribeRelation 系统规定参数。取值:CreateSubscribeRelation。
ProductKey String a1fyXVF**** 该订阅中的产品的ProductKey
IotInstanceId String 71592493182878**** 实例ID。您可在物联网平台控制台的实例概览页面,查看当前实例的ID。
upRawFlag Boolean true 推送消息类型是否选择透传上报。可选值:true:是。false(默认):否。
propertyFlag Boolean true 推送消息类型是否选择设备属性上报。可选值:true:是。false(默认):否。
eventFlag Boolean true 推送消息类型是否选择设备事件上报。可选值:true:是。false(默认):否。
customTopicFlag Boolean true 推送消息类型是否选择自定义Topic。可选值:true:是。false(默认):否。
statusChangeFlag Boolean true 推送消息类型是否选择设备状态变化通知。可选值:true:是。false(默认):否。
otaVersionPostFlag Boolean true 推送消息类型是否选择OTA模块版本号变更通知。可选值:true:是。false(默认):否。
otaProgressPostFlag Boolean true 推送消息类型是否选择OTA升级进度通知。可选值:true:是。false(默认):否。
downlinkReplyFlag Boolean true 推送消息类型是否选择属性设置、服务调用响应通知。可选值:true:是。false(默认):否。
Type String AMQP 订阅类型:AMQP
ConsumerGroupIds.N RepeatList 72310871085914**** 创建的AMQP订阅中的消费组ID。

说明

请求参数中的Flag不能全部为false或不传入,至少传入一个为true的Flag。

# 返回数据

名称 类型 示例值 描述
Code String iot.system.SystemException 调用失败时,返回的错误码。
ErrorMessage String 系统异常 调用失败时,返回的出错信息。
RequestId String 71a86574e8aa4c069d600e7658b3a533 平台为该请求生成的唯一标识符。
Success Boolean true 是否调用成功。true:调用成功。false:调用失败。

# 示例

请求示例

http://open.${区域}.fenydata.com/fenydata-java-open/?Action=CreateSubscribeRelation
&IotInstanceId=70255861902711****
&ProductKey=a1Zkii7****
&Type=AMQP
&statusChangeFlag=true
&ConsumerGroupIds.1=72310871085914****
&<公共请求参数>

正常返回示例

XML格式

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xml>
  <RequestId>4788a8c3af63465a87a115358106b6a3</RequestId>
  <Success>true</Success>
</xml>

JSON格式

{
  "RequestId": "c7ff3a6790a844c4b931f20b40177a5e",
  "Success": true
}