你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Update-AzFrontDoorCdnProfile
使用指定的订阅和资源组下的指定配置文件名称更新现有的 Azure Front Door Standard 或 Azure Front Door Premium 或 CDN 配置文件。
语法
Update-AzFrontDoorCdnProfile
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-LogScrubbingRule <IProfileScrubbingRules[]>]
[-LogScrubbingState <ProfileScrubbingState>]
[-OriginResponseTimeoutSecond <Int32>]
[-Tag <Hashtable>]
[-IdentityType <ManagedServiceIdentityType>]
[-IdentityUserAssignedIdentity <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzFrontDoorCdnProfile
-InputObject <ICdnIdentity>
[-LogScrubbingRule <IProfileScrubbingRules[]>]
[-LogScrubbingState <ProfileScrubbingState>]
[-OriginResponseTimeoutSecond <Int32>]
[-Tag <Hashtable>]
[-IdentityType <ManagedServiceIdentityType>]
[-IdentityUserAssignedIdentity <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
使用指定的订阅和资源组下的指定配置文件名称更新现有的 Azure Front Door Standard 或 Azure Front Door Premium 或 CDN 配置文件。
示例
示例 1:更新资源组下的 AzureFrontDoor 配置文件
$tags = @{
Tag1 = 11
Tag2 = 22
}
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -Tag $tags
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
更新资源组下的 AzureFrontDoor 配置文件
示例 2:通过标识更新资源组下的 AzureFrontDoor 配置文件
$tags = @{
Tag1 = 11
Tag2 = 22
}
Get-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 | Update-AzFrontDoorCdnProfile -Tag $tags
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
通过标识更新资源组下的 AzureFrontDoor 配置文件
示例 3:使用 SystemAssigned 类型对 AzureFrontDoor 配置文件启用托管标识
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -IdentityType SystemAssigned
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
使用 SystemAssigned 类型对 AzureFrontDoor 配置文件启用托管标识
示例 4:使用 UserAssigned 类型对 AzureFrontDoor 配置文件启用托管标识
$userId = @{"/subscriptions/subId/resourceGroups/testps-rg-da16jm/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testcdnrpaadidentity" = @{}}
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -IdentityType UserAssigned -IdentityUserAssignedIdentity $userId
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
使用 UserAssigned 类型对 AzureFrontDoor 配置文件启用托管标识
示例 5:将 Profile Logscrub 启用到 AzureFrontDoor 配置文件,仅包含一个 LogScrubbingRule
$rule = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -LogScrubbingRule $rule -LogScrubbingState Enabled
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
将 Profile Logscrub 启用到 AzureFrontDoor 配置文件,仅包含一个 LogScrubbingRule
示例 6:将 Profile Logscrub 启用到 AzureFrontDoor 配置文件,其中包含多个 LogScrubbingRule
$rule1 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Enabled
$rule2 = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable QueryStringArgNames -State Enabled
$rules = New-AzFrontDoorCdnProfileLogScrubbingObject -ScrubbingRule @($rule1, $rule2) -State Enabled
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -LogScrubbingRule $rules.ScrubbingRule -LogScrubbingState Enabled
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
将 Profile Logscrub 启用到 AzureFrontDoor 配置文件,其中包含多个 LogScrubbingRule
示例 7:将 Profile Logscrub 禁用到 AzureFrontDoor 配置文件
$rule = New-AzFrontDoorCdnProfileScrubbingRulesObject -MatchVariable RequestIPAddress -State Disabled
Update-AzFrontDoorCdnProfile -ResourceGroupName testps-rg-da16jm -Name fdp-v542q6 -LogScrubbingRule $rule -LogScrubbingState Disabled
Location Name Kind ResourceGroupName
-------- ---- ---- -----------------
Global fdp-v542q6 frontdoor testps-rg-da16jm
将 Profile Logscrub 禁用到 AzureFrontDoor 配置文件
参数
-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 |
-IdentityType
托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。
类型: | ManagedServiceIdentityType |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-IdentityUserAssignedIdentity
与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。
类型: | Hashtable |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
要构造的标识参数,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。
类型: | ICdnIdentity |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-LogScrubbingRule
应用于 Azure Front Door 配置文件日志的日志清理规则列表。 若要构造,请参阅 LOGSCRUBBINGRULE 属性的 NOTES 部分并创建哈希表。
类型: | IProfileScrubbingRules[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-LogScrubbingState
日志清理配置的状态。默认值为“已启用”。
类型: | ProfileScrubbingState |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
Azure Front Door Standard 或 Azure Front Door Premium 或 CDN 配置文件的名称,该配置文件在资源组中是唯一的。
类型: | String |
别名: | ProfileName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-NoWait
异步运行命令
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-OriginResponseTimeoutSecond
向源转发请求时发送和接收超时。 达到超时时,请求会失败并返回。
类型: | Int32 |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
Azure 订阅中的资源组的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
Azure 订阅 ID。
类型: | String |
Position: | Named |
默认值: | (Get-AzContext).Subscription.Id |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Tag
配置文件标记
类型: | Hashtable |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |