I'm trying to execute automated script generated from Azure for iothub end points, but getting the following the error:
New-AzureRmResourceGroupDeployment : 12:25:25 AM - Error: 
Code=InvalidTemplate; Message=Deployment template validation failed: 'The 
template resource 'ServiceBus1/Topic1/iothubroutes_tst-IOTHUB' at line '216' 
and column '10' is not valid: Unable to evaluate template language function 
'resourceId': function requires exactly one multi-segmented argument which 
must be resource type including resource provider namespace. Current function 
arguments 'Microsoft.ServiceBus/namespaces/topics,ServiceBus1/Topic1'. Please 
see https://aka.ms/arm-template-expressions/#resourceid for usage details.. 
Please see https://aka.ms/arm-template-expressions for usage details.'.
At C:\Users\user\Desktop\testEndpoints\CIMS-ResourceGrp\deplo
y.ps1:104 char:5
+     New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGr ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeplo 
   yment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets 
   .Implementation.NewAzureResourceGroupDeploymentCmdlet
Please find below is the template file piece of code:
"enableExpress": false
        },
        "dependsOn": [
            "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_CS_ServiceBus_name'))]"
        ]
    },
    {
        "comments": "Generalized from resource: '/subscriptions/7dshsjdh/resourcegroups/CS-ResourceGrp/providers/Microsoft.ServiceBus/namespaces/CS-ServiceBus/topics/cs-topic/authorizationRules/iothubroutes_Cs-IOTHUB'.",
        "type": "Microsoft.ServiceBus/namespaces/topics/authorizationRules",
        "name": "[parameters('authorizationRules_iothubroutes_CS_IOTHUB_name')]",
        "apiVersion": "2015-08-01",
        "location": "East US",
        "scale": null,
        "properties": {
            "rights": [
                "Send"
            ]
        },
        "dependsOn": [
            "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_CS_ServiceBus_name'))]",
            "[resourceId('Microsoft.ServiceBus/namespaces/topics', parameters('topics_cs_topic_name'))]"
        ]