gpt4 book ai didi

azure - ARM 模板抛出 "Shared throughput collection should have a partition key"

转载 作者:行者123 更新时间:2023-12-02 06:38:06 25 4
gpt4 key购买 nike

我正在尝试创建一个具有共享吞吐量的cosmosdb帐户,我有ARM中提到的分区键,但在创建容器时似乎没有使用这个。

"properties": {
"resource": {
"id": "[variables('cosmosDbContainers')[copyIndex()]]"
},
"partitionKey": {
"paths": [
"/id"
],
"kind": "Hash"
},
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
]
},

最佳答案

貌似ARM中partitionKey的放置位置不对,应该是在“资源”

 "resource": {
"id": "[variables('cosmosDbContainers')[copyIndex()]]",
"partitionKey": {
"paths": [
"/ipCountryCode"
],
"kind": "Hash"
}
},

关于azure - ARM 模板抛出 "Shared throughput collection should have a partition key",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69733616/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com