逻辑应用 Blob 覆盖同名文件
Logic Apps Blob overwriting file of same name
所以我通过 Http-Request-Trigger 将以下 JSON 发布到逻辑应用程序。
{
"RequestMetaDataValue": {
"RequestMetaDataUuid": "33333333-3333-3333-3333-333333333333"
},
"OtherStuff": [{
"OtherStuffUuid": "11111111-1111-1111-1111-1111",
"OtherStuffString": "peanut"
},
{
"OtherStuffUuid": "e5dceac3-51cb-477b-b3a9-bd08f351cc0e",
"OtherStuffString": "banana"
}]
}
逻辑应用解析 Json,因此我可以提取 RequestMetaDataUuid 值。在本例中为“33333333-3333-3333-3333-333333333333”。
然后我使用创建 Blob(操作?),如下所示:
https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-azureblobstorage
以及它在我的设计器中的样子
非常直接。
问题来了。
如果我重新发送(相同的)Json,blob/file 会在 blob 中被覆盖。
例如,如果我改变
"OtherStuffUuid": "11111111-1111-1111-1111-1111",
到
"OtherStuffUuid": "aaaaaaaa-1111-1111-1111-1111",
最初有 "OtherStuffUuid": "11111111-1111-1111-1111-1111" 的 blob 永远不会降落。 :(
有没有办法防止覆盖?
有没有办法检查 blob 存储中 blob/file 是否已经存在(我的偏好)?
追加
根据一个答案,我尝试添加以下预检查。
此处的文档:
https://docs.microsoft.com/en-us/connectors/azureblob/#Get_Blob_Metadata_using_path
Get Blob Metadata using path Operation ID: GetFileMetadataByPath This
operation retrieves blob metadata using path.
Required Parameters Blob path string Specify unique path to the blob
Key: path
Returns Body BlobMetadata Blob metadata
您可以使用 'Get Blob Metadata using path' 操作来检查 blob 是否存在。然后,您可以使用条件(基于获取 blob 元数据操作结果的状态代码)来 运行 操作,具体取决于 blob 是否已经存在。
所以我通过 Http-Request-Trigger 将以下 JSON 发布到逻辑应用程序。
{
"RequestMetaDataValue": {
"RequestMetaDataUuid": "33333333-3333-3333-3333-333333333333"
},
"OtherStuff": [{
"OtherStuffUuid": "11111111-1111-1111-1111-1111",
"OtherStuffString": "peanut"
},
{
"OtherStuffUuid": "e5dceac3-51cb-477b-b3a9-bd08f351cc0e",
"OtherStuffString": "banana"
}]
}
逻辑应用解析 Json,因此我可以提取 RequestMetaDataUuid 值。在本例中为“33333333-3333-3333-3333-333333333333”。
然后我使用创建 Blob(操作?),如下所示:
https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-azureblobstorage
以及它在我的设计器中的样子
非常直接。
问题来了。
如果我重新发送(相同的)Json,blob/file 会在 blob 中被覆盖。
例如,如果我改变
"OtherStuffUuid": "11111111-1111-1111-1111-1111",
到
"OtherStuffUuid": "aaaaaaaa-1111-1111-1111-1111",
最初有 "OtherStuffUuid": "11111111-1111-1111-1111-1111" 的 blob 永远不会降落。 :(
有没有办法防止覆盖?
有没有办法检查 blob 存储中 blob/file 是否已经存在(我的偏好)?
追加
根据一个答案,我尝试添加以下预检查。
此处的文档:
https://docs.microsoft.com/en-us/connectors/azureblob/#Get_Blob_Metadata_using_path
Get Blob Metadata using path Operation ID: GetFileMetadataByPath This operation retrieves blob metadata using path.
Required Parameters Blob path string Specify unique path to the blob Key: path
Returns Body BlobMetadata Blob metadata
您可以使用 'Get Blob Metadata using path' 操作来检查 blob 是否存在。然后,您可以使用条件(基于获取 blob 元数据操作结果的状态代码)来 运行 操作,具体取决于 blob 是否已经存在。