ARM 模板抛出 "Shared throughput collection should have a partition key"
ARM template throws "Shared throughput collection should have a partition key"
我正在尝试创建一个具有共享吞吐量的 cosmosdb 帐户,我有 ARM 中提到的分区键,但在创建容器时似乎没有使用它。
"properties": {
"resource": {
"id": "[variables('cosmosDbContainers')[copyIndex()]]"
},
"partitionKey": {
"paths": [
"/id"
],
"kind": "Hash"
},
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
]
},
看来partitionKey在ARM中的位置不对,应该在下面
"resource"
键
"resource": {
"id": "[variables('cosmosDbContainers')[copyIndex()]]",
"partitionKey": {
"paths": [
"/ipCountryCode"
],
"kind": "Hash"
}
},
我正在尝试创建一个具有共享吞吐量的 cosmosdb 帐户,我有 ARM 中提到的分区键,但在创建容器时似乎没有使用它。
"properties": {
"resource": {
"id": "[variables('cosmosDbContainers')[copyIndex()]]"
},
"partitionKey": {
"paths": [
"/id"
],
"kind": "Hash"
},
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
]
},
看来partitionKey在ARM中的位置不对,应该在下面
"resource"
键
"resource": {
"id": "[variables('cosmosDbContainers')[copyIndex()]]",
"partitionKey": {
"paths": [
"/ipCountryCode"
],
"kind": "Hash"
}
},