Azure Logic App - Dynamic API Connection

。_饼干妹妹 提交于 2020-01-04 13:03:22

问题


Is it possible to dynamically choose the FTP API connection that I want to use? We have defined two FTP API connections in the same resource group, with name ftptest1 and ftptest2.

How can I select one of these in the code view of the Logic App? I'm only able to select the connection in the designer and then connection 'ftp' is created. See code snippet below.

But I need to dynamically select one of the two FTP connections based on a parameter.

"inputs": {
            "body": "@body('XMLFile')",
            "host": {
                "api": {
                    "runtimeUrl": "https://logic-apis-westeurope.azure-apim.net/apim/ftp"
                },
                "connection": {
                     "name": "@parameters('$connections')['ftp']['connectionId']"
                }
            },

Is it possible to change the "@parameters('$connections')['ftp']['connectionId']" and select an existing API Connection there by name or something else?

Thank you!


回答1:


You should add a condition after which there will two FTP connectors each using different connection. This should make it dynamic. There is no charge on how many actions are in the definition. We charge on the basis of action execution which in this case will be counted one (either ftp1 or ftp2).



来源:https://stackoverflow.com/questions/39720265/azure-logic-app-dynamic-api-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!