跳转到内容
搜索文档

事件订阅

最后更新 查看 MarkdownAgent 设置

事件订阅允许您在 Cloudflare 账户中发生事件时接收消息。Cloudflare 产品(例如 KVWorkers AIWorkers)可以将结构化事件发布到队列,然后您可以使用 Workers 或 HTTP 拉取消费者来消费这些事件,以构建自定义工作流、集成或逻辑。

有关事件订阅的更多信息,请参阅管理指南

可用的 Access 事件

application.created

在创建应用程序时触发。

示例:

{
  "type": "cf.access.application.created",
  "source": {
    "type": "access"
  },
  "payload": {
    "id": "app-12345678-90ab-cdef-1234-567890abcdef",
    "name": "My Application"
  },
  "metadata": {
    "accountId": "f9f79265f388666de8122cfb508d7776",
    "eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f",
    "eventSchemaVersion": 1,
    "eventTimestamp": "2025-05-01T02:48:57.132Z"
  }
}

application.deleted

在删除应用程序时触发。

示例:

{
  "type": "cf.access.application.deleted",
  "source": {
    "type": "access"
  },
  "payload": {
    "id": "app-12345678-90ab-cdef-1234-567890abcdef",
    "name": "My Application"
  },
  "metadata": {
    "accountId": "f9f79265f388666de8122cfb508d7776",
    "eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f",
    "eventSchemaVersion": 1,
    "eventTimestamp": "2025-05-01T02:48:57.132Z"
  }
}

这篇文档对您有帮助吗?