All Products
Search
Document Center

CDN:UpdateFCTrigger

Last Updated:Aug 28, 2026

Updates the configuration of a Function Compute trigger associated with a CDN event, including the event source, function target, and RAM role.

Debugging

Debug

Try this operation in OpenAPI Explorer, which automatically generates SDK code samples.

Authorization information

OperationAccess levelResource typeCondition keyAssociated operation
cdn:UpdateFCTriggerupdate*All Resourcesnonenone

Column descriptions:

  • Operation: The value to use in the Action element of a RAM policy to grant a RAM user or RAM role permission to call this operation.

  • Access level: The access level of the operation. Values: read, write, and list.

  • Resource type: The resource type on which you can grant permissions. Bold entries indicate required resource types. If the permissions cannot be granted at the resource level, All Resources is used.

  • Condition key: The condition key defined by the cloud service.

  • Associated operation: Other operations that the caller must have permission to perform to complete this operation.

Request parameters

ParameterTypeRequiredDescriptionExample
TriggerARNstringYesThe ARN of the Function Compute trigger to update.acs:fc:cn-beijing:1234567890:services/FCTestService/functions/printEvent/triggers/testtrigger
SourceARNstringNoThe ARN specifying the CDN event source and filters for the trigger. For the format, see SourceARN format.acs:cdn:*:1234567890:domain/example.com
FunctionARNstringNoThe ARN of the Function Compute function to invoke when the trigger fires.acs:fc:1223455566666:123:services/myservice/functions/myfunction
RoleARNstringNoThe ARN of the RAM role that CDN assumes to invoke the function.acs:ram::1234567890:role/aliyuncdneventnotificationrole
NotesstringNoThe remarks for the trigger.test

SourceARN format

acs:cdn:{RegionID}:{AccountID}:{Filter}

The {Filter} component specifies which CDN resources can fire the trigger:

  • Format: {FilterName}/{FilterValue}

  • Multiple values: Separate values with commas and enclose them in braces. For example, domain/{example.com,aliyun.com} fires the trigger for both domains.

  • Single value: Omit the braces. For example, domain/example.com fires the trigger only for example.com.

  • Multiple filters: Separate filters with forward slashes (/). The logical operator between filters is AND. Format: acs:cdn:{RegionID}:{AccountID}:{Filter1}/{Filter2}/{Filter3}...

Example — single domain:

The LogFileCreated event fires the trigger only when example.com generates a log file:

acs:cdn:*:1234567890:domain/example.com

Example — multiple domains:

The trigger fires for log files from both example.com and aliyun.com:

acs:cdn:*:1234567890:domain/{example.com,aliyun.com}

Response elements

ParameterTypeDescriptionExample
RequestIdstringThe request ID.EC046C5D-8CB4-4B6B-B7F8-B335E51EF90E

Examples

Sample success response (JSON)

{
  "RequestId": "EC046C5D-8CB4-4B6B-B7F8-B335E51EF90E"
}

Error codes

HTTP status codeError codeError message
400InvalidParameter.TriggerARNThe specified parameter TriggerARN is not valid.
400InvalidParameter.SourceARNThe specified parameter SourceARN is not valid.
400InvalidParameter.FunctionARNThe specified parameter FunctionARN is not valid.
400InvalidParameter.RoleARNThe specified parameter RoleARN is not valid.
403PermissionDenyNo permission to operate this FCTrigger.

For a complete list of error codes, see Service error codes.

Change history

DateSummaryDetails
2024-12-18API description update. Error codes changed.View change details