azure - 通过 Azure ARM Rest API 创建机器人连接
问题描述
所以,我一直在尝试使用 Azure Rest API 来创建一些资源。更具体地说,我正在尝试使用 Insomnia 创建一个机器人连接。请求和响应是这样的:
我正在使用 PUT 方法(如您所见),URL(敏感数据已编辑)如下:
https://management.azure.com/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.BotService/botServices/bot-poc-myweb/Connections/mywebbot?api-version=2018-07-12
该错误表示未找到连接资源。好吧..这里没有惊喜,因为我有点想创造它。有谁知道可能出了什么问题?
解决方案
尝试这个:
请求网址:
PUT https://management.azure.com/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.BotService/botServices/<bot_name>/Connections/<conn_name>?api-version=2018-07-12
请求正文:
{
"location": "global",
"properties": {
"scopes": "<scopes>",
"serviceProviderId": "30dd229c-58e3-4a48-bdfd-91ec48eb906c",
"clientId": "<client id>",
"clientSecret": "<secret>",
"parameters": [
{
"key": "clientId",
"value": "<client id>"
},
{
"key": "clientSecret",
"value": "<secret>"
},
{
"key": "tokenExchangeUrl",
"value": "<token exchange URL>"
},
{
"key": "tenantId",
"value": "<tenant id>"
}
]
}
}
结果:
推荐阅读
- jquery - JQUERY 多个 IF 条件
- scala - ivy.xml 的 SBT 下载错误,尽管它存在
- python - 谁能向我解释第二行代码?
- python - 如何从 Cython 运行 doctest?
- python - 有没有办法在 jupyter notebook 的循环中使用魔法运行 python 程序?
- reactjs - 无法使用手动模拟监视类的模拟函数
- r - GGplot 不会绘图,但 base R 会
- javascript - 从 JavaScript 中的选定日期范围中获取未选定的日期范围
- discord.js - BulkDelete Discord.js(如何添加整数解析)
- python - 我如何解决海龟,Python中的奇数问题