Queries all the configured data forwarding actions of a specific rule. When the rule is triggered, data can be forwarded to different destinations based on the configured actions.
QPS limits
Each Alibaba Cloud account can run up to 50 queries per second (QPS).
Debugging
Request parameters
Parameter | Data type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListRuleActions |
The operation that you want to perform. Set the value to ListRuleActions. |
RuleId | Long | Yes | 10000 |
The ID of the rule. You can log on to the IoT Platform console and go to the details page of the instance that you want to manage. On the instance details page, choose Rules Engine > Data Forwarding to obtain the rule ID. Alternatively, you can call the ListRule operation to view the value of the Id parameter in the response. |
IotInstanceId | String | No | iot_instc_pu****_c*-v64******** |
The ID of the instance. On the Overview page in the IoT Platform console, you can view the ID of the instance. Important
For more information about the instance, see Overview. |
In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information about the common request parameters, see Common parameters.
Response parameters
Parameter | Data type | Example | Description |
---|---|---|---|
Code | String | iot.system.SystemException |
The error code returned if the call fails. For more information about error codes, see Error codes. |
ErrorMessage | String | A system exception occurred. |
The error message returned if the call fails. |
RequestId | String | 22254BDB-3DC1-4643-8D1B-EE0437EF09A9 |
The ID of the request. |
RuleActionList | Array of RuleActionInfo |
If the call is successful, all configured data forwarding actions of the specified rule are returned. For more information about the returned data, see the following RuleActionInfo parameter. |
|
RuleActionInfo | |||
Configuration | String | {\"endPoint\":\"http://ShanghaiRegion.cn-shanghai.ots.aliyuncs.com\",\"instanceName\":\"ShanghaiRegion\",\"primaryKeys\":[{\"columnName\":\"temperature\",\"columnType\":\"INTEGER\",\"columnValue\":\"${deviceName}\"}],\"regionName\":\"cn-shanghai\",\"role\":{\"roleArn\":\"acs:ram::1231579085******:role/aliyuniotaccessingotsrole\",\"roleName\":\"AliyunIOTAccessingOTSRole\"},\"tableName\":\"iottest\",\"uid\":\"1231579085******\"} |
The configurations of the data destination. |
ErrorActionFlag | Boolean | false |
Indicates whether the data destination is used to receive the error operation data. The error operation data is data that failed to be forwarded two consecutive times.
|
Id | Long | 139099 |
The ID of the action in which data is forwarded to the destination. |
RuleId | Long | 10000 |
The ID of the rule based on which data is forwarded to the destination. |
Status | String | NORMAL |
The status of the data forwarding action. Valid values:
|
Type | String | OTS |
The type of the action in which data is forwarded to a destination. Valid values:
|
Success | Boolean | true |
Indicates whether the call was successful.
|
Examples
Sample requests
https://iot.cn-shanghai.aliyuncs.com/?Action=ListRuleActions
&RuleId=10000
&<Common request parameters>
Sample success response
XML
format
<ListRuleActionsResponse>
<RuleActionList>
<RuleActionInfo>
<Type>OTS</Type>
<RuleId>10000</RuleId>
<Id>139099</Id>
<Status>NORMAL</Status>
<Configuration>{"endPoint":"http://ShanghaiRegion.cn-shanghai.ots.aliyuncs.com","instanceName":"ShanghaiRegion","primaryKeys":[{"columnName":"temperature","columnType":"INTEGER","columnValue":"${deviceName}"}],"regionName":"cn-shanghai","role":{"roleArn":"acs:ram::1231579085******:role/aliyuniotaccessingotsrole","roleName":"AliyunIOTAccessingOTSRole"},"tableName":"iottest","uid":"1231579085******"}</Configuration>
<ErrorActionFlag>false</ErrorActionFlag>
</RuleActionInfo>
<RuleActionInfo>
<Type>REPUBLISH</Type>
<RuleId>152323</RuleId>
<Id>142401</Id>
<Status>NORMAL</Status>
<Configuration>{"topic":"/sys/a1zSA28H***/device/thing/service/property/set","topicType":0,"uid":"1231579085******"}</Configuration>
<ErrorActionFlag>false</ErrorActionFlag>
</RuleActionInfo>
</RuleActionList>
<RequestId>22254BDB-3DC1-4643-8D1B-EE0437EF09A9</RequestId>
<Success>true</Success>
</ListRuleActionsResponse>
JSON
format
{
"RuleActionList": {
"RuleActionInfo": [
{
"Type": "OTS",
"RuleId": 10000,
"Id": 139099,
"Status":"NORMAL",
"Configuration": "{\"endPoint\":\"http://ShanghaiRegion.cn-shanghai.ots.aliyuncs.com\",\"instanceName\":\"ShanghaiRegion\",\"primaryKeys\":[{\"columnName\":\"temperature\",\"columnType\":\"INTEGER\",\"columnValue\":\"${deviceName}\"}],\"regionName\":\"cn-shanghai\",\"role\":{\"roleArn\":\"acs:ram::1231579085******:role/aliyuniotaccessingotsrole\",\"roleName\":\"AliyunIOTAccessingOTSRole\"},\"tableName\":\"iottest\",\"uid\":\"1231579085******\"}",
"ErrorActionFlag": false
},
{
"Type": "REPUBLISH",
"RuleId": 152323,
"Id": 142401,
"Status": "NORMAL",
"Configuration": "{\"topic\":\"/sys/a1zSA28H***/device/thing/service/property/set\",\"topicType\":0,\"uid\":\"1231579085******\"}",
"ErrorActionFlag": false
}
]
},
"RequestId": "22254BDB-3DC1-4643-8D1B-EE0437EF09A9",
"Success": true
}
Error codes
For a list of error codes, visit the Error Center.