- Categories:
Notification functions (Message Sanitization)
SANITIZE_ WEBHOOK_ CONTENT¶
从要发送的通知消息正文中移除占位符(例如,用于指定密钥的 SNOWFLAKE_WEBHOOK_SECRET 占位符)。
Placeholders like SNOWFLAKE_WEBHOOK_SECRET are used in notification integrations. When you create a notification integration, you can use placeholders to indicate where you want the content inserted into the request. For example, you can use the SNOWFLAKE_WEBHOOK_SECRET placeholder to insert the secret into the HTTP headers or body of the request.
The SYSTEM$SEND_SNOWFLAKE_NOTIFICATION stored procedure replaces these placeholders in the integration parameters with actual values. The stored procedure also replaces the placeholders if specified directly in the message string passed to the function. If the placeholder is for a secret, this might unintentionally make the secret available to others. For example, if this message is sent to a Slack webhook, the message containing the secret might be posted to a Slack channel.
为了避免这种情况,请将消息传递给 SANITIZE_WEBHOOK_CONTENT,以便在将消息传递给 SYSTEM$SEND_SNOWFLAKE_NOTIFICATION 之前删除消息中的所有占位符。
- See also:
语法
实参
message包含要清理的消息的 VARCHAR 值。
返回
Returns a VARCHAR value with placeholders replaced with the string REDACTED.