通过Logic App将JSON消息放置/发布到Azure存储队列
我希望能够使用Logic App在Azure存储队列中放置/发布消息,因为我想使用 HTTP Logic App acion提供的托管身份选项.
I want to be able to use Logic Apps to put/post messages in an Azure Storage Queue, because I want to make use of the Managed Identity option that HTTP Logic App acion provides.
我有一个逻辑应用程序,该应用程序使用HTTP操作将XML消息发布到队列中,并且有一个将消息放入队列中"操作,该操作将JSON消息放入队列中以进行调试.
I have a Logic App that uses HTTP action to post XML messages to the queue and I have a "Put a message on a queue" action that puts JSON message to the queue for debugging purposes.
我的最终目标是能够将HTTP操作与托管身份作为身份验证一起使用,但能够将JSON消息发布到队列中,就像将消息放入队列中"操作一样.
My ultimate goal is to be able to use the HTTP action with Managed Identity as Authentication but be able to post JSON messages to the queue like the "Put a message on a queue" action is able to.
这对我有用:
-
已启用受管身份";在Logic App上.
Enabled "Managed Identity" on the Logic App.
在存储队列上添加了Storage-Queue-Contributor权限.
Added Storage-Queue-Contributor permissions on the storage queue.
使用 utcnow('R')
来获取此日期格式(星期二,2020年9月8日12:03:08 GMT")用于 x-ms-date
HTTP标头(MS对此没有相关文档).
Used utcnow('R')
to get this date format ("Tue, 08 Sep 2020 12:03:08 GMT")
for x-ms-date
HTTP header (no doc from MS about this).
内部插入JSON数据
<QueueMessage>
<MessageText>
{
"car": "Audi",
"year": 1983
}
</MessageText>
</QueueMessage>
在Logic App设计器中的最终结果:
Final result in Logic App designer: