gpt4 book ai didi

azure - 无法为 Event-Grid 创建 Webhook 订阅

转载 作者:行者123 更新时间:2023-12-03 02:38:54 25 4
gpt4 key购买 nike

从昨天起,我就遇到了 Azure Event-Grid 的问题,并且找不到我做错的地方。

我使用以下链接在 azure cli 中创建自定义事件网格主题。 https://learn.microsoft.com/en-us/azure/event-grid/scripts/event-grid-cli-create-custom-topic

并使用下面的链接来处理端点端的验证。 https://learn.microsoft.com/en-us/azure/event-grid/receive-events

并使用以下有效负载进行测试

[{
"subject": "Contoso/foo/bar/items",
"eventType": "Microsoft.EventGrid.SubscriptionValidationEvent",
"eventTime": "2017-08-16T01:57:26.005121Z",
"id": "602a88ef-0001-00e6-1233-1646070610ea",
"data": {
"validationCode": "123456789"
},
"dataVersion": "",
"metadataVersion": "1"
}]

并获得 123456789 回复和 200 回复。

当我运行下面链接中的命令时,出现此错误。

Deployment failed. Correlation ID: 6acbe8ab-1bf5-4f35-b133-9c907c2e2545. The operation failed due to an internal server error. The initial state of the impacted resources (if any) are restored. Please try again in few minutes. If error still persists, report 05a94a7a-b132-451b-90ff-ceb2f5d587ae:6/3/2020 3:49:40 PM (UTC) to our forums for assistance or raise a support ticket .

https://learn.microsoft.com/en-us/azure/event-grid/scripts/event-grid-cli-subscribe-custom-topic

提前非常感谢

最佳答案

我缺少验证握手的实现(在您的 webhook 实现中),但如果您刚刚在 HTTP-200 响应中返回“123456789”,这可能就是原因。

您必须返回一个 json 负载,其中包含您的代码,如下所示:

{
"validationResponse": "123456789"
}

docs 中有更详细的解释。

关于azure - 无法为 Event-Grid 创建 Webhook 订阅,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62179827/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com