arm template - String concatenation issue with Azure Logic Apps -


i'm creating arm template deploys web app (an mvc api) , logic app.

i'm attempting define http action within logic app such dynamically concatenates base uri of api property of current item using spliton , @triggerbody(). base uri concatenated set of parameters in arm template variable variables('hockeyappapisettings').uri.

here's relevant snipped of action definition:

"actionname": {   "conditions": [ ],   "inputs": {     "authentication": {       "audience": "[variables('apisettings').authentication.audience]",       "clientid": "[variables('apisettings').authentication.clientid]",       "secret": "[variables('apisettings').authentication.secret]",       "tenant": "[variables('apisettings').authentication.tenant]",       "type": "activedirectoryoauth"     },     "method": "patch",     "uri": "[concat(variables('apisettings').uri, '/@{triggerbody()['id']}/scanninginprogress')]"     //"uri": "[concat(variables('apisettings').uri, '//@{triggerbody()[/'id/']}//scanninginprogress')]"     //"uri": "[concat(variables('apisettings').uri, '//@@{triggerbody()[/'id/']}//scanninginprogress')]"   },   "type": "http" }, 

the "uri" section i'm struggling with. i've sprinkled various escape characters (\ , @) in differing patterns through out this.

i either can't deployment succeed w/deployment errors like:

unable parse template language expression 'concat(variables('apisettings').uri, '//@{triggerbody()[/'id/']}//scanninginprogress')': expected token 'rightparenthesis' , actual 'identifier'. please see http://aka.ms/arm-template-expressions usage details..'.

or if deployment working , @ code in portal after deployment, string concatenation doesn't seem work properly. variable doesn't converted value.

i have validated if edit uri directly (via portal html editor) using this: "uri" : "https://edited.azurewebsites.net/api/packages/@{triggerbody()['id']}/scanninginprogress" logic app make patch call each item comes http trigger.

what doing wrong?

you need escape inner single quotes, i.e. try

"uri": "[concat(variables('apisettings').uri, '/@{triggerbody()[''id'']}/scanninginprogress')]" 

alternatively can use dot notation reference property, i.e.

"uri": "[concat(variables('apisettings').uri, '/@{triggerbody().id}/scanninginprogress')]" 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -