ALTER NOTIFICATION INTEGRATION (Webhook)¶
Modifies the properties for an existing notification integration for a webhook.
语法
参数
name指定要更改的集成的标识符。
If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.
For more information, see Identifier requirements.
SET ...为集成设置一个或多个属性:
ENABLED = { TRUE | FALSE }Specifies whether to initiate operation of the integration or suspend it.
TRUEenables the integration.FALSEdisables the integration for maintenance. Any integration between Snowflake and a third-party service fails to work.
The value is case-insensitive.
The default is
TRUE.
WEBHOOK_URL = 'url'Specifies the URL for the webhook. The URL must use the
https://protocol.You can only specify the following URLs:
-
URLs for Slack webhooks. These URLs must start with
https://hooks.slack.com/services/. -
URLs for Microsoft Teams webhooks. These URLs must use the following general format:
-
Up until November 30, 2025, Microsoft Teams supports URLs in the following format:
-
From November 30, 2025 onward (https://learn.microsoft.com/en-us/troubleshoot/power-platform/power-automate/flow-run-issues/triggers-troubleshoot?tabs=new-designer#changes-to-http-or-teams-webhook-trigger-flows), Microsoft Teams supports URLs in the following format:
Note
You must omit the port number (
:443) from the URL in the WEBHOOK_URL parameter. For information about the Microsoft API data format, see https://adaptivecards.io/ (https://adaptivecards.io/) . -
-
URLs for PagerDuty webhooks. This URL must be
https://events.pagerduty.com/v2/enqueue.
If the URL includes a secret and you created a secret object for that secret, replace that secret in the URL with SNOWFLAKE_WEBHOOK_SECRET. For example, if you created a secret object for the secret in a Slack webhook URL, set WEBHOOK_URL to:
-
WEBHOOK_SECRET = secret_nameSpecifies the secret to use with this integration.
If you are using the SNOWFLAKE_WEBHOOK_SECRET placeholder in WEBHOOK_URL, WEBHOOK_BODY_TEMPLATE, or WEBHOOK_HEADERS, the placeholder is replaced by this secret when you send a notification.
If the database and schema containing the secret object will not be active when you send a notification, qualify the secret name with the schema name or the database and schema names. For example:
You must have the USAGE privilege on the secret (and the database and schema that contain it) to specify this parameter.
Default: No value
WEBHOOK_BODY_TEMPLATE = 'template_for_http_request_body'Specifies a template for the body of the HTTP request to send for the notification.
If the webhook requires a specific format for the body of the HTTP request (for example, a specific JSON format), set this to a string that specifies the format. In this string:
- If the message needs to include a secret and you created a secret object for that secret, use the SNOWFLAKE_WEBHOOK_SECRET placeholder where the secret should appear in the message.
- Use the SNOWFLAKE_WEBHOOK_MESSAGE placeholder where the notification message needs to be included.
For example:
If you set WEBHOOK_BODY_TEMPLATE, you must also set WEBHOOK_HEADERS to include the
Content-Typeheader with the type of your message. For example, if you set WEBHOOK_BODY_TEMPLATE to a template in JSON format, set WEBHOOK_HEADERS to include the headerContent-Type: application/json:Default: No value
WEBHOOK_HEADERS = ( 'header'='value' [ , 'header'='value', ... ] )Specifies a list of HTTP headers and values to include in the HTTP request for the webhook.
If an HTTP header must include a secret (for example, the
Authorizationheader) and you created a secret object for that secret, use the SNOWFLAKE_WEBHOOK_SECRET placeholder in the header value. For example:Default: No value
COMMENT = 'string_literal'String (literal) that specifies a comment for the integration.
Default: No value
UNSET ...取消设置集成的一个或多个属性,这会将属性重置为其默认值:
ENABLEDWEBHOOK_SECRETWEBHOOK_BODY_TEMPLATEWEBHOOK_HEADERSCOMMENT
To unset multiple properties or parameters with a single ALTER statement, separate each property or parameter with a comma.
When unsetting a property or parameter, specify only the property or parameter name (unless the syntax above indicates that you should specify the value). Specifying the value returns an error.
访问控制要求
A role used to execute this operation must have the following privileges at a minimum:
| 权限 | 对象 | 备注 |
|---|---|---|
| OWNERSHIP | 集成 | OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the [GRANT OWNERSHIP](/sql-reference/sql/grant-ownership) command to a different role by the owning role (or any role with the MANAGE GRANTS privilege). |
| USAGE | 密钥 | 如果将 WEBHOOK_SECRET 属性设置为密钥对象,则必须对该密钥以及包含该密钥的数据库和架构拥有 USAGE 权限。 |
For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.
使用说明
-
关于元数据:
Attention
Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.