Я ищу способ динамически выбирать ApiConnection в коннекторе «SQL GET ROWS» (но, конечно, может быть применен к любым другим коннекторам). В качестве простого примера у меня есть следующий рабочий процесс:
![enter image description here](https://i.stack.imgur.com/vHJiK.png)
What I want to achieve is: inside the HTTP request (in the body or as a header) I'm sending "France" => so in the end the connector 'GET ROWS from PostgreSQL table" must target an ApiConnection "P01".
If I'm sending "Germany", the connector must target an ApiConnection "P02".
And so on.
I was unable to find something that fulfill my needs. I found this link https://social.msdn.microsoft.com/Forums/azure/en-US/22b83226-e7a4-4168-bd31-3547367f4959/choose-api-connection-dynamically-in-logic-app?forum=azurelogicapps, но кажется, что ваше ApiConnection должно быть определено в этой части кода LogicApp ниже:
введите описание изображения здесь
Иначе ничего не получится :( Я даже пытался написать код ниже, но обнаружил ошибку:
"postgresql_datagateway": {
"id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', parameters('logicAppLocation'), '/managedApis/', 'postgresql')]",
"connectionId": "[resourceId('Microsoft.Web/connections', triggerOutputs()[''headers''][''x-apiconnection-name''])]",
"connectionName": "triggerOutputs()[''headers''][''x-apiconnection-name'']"
},
Заранее спасибо за вашу помощь, ребята!