使用 json 模板创建 GLOBAL documentdb 的 Azure Powershell 脚本
Azure Powershell script creation of a GLOBAL documentdb using a json template
我可以创建一个调用 New-AzureRmResourceGroupDeployment 的 powershell 脚本,并使用 json 模板在 azure 中创建一个 documentdb。我想创建一个 GLOBAL documentdb,它是 documentdbs 的一项新功能。我还没有看到如何做到这一点。
原始 json 模板片段创建文档数据库效果很好!
{
"apiVersion": "2015-04-08",
"type": "Microsoft.DocumentDb/databaseAccounts",
"name": "[variables('databaseAccountName')]",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "documentDbAccount"
},
"properties": {
"name": "[variables('databaseAccountName')]",
"databaseAccountOfferType": "Standard"
}
},
但它不会使用 GLOBAL 'kind' 创建它。
我在某处看到过这个
"kind": "GlobalDocumentDB"
所以我尝试将其添加到 json 后键入
{
"apiVersion": "2015-04-08",
"type": "Microsoft.DocumentDb/databaseAccounts",
"kind": "GlobalDocumentDB",
"name": "[variables('databaseAccountName')]",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "documentDbAccount"
},
"properties": {
"name": "[variables('databaseAccountName')]",
"databaseAccountOfferType": "Standard"
}
},
但这失败了。所以显然不是创建 GLOBAL Documentdb 的方法。
有人知道需要什么吗???谢谢!
很抱歉删除了答案,但很快就会有一套更完整的文档,然后我们会在这里得到答案。
我可以创建一个调用 New-AzureRmResourceGroupDeployment 的 powershell 脚本,并使用 json 模板在 azure 中创建一个 documentdb。我想创建一个 GLOBAL documentdb,它是 documentdbs 的一项新功能。我还没有看到如何做到这一点。
原始 json 模板片段创建文档数据库效果很好!
{
"apiVersion": "2015-04-08",
"type": "Microsoft.DocumentDb/databaseAccounts",
"name": "[variables('databaseAccountName')]",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "documentDbAccount"
},
"properties": {
"name": "[variables('databaseAccountName')]",
"databaseAccountOfferType": "Standard"
}
},
但它不会使用 GLOBAL 'kind' 创建它。 我在某处看到过这个
"kind": "GlobalDocumentDB"
所以我尝试将其添加到 json 后键入
{
"apiVersion": "2015-04-08",
"type": "Microsoft.DocumentDb/databaseAccounts",
"kind": "GlobalDocumentDB",
"name": "[variables('databaseAccountName')]",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "documentDbAccount"
},
"properties": {
"name": "[variables('databaseAccountName')]",
"databaseAccountOfferType": "Standard"
}
},
但这失败了。所以显然不是创建 GLOBAL Documentdb 的方法。
有人知道需要什么吗???谢谢!
很抱歉删除了答案,但很快就会有一套更完整的文档,然后我们会在这里得到答案。