你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Update-AzFrontDoorCdnProfileSku
将配置文件从Standard_AzureFrontDoor升级到Premium_AzureFrontDoor。
语法
Update-AzFrontDoorCdnProfileSku
-ProfileName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-ProfileUpgradeParameter <IProfileUpgradeParameters>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
将配置文件从Standard_AzureFrontDoor升级到Premium_AzureFrontDoor。
示例
示例 1:当配置文件未与 WAF 策略关联时。
$nullUpgradePara = @{}
Update-AzFrontDoorCdnProfileSku -ProfileName profileName -ResourceGroupName rgName -ProfileUpgradeParameter $nullUpgradePara
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global profileName frontdoor rgName
当配置文件未与 WAF 策略关联时。 将配置文件从Standard_AzureFrontDoor升级到Premium_AzureFrontDoor。
示例 2:当与 WAF 关联的 CDN 配置文件并复制到新的 waf 策略时...
$waf = New-AzFrontDoorCdnProfileChangeSkuWafMappingObject -SecurityPolicyName waf -ChangeToWafPolicyId /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourcegroups/rgName/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/newWAFName
$upgrade = New-AzFrontDoorCdnProfileUpgradeParametersObject -WafMappingList $waf
Update-AzFrontDoorCdnProfileSku -ProfileName profileName -ResourceGroupName rgName -ProfileUpgradeParameter $upgrade
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global profileName frontdoor rgName
当与 WAF 关联的 CDN 配置文件并复制到新的 WAF 策略时,新 WAF 策略的订阅和资源组应与配置文件的订阅和资源组相同。 将配置文件从Standard_AzureFrontDoor升级到Premium_AzureFrontDoor。
示例 2:与 WAF 关联的 CDN 配置文件并选择一个令人发泄的 WAF 策略...
$waf1 = New-AzFrontDoorCdnProfileChangeSkuWafMappingObject -SecurityPolicyName waf1 -ChangeToWafPolicyId /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourcegroups/rgtest01/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/existingWAFName1
$waf2 = New-AzFrontDoorCdnProfileChangeSkuWafMappingObject -SecurityPolicyName waf2 -ChangeToWafPolicyId /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourcegroups/rgtest02/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/existingWAFName2
$upgrade = New-AzFrontDoorCdnProfileUpgradeParametersObject -WafMappingList @($waf1, $waf2)
Update-AzFrontDoorCdnProfileSku -ProfileName profileName -ResourceGroupName rgName -ProfileUpgradeParameter $upgrade
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global profileName frontdoor rgName
当与 WAF 关联的 CDN 配置文件并选择一个 exsting WAF 策略时,只能选择与配置文件位于同一订阅中的 WAF 策略。 将配置文件从Standard_AzureFrontDoor升级到Premium_AzureFrontDoor。
示例 4:与 WAF 关联的 CDN 配置文件,当配置文件的订阅不同于本地子创建时
$waf = New-AzFrontDoorCdnProfileChangeSkuWafMappingObject -SecurityPolicyName waf -ChangeToWafPolicyId /subscriptions/testSubId01/resourcegroups/rgtest01/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/ExistingPremiumWAFName
$upgrade = New-AzFrontDoorCdnProfileUpgradeParametersObject -WafMappingList $waf
Update-AzFrontDoorCdnProfileSku -ProfileName profileName -ResourceGroupName rgName -ProfileUpgradeParameter $upgrade -SubscriptionId testSubId01
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global profileName frontdoor rgName
与 WAF 关联的 CDN 配置文件,当配置文件的订阅不同于本地子创建时。
参数
-AsJob
以作业身份运行命令
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | PSObject |
别名: | AzureRMContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-NoWait
异步运行命令
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ProfileName
在资源组中唯一的 Azure Front Door 标准版或 Azure Front Door Premium 的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ProfileUpgradeParameter
配置文件升级所需的参数。 若要构造,请参阅 PROFILEUPGRADEPARAMETER 属性的 NOTES 部分,并创建哈希表。
类型: | IProfileUpgradeParameters |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
Azure 订阅中的资源组的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
Azure 订阅 ID。
类型: | String |
Position: | Named |
默认值: | (Get-AzContext).Subscription.Id |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |