gpt4 book ai didi

azure - 具有共享自动缩放吞吐量的 CosmosDB 部署失败

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

尝试为数据库帐户部署 ARM 模板,SQL 数据库具有两个集合,其中自动缩放吞吐量设置在数据库级别设置(为集合共享)。

我在 Azure UI 中创建了此设置,然后导出了模板。使用 New-AzResourceGroupDeployment 从 Powershell 导入模板时,失败并显示消息

Status Message: Entity with the specified id does not exist in the system.
ActivityId: <redacted>, Microsoft.Azure.Documents.Common/2.11.0 (Code:NotFound)

这很荒谬,因为我导出了模板并没有修改它然后导入。 Azure 不识别它自己的格式吗?我认为问题与模板的这个片段有关:

{
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/throughputSettings",
"apiVersion": "2020-04-01",
"name": "[concat(parameters('databaseAccounts_an_test_name'), '/', parameters('databaseAccounts_an_test_name'), '-db-2/default')]",
"dependsOn": [
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', parameters('databaseAccounts_an_test_name'), concat(parameters('databaseAccounts_an_test_name'), '-db-2'))]",
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccounts_an_test_name'))]"
],
"properties": {
"resource": {
"throughput": 400,
"autoscaleSettings": {
"maxThroughput": 4000
}
}
}
}

enter image description here

有什么想法吗?

最佳答案

根据 Mark Brown 的暗示,这是准确的解决方案。

{
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
"name": ...
"apiVersion": "2020-04-01"
"dependsOn": ...
"properties": {
"resource": {
"id": ...
},
"options": {
"autoscaleSettings": {
"maxThroughput": 4000
}
}
}
}

请勿使用导出模板中 yaml 的 Microsoft.DocumentDB/databaseAccounts/sqlDatabases/throughputSettings 部分。我不确定为什么 Azure 将其导出然后不允许导入。

关于azure - 具有共享自动缩放吞吐量的 CosmosDB 部署失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62406622/

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