共用方式為


快速入門:建立伺服器 - ARM 範本

本快速入門說明如何使用 Azure Resource Manager 範本 (ARM 範本) 在 Azure 訂用帳戶中建立 Analysis Services 伺服器資源。

Azure Resource Manager 範本是一個 JavaScript 物件標記法 (JSON) 檔案,會定義專案的基礎結構和設定。 範本使用宣告式語法。 您可以描述預期的部署,而不需要撰寫程式設計命令順序來建立部署。

如果您的環境符合必要條件,而且您很熟悉 ARM 範本,請選取 [部署至 Azure] 按鈕。 範本會在 Azure 入口網站中開啟。

將 Resource Manager 範本部署至 Azure 的按鈕。

必要條件

  • Azure 訂用帳戶︰瀏覽 Azure 免費試用建立帳戶。
  • Microsoft Entra ID:您的訂用帳戶必須與 Microsoft Entra 租用戶相關聯。 而且,您必須使用該 Microsoft Entra ID 中的帳戶來登入 Azure。 若要深入了解,請參閱驗證和使用者權限

檢閱範本

本快速入門中使用的範本是來自 Azure 範本

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "metadata": {
    "_generator": {
      "name": "bicep",
      "version": "0.5.6.12127",
      "templateHash": "17179487501489240263"
    }
  },
  "parameters": {
    "serverName": {
      "type": "string",
      "metadata": {
        "description": "The name of the Azure Analysis Services server to create. Server name must begin with a letter, be lowercase alphanumeric, and between 3 and 63 characters in length. Server name must be unique per region."
      }
    },
    "location": {
      "type": "string",
      "defaultValue": "[resourceGroup().location]",
      "metadata": {
        "description": "Location of the Azure Analysis Services server. For supported regions, see https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region"
      }
    },
    "skuName": {
      "type": "string",
      "defaultValue": "S0",
      "metadata": {
        "description": "The sku name of the Azure Analysis Services server to create. Choose from: B1, B2, D1, S0, S1, S2, S3, S4, S8, S9. Some skus are region specific. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region"
      }
    },
    "capacity": {
      "type": "int",
      "defaultValue": 1,
      "metadata": {
        "description": "The total number of query replica scale-out instances. Scale-out of more than one instance is supported on selected regions only. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region"
      }
    },
    "firewallSettings": {
      "type": "object",
      "defaultValue": {
        "firewallRules": [
          {
            "firewallRuleName": "AllowFromAll",
            "rangeStart": "0.0.0.0",
            "rangeEnd": "255.255.255.255"
          }
        ],
        "enablePowerBIService": true
      },
      "metadata": {
        "description": "The inbound firewall rules to define on the server. If not specified, firewall is disabled."
      }
    },
    "backupBlobContainerUri": {
      "type": "string",
      "defaultValue": "",
      "metadata": {
        "description": "The SAS URI to a private Azure Blob Storage container with read, write and list permissions. Required only if you intend to use the backup/restore functionality. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-backup"
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.AnalysisServices/servers",
      "apiVersion": "2017-08-01",
      "name": "[parameters('serverName')]",
      "location": "[parameters('location')]",
      "sku": {
        "name": "[parameters('skuName')]",
        "capacity": "[parameters('capacity')]"
      },
      "properties": {
        "ipV4FirewallSettings": "[parameters('firewallSettings')]",
        "backupBlobContainerUri": "[parameters('backupBlobContainerUri')]"
      }
    }
  ]
}

具有防火牆規則的單一 Microsoft.analysisservices/servers 資源會在範本中定義。

部署範本

  1. 選取以下部署至 Azure 連結來登入 Azure 並開啟範本。 此範本是用來建立 Analysis Services 伺服器資源,並指定必要和選用的屬性。

    將 Resource Manager 範本部署至 Azure 的按鈕。

  2. 選取或輸入下列值。

    除非另有指定,否則請使用預設值。

    • 訂用帳戶:選取 Azure 訂用帳戶。
    • 資源群組:按一下 [新建],然後輸入新資源群組的唯一名稱。
    • 位置:選取資源群組中建立之資源的預設位置。
    • 伺服器名稱:輸入伺服器資源的名稱。
    • 位置:忽略 Analysis Services。 位置是在「伺服器位置」中指定。
    • 伺服器位置:輸入 Analysis Services 伺服器的位置。 這通常與為資源群組指定的預設位置相同,但不是必填項目。 例如美國中北部。 如需支援的區域,請參閱依區域的 Analysis Services 可用性
    • SKU 名稱:輸入要建立 Analysis Services 伺服器的 SKU 名稱。 選擇:B1、B2、D1、S0、S1、S2、S3、S4、S8v2、S9v2。 SKU 功能是否可用取決於區域。 建議使用 S0 或 D1 進行評估和測試。
    • 容量:輸入查詢複本擴增執行個體的總數。 只有選取的區域支援多個執行個體的擴增。
    • 防火牆設定:輸入要為伺服器定義的傳入防火牆規則。 如果未指定,則會停用防火牆。
    • 備份 Blob 容器 URI:輸入具有讀取、寫入和列出權限的私人 Azure Blob 儲存體容器的 SAS URI。 只有當您要使用備份/還原時才需要輸入。
    • 我同意上方所述的條款及條件:選取。
  3. 選取 [購買] 。 成功部署伺服器之後,您會收到通知:

    ARM 範本,部署入口網站通知

驗證部署

使用 Azure 入口網站或 Azure PowerShell 來確認已建立資源群組和伺服器資源。

PowerShell

$resourceGroupName = Read-Host -Prompt "Enter the Resource Group name"
(Get-AzResource -ResourceType "Microsoft.AnalysisServices/servers" -ResourceGroupName $resourceGroupName).Name
 Write-Host "Press [ENTER] to continue..."

清除資源

不再需要時,請使用 Azure 入口網站、Azure CLI 或 Azure PowerShell 來刪除資源群組和伺服器資源。

echo "Enter the Resource Group name:" &&
read resourceGroupName &&
az group delete --name $resourceGroupName &&
echo "Press [ENTER] to continue ..."

下一步

在本快速入門中,您已使用 ARM 範本來建立新的資源群組和 Azure Analysis Services 伺服器資源。 使用範本建立伺服器資源之後,請考慮下列事項: