你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzNetworkManagerSecurityAdminRule
更新网络管理器安全管理规则。
语法
Set-AzNetworkManagerSecurityAdminRule
-InputObject <PSNetworkManagerSecurityBaseAdminRule>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Set-AzNetworkManagerSecurityAdminRule cmdlet 更新网络管理器安全管理规则。
示例
示例 1
$SecurityAdminRule = Get-AzNetworkManagerSecurityAdminRule -Name "psRule" -RuleCollectionName "psRuleCollection" -SecurityAdminConfigurationName "psSecurityAdminConfig" -NetworkManagerName "psNetworkManager" -ResourceGroupName "psResourceGroup"
$SecurityAdminRule.priority = 50
Set-AzNetworkManagerSecurityAdminRule -InputObject $SecurityAdminRule
Protocol : Tcp
Direction : Inbound
Sources : {Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerAddressPrefixItem}
Destinations : {Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerAddressPrefixItem}
SourcePortRanges : {100}
DestinationPortRanges : {99}
Access : Allow
Priority : 50
SourcesText : [
{
"AddressPrefix": "Internet",
"AddressPrefixType": "ServiceTag"
}
]
DestinationsText : [
{
"AddressPrefix": "10.0.0.1",
"AddressPrefixType": "IPPrefix"
}
]
SourcePortRangesText : [
"100"
]
DestinationPortRangesText : [
"99"
]
DisplayName :
Description : TestDescription
Type : Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules
ProvisioningState : Succeeded
SystemData : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSSystemData
SystemDataText : {
"CreatedBy": "jaredgorthy@microsoft.com",
"CreatedByType": "User",
"CreatedAt": "2022-08-08T00:39:56.4512419Z",
"LastModifiedBy": "jaredgorthy@microsoft.com",
"LastModifiedByType": "User",
"LastModifiedAt": "2022-08-08T01:23:18.6454664Z"
}
Name : psRule
Etag :
Id : /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/securityAdminConfigurations/psSecurityAdminConfig/ruleCollections/psRuleCollection/rules/psRule
更新网络管理器安全管理规则的优先级”。
参数
-AsJob
在后台运行 cmdlet
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Confirm
提示你在运行 cmdlet 之前进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
网络管理器安全管理规则
类型: | PSNetworkManagerSecurityBaseAdminRule |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-WhatIf
显示运行该 cmdlet 时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
输入
PSNetworkManagerSecurityBaseAdminRule
输出
PSNetworkManagerSecurityBaseAdminRule