Updates the configuration of a Function Compute trigger associated with a CDN event, including the event source, function target, and RAM role.
Debugging
Try this operation in OpenAPI Explorer, which automatically generates SDK code samples.
Authorization information
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| cdn:UpdateFCTrigger | update | *All Resources | none | none |
Column descriptions:
Operation: The value to use in the
Actionelement 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
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| TriggerARN | string | Yes | The ARN of the Function Compute trigger to update. | acs:fc:cn-beijing:1234567890:services/FCTestService/functions/printEvent/triggers/testtrigger |
| SourceARN | string | No | The ARN specifying the CDN event source and filters for the trigger. For the format, see SourceARN format. | acs:cdn:*:1234567890:domain/example.com |
| FunctionARN | string | No | The ARN of the Function Compute function to invoke when the trigger fires. | acs:fc:1223455566666:123:services/myservice/functions/myfunction |
| RoleARN | string | No | The ARN of the RAM role that CDN assumes to invoke the function. | acs:ram::1234567890:role/aliyuncdneventnotificationrole |
| Notes | string | No | The 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.comfires the trigger only forexample.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.comExample — 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
| Parameter | Type | Description | Example |
|---|---|---|---|
| RequestId | string | The request ID. | EC046C5D-8CB4-4B6B-B7F8-B335E51EF90E |
Examples
Sample success response (JSON)
{
"RequestId": "EC046C5D-8CB4-4B6B-B7F8-B335E51EF90E"
}Error codes
| HTTP status code | Error code | Error message |
|---|---|---|
| 400 | InvalidParameter.TriggerARN | The specified parameter TriggerARN is not valid. |
| 400 | InvalidParameter.SourceARN | The specified parameter SourceARN is not valid. |
| 400 | InvalidParameter.FunctionARN | The specified parameter FunctionARN is not valid. |
| 400 | InvalidParameter.RoleARN | The specified parameter RoleARN is not valid. |
| 403 | PermissionDeny | No permission to operate this FCTrigger. |
For a complete list of error codes, see Service error codes.
Change history
| Date | Summary | Details |
|---|---|---|
| 2024-12-18 | API description update. Error codes changed. | View change details |