All Products
Search
Document Center

Function Compute:Overview of CDN event triggers

Last Updated:Apr 01, 2026

The CDN event trigger connects Alibaba Cloud Content Delivery Network (CDN) with Function Compute, so your functions run automatically when CDN lifecycle events occur — cache refreshes, log file creation, domain management changes, and more. Write function code once; the trigger handles invocation whenever CDN detects a matching event on the domains you specify.

How it works

Alibaba Cloud CDN is a distributed network of edge nodes that caches origin server resources closer to end users, reducing latency and offloading traffic from your origin. When CDN captures a lifecycle event, it encodes the event data as a JSON string and forwards it to your function for processing.

Use cases

  • Track cache refresh and preload status — React to CachedObjectsRefreshed and CachedObjectsPushed events to get the current status of a refresh or preload operation as soon as it completes, instead of polling the status list repeatedly.

  • Process log files as they arrive — React to LogFileCreated events to run log processing pipelines immediately when CDN generates a new log file, without waiting for a scheduled batch job.

  • Respond to domain lifecycle changes — React to CdnDomainStarted or CdnDomainStopped events to trigger downstream data processing as soon as a CDN domain is enabled or disabled.

Supported events

All events are filtered by domain name. When the CDN system detects an event on a domain that matches your trigger's filter, it automatically invokes your function. All events use version 1.0.0.

EventWhen it firesReference
CachedObjectsRefreshedA cache refresh operation completes on the domainRefreshObjectCaches
CachedObjectsBlockedA specified URL is blocked on a Point of Presence (POP).
Note

To use this event, submit a ticket to have your account added to the CDN allowlist.

CachedObjectsPushedA cache preload operation completes on the domainPushObjectCache
LogFileCreatedCDN generates a new log file for the domainDescribeCdnDomainLogs
CdnDomainStartedA CDN domain is enabledStartCdnDomain
CdnDomainStoppedA CDN domain is disabledStopCdnDomain
CdnDomainAddedA new CDN domain is addedAddCdnDomain
CdnDomainDeletedA CDN domain is deletedDeleteCdnDomain