{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "metadata": {
        "description": "End to end Service Bus Example"
    },
    "contentVersion": "1.0.0.0",
    "resources": [
        {
            "type": "Microsoft.ServiceBus/namespaces",
            "apiVersion": "2017-04-01",
            "location": "eastus",
            "name": "my-test-sbus",
            "sku": {
                "name": "Standard",
                "tier": "Standard"
            }
        },
        {
            "type": "Microsoft.ServiceBus/namespaces/topics",
            "apiVersion": "2017-04-01",
            "dependsOn": [
                "[resourceId('Microsoft.ServiceBus/namespaces', 'my-test-sbus')]"
            ],
            "name": "my-test-sbus/topic1"
        },
        {
            "type": "Microsoft.ServiceBus/namespaces/topics/subscriptions",
            "apiVersion": "2017-04-01",
            "dependsOn": [
                "[resourceId('Microsoft.ServiceBus/namespaces/topics', 'my-test-sbus', 'topic1')]"
            ],
            "name": "my-test-sbus/topic1/sub1",
            "properties": {
                "operationId": "topic1sub1"
            },
            "resources": [
                {
                    "apiVersion": "2017-04-01",
                    "dependsOn": [
                        "sub1"
                    ],
                    "name": "on-topic1sub1",
                    "properties": {
                        "correlationFilter": {
                            "properties": {
                                "operation": "reset",
                                "operationresource": "host"
                            }
                        },
                        "filterType": "CorrelationFilter"
                    },
                    "type": "Rules"
                }
            ]
        }
    ]
}