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 Services and Functions.
- In the Services pane, click the service that you require. On the Functions tab, click the name of the function that you require.
- Click the Triggers tab. Then, click Create Trigger.
- In the Create Trigger panel, enter the relevant 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.
oss:ObjectCreated:PutObject is selected in this example.
Trigger Rule Enter the prefix and suffix for the trigger rule. For information about the precautions, see Trigger 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.