0

是否可以在手臂模板中设置 SignalR 模式(默认 || 无服务器 || 经典)?

我目前使用的手臂模板的快照:

 "resources": [
    {
        "comments": "SignalR serverless arm ressource",
        "type": "Microsoft.SignalRService/SignalR",
        "sku": {
            "name": "Free_F1",
            "tier": "Free",
            "size": "F1",
            "capacity": 1
        },
        "name": "[parameters('SignalR_Name')]",
        "apiVersion": "2018-10-01",
        "location": "potatocountry",
        "tags": {
            "CostCenter": "-",
            "Product": "signalr",
            "Team": "t5"
        },
        "scale": null,
        "properties": {
            "hostNamePrefix": null
        },
        "dependsOn": []
    }

使用此模板 SignalR 在默认模式下生成。需要无服务器模式。

4

1 回答 1

3

原始答案

我没有在API定义中看到这一点。我看resources.azure.com不到它,导出模板时也看不到它。所以我想现在的答案是:“不”。

更新

实际上,这就是门户的作用:

/subscriptions/id/resourceGroups/name/providers/Microsoft.SignalRService/SignalR/name/switchFeatures?api-version=2018-10-01

使用此有效负载:

{"features":[{"flag":"ServiceMode","value":"Serverless"}]}

尝试类似:

"type": "Microsoft.SignalRService/SignalR/switchFeatures",
"name": "[concat(parameters('SignalR_Name'), '/doesntmatter')]",
"apiVersion": "2018-10-01",
"location": "xxx",
"properties": {
     "features": [{
          "flag":  "ServiceMode",
          "value": "Serverless"
     }]
}
于 2019-02-06T14:01:39.890 回答