All Products
Search
Document Center

Intelligent Media Management:CreateTrigger

Last Updated:Dec 11, 2024

Creates a trigger. A trigger can trigger Intelligent Media Management (IMM) based on events such as events in Object Storage Service (OSS) to process files, such as images, videos, and documents based on data processing templates.

Operation description

If you want to create a trigger to process data in OSS , make sure that you have bound the dataset to the OSS bucket where the data is stored. For more information about how to bind a dataset to a bucket, see AttachOSSBucket .

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
imm:CreateTriggercreate
*Trigger
acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}/trigger/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectNamestringYes

The name of the project.

test-project
InputInputYes

The data source configurations.

Actionsarray<object>Yes

The processing templates.

objectYes

The processing template.

NamestringYes

The name of the template.

doc/convert
ParametersarrayNo

The template parameters.

stringNo

The template parameter.

pages=3
FastFailPolicyFastFailPolicyNo

The policy configurations for handling failures.

NotificationobjectNo

The notification settings. The operation supports multiple messaging middleware options. For more information about notification messages, see Asynchronous message examples. You can use one of the following methods to receive notification messages:

Activate and connect to EventBridge in the same region as the IMM project. For more information, see IMM events. Activate Simple Message Queue in the same region as the IMM project and configure a subscription.

MNSMNSNo

The Simple Message Queue notification message configurations.

TagsobjectNo

The custom tags. You can search for or filter asynchronous tasks by custom tag.

{"key":"val"}
ServiceRolestringYes

The service role. IMM assumes the service role so that it can access resources in other cloud services, such as OSS. Default value: AliyunIMMBatchTriggerRole.

You can also create a custom service role in the RAM console and grant the required permissions to the role based on your business requirements. For more information, see Create a regular service role and Grant permissions to a role.

AliyunIMMDefaultRole

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

EC564A9A-BA5C-4499-A087-D9B9E76E*****
Idstring

The ID of the trigger.

trigger-9f72636a-0f0c-4baf-ae78-38b27b******

Examples

Sample success responses

JSONformat

{
  "RequestId": "EC564A9A-BA5C-4499-A087-D9B9E76E*****",
  "Id": "trigger-9f72636a-0f0c-4baf-ae78-38b27b******"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-05The internal configuration of the API is changed, but the call is not affectedView Change Details