AzureResourceManager模板将Azure功能挂钩到存储事件

时间:2018-03-14 19:59:26

标签: azure azure-storage-blobs azure-resource-manager

我有一个AzureResourceManager模板,它既可以创建StorageAccount,也可以创建AzureFunctions。我想添加一个JSON节点来订阅Blob存储事件的函数。此URL说明了如何:

https://docs.microsoft.com/en-us/azure/event-grid/event-subscription-template

但我不确定如何填充" endpointURL",因为此函数不是静态的,而是在模板的早期生成。

{
    "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "storageName": {
            "type": "string"
        }
    },
    "resources": [
        {
            "type": "Microsoft.Storage/storageAccounts/providers/eventSubscriptions",
            "name": "[concat(parameters('storageName'), '/Microsoft.EventGrid/myStorageSubscription')]",
            "apiVersion": "2018-01-01",
            "properties": {
                "destination": {
                    "endpointType": "WebHook",
                    "properties": {
                        "endpointUrl": "<WHAT GOES HERE?>"
                    }
                },
                "filter": {
                    "subjectBeginsWith": "",
                    "subjectEndsWith": "",
                    "isSubjectCaseSensitive": false
                }
            }
        }
    ]
}

0 个答案:

没有答案