Queries all data forwarding actions of a specified rule.

Limits

Each Alibaba Cloud account can run a maximum of 50 queries per second (QPS).

Note RAM users of an Alibaba Cloud account share the quota of the 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 ListRuleActions

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

RuleId Long Yes 10000

The ID of the rule that you want to query. You can log on to the IoT Platform console and choose Rules > Data Forwarding to view the rule ID. You can also call the ListRule operation and view the rule ID in the response.

IotInstanceId String No iot_instc_pu****_c*-v64********

The ID of the instance. This parameter is not required for the public instance but required for Enterprise Edition instances.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
Code String iot.system.SystemException

The error code returned if the call fails. For more information, 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

The rule action information returned if the call is successful. For more information, see the following parameters included in the 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 rule action.

ErrorActionFlag Boolean false

Indicates whether the rule action forwarded error operation data that failed to be forwarded to the destination cloud service. A data forwarding failure indicates that forwarding retries also failed.

  • true: forwards error operation data
  • false: forwards normal data instead of error operation data
Id Long 139099

The ID of the rule action.

RuleId Long 10000

The ID of the rule based on which the rule action is performed.

Type String OTS

The type of the rule action. Valid values:

  • REPUBLISH: forwards data to another topic
  • OTS: stores data to Tablestore
  • MNS: sends data to Message Service (MNS)
  • FC: sends data to Function Compute
  • RDS: stores data to ApsaraDB RDS
  • AMQP: forwards data to an AMQP consumer group
Success Boolean true

Indicates whether the call was successful.

  • true: The call was successful.
  • false: The call failed.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=ListRuleActions
&RuleId=10000
&<Common request parameters>

Sample success responses

XML format

<ListRuleActionsResponse>
      <RuleActionList>
            <RuleActionInfo>
                  <Type>REPUBLISH</Type>
                  <RuleId>152323</RuleId>
                  <Id>142401</Id>
                  <Configuration>
                        <topic>/sys/a1zSA28HUyy/device/thing/service/property/set</topic>
                        <topicType>0</topicType>
                        <uid>1231579*******</uid>
                  </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, 
        "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, 
        "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 API Error Center.