我是使用 Azure 进行开发的新手。我希望你能帮助解决这个代码。我的目标是从 Azure Cosmos DB 的集合中删除项目。但我收到 http 错误:如果我使用此值 'partionKey' = '/Structures',则为 400;如果值为 '',则为 404。错误消息 =“x-ms-partitionkey 标头中提供的分区键的组件少于集合中定义的组件”
client = cosmos_client.CosmosClient("https://....documents.azure.com:443/", {'masterKey': '...'})
options = {}
options['enableCrossPartitionQuery'] = True
options['maxItemCount'] = 5
options['partitionKey'] = '/Structures'
client.DeleteItem("dbs/.../colls/.../docs/.../", options)
Run Code Online (Sandbox Code Playgroud)