【发布时间】:2019-03-03 09:48:05
【问题描述】:
使用逻辑应用 CosmosDB 连接器/操作“删除文档”,生成的逻辑应用代码使用标头属性
x-ms-documentdb-raw-partitionkey
这会导致错误(无效的分区键)。
当手动更正标题属性名称时
x-ms-documentdb-partitionkey
一切正常。
其他有类似经历的人吗?
谢谢。
【问题讨论】:
标签: azure-logic-apps
使用逻辑应用 CosmosDB 连接器/操作“删除文档”,生成的逻辑应用代码使用标头属性
x-ms-documentdb-raw-partitionkey
这会导致错误(无效的分区键)。
当手动更正标题属性名称时
x-ms-documentdb-partitionkey
一切正常。
其他有类似经历的人吗?
谢谢。
【问题讨论】:
标签: azure-logic-apps
x-ms-documentdb-raw-partitionkey 对我来说效果很好。以下是我的洛杉矶工作流程:
"$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"
}
},
【讨论】: