Document Database Service (DDS) Trigger (Offline Soon)
This section describes how to create a DDS trigger on the FunctionGraph console. The trigger triggers a function each time a table in the DDS database is updated.
The DDS trigger is about to be brought offline. You are advised not to create DDS triggers.
Notes and Constraints
- The DDS triggers are available only to existing users. You can check whether the trigger type is supported on the console.
- The valid payload size of a request body is 6 MB when a DDS trigger is used.
Prerequisites
- Function and configuration:
- You have created a function.
- You have configured the DDS and VPC agency permissions for the function. For details, see Configuring Agency Permissions.
- You have enabled VPC access for the function. For details, see Configuring Networks.
- DDS:
- You have created a DDS DB instance.
- You have created a DDS database.
- You have configured the subnet permissions for the DDS security group. For details, see .
Creating a DDS Trigger
- Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
- Click the function to be configured to go to the function details page.
- Choose Configuration > Triggers and click Create Trigger.
Figure 1 Creating a trigger
- Configure the following parameters.
Table 1 Parameters for creating a DDS trigger Parameter
Description
Example Value
Trigger Type
Mandatory.
Select Document Database Service (DDS).
Document Database Service (DDS)
DB Instance
Mandatory.
Select the created DDS database instance. If no instance is available, click Create DB Instance.
dds_fg
Password
Mandatory.
Password of the DDS DB instance administrator rwuser. The password must contain uppercase letters, lowercase letters, digits, and special characters.
DDStest@123
Database
Mandatory.
Enter a database name. Note that admin, local, and config are reserved database names and cannot be used here.
DDS_test
Collection
Mandatory.
Enter a custom database collection name. For details about how to create a database collection, see Creating a Collection.
DDS_set
Batch Size
Mandatory.
Maximum amount of data that can be processed by a function at a time. The value ranges from 1 to 10000.
100
- Click OK.
Configuring a DDS Event to Trigger the Function
- Return to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
- Click the name of the function to be configured. The function details page is displayed.
- Select a version and click Test. The Configure Test Event dialog box is displayed.
- Set the parameters described in Table 2 and click Save.
Table 2 Test event information Parameter
Description
Configure Test Event
You can choose to create a test event or edit an existing one.
Use the default option Create new test event.
Event Templates
Select Document Database Service (DDS) to use the built-in DDS event template.
Event Name
The event name can contain 1 to 25 characters and must start with a letter and end with a letter or digit. Only letters, digits, underscores (_), and hyphens (-) are allowed. For example, dds-123test.
Event data
The system automatically loads the built-in DDS event template, which is used in this example without modifications.
- Click Test. The function test result is displayed.
Helpful Links
Manage function triggers through APIs. For details, see Function Trigger APIs.
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