Azure SignalR无服务器手臂模板

时间:2019-02-06 13:46:55

标签: azure signalr azure-signalr

是否可以设置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在默认模式下生成。需要无服务器模式。

1 个答案:

答案 0 :(得分:2)

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"}]}"