使用逻辑应用程序CosmosDB连接器/操作“删除文档”,生成的逻辑应用程序代码使用标题属性
X-MS-documentdb-原始partitionkey
这会导致错误(无效的分区键)。
手动更正标题属性名称时
X-MS-documentdb-partitionkey
一切正常。
有其他类似经历的人吗?
谢谢。
用x-ms-documentdb-raw-partitionkey
对我来说很好。以下是我的LA工作流程:
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"actions": {
"Delete_a_document": {
"inputs": {
"headers": {
"x-ms-documentdb-raw-partitionkey": "\"abc\""
},
"host": {
"connection": {
"name": "@parameters('$connections')['documentdb']['connectionId']"
}
},
"method": "delete",
"path": "/dbs/@{encodeURIComponent('test')}/colls/@{encodeURIComponent('test')}/docs/@{encodeURIComponent(items('For_each')?['id'])}"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"foreach": "@body('Get_all_documents')?['Documents']",
"runAfter": {
"Get_all_documents": [
"Succeeded"
]
},
"type": "Foreach"
},
"Get_all_documents": {
"inputs": {
"headers": {
"x-ms-documentdb-raw-partitionkey": "\"abc\""
},
"host": {
"connection": {
"name": "@parameters('$connections')['documentdb']['connectionId']"
}
},
"method": "get",
"path": "/dbs/@{encodeURIComponent('test')}/colls/@{encodeURIComponent('test')}/docs"
},
"runAfter": {},
"type": "ApiConnection"
}
},