跳到主要内容

CREATE NOTIFICATION INTEGRATION

Introduced or updated: v1.2.371

创建一个命名的通知集成,可用于向外部消息服务发送通知。

注意: 此功能仅在 Databend Cloud 中开箱即用。

语法

Webhook 通知

CREATE NOTIFICATION INTEGRATION [ IF NOT EXISTS ] <name>
TYPE = <type>
ENABLED = <bool>
[ WEBHOOK = ( url = <string_literal>, method = <string_literal>, authorization_header = <string_literal> ) ]
[ COMMENT = '<string_literal>' ]
必需参数描述
name通知集成的名称。这是一个必填字段。
type通知集成的类型。目前,仅支持 webhook
enabled是否启用通知集成。
可选参数 (Webhook)描述
urlWebhook 的 URL。
method发送 Webhook 时要使用的 HTTP 方法。默认为 GET
authorization_header发送 Webhook 时要使用的授权标头。

示例

Webhook 通知

CREATE NOTIFICATION INTEGRATION IF NOT EXISTS SampleNotification type = webhook enabled = true webhook = (url = 'https://example.com', method = 'GET', authorization_header = 'bearer auth')

此示例创建一个名为 SampleNotification 的通知集成,类型为 webhook,已启用,并使用 GET 方法和 bearer auth 授权标头将通知发送到 https://example.com URL。

开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册