你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

管理 Azure Maps 帐户的定价层

可以通过 Azure 门户Azure 资源管理器 (ARM) 模板管理 Azure Maps 帐户的定价层。

注意

Azure Maps Gen1 定价层停用

Gen1 定价层现已弃用,并将于 2026 年 9 月 15 日开始停用。 Gen2 定价层将取代 Gen1(S0 和 S1)定价层。 如果你的 Azure Maps 帐户选择了 Gen1 定价层,你可以在停用之前切换到 Gen2 定价层,否则它会自动更新。

在 2023 年 9 月 14 日之后,通过 Azure 门户创建新的 Azure Maps 帐户时,Gen1 定价层不再可用。 在 2023 年 10 月 12 日之后,使用 ARM 模板创建新的 Azure Maps 帐户时,Gen1 定价层不再可用。

如果更改 Azure Maps 帐户的定价层,无需生成新的订阅密钥、客户端 ID(对于 Microsoft Entra 身份验证)或共享访问签名 (SAS) 令牌。

有关 Gen2 定价层的详细信息,请参阅 Azure Maps 定价

更改定价层

Azure 门户

若要在 Azure 门户中将定价层从“Gen1”更改为“Gen2”,请导航到 Azure Maps 帐户“设置”菜单中的“定价层”选项。 从“定价层”下拉列表中选择“Gen2”,然后选择“保存”按钮。

注意

如果更改 Azure Maps 帐户的定价层,无需生成新的订阅密钥、客户端 ID(对于 Microsoft Entra 身份验证)或共享访问签名 (SAS) 令牌。

Change a pricing tier

ARM 模板

若要在 ARM 模板中将定价层从“Gen1”更改为“Gen2”,请将 pricingTier 更新为“G2”,将 kind 更新为“Gen2”。 有关使用 ARM 模板的详细信息,请参阅 使用 ARM 模板创建帐户

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "metadata": {
    "_generator": {
      "name": "bicep",
      "version": "0.25.53.49325",
      "templateHash": "695164742048978243"
    }
  },
  "parameters": {
    "accountName": {
      "type": "string",
      "defaultValue": "[uniqueString(resourceGroup().id)]",
      "metadata": {
        "description": "The name for your Azure Maps account. This value must be globally unique."
      }
    },
    "location": {
      "type": "string",
      "allowedValues": [
        "westeurope",
        "eastus",
        "westus2",
        "northeurope",
        "westcentralus",
        "usgovvirginia",
        "usgovarizona"
      ],
      "metadata": {
        "description": "Specifies the location for all the resources."
      }
    },
    "pricingTier": {
      "type": "string",
      "defaultValue": "G2",
      "allowedValues": [
        "G2"
      ],
      "metadata": {
        "description": "The pricing tier SKU for the account."
      }
    },
    "kind": {
      "type": "string",
      "defaultValue": "Gen2",
      "allowedValues": [
        "Gen2"
      ],
      "metadata": {
        "description": "The pricing tier for the account."
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.Maps/accounts",
      "apiVersion": "2023-06-01",
      "name": "[parameters('accountName')]",
      "location": "[parameters('location')]",
      "sku": {
        "name": "[parameters('pricingTier')]"
      },
      "kind": "[parameters('kind')]"
    }
  ]
}

后续步骤

了解如何查看 Azure Maps 帐户的 API 使用情况指标: