使用 Azure PowerShell 从 Azure Front Door 标准层升级到高级层

Applies to: ✔️ Front Door Standard

Azure Front Door 允许从标准版升级到高级版,以获得增强功能并提高配额上限。 此升级不会导致服务或应用程序中断。 For more information on the differences between Standard and Premium, see Tier comparison.

本指南介绍如何将 Azure Front Door 标准版配置文件升级到高级版。 升级后,将按小时费率向你收取 Azure Front Door 高级版每月基本费用。

Important

Downgrading from Premium to Standard is not supported.

Prerequisites

  • 确保你的订阅中拥有 Azure Front Door 标准版配置文件。
  • 在本地安装最新的 Azure PowerShell 模块。 有关详细信息,请参阅安装和配置 Azure PowerShell

Upgrade Tier

Run the Update-AzFrontDoorCdnProfile command to upgrade your Azure Front Door Standard profile to Premium. The following example upgrades a profile named myAzureFrontDoor in the resource group myAFDResourceGroup.

未关联任何 WAF 策略

Update-AzFrontDoorCdnProfile -ProfileName myAzureFrontDoor -ResourceGroupName myAFDResourceGroup -ProfileUpgradeParameter @{}

Example output:

Location Name              Kind      ResourceGroupName
-------- ----              ----      -----------------
Global   myAzureFrontDoor  frontdoor myAFDResourceGroup

已关联 WAF 策略

  1. Run the New-AzFrontDoorCdnProfileChangeSkuWafMappingObject command to create a WAF policy mapping object. 此命令会将标准版 WAF 策略映射到高级版 WAF 策略资源 ID。 将 WafPolicyId 值替换为高级版 WAF 策略的资源 ID。 如果是创建新策略,请将 premiumWAFPolicyName 替换为新的高级版 WAF 策略的名称。 This example creates two premium WAF policies named myPremiumWAFPolicy1 and myPremiumWAFPolicy2.

    # Replace the following values:
    # <subscriptionId>: Your subscription ID.
    # <resourceGroupName>: The resource group name of the WAF policy.
    # <standardWAFPolicyName>: The name of the standard WAF policy.
    
    $waf1 = New-AzFrontDoorCdnProfileChangeSkuWafMappingObject SecurityPolicyName <standardWAFPolicyName> -WafPolicyId /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/myPremiumWAFPolicy1
    
    $waf2 = New-AzFrontDoorCdnProfileChangeSkuWafMappingObject SecurityPolicyName <standardWAFPolicyName> -WafPolicyId /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/myPremiumWAFPolicy2
    
  2. Run the New-AzFrontDoorCdnProfileUpgradeParametersObject command to create an upgrade parameters object.

    $upgradeParams = New-AzFrontDoorCdnProfileUpgradeParametersObject -WafPolicyMapping @{$waf1, $waf2}
    
  3. Run the Update-AzFrontDoorCdnProfile command to upgrade your Azure Front Door Standard profile to Premium. The following example upgrades a profile named myAzureFrontDoor in the resource group myAFDResourceGroup.

    Update-AzFrontDoorCdnProfile -ProfileName myAzureFrontDoor -ResourceGroupName myAFDResourceGroup -ProfileUpgradeParameter $upgradeParams
    

    Example output:

    Location Name              Kind      ResourceGroupName
    -------- ----              ----      -----------------
    Global   myAzureFrontDoor  frontdoor myAFDResourceGroup
    

Note

现在,Azure Front Door 高级版将按每小时费率计费。

Next Steps