通过Logic App将JSON消息放置/发布到Azure存储队列 [英] Put/Post JSON message to Azure Storage Queue via Logic App

查看:88
本文介绍了通过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.

推荐答案

这对我有用:

  1. 已启用受管身份";在Logic App上.

  1. 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:

这篇关于通过Logic App将JSON消息放置/发布到Azure存储队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆