创建/更新Cosmos Gremlin DB(吞吐量)ARM模板2019-08-01

时间:2019-10-29 13:47:41

标签: azure azure-cosmosdb azure-cosmosdb-gremlinapi

我正在尝试使用ARM模板(特别是针对API版本2019-08-01)为CosmosDB帐户创建/更新Gremlin db及其吞吐量。

创建帐户没有问题,但是我似乎无法创建数据库。

如果以前有人这样做,我将非常感谢一些提示!

模式:https://github.com/Azure/azure-resource-manager-schemas/blob/master/schemas/2019-08-01/Microsoft.DocumentDB.json

MS文档:https://docs.microsoft.com/en-us/azure/templates/microsoft.documentdb/2019-08-01/databaseaccounts/gremlindatabases

模板:

{
  "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {

  },
  "variables": {

  },
  "resources": [
    {
      "type": "Microsoft.DocumentDb/databaseAccounts",
    "name": "[concat('sec-', uniqueString('unique','dbName'))]",
      "kind": "GlobalDocumentDB",
      "apiVersion": "2019-08-01",
      "location": "eastus2",
      "properties": {
        "capabilities": [
          {
            "name": "EnableGremlin"
          }
        ],
        "databaseAccountOfferType": "Standard",
        "isVirtualNetworkFilterEnabled": false,
        "virtualNetworkRules": [

        ],
        "ipRangeFilter": "",
        "enableMultipleWriteLocations": false,
        "locations": [
          {
            "locationName": "East US 2",
            "failoverPriority": 0,
          "id": "[concat(concat('sec-', uniqueString('unique','dbName')), '-', 'eastus2')]"
          }
        ]
      },
      "resources": [
      ],
      "dependsOn": [

      ]
    },
    {
      "type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases",
    "name": "[concat('gremlinDatabases/', 'gremlinDB')]",
      "apiVersion": "2019-08-01",
      "properties": {
        "options": {
          "Throughput": 800
        },
        "resource": {
          "id": "gremlinDB"
        }
      },
      "dependsOn": [
      "[resourceId('Microsoft.DocumentDb/databaseAccounts',concat('sec-', uniqueString('unique','dbName')))]"
      ]
    }
  ]
}

错误消息:

New-AzureRmResourceGroupDeployment : 6:17:06 PM - Resource Microsoft.DocumentDB/databaseAccounts/gremlinDatabases 'gremlinDatabases/gremlinDB' failed with message '{
  "error": {
    "code": "ResourceNotFound",
    "message": "The Resource 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases' under resource group 'my-resource-group-name' was not found."
  }
}'
At C:\dev\PoshArm-Deployment\src\PoshArmDeployment\Public\Publish-ArmResourceGroup.ps1:68 char:33
+ ...    $deploymentResult = New-AzureRmResourceGroupDeployment @deployment
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet

0 个答案:

没有答案