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).

Note The Resource Access Management (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 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
  • If your instance has an ID, you must specify the ID for this parameter. Otherwise, the call fails.
  • If the Overview page or instance ID is not displayed in the IoT Platform console, you do not need to configure this parameter.

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.

  • true: This destination is used to receive error operation data.
  • false: This destination is not used to receive error operation data.
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:

  • INIT: The action is being configured.
  • NORMAL: The configuration is complete, and the action can run properly.
  • INVALID: The configuration data is invalid, and the action fails to run.
  • SHORTCUT: An exception occurs and the data forwarding action is stopped.
Type String OTS

The type of the action in which data is forwarded to a destination. Valid values:

  • REPUBLISH: Data is forwarded to a topic.
  • OTS: Data is stored in Tablestore.
  • MNS: Data is forwarded to Message Service (MNS).
  • ONS: Data is forwarded to Message Queue for Apache RocketMQ.
  • TSDB: Data is stored in Time Series Database.
  • FC: Data is forwarded to Function Compute.

  • RDS: Data is forwarded to ApsaraDB RDS.
  • AMQP: Data is forwarded to an Advanced Message Queuing Protocol (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 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.