Get-AzFrontDoorCdnSecurityPolicy
语法
List (默认值)
Get-AzFrontDoorCdnSecurityPolicy
-ProfileName <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
GetViaIdentityProfile
Get-AzFrontDoorCdnSecurityPolicy
-Name <String>
-ProfileInputObject <ICdnIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get
Get-AzFrontDoorCdnSecurityPolicy
-Name <String>
-ProfileName <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
GetViaIdentity
Get-AzFrontDoorCdnSecurityPolicy
-InputObject <ICdnIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
说明
示例
示例 1:列出指定 AzureFrontDoor 配置文件中的 AzureFrontDoor 安全策略
Get-AzFrontDoorCdnSecurityPolicy -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6
Name ResourceGroupName
---- -----------------
policy001 testps-rg-da16jm
列出指定 AzureFrontDoor 配置文件中的 AzureFrontDoor 安全策略
示例 2:在指定的 AzureFrontDoor 配置文件中获取 AzureFrontDoor 安全策略
Get-AzFrontDoorCdnSecurityPolicy -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -Name policy001
Name ResourceGroupName
---- -----------------
policy001 testps-rg-da16jm
在指定的 AzureFrontDoor 配置文件中获取 AzureFrontDoor 安全策略
示例 3:通过标识在指定的 AzureFrontDoor 配置文件中获取 AzureFrontDoor 安全策略
$endpoint = Get-AzFrontDoorCdnEndpoint -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -EndpointName end001
$endpoint2 = Get-AzFrontDoorCdnEndpoint -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -EndpointName end002
$updateAssociation = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)})
$updateAssociation2 = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint2.Id)})
$wafPolicyId = "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourcegroups/rgName01/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/waf01"
$updateWafParameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association @($updateAssociation, $updateAssociation2) -WafPolicyId $wafPolicyId
Update-AzFrontDoorCdnSecurityPolicy -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -Name policy001 -Parameter $updateWafParameter | Get-AzFrontDoorCdnSecurityPolicy
Name ResourceGroupName
---- -----------------
policy001 testps-rg-da16jm
通过标识获取指定 AzureFrontDoor 配置文件中的 AzureFrontDoor 安全策略
参数
-DefaultProfile
DefaultProfile 参数不起作用。
如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
参数属性
| 类型: | PSObject
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | AzureRMContext, AzureCredential |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
标识参数
GetViaIdentity
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Name
配置文件下的安全策略的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | SecurityPolicyName |
参数集
GetViaIdentityProfile
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
Get
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
标识参数
GetViaIdentityProfile
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ProfileName
在资源组中唯一的 Azure Front Door 标准版或 Azure Front Door Premium 的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
List
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
Get
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ResourceGroupName
Azure 订阅中的资源组的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
List
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
Get
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-SubscriptionId
Azure 订阅 ID。
参数属性
| 类型: | String[]
|
| 默认值: | (Get-AzContext).Subscription.Id |
| 支持通配符: | False |
| 不显示: | False |
参数集
List
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
Get
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输出