gpt4 book ai didi

azure - 如何根据文件名运行资源事件发生时?

转载 作者:行者123 更新时间:2023-12-03 06:52:08 24 4
gpt4 key购买 nike

我在逻辑应用程序中有一个工作流程,我想根据文件名运行它。在没有条件的情况下它工作得很好,但比我想要的要多。所以使用这个条件来限制工作流的运行

@or(contains(triggerBody()?['Name'],'example.csv'),contains(triggerBody()?['Name'],'Hello.csv'))

第一个元素的主体:

   {
"topic": "/subscriptions/5665-56-56-56-56/resourceGroups/nameResources/providers/Microsoft.Storage/storageAccounts/name",
"subject": "/blobServices/default/containers/output/blobs/hello.csv",
"eventType": "Microsoft.Storage.BlobCreated",
"id": "45-45-45-45-456",
"data": {
"api": "PutBlob",
"clientRequestId": "45-45-4fd8-45-45",
"requestId": "45-45-0028-5346-45",
"eTag": "45",
"contentType": "text/csv",
"contentLength": 5432,
"blobType": "BlockBlob",
"blobUrl": "https://name.blob.core.windows.net/output/hello.csv",
"url": "https://name.blob.core.windows.net/output/hello.csv",
"sequencer": "66666",
"identity": "$superuser",
"storageDiagnostics": {
"batchId": "66-66-66-66-66"
}
},
"dataVersion": "",
"metadataVersion": "1",
"eventTime": "time"
}

工作流程:

enter image description here

这个基于文件名的条件是否正确?

最佳答案

我建议尝试这样的事情......

@or(contains(string(triggerBody()),'example.csv'),contains(string(triggerBody()),'Hello.csv'))

简化了遍历 JSON 结构的过程。

我测试了这个概念,它对我有用。

关于azure - 如何根据文件名运行资源事件发生时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73489623/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com