我使用 BlobTriggerCSharp 创建了一个函数应用程序,这是函数的名称:BlobTriggerCSharp1
我想在逻辑应用程序中使用此函数,因此我创建了逻辑应用程序和选定的重复次数、提供的频率和间隔。我单击“操作”,选择“在同一区域中显示 Azure 函数”,它显示所有函数应用程序,例如“Container:FunctionappName”,但是当我单击该函数应用程序内的现有函数时,该函数应用程序不显示。有人可以帮忙解决这个问题吗?
这看起来很明显,但不知何故它对我不起作用。我正在尝试在 Microsoft Azure 上的 Logic App 中构建解决方案,但我坚持将 JSON 对象转换为 XML。
我的要求是执行存储过程并以 XML 格式保存响应。默认情况下,SQL 执行存储过程操作以以下 JSON 格式返回响应,
{
"OutputParameters": { },
"ReturnCode": 0,
"ResultSets": {
"Table1": [
{
"ProductID": 680,
"Name": "HL Road Frame - Black, 58",
"ProductNumber": "FR-R92B-58",
"Color": "Black",
"StandardCost": 1059.31,
"ListPrice": 1431.5,
"Size": "58",
"Weight": 1016.04
},
{
"ProductID": 706,
"Name": "HL Road Frame - Red, 58",
"ProductNumber": "FR-R92R-58",
"Color": "Red",
"StandardCost": 1059.31,
"ListPrice": 1431.5,
"Size": "58",
"Weight": 1016.04
}]
}
}
Run Code Online (Sandbox Code Playgroud)
然后在“创建 Blob”操作中使用上述响应以在 Azure 上的 Blob 中保存响应。 …
正如托马斯指出的那样,问题是由于子操作中的错误,而不是我检查变量值的方式。
我有一个变量,它早先在 LA 中就已经初始化了。稍后我尝试使用条件检查变量是否为空。
这是运行历史记录的输出:
看起来变量此时是一个空字符串,但是条件失败而没有任何有用的信息。
我也尝试过 null 或将变量包装在空命令中并与真/假进行比较。都给了同样的失败。
我有一个逻辑应用程序,当安全中心出现安全警报时会触发该应用程序。
我有一个步骤,我将输入的一个子集映射到一个 JSON 文档并使用它来创建一个文件。
我需要我正在创建的 JSON 文档都在一行中,所以我需要确保我替换了输入中的任何控制换行符。
示例输入:
{
"headers": {
"Content-Type": "application/json"
},
"body": {
"RemediationSteps": "[\r\n \"1. Enforce the use of strong passwords\",\r\n \"2. Add the source IP to NSG block list for 24 hours\",\r\n \"3. Create an allow list for RDP access in NSG\"\r\n]"
}
}
Run Code Online (Sandbox Code Playgroud)
我的映射(在设计器中):
replace(triggerBody()?['RemediationSteps'], '\r\n', ' ')
Run Code Online (Sandbox Code Playgroud)
但是,我的 JSON 文档中仍然有新行。
我在 Azure 中构建了一个简单的函数,它从 json 正文中获取文件的位置,并读取第一行以从所述文件中获取标头。我正在 Visual Studio 中构建该函数并使用打包部署发布它。
我可以在 Azure Functions 下的门户上测试该函数并获得返回结果,但是当我在逻辑应用程序中尝试该函数时,出现 404 Not Found 错误。
我已经创建了 MS 提供的示例 HTTPRequest 函数,并且在相同的函数名称下工作正常,但我不确定为什么我编写的函数不起作用。
下面是我用于该函数的代码
using System;
using System.IO;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
namespace Functions
{
public static class GetTableHeaders
{
[FunctionName("GetTableHeaders")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
IBinder binder,
ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");
string guid = req.Query["guid"]; …Run Code Online (Sandbox Code Playgroud) 我有一个数组变量“Names”,其值例如[“Unity”,“Block”,“PRD”,“Monit”],并且希望将它们中的每个值放入一个新变量中。
所需的输出类似于: Variable Group = Unity Variabel Test = Block (...)
由于这是一个数组,我认为基本的 Names[0] 会给我第一个值,等等 1、2、3 等,但在逻辑应用程序上我无法弄清楚它是如何工作的。
这可能吗?
谢谢
我已设法将所有用户数据放入数组中(请参阅此处),但现在我无法循环访问数据。构建数组后,我已将其转换为 JSON,但我无法再处理 JSON 架构中定义的字段。
我在循环中唯一可以解决的问题(我使用 JSON 正文作为 For Each 循环的输入)是正文本身,而不是用户名、邮件地址等各个字段。
我是否应该更改 JSON 架构中的某些内容来解决此问题,还是有其他问题?
编辑:请在下面找到我的 JSON 架构:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"items": [
{
"properties": {
"@@odata.type": {
"type": "string"
},
"createdDateTime": {
"type": "string"
},
"employeeId": {
"type": "string"
},
"givenName": {
"type": "string"
},
"id": {
"type": "string"
},
"mail": {
"type": "string"
},
"onPremisesSamAccountName": {
"type": "string"
},
"surname": {
"type": "string"
},
"userPrincipalName": {
"type": "string"
}
},
"required": [
"@@odata.type",
"id",
"givenName",
"surname",
"userPrincipalName",
"mail", …Run Code Online (Sandbox Code Playgroud) 我创建了几个具有自定义路由的Azure函数,根据我从文档https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-functions#precessions的理解,它们不会出现在逻辑应用的 Azure Functions 列表中,而它们不会\xe2\x80\x99t。
\n\n\n\n为了进行测试,我添加了一个没有自定义路由的 Azure 函数,并且它对逻辑应用程序可见。
\n\n\n\n我尝试按照https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-functions#function-swagger (CORS) 和https://learn.microsoft上的说明进行操作。 com/en-us/azure/azure-functions/functions-openapi-definition(设置 API 管理),但仍然看不到逻辑应用中的 Azure Functions。
\n\n我确信我错过了一些东西,任何帮助将不胜感激。
\n我在逻辑应用程序 Ex 中有两个变量作为数组;
Variable A=["A","B"]
Variable B=["C","D"]
Run Code Online (Sandbox Code Playgroud)
我想结合两者并返回
Variable 9=["A","B","C","D"]
Run Code Online (Sandbox Code Playgroud) arrays function azure-logic-apps workflow-definition-language
有人知道如何使用逻辑应用连接器和触发器连接到 Azure blob 存储吗?我不想授予对我的存储帐户的公共访问权限。如果我允许公共访问,它工作正常,但是当我将访问限制为仅选定的 IP 时,它停止工作并且我无法连接到存储帐户。我附上了截图。