Azure 如何将参数传递到逻辑应用程序中的服务总线主题名称?

Azure 如何将参数传递到逻辑应用程序中的服务总线主题名称?,azure,azure-logic-apps,Azure,Azure Logic Apps,我正在从服务总线主题获取消息。 我想在这里参数化主题名称。 我试过了 还有concat()我也试过了,但没有任何效果 有人能帮我一下吗?如果你不想处理concat(),你应该看看这篇文章: 您可以指定逻辑应用程序参数,这些参数不同于ARM模板参数 总之,创建一个ARM参数,一个Logic App参数,然后将ARM参数映射到Logic App参数。这有点复杂,但您避免使用concat函数 因此,ARM模板应如下所示: { "$schema": "https://schema.manage

我正在从服务总线主题获取消息。
我想在这里参数化主题名称。
我试过了

还有
concat()
我也试过了,但没有任何效果


有人能帮我一下吗?

如果你不想处理
concat()
,你应该看看这篇文章:

您可以指定
逻辑应用程序参数
,这些参数不同于
ARM模板参数

总之,创建一个ARM参数,一个Logic App参数,然后将ARM参数映射到Logic App参数。这有点复杂,但您避免使用
concat
函数

因此,ARM模板应如下所示:

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "topicname": {
      "type": "string",
      "metadata": {
        "description": "The name of the topic."
      }
    }
    ...   
  },
  "variables": {
  ...
  },
  "resources": [
    {
      "type": "Microsoft.Logic/workflows",
      "properties": {
        "definition": {
                ... 
                "path": "/@{encodeURIComponent(encodeURIComponent(parameters('topicname')))}/messages",
                ... 
          },
          "contentVersion": "1.0.0.0",
          "outputs": {},
          "parameters": {
            "$connections": {
              "defaultValue": {},
              "type": "Object"
            },
            "topicname": {
              "type": "String"
            }            
          }
        },
        "parameters": {
          "$connections": {
          ...
          },
          "topicname": {
            "value": "[parameters('topicname')]"
          },

        }
      },
      "dependsOn": [

      ]
    }    
  ]
}
{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "topicname": {
      "type": "string",
      "metadata": {
        "description": "The name of the topic."
      }
    }
    ...   
  },
  "variables": {
  ...
  },
  "resources": [
    {
      "type": "Microsoft.Logic/workflows",
      "properties": {
        "definition": {
                ... 
                "path": "/@{encodeURIComponent(encodeURIComponent(parameters('topicname')))}/messages",
                ... 
          },
          "contentVersion": "1.0.0.0",
          "outputs": {},
          "parameters": {
            "$connections": {
              "defaultValue": {},
              "type": "Object"
            },
            "topicname": {
              "type": "String"
            }            
          }
        },
        "parameters": {
          "$connections": {
          ...
          },
          "topicname": {
            "value": "[parameters('topicname')]"
          },

        }
      },
      "dependsOn": [

      ]
    }    
  ]
}