如何使用Azure REST Api更新Web应用程序连接字符串

时间:2019-06-18 13:33:13

标签: azure azure-api-apps

我正在尝试将Azure Webapp连接到通过Azure REST API提供的SQL数据库。因此,我正在尝试实现此请求:https://docs.microsoft.com/en-us/rest/api/appservice/webapps/updateconnectionstrings

但是我没有成功创建请求的正文

1 个答案:

答案 0 :(得分:0)

我相信您设置了错误的json主体数据。以下是我的测试连接字符串,connections是字符串名称,而connections包含ConnStringValueTypePair

{"properties": {
    "connections": {
      "value": "test1",
      "type": "SQLAzure"
    }
  }
}

enter image description here

它也可以将字符串更新为Azure。

enter image description here