参数值应如下所示:
"parameterValues": {
"storageaccount": "storageAccount",
"sharedkey": "accountKey"
}
以及
"tableName"
不允许在
parameterValues
是的。
我用下面的ARM模板测试它,它对我来说是正确的。如果不想将硬代码与存储帐户密钥一起使用,可以使用
ListKeys
在ARM模板中的函数。
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"connectionName": {
"type": "string",
"defaultValue": "azuretablestest",
"metadata": {
"description": "The name of the connection to the Table Store that the Logic App will use."
}
},
"connectionDisplayName": {
"type": "string",
"defaultValue": "AzureTablesTest",
"metadata": {
"description": "The display name of the connection to the Table Store that the Logic App will use."
}
},
"locationName": {
"type": "string",
"defaultValue": "eastus",
"metadata": {
"description": "The Azure location to use when creating resources (eg. North Europe)."
}
}
},
"variables": {},
"resources": [
{
"comments": "Connection to the Table Store that will hold HMLR Business Gateway Service responses.",
"type": "Microsoft.Web/connections",
"name": "[parameters('connectionName')]",
"apiVersion": "2016-06-01",
"location": "[parameters('locationName')]",
"scale": null,
"properties": {
"displayName": "[parameters('connectionDisplayName')]",
"customParameterValues": {},
"parameterValues": {
"storageaccount": "accountName",
"sharedkey": "accountKey"
},
"api": {
"id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', replace(toLower(parameters('locationName')), ' ', ''), '/managedApis/azuretables')]"
}
},
"dependsOn": []
}
],
"outputs": {}
}