A trigger initiates data processing tasks for matched incremental objects stored in an Object Storage Service (OSS) bucket. For example, you can convert incoming DOCX objects to PDF, or transcode MOV objects to MP4—without manual intervention. Unlike a batch processor, a trigger only acts on new (incremental) objects, not on objects already in the bucket.
Intelligent Media Management (IMM) features are available in all supported regions via API operations or SDKs.
Create a trigger
Prerequisites
Before you begin, ensure that you have:
An OSS bucket containing the objects to process
An IMM processing style configured under Document Processing or Media Processing. If no style exists, create one by selecting Add Style in the console.
The
AliyunIMMBatchTriggerRoleservice role. Create it on the Cloud Resource Access Authorization page.(Optional) A Simple Message Queue (SMQ) topic, if you want to receive task notifications
To prevent unexpected behaviors such as trigger loops and overwriting of source objects, avoid specifying an output path that begins with the input path. If you use the {key}, {barename}, or {basename} variable, verify that the resolved output path differs from the input path.
Steps
Log on to the OSS console.
In the left-side navigation pane, click Buckets. On the Buckets page, click the bucket name.
In the left-side navigation tree, click Data Processing.
Click Document Processing, Media Processing, or another data processing capability provided by IMM.
Click the Trigger tab, then click Create Trigger.
In the Create Trigger panel, configure the following sections.
Input Configuration
Parameter Description Input Storage Bucket The bucket containing the objects to process. Path Prefix The prefix of the paths to monitor. For example, images/monitors all objects under theimages/directory.Filter Rule Narrows which objects within the prefix are processed. Select one of the following options: All (all objects in the directory), Prefix (objects whose names start with a specified string, for example, raw-), or Suffix (objects with a specified extension, for example,.mov). Separate multiple values with commas.Output Configuration
Parameter Description Style The processing style to apply. If no style is available, select Add Style from the drop-down list. Output Path The storage path for processed objects. Must contain the object name with an extension and include at least one variable to avoid output objects overwriting each other, and cannot end with /.Permission Configuration
Parameter Description Service Role The role IMM assumes to access OSS and other cloud services. Select AliyunIMMBatchTriggerRole.Notification Configuration
Parameter Description Message Queue (Optional) The SMQ topic to receive task notifications. For setup details, see Overview. 
Click OK.
The trigger is created and enters Ready status. Each new object that matches the configured conditions starts a data processing task. To verify the trigger works, upload several objects to the bucket and check the task list.
Data processing tasks generate fees. For more information, see Billable items.
View triggers and task status
Log on to the OSS console.
In the left-side navigation pane, click Buckets. On the Buckets page, click the bucket name.
In the left-side navigation tree, click Data Processing, then click the task type (Document Processing or Media Processing).
Click the Trigger tab. The trigger list shows the status of each trigger:
Status Description Ready The trigger is ready. Running The trigger is running. Succeeded The trigger completed successfully. Suspended The trigger is paused and no longer starts new tasks. Tasks already in progress continue to run. Failed The trigger encountered an error. To find a specific trigger, enter its ID in the Trigger ID search box.
To view trigger details, click View Details in the Actions column.
To view all tasks started by a trigger, click the icon next to the trigger ID. Filter tasks by source object path or status.
Constraints
Triggers support only Standard storage class objects.
Output objects from one trigger cannot serve as input objects for another trigger.
The output path must contain the object name with a file extension. Use variables in the object name to keep output paths unique.
Suspending a trigger stops it from starting new tasks. Tasks already submitted are not affected.