This topic describes how to create an Object Storage Service (OSS) event trigger in the Function Compute console.
Create a trigger
- Log on to the Function Compute console.
- In the top navigation bar, select a region.
- In the left-side navigation pane, click Service/Function.
- Find the required function in the required service and click the name of the function.
- Click the Triggers tab. On the tab, click Create Trigger.
- In the Create Trigger dialog box, enter the related information. Then click OK.
Parameter Description Trigger Type Select Object Storage Service (OSS). Trigger Name Enter a name for the custom trigger. Version/Alias Enter a version or an alias for the trigger. Default value: LATEST. For more information, see Introduction to versions. Bucket Select the created OSS bucket. Events Select an event. For more information, see Definition of OSS events.
ObjectCreated:PutObject is selected in this example.
Trigger Rule Enter the prefix and suffix for the trigger rule. For information about the precautions, seeTrigger rules. Role Operation
- Select Quick Authorize from the drop-down list.
- Click Authorize.
- On the page that appears, click Confirm Authorization Policy.
The trigger role is AliyunOSSEventNotificationRole.You can view the created trigger in the trigger list.