CosmosDB连接器/删除Designer使用的分区集合/错误标题属性中的文档

问题描述 投票:0回答:1

使用逻辑应用程序CosmosDB连接器/操作“删除文档”,生成的逻辑应用程序代码使用标题属性

X-MS-documentdb-原始partitionkey

这会导致错误(无效的分区键)。

手动更正标题属性名称时

X-MS-documentdb-partitionkey

一切正常。

有其他类似经历的人吗?

谢谢。

azure-logic-apps
1个回答
0
投票

x-ms-documentdb-raw-partitionkey对我来说很好。以下是我的LA工作流程:

LA Workflow

        "$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"
            }
        },
© www.soinside.com 2019 - 2024. All rights reserved.