EventGrid Trigger (OBS Application Service)
This section describes how to create an EG trigger (OBS Application Service) on the FunctionGraph console. The EG trigger triggers a function when a file in an OBS bucket is updated.
You can configure OBS Application Service triggers for shared functions in the LA-Sao Paulo1 region.
For details about the EG event source, see Supported Event Sources.
Notes and Constraints
- EG triggers are available only inLA-Mexico City2 and LA-Santiago. You can check whether the trigger type is supported on the console.
- Ensure that the created function and the OBS bucket are in the same region.
Prerequisites
- Function and configuration:
- You have created a function.
- You have configured the OBS agency permission for the function. For details about how to create an agency, see Configuring Agency Permissions.
- OBS bucket:
You have created an OBS bucket. The following uses the eventbucket bucket as an example. For details, see Creating a Bucket.
Creating an EG Trigger (OBS Application Service)
- Log in 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.
- Choose Configuration > Triggers and click Create Trigger.
Figure 1 Creating a trigger
- Configure the following parameters.
Table 1 Parameters for creating an EG trigger (OBS Application Service) Parameter
Description
Example Value
Trigger Type
Mandatory.
Select OBS Application Service.
OBS Application Service
Trigger Name
Mandatory.
Name of a trigger. Only letters, digits, underscores (_), and hyphens (-) are allowed. The value cannot start with a digit or hyphen (-). Maximum length: 128 characters.
eg-obs
Bucket Name
Mandatory.
Select an OBS bucket. If no OBS bucket is available, click Create Bucket.
eventbucket
Event Type
Mandatory.
Select the required trigger event type. Options:
- Delete objects without specifying version
- Delete objects by version
To select this event type, you must enable versioning. For details, see Deleting Objects from a Bucket with Versioning Enabled.
- Create or override bucket objects via UI or Put request
- Merge parts via UI or API request
- Create or override bucket objects via Copy request
- Create or override bucket objects via Post request
Create or override bucket objects via UI or Put request
Object Name Prefix
Optional.
Enter a keyword for limiting notifications to those about objects whose names start with the matching characters. This limit can be used to filter the names of OBS objects.
-
Object Name Suffix
Optional.
Enter a keyword for limiting notifications to those about objects whose names end with the matching characters. This limit can be used to filter the names of OBS objects.
-
Object Name Encoding
Mandatory.
Specifies whether to encode the object name. This option is enabled by default.
Enabled
- Click OK.
Configuring an EG Trigger (OBS Application Service) for a Shared Function
You can configure an EG trigger (OBS Application Service) for a shared function in the LA-Sao Paulo1 region. For details about the shared function, see Sharing Functions Based on RAM.
- Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
- On the Shared tab, click the function name to go to the function details page.
- The subsequent steps are the same as those for creating a common function. For details, see 3.
Configuring an EG Event to Trigger the Function
- Return 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.
- On the function details page, select a version.
- On the Code tab page, click Test. The Configure Test Event dialog box is displayed.
- Set the parameters described in Table 2 and click Save.
Table 2 Test parameters 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 Blank Template. For details about the code, see "OBS Application Service" in Supported Event Sources.
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, myobs-123test.
Event data
Use the newly created test event.
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