Preparation
Before creating a forwarding rule, create an IoTDA instance as well as products and devices. In this best practice, we only create an instance for testing.
Creating an IoTDA Instance
- Log in to the IoTDA console. In the navigation pane, choose IoTDA Instances.
- On the right of the IoTDA Instances page, click Buy Instance. The parameter configuration page is displayed. Set the parameters based on service requirements.
Figure 1 Enabling free standard edition
- Click Create.
Creating a Function
- In the left navigation pane of the management console, choose Compute > FunctionGraph. On the FunctionGraph console, click Create Function.
- Select Create from scratch. Set Function Type to Event Function, enter a name (for example, iotdemo) for Function Name, select a runtime (for example, Python 3.9), and click Create Function.
Creating a Forwarding Rule
Forwarding rules are used to transfer data from IoTDA to trigger specified functions. For this purpose, you can create forwarding rules in IoTDA or create an IoTDA trigger in FunctionGraph. Perform the following procedure to create a forwarding rule:
- In the navigation pane on the left, choose IoT > IoT Device Access. On the IoTDA console, click the instance name. On the displayed page, choose Rules > Data Forwarding, and click Create Rule.
Figure 2 Creating a rule
- Enter basic information and click Create Rule.
- Rule Name: Enter a custom rule name.
- Data Source: select Device message.
- Trigger: select device message reporting.
- Resource Space: Retain the default value.
- To set the forwarding target, click Add, and select FunctionGraph.
- If this is the first time you select FunctionGraph, authorize access to IoTDA.
- Select function iotdemo.
Figure 3 Adding a forwarding target
- Start the rule.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot