This template creates an Azure Relay namespace and HybridConnection.
{"apiversion": "2018-01-01-preview", "name": "[parameters('namespacename')]", "type": "microsoft.relay/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('hybridconnectionname')]", "type": "hybridconnections", "dependson": ["[resourceid('microsoft.relay/namespaces", parameters('namespacename'))]"], "properties": {"requiresclientauthorization": "true", "usermetadata": "meta data supplied by user for hybridconnections"}}]} 